From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../suggestions/derive-macro-missing-bounds.stderr | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 tests/ui/suggestions/derive-macro-missing-bounds.stderr (limited to 'tests/ui/suggestions/derive-macro-missing-bounds.stderr') diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.stderr b/tests/ui/suggestions/derive-macro-missing-bounds.stderr new file mode 100644 index 000000000..79036279d --- /dev/null +++ b/tests/ui/suggestions/derive-macro-missing-bounds.stderr @@ -0,0 +1,113 @@ +error[E0277]: `a::Inner` doesn't implement `Debug` + --> $DIR/derive-macro-missing-bounds.rs:12:21 + | +LL | #[derive(Debug)] + | ----- in this derive macro expansion +LL | struct Outer(Inner); + | ^^^^^^^^ `a::Inner` cannot be formatted using `{:?}` + | + = help: the trait `Debug` is not implemented for `a::Inner` + = note: add `#[derive(Debug)]` to `a::Inner` or manually `impl Debug for a::Inner` + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider annotating `a::Inner` with `#[derive(Debug)]` + | +LL | #[derive(Debug)] + | +help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement + | +LL | struct Outer(Inner) where a::Inner: Debug; + | ++++++++++++++++++++++++ + +error[E0277]: the trait bound `T: c::Trait` is not satisfied + --> $DIR/derive-macro-missing-bounds.rs:41:21 + | +LL | #[derive(Debug)] + | ----- in this derive macro expansion +LL | struct Outer(Inner); + | ^^^^^^^^ the trait `c::Trait` is not implemented for `T` + | +note: required for `c::Inner` to implement `Debug` + --> $DIR/derive-macro-missing-bounds.rs:34:28 + | +LL | impl Debug for Inner { + | ----- ^^^^^ ^^^^^^^^ + | | + | unsatisfied trait bound introduced here + = note: 1 redundant requirement hidden + = note: required for `&c::Inner` to implement `Debug` + = note: required for the cast from `&c::Inner` to the object type `dyn Debug` + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider restricting type parameter `T` + | +LL | struct Outer(Inner); + | ++++++++++ + +error[E0277]: the trait bound `T: d::Trait` is not satisfied + --> $DIR/derive-macro-missing-bounds.rs:56:21 + | +LL | #[derive(Debug)] + | ----- in this derive macro expansion +LL | struct Outer(Inner); + | ^^^^^^^^ the trait `d::Trait` is not implemented for `T` + | +note: required for `d::Inner` to implement `Debug` + --> $DIR/derive-macro-missing-bounds.rs:49:13 + | +LL | impl Debug for Inner where T: Debug, T: Trait { + | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here + = note: 1 redundant requirement hidden + = note: required for `&d::Inner` to implement `Debug` + = note: required for the cast from `&d::Inner` to the object type `dyn Debug` + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider restricting type parameter `T` + | +LL | struct Outer(Inner); + | ++++++++++ + +error[E0277]: the trait bound `T: e::Trait` is not satisfied + --> $DIR/derive-macro-missing-bounds.rs:71:21 + | +LL | #[derive(Debug)] + | ----- in this derive macro expansion +LL | struct Outer(Inner); + | ^^^^^^^^ the trait `e::Trait` is not implemented for `T` + | +note: required for `e::Inner` to implement `Debug` + --> $DIR/derive-macro-missing-bounds.rs:64:13 + | +LL | impl Debug for Inner where T: Debug + Trait { + | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here + = note: 1 redundant requirement hidden + = note: required for `&e::Inner` to implement `Debug` + = note: required for the cast from `&e::Inner` to the object type `dyn Debug` + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider restricting type parameter `T` + | +LL | struct Outer(Inner); + | ++++++++++ + +error[E0277]: the trait bound `T: f::Trait` is not satisfied + --> $DIR/derive-macro-missing-bounds.rs:86:21 + | +LL | #[derive(Debug)] + | ----- in this derive macro expansion +LL | struct Outer(Inner); + | ^^^^^^^^ the trait `f::Trait` is not implemented for `T` + | +note: required for `f::Inner` to implement `Debug` + --> $DIR/derive-macro-missing-bounds.rs:79:20 + | +LL | impl Debug for Inner where T: Trait { + | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here + = note: 1 redundant requirement hidden + = note: required for `&f::Inner` to implement `Debug` + = note: required for the cast from `&f::Inner` to the object type `dyn Debug` + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider restricting type parameter `T` + | +LL | struct Outer(Inner); + | ++++++++++ + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3