Skip to content

Commit 20ea5fe

Browse files
committedJun 22, 2021
Change Debug unimplemented message per request
1 parent c1d636a commit 20ea5fe

7 files changed

+7
-7
lines changed
 

‎library/core/src/fmt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ impl Display for Arguments<'_> {
564564
on(
565565
crate_local,
566566
label = "`{Self}` cannot be formatted using `{{:?}}`",
567-
note = "add `#[derive(Debug)]` to `{Self}` or manually implement `{Debug}` for `{Self}`"
567+
note = "add `#[derive(Debug)]` to `{Self}` or manually `impl {Debug} for {Self}`"
568568
),
569569
message = "`{Self}` doesn't implement `{Debug}`",
570570
label = "`{Self}` cannot be formatted using `{{:?}}` because it doesn't implement `{Debug}`"

‎src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | x: Error
55
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `Error`
8-
= note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
8+
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
99
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error: aborting due to previous error

‎src/test/ui/derives/derives-span-Debug-enum.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | Error
55
| ^^^^^ `Error` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `Error`
8-
= note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
8+
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
99
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error: aborting due to previous error

‎src/test/ui/derives/derives-span-Debug-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | x: Error
55
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `Error`
8-
= note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
8+
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
99
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error: aborting due to previous error

‎src/test/ui/derives/derives-span-Debug-tuple-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | Error
55
| ^^^^^ `Error` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `Error`
8-
= note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
8+
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
99
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error: aborting due to previous error

‎src/test/ui/on-unimplemented/no-debug.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | println!("{:?} {:?}", Foo, Bar);
55
| ^^^ `Foo` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `Foo`
8-
= note: add `#[derive(Debug)]` to `Foo` or manually implement `Debug` for `Foo`
8+
= note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
99
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error[E0277]: `Bar` doesn't implement `Debug`

‎src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let _: NotDebug = dbg!(NotDebug);
55
| ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}`
66
|
77
= help: the trait `Debug` is not implemented for `NotDebug`
8-
= note: add `#[derive(Debug)]` to `NotDebug` or manually implement `Debug` for `NotDebug`
8+
= note: add `#[derive(Debug)]` to `NotDebug` or manually `impl Debug for NotDebug`
99
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
1010

1111
error: aborting due to previous error

0 commit comments

Comments
 (0)
Please sign in to comment.