about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAris Merchant <22333129+inquisitivecrystal@users.noreply.github.com>2021-06-22 00:38:31 -0700
committerAris Merchant <22333129+inquisitivecrystal@users.noreply.github.com>2021-06-22 00:38:31 -0700
commit20ea5fedeab3834b2b2579c11c63e8b696de49ea (patch)
tree47dd04915ac2cdd9eef1745d7862dcb2b4c04af1
parentc1d636ad8a9044ff0494f3a1f2792a535b620fca (diff)
downloadrust-20ea5fedeab3834b2b2579c11c63e8b696de49ea.tar.gz
rust-20ea5fedeab3834b2b2579c11c63e8b696de49ea.zip
Change Debug unimplemented message per request
-rw-r--r--library/core/src/fmt/mod.rs2
-rw-r--r--src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr2
-rw-r--r--src/test/ui/derives/derives-span-Debug-enum.stderr2
-rw-r--r--src/test/ui/derives/derives-span-Debug-struct.stderr2
-rw-r--r--src/test/ui/derives/derives-span-Debug-tuple-struct.stderr2
-rw-r--r--src/test/ui/on-unimplemented/no-debug.stderr2
-rw-r--r--src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr2
7 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs
index 1a65bf35897..409a84367a7 100644
--- a/library/core/src/fmt/mod.rs
+++ b/library/core/src/fmt/mod.rs
@@ -564,7 +564,7 @@ impl Display for Arguments<'_> {
     on(
         crate_local,
         label = "`{Self}` cannot be formatted using `{{:?}}`",
-        note = "add `#[derive(Debug)]` to `{Self}` or manually implement `{Debug}` for `{Self}`"
+        note = "add `#[derive(Debug)]` to `{Self}` or manually `impl {Debug} for {Self}`"
     ),
     message = "`{Self}` doesn't implement `{Debug}`",
     label = "`{Self}` cannot be formatted using `{{:?}}` because it doesn't implement `{Debug}`"
diff --git a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr
index dc63ec7fe6f..4ec89fe729f 100644
--- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr
+++ b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr
@@ -5,7 +5,7 @@ LL |      x: Error
    |      ^^^^^^^^ `Error` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `Error`
-   = note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
+   = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/derives/derives-span-Debug-enum.stderr b/src/test/ui/derives/derives-span-Debug-enum.stderr
index 5a791eb6be4..d564b6ad76b 100644
--- a/src/test/ui/derives/derives-span-Debug-enum.stderr
+++ b/src/test/ui/derives/derives-span-Debug-enum.stderr
@@ -5,7 +5,7 @@ LL |      Error
    |      ^^^^^ `Error` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `Error`
-   = note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
+   = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/derives/derives-span-Debug-struct.stderr b/src/test/ui/derives/derives-span-Debug-struct.stderr
index 017bddaa633..352141c7e33 100644
--- a/src/test/ui/derives/derives-span-Debug-struct.stderr
+++ b/src/test/ui/derives/derives-span-Debug-struct.stderr
@@ -5,7 +5,7 @@ LL |     x: Error
    |     ^^^^^^^^ `Error` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `Error`
-   = note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
+   = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr
index 864785f2c21..65765490183 100644
--- a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr
+++ b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr
@@ -5,7 +5,7 @@ LL |     Error
    |     ^^^^^ `Error` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `Error`
-   = note: add `#[derive(Debug)]` to `Error` or manually implement `Debug` for `Error`
+   = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr
index 0d954410620..b17c1d4c252 100644
--- a/src/test/ui/on-unimplemented/no-debug.stderr
+++ b/src/test/ui/on-unimplemented/no-debug.stderr
@@ -5,7 +5,7 @@ LL |     println!("{:?} {:?}", Foo, Bar);
    |                           ^^^ `Foo` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `Foo`
-   = note: add `#[derive(Debug)]` to `Foo` or manually implement `Debug` for `Foo`
+   = note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
    = note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: `Bar` doesn't implement `Debug`
diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
index 8f9e323e903..3cdab6541e7 100644
--- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
+++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
@@ -5,7 +5,7 @@ LL |     let _: NotDebug = dbg!(NotDebug);
    |                       ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}`
    |
    = help: the trait `Debug` is not implemented for `NotDebug`
-   = note: add `#[derive(Debug)]` to `NotDebug` or manually implement `Debug` for `NotDebug`
+   = note: add `#[derive(Debug)]` to `NotDebug` or manually `impl Debug for NotDebug`
    = note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error