We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efcc1d1 commit d3efb2bCopy full SHA for d3efb2b
src/libcore/fmt/mod.rs
@@ -269,6 +269,22 @@ impl<'a> Display for Arguments<'a> {
269
270
/// Format trait for the `:?` format. Useful for debugging, all types
271
/// should implement this.
272
+///
273
+/// Generally speaking, you should just `derive` a `Debug` implementation.
274
275
+/// # Examples
276
277
+/// ```
278
+/// #[derive(Debug)]
279
+/// struct Point {
280
+/// x: i32,
281
+/// y: i32,
282
+/// }
283
284
+/// let origin = Point { x: 0, y: 0 };
285
286
+/// println!("The origin is: {:?}", origin);
287
288
#[stable(feature = "rust1", since = "1.0.0")]
289
#[rustc_on_unimplemented = "`{Self}` cannot be formatted using `:?`; if it is \
290
defined in your crate, add `#[derive(Debug)]` or \
0 commit comments