From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../derive-on-trait-item-or-impl-item.stderr | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/derives/derive-on-trait-item-or-impl-item.stderr (limited to 'tests/ui/derives/derive-on-trait-item-or-impl-item.stderr') diff --git a/tests/ui/derives/derive-on-trait-item-or-impl-item.stderr b/tests/ui/derives/derive-on-trait-item-or-impl-item.stderr new file mode 100644 index 000000000..1fd97bdd5 --- /dev/null +++ b/tests/ui/derives/derive-on-trait-item-or-impl-item.stderr @@ -0,0 +1,21 @@ +error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s + --> $DIR/derive-on-trait-item-or-impl-item.rs:2:5 + | +LL | #[derive(Clone)] + | ^^^^^^^^^^^^^^^^ not applicable here +LL | +LL | type Bar; + | --------- not a `struct`, `enum` or `union` + +error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s + --> $DIR/derive-on-trait-item-or-impl-item.rs:10:5 + | +LL | #[derive(Clone)] + | ^^^^^^^^^^^^^^^^ not applicable here +LL | +LL | fn bar(&self) {} + | ---------------- not a `struct`, `enum` or `union` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0774`. -- cgit v1.2.3