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 --- .../ui/derives/auxiliary/derive-marker-tricky.rs | 15 --- .../clone-debug-dead-code-in-the-same-struct.rs | 12 -- ...clone-debug-dead-code-in-the-same-struct.stderr | 24 ---- src/test/ui/derives/clone-debug-dead-code.rs | 45 -------- src/test/ui/derives/clone-debug-dead-code.stderr | 54 --------- .../ui/derives/derive-Debug-use-ufcs-struct.rs | 40 ------- src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs | 32 ------ src/test/ui/derives/derive-assoc-type-not-impl.rs | 19 ---- .../ui/derives/derive-assoc-type-not-impl.stderr | 34 ------ src/test/ui/derives/derive-deadlock.rs | 6 - src/test/ui/derives/derive-deadlock.stderr | 10 -- src/test/ui/derives/derive-hygiene.rs | 121 --------------------- src/test/ui/derives/derive-macro-const-default.rs | 11 -- src/test/ui/derives/derive-marker-tricky.rs | 16 --- src/test/ui/derives/derive-multiple-with-packed.rs | 10 -- .../derives/derive-on-trait-item-or-impl-item.rs | 15 --- .../derive-on-trait-item-or-impl-item.stderr | 21 ---- src/test/ui/derives/derive-partial-ord.rs | 60 ---------- src/test/ui/derives/derive-renamed.rs | 11 -- .../derives-span-Clone-enum-struct-variant.rs | 13 --- .../derives-span-Clone-enum-struct-variant.stderr | 18 --- src/test/ui/derives/derives-span-Clone-enum.rs | 13 --- src/test/ui/derives/derives-span-Clone-enum.stderr | 18 --- src/test/ui/derives/derives-span-Clone-struct.rs | 11 -- .../ui/derives/derives-span-Clone-struct.stderr | 18 --- .../ui/derives/derives-span-Clone-tuple-struct.rs | 11 -- .../derives/derives-span-Clone-tuple-struct.stderr | 18 --- .../derives-span-Debug-enum-struct-variant.rs | 13 --- .../derives-span-Debug-enum-struct-variant.stderr | 20 ---- src/test/ui/derives/derives-span-Debug-enum.rs | 13 --- src/test/ui/derives/derives-span-Debug-enum.stderr | 20 ---- src/test/ui/derives/derives-span-Debug-struct.rs | 11 -- .../ui/derives/derives-span-Debug-struct.stderr | 20 ---- .../ui/derives/derives-span-Debug-tuple-struct.rs | 11 -- .../derives/derives-span-Debug-tuple-struct.stderr | 20 ---- src/test/ui/derives/derives-span-Default-struct.rs | 11 -- .../ui/derives/derives-span-Default-struct.stderr | 18 --- .../derives/derives-span-Default-tuple-struct.rs | 11 -- .../derives-span-Default-tuple-struct.stderr | 18 --- .../derives/derives-span-Eq-enum-struct-variant.rs | 13 --- .../derives-span-Eq-enum-struct-variant.stderr | 23 ---- src/test/ui/derives/derives-span-Eq-enum.rs | 13 --- src/test/ui/derives/derives-span-Eq-enum.stderr | 23 ---- src/test/ui/derives/derives-span-Eq-struct.rs | 11 -- src/test/ui/derives/derives-span-Eq-struct.stderr | 23 ---- .../ui/derives/derives-span-Eq-tuple-struct.rs | 11 -- .../ui/derives/derives-span-Eq-tuple-struct.stderr | 23 ---- .../derives-span-Hash-enum-struct-variant.rs | 13 --- .../derives-span-Hash-enum-struct-variant.stderr | 18 --- src/test/ui/derives/derives-span-Hash-enum.rs | 12 -- src/test/ui/derives/derives-span-Hash-enum.stderr | 18 --- src/test/ui/derives/derives-span-Hash-struct.rs | 11 -- .../ui/derives/derives-span-Hash-struct.stderr | 18 --- .../ui/derives/derives-span-Hash-tuple-struct.rs | 11 -- .../derives/derives-span-Hash-tuple-struct.stderr | 18 --- .../derives-span-Ord-enum-struct-variant.rs | 13 --- .../derives-span-Ord-enum-struct-variant.stderr | 18 --- src/test/ui/derives/derives-span-Ord-enum.rs | 13 --- src/test/ui/derives/derives-span-Ord-enum.stderr | 18 --- src/test/ui/derives/derives-span-Ord-struct.rs | 11 -- src/test/ui/derives/derives-span-Ord-struct.stderr | 18 --- .../ui/derives/derives-span-Ord-tuple-struct.rs | 11 -- .../derives/derives-span-Ord-tuple-struct.stderr | 18 --- .../derives-span-PartialEq-enum-struct-variant.rs | 13 --- ...rives-span-PartialEq-enum-struct-variant.stderr | 23 ---- src/test/ui/derives/derives-span-PartialEq-enum.rs | 13 --- .../ui/derives/derives-span-PartialEq-enum.stderr | 23 ---- .../ui/derives/derives-span-PartialEq-struct.rs | 11 -- .../derives/derives-span-PartialEq-struct.stderr | 23 ---- .../derives/derives-span-PartialEq-tuple-struct.rs | 11 -- .../derives-span-PartialEq-tuple-struct.stderr | 23 ---- .../derives-span-PartialOrd-enum-struct-variant.rs | 13 --- ...ives-span-PartialOrd-enum-struct-variant.stderr | 19 ---- .../ui/derives/derives-span-PartialOrd-enum.rs | 13 --- .../ui/derives/derives-span-PartialOrd-enum.stderr | 19 ---- .../ui/derives/derives-span-PartialOrd-struct.rs | 11 -- .../derives/derives-span-PartialOrd-struct.stderr | 19 ---- .../derives-span-PartialOrd-tuple-struct.rs | 11 -- .../derives-span-PartialOrd-tuple-struct.stderr | 19 ---- src/test/ui/derives/deriving-bounds.rs | 11 -- src/test/ui/derives/deriving-bounds.stderr | 50 --------- src/test/ui/derives/deriving-copyclone.rs | 37 ------- src/test/ui/derives/deriving-copyclone.stderr | 75 ------------- .../ui/derives/deriving-meta-empty-trait-list.rs | 8 -- src/test/ui/derives/deriving-meta-unknown-trait.rs | 6 - .../ui/derives/deriving-meta-unknown-trait.stderr | 24 ---- .../deriving-no-inner-impl-error-message.rs | 14 --- .../deriving-no-inner-impl-error-message.stderr | 39 ------- src/test/ui/derives/deriving-non-type.rs | 30 ----- src/test/ui/derives/deriving-non-type.stderr | 75 ------------- src/test/ui/derives/deriving-primitive.rs | 5 - src/test/ui/derives/deriving-primitive.stderr | 14 --- src/test/ui/derives/deriving-with-repr-packed.rs | 45 -------- .../ui/derives/deriving-with-repr-packed.stderr | 111 ------------------- src/test/ui/derives/issue-36617.rs | 16 --- src/test/ui/derives/issue-36617.stderr | 97 ----------------- src/test/ui/derives/issue-43023.rs | 20 ---- src/test/ui/derives/issue-43023.stderr | 29 ----- src/test/ui/derives/issue-91492.rs | 25 ----- src/test/ui/derives/issue-91492.stderr | 54 --------- src/test/ui/derives/issue-91550.rs | 29 ----- src/test/ui/derives/issue-91550.stderr | 84 -------------- src/test/ui/derives/issue-97343.rs | 8 -- src/test/ui/derives/issue-97343.stderr | 21 ---- 104 files changed, 2432 deletions(-) delete mode 100644 src/test/ui/derives/auxiliary/derive-marker-tricky.rs delete mode 100644 src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs delete mode 100644 src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr delete mode 100644 src/test/ui/derives/clone-debug-dead-code.rs delete mode 100644 src/test/ui/derives/clone-debug-dead-code.stderr delete mode 100644 src/test/ui/derives/derive-Debug-use-ufcs-struct.rs delete mode 100644 src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs delete mode 100644 src/test/ui/derives/derive-assoc-type-not-impl.rs delete mode 100644 src/test/ui/derives/derive-assoc-type-not-impl.stderr delete mode 100644 src/test/ui/derives/derive-deadlock.rs delete mode 100644 src/test/ui/derives/derive-deadlock.stderr delete mode 100644 src/test/ui/derives/derive-hygiene.rs delete mode 100644 src/test/ui/derives/derive-macro-const-default.rs delete mode 100644 src/test/ui/derives/derive-marker-tricky.rs delete mode 100644 src/test/ui/derives/derive-multiple-with-packed.rs delete mode 100644 src/test/ui/derives/derive-on-trait-item-or-impl-item.rs delete mode 100644 src/test/ui/derives/derive-on-trait-item-or-impl-item.stderr delete mode 100644 src/test/ui/derives/derive-partial-ord.rs delete mode 100644 src/test/ui/derives/derive-renamed.rs delete mode 100644 src/test/ui/derives/derives-span-Clone-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-Clone-enum.rs delete mode 100644 src/test/ui/derives/derives-span-Clone-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-Clone-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Clone-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Clone-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Clone-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Debug-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-Debug-enum.rs delete mode 100644 src/test/ui/derives/derives-span-Debug-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-Debug-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Debug-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Debug-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Debug-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Default-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Default-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Default-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Default-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Eq-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-Eq-enum.rs delete mode 100644 src/test/ui/derives/derives-span-Eq-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-Eq-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Eq-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Eq-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Eq-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-Hash-enum.rs delete mode 100644 src/test/ui/derives/derives-span-Hash-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-Hash-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Hash-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Hash-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Hash-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Ord-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-Ord-enum.rs delete mode 100644 src/test/ui/derives/derives-span-Ord-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-Ord-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Ord-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-Ord-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-Ord-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialEq-enum.rs delete mode 100644 src/test/ui/derives/derives-span-PartialEq-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialEq-struct.rs delete mode 100644 src/test/ui/derives/derives-span-PartialEq-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialEq-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.rs delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-enum.rs delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-enum.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-struct.rs delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-struct.stderr delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-tuple-struct.rs delete mode 100644 src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr delete mode 100644 src/test/ui/derives/deriving-bounds.rs delete mode 100644 src/test/ui/derives/deriving-bounds.stderr delete mode 100644 src/test/ui/derives/deriving-copyclone.rs delete mode 100644 src/test/ui/derives/deriving-copyclone.stderr delete mode 100644 src/test/ui/derives/deriving-meta-empty-trait-list.rs delete mode 100644 src/test/ui/derives/deriving-meta-unknown-trait.rs delete mode 100644 src/test/ui/derives/deriving-meta-unknown-trait.stderr delete mode 100644 src/test/ui/derives/deriving-no-inner-impl-error-message.rs delete mode 100644 src/test/ui/derives/deriving-no-inner-impl-error-message.stderr delete mode 100644 src/test/ui/derives/deriving-non-type.rs delete mode 100644 src/test/ui/derives/deriving-non-type.stderr delete mode 100644 src/test/ui/derives/deriving-primitive.rs delete mode 100644 src/test/ui/derives/deriving-primitive.stderr delete mode 100644 src/test/ui/derives/deriving-with-repr-packed.rs delete mode 100644 src/test/ui/derives/deriving-with-repr-packed.stderr delete mode 100644 src/test/ui/derives/issue-36617.rs delete mode 100644 src/test/ui/derives/issue-36617.stderr delete mode 100644 src/test/ui/derives/issue-43023.rs delete mode 100644 src/test/ui/derives/issue-43023.stderr delete mode 100644 src/test/ui/derives/issue-91492.rs delete mode 100644 src/test/ui/derives/issue-91492.stderr delete mode 100644 src/test/ui/derives/issue-91550.rs delete mode 100644 src/test/ui/derives/issue-91550.stderr delete mode 100644 src/test/ui/derives/issue-97343.rs delete mode 100644 src/test/ui/derives/issue-97343.stderr (limited to 'src/test/ui/derives') diff --git a/src/test/ui/derives/auxiliary/derive-marker-tricky.rs b/src/test/ui/derives/auxiliary/derive-marker-tricky.rs deleted file mode 100644 index 70345351b..000000000 --- a/src/test/ui/derives/auxiliary/derive-marker-tricky.rs +++ /dev/null @@ -1,15 +0,0 @@ -// force-host -// no-prefer-dynamic - -#![crate_type = "proc-macro"] - -extern crate proc_macro; -use proc_macro::*; - -#[proc_macro_derive(NoMarker)] -pub fn f(input: TokenStream) -> TokenStream { - if input.to_string().contains("rustc_copy_clone_marker") { - panic!("found `#[rustc_copy_clone_marker]`"); - } - TokenStream::new() -} diff --git a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs deleted file mode 100644 index 6ab1fb7b0..000000000 --- a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![forbid(dead_code)] - -#[derive(Debug)] -pub struct Whatever { - pub field0: (), - field1: (), //~ ERROR fields `field1`, `field2`, `field3`, and `field4` are never read - field2: (), - field3: (), - field4: (), -} - -fn main() {} diff --git a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr deleted file mode 100644 index 7f4f78ceb..000000000 --- a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error: fields `field1`, `field2`, `field3`, and `field4` are never read - --> $DIR/clone-debug-dead-code-in-the-same-struct.rs:6:5 - | -LL | pub struct Whatever { - | -------- fields in this struct -LL | pub field0: (), -LL | field1: (), - | ^^^^^^ -LL | field2: (), - | ^^^^^^ -LL | field3: (), - | ^^^^^^ -LL | field4: (), - | ^^^^^^ - | - = note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis -note: the lint level is defined here - --> $DIR/clone-debug-dead-code-in-the-same-struct.rs:1:11 - | -LL | #![forbid(dead_code)] - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/derives/clone-debug-dead-code.rs b/src/test/ui/derives/clone-debug-dead-code.rs deleted file mode 100644 index ab49260c0..000000000 --- a/src/test/ui/derives/clone-debug-dead-code.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Checks that derived implementations of Clone and Debug do not -// contribute to dead code analysis (issue #84647). - -#![forbid(dead_code)] - -struct A { f: () } -//~^ ERROR: field `f` is never read - -#[derive(Clone)] -struct B { f: () } -//~^ ERROR: field `f` is never read - -#[derive(Debug)] -struct C { f: () } -//~^ ERROR: field `f` is never read - -#[derive(Debug,Clone)] -struct D { f: () } -//~^ ERROR: field `f` is never read - -struct E { f: () } -//~^ ERROR: field `f` is never read -// Custom impl, still doesn't read f -impl Clone for E { - fn clone(&self) -> Self { - Self { f: () } - } -} - -struct F { f: () } -// Custom impl that actually reads f -impl Clone for F { - fn clone(&self) -> Self { - Self { f: self.f } - } -} - -fn main() { - let _ = A { f: () }; - let _ = B { f: () }; - let _ = C { f: () }; - let _ = D { f: () }; - let _ = E { f: () }; - let _ = F { f: () }; -} diff --git a/src/test/ui/derives/clone-debug-dead-code.stderr b/src/test/ui/derives/clone-debug-dead-code.stderr deleted file mode 100644 index 38be486e3..000000000 --- a/src/test/ui/derives/clone-debug-dead-code.stderr +++ /dev/null @@ -1,54 +0,0 @@ -error: field `f` is never read - --> $DIR/clone-debug-dead-code.rs:6:12 - | -LL | struct A { f: () } - | - ^ - | | - | field in this struct - | -note: the lint level is defined here - --> $DIR/clone-debug-dead-code.rs:4:11 - | -LL | #![forbid(dead_code)] - | ^^^^^^^^^ - -error: field `f` is never read - --> $DIR/clone-debug-dead-code.rs:10:12 - | -LL | struct B { f: () } - | - ^ - | | - | field in this struct - | - = note: `B` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis - -error: field `f` is never read - --> $DIR/clone-debug-dead-code.rs:14:12 - | -LL | struct C { f: () } - | - ^ - | | - | field in this struct - | - = note: `C` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis - -error: field `f` is never read - --> $DIR/clone-debug-dead-code.rs:18:12 - | -LL | struct D { f: () } - | - ^ - | | - | field in this struct - | - = note: `D` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis - -error: field `f` is never read - --> $DIR/clone-debug-dead-code.rs:21:12 - | -LL | struct E { f: () } - | - ^ - | | - | field in this struct - -error: aborting due to 5 previous errors - diff --git a/src/test/ui/derives/derive-Debug-use-ufcs-struct.rs b/src/test/ui/derives/derive-Debug-use-ufcs-struct.rs deleted file mode 100644 index cb9dda841..000000000 --- a/src/test/ui/derives/derive-Debug-use-ufcs-struct.rs +++ /dev/null @@ -1,40 +0,0 @@ -// run-pass -#![allow(warnings)] - -#[derive(Debug)] -pub struct Bar { pub t: () } - -impl Access for T {} -pub trait Access { - fn field(&self, _: impl Sized, _: impl Sized) { - panic!("got into Access::field"); - } - - fn finish(&self) -> Result<(), std::fmt::Error> { - panic!("got into Access::finish"); - } - - fn debug_struct(&self, _: impl Sized, _: impl Sized) { - panic!("got into Access::debug_struct"); - } -} - -impl MutAccess for T {} -pub trait MutAccess { - fn field(&mut self, _: impl Sized, _: impl Sized) { - panic!("got into MutAccess::field"); - } - - fn finish(&mut self) -> Result<(), std::fmt::Error> { - panic!("got into MutAccess::finish"); - } - - fn debug_struct(&mut self, _: impl Sized, _: impl Sized) { - panic!("got into MutAccess::debug_struct"); - } -} - -fn main() { - let bar = Bar { t: () }; - assert_eq!("Bar { t: () }", format!("{:?}", bar)); -} diff --git a/src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs b/src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs deleted file mode 100644 index 5f786769f..000000000 --- a/src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs +++ /dev/null @@ -1,32 +0,0 @@ -// run-pass -#![allow(warnings)] - -#[derive(Debug)] -pub struct Foo(pub T); - -use std::fmt; - -impl Field for T {} -impl Finish for T {} -impl Dt for &mut fmt::Formatter<'_> {} - -pub trait Field { - fn field(&self, _: impl Sized) { - panic!("got into field"); - } -} -pub trait Finish { - fn finish(&self) -> Result<(), std::fmt::Error> { - panic!("got into finish"); - } -} -pub trait Dt { - fn debug_tuple(&self, _: &str) { - panic!("got into debug_tuple"); - } -} - -fn main() { - let foo = Foo(()); - assert_eq!("Foo(())", format!("{:?}", foo)); -} diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.rs b/src/test/ui/derives/derive-assoc-type-not-impl.rs deleted file mode 100644 index 0f642d63a..000000000 --- a/src/test/ui/derives/derive-assoc-type-not-impl.rs +++ /dev/null @@ -1,19 +0,0 @@ -trait Foo { - type X; - fn method(&self) {} -} - -#[derive(Clone)] -struct Bar { - x: T::X, -} - -struct NotClone; - -impl Foo for NotClone { - type X = i8; -} - -fn main() { - Bar:: { x: 1 }.clone(); //~ ERROR -} diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.stderr b/src/test/ui/derives/derive-assoc-type-not-impl.stderr deleted file mode 100644 index c4fddcf5f..000000000 --- a/src/test/ui/derives/derive-assoc-type-not-impl.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0599]: the method `clone` exists for struct `Bar`, but its trait bounds were not satisfied - --> $DIR/derive-assoc-type-not-impl.rs:18:30 - | -LL | struct Bar { - | ------------------ - | | - | method `clone` not found for this struct - | doesn't satisfy `Bar: Clone` -... -LL | struct NotClone; - | --------------- doesn't satisfy `NotClone: Clone` -... -LL | Bar:: { x: 1 }.clone(); - | ^^^^^ method cannot be called on `Bar` due to unsatisfied trait bounds - | -note: trait bound `NotClone: Clone` was not satisfied - --> $DIR/derive-assoc-type-not-impl.rs:6:10 - | -LL | #[derive(Clone)] - | ^^^^^ unsatisfied trait bound introduced in this `derive` macro - = note: the following trait bounds were not satisfied: - `NotClone: Clone` - which is required by `Bar: Clone` - = help: items from traits can only be used if the trait is implemented and in scope - = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `Clone` -help: consider annotating `NotClone` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/derives/derive-deadlock.rs b/src/test/ui/derives/derive-deadlock.rs deleted file mode 100644 index 0137b1e5b..000000000 --- a/src/test/ui/derives/derive-deadlock.rs +++ /dev/null @@ -1,6 +0,0 @@ -use std as derive; - -#[derive(Default)] //~ ERROR cannot determine resolution for the attribute macro `derive` -struct S; - -fn main() {} diff --git a/src/test/ui/derives/derive-deadlock.stderr b/src/test/ui/derives/derive-deadlock.stderr deleted file mode 100644 index 8d062491c..000000000 --- a/src/test/ui/derives/derive-deadlock.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: cannot determine resolution for the attribute macro `derive` - --> $DIR/derive-deadlock.rs:3:3 - | -LL | #[derive(Default)] - | ^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: aborting due to previous error - diff --git a/src/test/ui/derives/derive-hygiene.rs b/src/test/ui/derives/derive-hygiene.rs deleted file mode 100644 index 4fa83c490..000000000 --- a/src/test/ui/derives/derive-hygiene.rs +++ /dev/null @@ -1,121 +0,0 @@ -// Make sure that built-in derives don't rely on the user not declaring certain -// names to work properly. - -// check-pass - -#![allow(nonstandard_style)] -#![feature(decl_macro)] - -use std::prelude::v1::test as inline; - -static f: () = (); -static cmp: () = (); -static other: () = (); -static state: () = (); -static __self_0_0: () = (); -static __self_1_0: () = (); -static __self_vi: () = (); -static __arg_1_0: () = (); -static debug_trait_builder: () = (); - -struct isize; -trait i16 {} - -trait MethodsInDerives: Sized { - fn debug_tuple(self) {} - fn debug_struct(self) {} - fn field(self) {} - fn finish(self) {} - fn clone(self) {} - fn cmp(self) {} - fn partial_cmp(self) {} - fn eq(self) {} - fn ne(self) {} - fn le(self) {} - fn lt(self) {} - fn ge(self) {} - fn gt(self) {} - fn hash(self) {} -} - -trait GenericAny {} -impl GenericAny for S {} - -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] -enum __H { V(i32), } - -#[repr(i16)] -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] -enum W { A, B } - -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] -struct X>> { - A: A, -} - -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] -struct Y(B) -where - B: From; - -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] -enum Z { - C(C), - B { C: C }, -} - -// Make sure that we aren't using `self::` in paths, since it doesn't work in -// non-module scopes. -const NON_MODULE: () = { - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum __H { V(i32), } - - #[repr(i16)] - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum W { A, B } - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] - struct X self::X> { - A: A, - } - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] - struct Y(B) - where - B: From; - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum Z { - C(C), - B { C: C }, - } -}; - -macro m() { - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum __H { V(i32), } - - #[repr(i16)] - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum W { A, B } - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] - struct X>> { - A: A, - } - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)] - struct Y(B) - where - B: From; - - #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] - enum Z { - C(C), - B { C: C }, - } -} - -m!(); - -fn main() {} diff --git a/src/test/ui/derives/derive-macro-const-default.rs b/src/test/ui/derives/derive-macro-const-default.rs deleted file mode 100644 index ce80271d2..000000000 --- a/src/test/ui/derives/derive-macro-const-default.rs +++ /dev/null @@ -1,11 +0,0 @@ -// check-pass -#[derive(Clone, PartialEq, Debug)] -struct Example([T; N]); - -fn main() { - let a = Example([(); 16]); - let b = a.clone(); - if a != b { - let _c = format!("{:?}", a); - } -} diff --git a/src/test/ui/derives/derive-marker-tricky.rs b/src/test/ui/derives/derive-marker-tricky.rs deleted file mode 100644 index 730ea4714..000000000 --- a/src/test/ui/derives/derive-marker-tricky.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Test that `#[rustc_copy_clone_marker]` is not injected when a user-defined derive shadows -// a built-in derive in non-trivial scope (e.g. in a nested module). - -// check-pass -// aux-build:derive-marker-tricky.rs - -extern crate derive_marker_tricky; - -mod m { - use derive_marker_tricky::NoMarker as Copy; - - #[derive(Copy)] - struct S; -} - -fn main() {} diff --git a/src/test/ui/derives/derive-multiple-with-packed.rs b/src/test/ui/derives/derive-multiple-with-packed.rs deleted file mode 100644 index e762ee357..000000000 --- a/src/test/ui/derives/derive-multiple-with-packed.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass - -#[derive(Clone, Copy)] -#[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]` -#[repr(packed)] -struct CacheRecordHeader { - field: u64, -} - -fn main() {} diff --git a/src/test/ui/derives/derive-on-trait-item-or-impl-item.rs b/src/test/ui/derives/derive-on-trait-item-or-impl-item.rs deleted file mode 100644 index 7e579ec22..000000000 --- a/src/test/ui/derives/derive-on-trait-item-or-impl-item.rs +++ /dev/null @@ -1,15 +0,0 @@ -trait Foo { - #[derive(Clone)] - //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s - type Bar; -} - -struct Bar; - -impl Bar { - #[derive(Clone)] - //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s - fn bar(&self) {} -} - -fn main() {} diff --git a/src/test/ui/derives/derive-on-trait-item-or-impl-item.stderr b/src/test/ui/derives/derive-on-trait-item-or-impl-item.stderr deleted file mode 100644 index 1fd97bdd5..000000000 --- a/src/test/ui/derives/derive-on-trait-item-or-impl-item.stderr +++ /dev/null @@ -1,21 +0,0 @@ -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`. diff --git a/src/test/ui/derives/derive-partial-ord.rs b/src/test/ui/derives/derive-partial-ord.rs deleted file mode 100644 index 9078a7ffa..000000000 --- a/src/test/ui/derives/derive-partial-ord.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Checks that in a derived implementation of PartialOrd the lt, le, ge, gt methods are consistent -// with partial_cmp. Also verifies that implementation is consistent with that for tuples. -// -// run-pass - -#[derive(PartialEq, PartialOrd)] -struct P(f64, f64); - -fn main() { - let values: &[f64] = &[1.0, 2.0, f64::NAN]; - for a in values { - for b in values { - for c in values { - for d in values { - // Check impl for a tuple. - check(&(*a, *b), &(*c, *d)); - - // Check derived impl. - check(&P(*a, *b), &P(*c, *d)); - - // Check that impls agree with each other. - assert_eq!( - PartialOrd::partial_cmp(&(*a, *b), &(*c, *d)), - PartialOrd::partial_cmp(&P(*a, *b), &P(*c, *d)), - ); - } - } - } - } -} - -fn check(a: &T, b: &T) { - use std::cmp::Ordering::*; - match PartialOrd::partial_cmp(a, b) { - None => { - assert!(!(a < b)); - assert!(!(a <= b)); - assert!(!(a > b)); - assert!(!(a >= b)); - } - Some(Equal) => { - assert!(!(a < b)); - assert!(a <= b); - assert!(!(a > b)); - assert!(a >= b); - } - Some(Less) => { - assert!(a < b); - assert!(a <= b); - assert!(!(a > b)); - assert!(!(a >= b)); - } - Some(Greater) => { - assert!(!(a < b)); - assert!(!(a <= b)); - assert!(a > b); - assert!(a >= b); - } - } -} diff --git a/src/test/ui/derives/derive-renamed.rs b/src/test/ui/derives/derive-renamed.rs deleted file mode 100644 index d310e5806..000000000 --- a/src/test/ui/derives/derive-renamed.rs +++ /dev/null @@ -1,11 +0,0 @@ -// check-pass -// edition:2018 - -use derive as my_derive; - -#[my_derive(Debug)] -struct S; - -fn main() { - println!("{:?}", S); // OK -} diff --git a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.rs deleted file mode 100644 index b556d4424..000000000 --- a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Clone)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr deleted file mode 100644 index 7326324b0..000000000 --- a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied - --> $DIR/derives-span-Clone-enum-struct-variant.rs:9:6 - | -LL | #[derive(Clone)] - | ----- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ the trait `Clone` is not implemented for `Error` - | - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Clone-enum.rs b/src/test/ui/derives/derives-span-Clone-enum.rs deleted file mode 100644 index 9bb4f486c..000000000 --- a/src/test/ui/derives/derives-span-Clone-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Clone)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Clone-enum.stderr b/src/test/ui/derives/derives-span-Clone-enum.stderr deleted file mode 100644 index 229a4f7d9..000000000 --- a/src/test/ui/derives/derives-span-Clone-enum.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied - --> $DIR/derives-span-Clone-enum.rs:9:6 - | -LL | #[derive(Clone)] - | ----- in this derive macro expansion -... -LL | Error - | ^^^^^ the trait `Clone` is not implemented for `Error` - | - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Clone-struct.rs b/src/test/ui/derives/derives-span-Clone-struct.rs deleted file mode 100644 index f151636f8..000000000 --- a/src/test/ui/derives/derives-span-Clone-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Clone)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Clone-struct.stderr b/src/test/ui/derives/derives-span-Clone-struct.stderr deleted file mode 100644 index 96bad9eda..000000000 --- a/src/test/ui/derives/derives-span-Clone-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied - --> $DIR/derives-span-Clone-struct.rs:8:5 - | -LL | #[derive(Clone)] - | ----- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ the trait `Clone` is not implemented for `Error` - | - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Clone-tuple-struct.rs b/src/test/ui/derives/derives-span-Clone-tuple-struct.rs deleted file mode 100644 index 7a6288532..000000000 --- a/src/test/ui/derives/derives-span-Clone-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Clone)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr deleted file mode 100644 index b61341e57..000000000 --- a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied - --> $DIR/derives-span-Clone-tuple-struct.rs:8:5 - | -LL | #[derive(Clone)] - | ----- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ the trait `Clone` is not implemented for `Error` - | - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.rs deleted file mode 100644 index 949597bc8..000000000 --- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Debug)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} 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 deleted file mode 100644 index 58a64a4f5..000000000 --- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: `Error` doesn't implement `Debug` - --> $DIR/derives-span-Debug-enum-struct-variant.rs:9:6 - | -LL | #[derive(Debug)] - | ----- in this derive macro expansion -... -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 `impl Debug for Error` - = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Debug)]` - | -LL | #[derive(Debug)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Debug-enum.rs b/src/test/ui/derives/derives-span-Debug-enum.rs deleted file mode 100644 index b2a39708c..000000000 --- a/src/test/ui/derives/derives-span-Debug-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Debug)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Debug-enum.stderr b/src/test/ui/derives/derives-span-Debug-enum.stderr deleted file mode 100644 index e9bb5f960..000000000 --- a/src/test/ui/derives/derives-span-Debug-enum.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: `Error` doesn't implement `Debug` - --> $DIR/derives-span-Debug-enum.rs:9:6 - | -LL | #[derive(Debug)] - | ----- in this derive macro expansion -... -LL | Error - | ^^^^^ `Error` cannot be formatted using `{:?}` - | - = help: the trait `Debug` is not implemented 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) -help: consider annotating `Error` with `#[derive(Debug)]` - | -LL | #[derive(Debug)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Debug-struct.rs b/src/test/ui/derives/derives-span-Debug-struct.rs deleted file mode 100644 index cf91c9436..000000000 --- a/src/test/ui/derives/derives-span-Debug-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Debug)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Debug-struct.stderr b/src/test/ui/derives/derives-span-Debug-struct.stderr deleted file mode 100644 index 0a117c060..000000000 --- a/src/test/ui/derives/derives-span-Debug-struct.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: `Error` doesn't implement `Debug` - --> $DIR/derives-span-Debug-struct.rs:8:5 - | -LL | #[derive(Debug)] - | ----- in this derive macro expansion -LL | struct Struct { -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 `impl Debug for Error` - = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Debug)]` - | -LL | #[derive(Debug)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.rs b/src/test/ui/derives/derives-span-Debug-tuple-struct.rs deleted file mode 100644 index cea973c91..000000000 --- a/src/test/ui/derives/derives-span-Debug-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Debug)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr deleted file mode 100644 index f2e90a418..000000000 --- a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: `Error` doesn't implement `Debug` - --> $DIR/derives-span-Debug-tuple-struct.rs:8:5 - | -LL | #[derive(Debug)] - | ----- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ `Error` cannot be formatted using `{:?}` - | - = help: the trait `Debug` is not implemented 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) -help: consider annotating `Error` with `#[derive(Debug)]` - | -LL | #[derive(Debug)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Default-struct.rs b/src/test/ui/derives/derives-span-Default-struct.rs deleted file mode 100644 index 71fd5829e..000000000 --- a/src/test/ui/derives/derives-span-Default-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Default)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Default-struct.stderr b/src/test/ui/derives/derives-span-Default-struct.stderr deleted file mode 100644 index d4affd535..000000000 --- a/src/test/ui/derives/derives-span-Default-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Default` is not satisfied - --> $DIR/derives-span-Default-struct.rs:8:5 - | -LL | #[derive(Default)] - | ------- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ the trait `Default` is not implemented for `Error` - | - = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Default)]` - | -LL | #[derive(Default)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Default-tuple-struct.rs b/src/test/ui/derives/derives-span-Default-tuple-struct.rs deleted file mode 100644 index 463f7d230..000000000 --- a/src/test/ui/derives/derives-span-Default-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Default)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr deleted file mode 100644 index 129351f59..000000000 --- a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Default` is not satisfied - --> $DIR/derives-span-Default-tuple-struct.rs:8:5 - | -LL | #[derive(Default)] - | ------- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ the trait `Default` is not implemented for `Error` - | - = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Default)]` - | -LL | #[derive(Default)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.rs deleted file mode 100644 index d2dab8687..000000000 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(Eq,PartialEq)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr deleted file mode 100644 index e3fb234b9..000000000 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied - --> $DIR/derives-span-Eq-enum-struct-variant.rs:9:6 - | -LL | #[derive(Eq,PartialEq)] - | -- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ the trait `Eq` is not implemented for `Error` - | -note: required by a bound in `AssertParamIsEq` - --> $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub struct AssertParamIsEq { - | ^^ required by this bound in `AssertParamIsEq` - = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Eq-enum.rs b/src/test/ui/derives/derives-span-Eq-enum.rs deleted file mode 100644 index c6c0d4321..000000000 --- a/src/test/ui/derives/derives-span-Eq-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(Eq,PartialEq)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Eq-enum.stderr b/src/test/ui/derives/derives-span-Eq-enum.stderr deleted file mode 100644 index 4e10c3f69..000000000 --- a/src/test/ui/derives/derives-span-Eq-enum.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied - --> $DIR/derives-span-Eq-enum.rs:9:6 - | -LL | #[derive(Eq,PartialEq)] - | -- in this derive macro expansion -... -LL | Error - | ^^^^^ the trait `Eq` is not implemented for `Error` - | -note: required by a bound in `AssertParamIsEq` - --> $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub struct AssertParamIsEq { - | ^^ required by this bound in `AssertParamIsEq` - = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Eq-struct.rs b/src/test/ui/derives/derives-span-Eq-struct.rs deleted file mode 100644 index df3100398..000000000 --- a/src/test/ui/derives/derives-span-Eq-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(Eq,PartialEq)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Eq-struct.stderr b/src/test/ui/derives/derives-span-Eq-struct.stderr deleted file mode 100644 index bfdab052a..000000000 --- a/src/test/ui/derives/derives-span-Eq-struct.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied - --> $DIR/derives-span-Eq-struct.rs:8:5 - | -LL | #[derive(Eq,PartialEq)] - | -- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ the trait `Eq` is not implemented for `Error` - | -note: required by a bound in `AssertParamIsEq` - --> $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub struct AssertParamIsEq { - | ^^ required by this bound in `AssertParamIsEq` - = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.rs b/src/test/ui/derives/derives-span-Eq-tuple-struct.rs deleted file mode 100644 index abf6526b9..000000000 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(Eq,PartialEq)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr deleted file mode 100644 index 26b8be343..000000000 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied - --> $DIR/derives-span-Eq-tuple-struct.rs:8:5 - | -LL | #[derive(Eq,PartialEq)] - | -- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ the trait `Eq` is not implemented for `Error` - | -note: required by a bound in `AssertParamIsEq` - --> $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub struct AssertParamIsEq { - | ^^ required by this bound in `AssertParamIsEq` - = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs deleted file mode 100644 index 3018a7b6d..000000000 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Hash)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr deleted file mode 100644 index fe5e0e96a..000000000 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied - --> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6 - | -LL | #[derive(Hash)] - | ---- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ the trait `Hash` is not implemented for `Error` - | - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Hash)]` - | -LL | #[derive(Hash)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Hash-enum.rs b/src/test/ui/derives/derives-span-Hash-enum.rs deleted file mode 100644 index 8ce7df18f..000000000 --- a/src/test/ui/derives/derives-span-Hash-enum.rs +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -struct Error; - -#[derive(Hash)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr deleted file mode 100644 index 99785b87c..000000000 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied - --> $DIR/derives-span-Hash-enum.rs:8:6 - | -LL | #[derive(Hash)] - | ---- in this derive macro expansion -... -LL | Error - | ^^^^^ the trait `Hash` is not implemented for `Error` - | - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Hash)]` - | -LL | #[derive(Hash)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Hash-struct.rs b/src/test/ui/derives/derives-span-Hash-struct.rs deleted file mode 100644 index fa5e2af6b..000000000 --- a/src/test/ui/derives/derives-span-Hash-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Hash)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr deleted file mode 100644 index 4db83dd13..000000000 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied - --> $DIR/derives-span-Hash-struct.rs:8:5 - | -LL | #[derive(Hash)] - | ---- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ the trait `Hash` is not implemented for `Error` - | - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Hash)]` - | -LL | #[derive(Hash)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.rs b/src/test/ui/derives/derives-span-Hash-tuple-struct.rs deleted file mode 100644 index 3822bce14..000000000 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(Hash)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr deleted file mode 100644 index 8660c97e6..000000000 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied - --> $DIR/derives-span-Hash-tuple-struct.rs:8:5 - | -LL | #[derive(Hash)] - | ---- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ the trait `Hash` is not implemented for `Error` - | - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Hash)]` - | -LL | #[derive(Hash)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.rs deleted file mode 100644 index 62355cc2d..000000000 --- a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(Eq,PartialOrd,PartialEq)] -struct Error; - -#[derive(Ord,Eq,PartialOrd,PartialEq)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr deleted file mode 100644 index 6e48332c2..000000000 --- a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied - --> $DIR/derives-span-Ord-enum-struct-variant.rs:9:6 - | -LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] - | --- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ the trait `Ord` is not implemented for `Error` - | - = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Ord)]` - | -LL | #[derive(Ord)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Ord-enum.rs b/src/test/ui/derives/derives-span-Ord-enum.rs deleted file mode 100644 index 72738931d..000000000 --- a/src/test/ui/derives/derives-span-Ord-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(Eq,PartialOrd,PartialEq)] -struct Error; - -#[derive(Ord,Eq,PartialOrd,PartialEq)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Ord-enum.stderr b/src/test/ui/derives/derives-span-Ord-enum.stderr deleted file mode 100644 index b05cf0a05..000000000 --- a/src/test/ui/derives/derives-span-Ord-enum.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied - --> $DIR/derives-span-Ord-enum.rs:9:6 - | -LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] - | --- in this derive macro expansion -... -LL | Error - | ^^^^^ the trait `Ord` is not implemented for `Error` - | - = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Ord)]` - | -LL | #[derive(Ord)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Ord-struct.rs b/src/test/ui/derives/derives-span-Ord-struct.rs deleted file mode 100644 index 53d4c2c22..000000000 --- a/src/test/ui/derives/derives-span-Ord-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(Eq,PartialOrd,PartialEq)] -struct Error; - -#[derive(Ord,Eq,PartialOrd,PartialEq)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Ord-struct.stderr b/src/test/ui/derives/derives-span-Ord-struct.stderr deleted file mode 100644 index c4def34a8..000000000 --- a/src/test/ui/derives/derives-span-Ord-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied - --> $DIR/derives-span-Ord-struct.rs:8:5 - | -LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] - | --- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ the trait `Ord` is not implemented for `Error` - | - = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Ord)]` - | -LL | #[derive(Ord)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-Ord-tuple-struct.rs b/src/test/ui/derives/derives-span-Ord-tuple-struct.rs deleted file mode 100644 index 4e09c2709..000000000 --- a/src/test/ui/derives/derives-span-Ord-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(Eq,PartialOrd,PartialEq)] -struct Error; - -#[derive(Ord,Eq,PartialOrd,PartialEq)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr deleted file mode 100644 index a3b288d0f..000000000 --- a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied - --> $DIR/derives-span-Ord-tuple-struct.rs:8:5 - | -LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] - | --- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ the trait `Ord` is not implemented for `Error` - | - = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(Ord)]` - | -LL | #[derive(Ord)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.rs b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.rs deleted file mode 100644 index 67a27729d..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(PartialEq)] -enum Enum { - A { - x: Error //~ ERROR - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr deleted file mode 100644 index 9953154fd..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `Error` - --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:9:6 - | -LL | #[derive(PartialEq)] - | --------- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `Error` - --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:4:1 - | -LL | struct Error; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0369`. diff --git a/src/test/ui/derives/derives-span-PartialEq-enum.rs b/src/test/ui/derives/derives-span-PartialEq-enum.rs deleted file mode 100644 index 0becc7e0d..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(PartialEq)] -enum Enum { - A( - Error //~ ERROR - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialEq-enum.stderr b/src/test/ui/derives/derives-span-PartialEq-enum.stderr deleted file mode 100644 index 7c1304523..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-enum.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `Error` - --> $DIR/derives-span-PartialEq-enum.rs:9:6 - | -LL | #[derive(PartialEq)] - | --------- in this derive macro expansion -... -LL | Error - | ^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `Error` - --> $DIR/derives-span-PartialEq-enum.rs:4:1 - | -LL | struct Error; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0369`. diff --git a/src/test/ui/derives/derives-span-PartialEq-struct.rs b/src/test/ui/derives/derives-span-PartialEq-struct.rs deleted file mode 100644 index c92ef5fad..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(PartialEq)] -struct Struct { - x: Error //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialEq-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-struct.stderr deleted file mode 100644 index ba3d6ced3..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-struct.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `Error` - --> $DIR/derives-span-PartialEq-struct.rs:8:5 - | -LL | #[derive(PartialEq)] - | --------- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `Error` - --> $DIR/derives-span-PartialEq-struct.rs:4:1 - | -LL | struct Error; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0369`. diff --git a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.rs b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.rs deleted file mode 100644 index 10ac347aa..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - - -struct Error; - -#[derive(PartialEq)] -struct Struct( - Error //~ ERROR -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr deleted file mode 100644 index ab0b56a9e..000000000 --- a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `Error` - --> $DIR/derives-span-PartialEq-tuple-struct.rs:8:5 - | -LL | #[derive(PartialEq)] - | --------- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `Error` - --> $DIR/derives-span-PartialEq-tuple-struct.rs:4:1 - | -LL | struct Error; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0369`. diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.rs b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.rs deleted file mode 100644 index a769c1376..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(PartialOrd,PartialEq)] -enum Enum { - A { - x: Error //~ ERROR can't compare `Error` with `Error` - } -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr deleted file mode 100644 index 2d19aaf68..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: can't compare `Error` with `Error` - --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:9:6 - | -LL | #[derive(PartialOrd,PartialEq)] - | ---------- in this derive macro expansion -... -LL | x: Error - | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` - | - = help: the trait `PartialOrd` is not implemented for `Error` - = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialOrd)]` - | -LL | #[derive(PartialOrd)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum.rs b/src/test/ui/derives/derives-span-PartialOrd-enum.rs deleted file mode 100644 index 4f0d794e4..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(PartialOrd,PartialEq)] -enum Enum { - A( - Error //~ ERROR can't compare `Error` with `Error` - ) -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr deleted file mode 100644 index dfbb8060f..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: can't compare `Error` with `Error` - --> $DIR/derives-span-PartialOrd-enum.rs:9:6 - | -LL | #[derive(PartialOrd,PartialEq)] - | ---------- in this derive macro expansion -... -LL | Error - | ^^^^^ no implementation for `Error < Error` and `Error > Error` - | - = help: the trait `PartialOrd` is not implemented for `Error` - = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialOrd)]` - | -LL | #[derive(PartialOrd)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-PartialOrd-struct.rs b/src/test/ui/derives/derives-span-PartialOrd-struct.rs deleted file mode 100644 index da857c674..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(PartialOrd,PartialEq)] -struct Struct { - x: Error //~ ERROR can't compare `Error` with `Error` -} - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr deleted file mode 100644 index ba63d86e8..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: can't compare `Error` with `Error` - --> $DIR/derives-span-PartialOrd-struct.rs:8:5 - | -LL | #[derive(PartialOrd,PartialEq)] - | ---------- in this derive macro expansion -LL | struct Struct { -LL | x: Error - | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` - | - = help: the trait `PartialOrd` is not implemented for `Error` - = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialOrd)]` - | -LL | #[derive(PartialOrd)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.rs b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.rs deleted file mode 100644 index 61d507670..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' - -#[derive(PartialEq)] -struct Error; - -#[derive(PartialOrd,PartialEq)] -struct Struct( - Error //~ ERROR can't compare `Error` with `Error` -); - -fn main() {} diff --git a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr deleted file mode 100644 index 7686ed806..000000000 --- a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: can't compare `Error` with `Error` - --> $DIR/derives-span-PartialOrd-tuple-struct.rs:8:5 - | -LL | #[derive(PartialOrd,PartialEq)] - | ---------- in this derive macro expansion -LL | struct Struct( -LL | Error - | ^^^^^ no implementation for `Error < Error` and `Error > Error` - | - = help: the trait `PartialOrd` is not implemented for `Error` - = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Error` with `#[derive(PartialOrd)]` - | -LL | #[derive(PartialOrd)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/deriving-bounds.rs b/src/test/ui/derives/deriving-bounds.rs deleted file mode 100644 index 95d440420..000000000 --- a/src/test/ui/derives/deriving-bounds.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[derive(Send)] -//~^ ERROR cannot find derive macro `Send` in this scope -//~| ERROR cannot find derive macro `Send` in this scope -struct Test; - -#[derive(Sync)] -//~^ ERROR cannot find derive macro `Sync` in this scope -//~| ERROR cannot find derive macro `Sync` in this scope -struct Test1; - -pub fn main() {} diff --git a/src/test/ui/derives/deriving-bounds.stderr b/src/test/ui/derives/deriving-bounds.stderr deleted file mode 100644 index 74ca37287..000000000 --- a/src/test/ui/derives/deriving-bounds.stderr +++ /dev/null @@ -1,50 +0,0 @@ -error: cannot find derive macro `Sync` in this scope - --> $DIR/deriving-bounds.rs:6:10 - | -LL | #[derive(Sync)] - | ^^^^ - | -note: unsafe traits like `Sync` should be implemented explicitly - --> $DIR/deriving-bounds.rs:6:10 - | -LL | #[derive(Sync)] - | ^^^^ - -error: cannot find derive macro `Sync` in this scope - --> $DIR/deriving-bounds.rs:6:10 - | -LL | #[derive(Sync)] - | ^^^^ - | -note: unsafe traits like `Sync` should be implemented explicitly - --> $DIR/deriving-bounds.rs:6:10 - | -LL | #[derive(Sync)] - | ^^^^ - -error: cannot find derive macro `Send` in this scope - --> $DIR/deriving-bounds.rs:1:10 - | -LL | #[derive(Send)] - | ^^^^ - | -note: unsafe traits like `Send` should be implemented explicitly - --> $DIR/deriving-bounds.rs:1:10 - | -LL | #[derive(Send)] - | ^^^^ - -error: cannot find derive macro `Send` in this scope - --> $DIR/deriving-bounds.rs:1:10 - | -LL | #[derive(Send)] - | ^^^^ - | -note: unsafe traits like `Send` should be implemented explicitly - --> $DIR/deriving-bounds.rs:1:10 - | -LL | #[derive(Send)] - | ^^^^ - -error: aborting due to 4 previous errors - diff --git a/src/test/ui/derives/deriving-copyclone.rs b/src/test/ui/derives/deriving-copyclone.rs deleted file mode 100644 index 06b3157a7..000000000 --- a/src/test/ui/derives/deriving-copyclone.rs +++ /dev/null @@ -1,37 +0,0 @@ -// this will get a no-op Clone impl -#[derive(Copy, Clone)] -struct A { - a: i32, - b: i64 -} - -// this will get a deep Clone impl -#[derive(Copy, Clone)] -struct B { - a: i32, - b: T -} - -struct C; // not Copy or Clone -#[derive(Clone)] struct D; // Clone but not Copy - -fn is_copy(_: T) {} -fn is_clone(_: T) {} - -fn main() { - // A can be copied and cloned - is_copy(A { a: 1, b: 2 }); - is_clone(A { a: 1, b: 2 }); - - // B can be copied and cloned - is_copy(B { a: 1, b: 2 }); - is_clone(B { a: 1, b: 2 }); - - // B cannot be copied or cloned - is_copy(B { a: 1, b: C }); //~ ERROR Copy - is_clone(B { a: 1, b: C }); //~ ERROR Clone - - // B can be cloned but not copied - is_copy(B { a: 1, b: D }); //~ ERROR Copy - is_clone(B { a: 1, b: D }); -} diff --git a/src/test/ui/derives/deriving-copyclone.stderr b/src/test/ui/derives/deriving-copyclone.stderr deleted file mode 100644 index 80e2dd7fe..000000000 --- a/src/test/ui/derives/deriving-copyclone.stderr +++ /dev/null @@ -1,75 +0,0 @@ -error[E0277]: the trait bound `B: Copy` is not satisfied - --> $DIR/deriving-copyclone.rs:31:13 - | -LL | is_copy(B { a: 1, b: C }); - | ------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `B` - | | - | required by a bound introduced by this call - | -note: required for `B` to implement `Copy` - --> $DIR/deriving-copyclone.rs:9:10 - | -LL | #[derive(Copy, Clone)] - | ^^^^ -note: required by a bound in `is_copy` - --> $DIR/deriving-copyclone.rs:18:15 - | -LL | fn is_copy(_: T) {} - | ^^^^ required by this bound in `is_copy` - = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider borrowing here - | -LL | is_copy(&B { a: 1, b: C }); - | + - -error[E0277]: the trait bound `B: Clone` is not satisfied - --> $DIR/deriving-copyclone.rs:32:14 - | -LL | is_clone(B { a: 1, b: C }); - | -------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B` - | | - | required by a bound introduced by this call - | -note: required for `B` to implement `Clone` - --> $DIR/deriving-copyclone.rs:9:16 - | -LL | #[derive(Copy, Clone)] - | ^^^^^ -note: required by a bound in `is_clone` - --> $DIR/deriving-copyclone.rs:19:16 - | -LL | fn is_clone(_: T) {} - | ^^^^^ required by this bound in `is_clone` - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider borrowing here - | -LL | is_clone(&B { a: 1, b: C }); - | + - -error[E0277]: the trait bound `B: Copy` is not satisfied - --> $DIR/deriving-copyclone.rs:35:13 - | -LL | is_copy(B { a: 1, b: D }); - | ------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `B` - | | - | required by a bound introduced by this call - | -note: required for `B` to implement `Copy` - --> $DIR/deriving-copyclone.rs:9:10 - | -LL | #[derive(Copy, Clone)] - | ^^^^ -note: required by a bound in `is_copy` - --> $DIR/deriving-copyclone.rs:18:15 - | -LL | fn is_copy(_: T) {} - | ^^^^ required by this bound in `is_copy` - = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider borrowing here - | -LL | is_copy(&B { a: 1, b: D }); - | + - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/deriving-meta-empty-trait-list.rs b/src/test/ui/derives/deriving-meta-empty-trait-list.rs deleted file mode 100644 index 0306ce717..000000000 --- a/src/test/ui/derives/deriving-meta-empty-trait-list.rs +++ /dev/null @@ -1,8 +0,0 @@ -// check-pass - -#![deny(unused)] - -#[derive()] // OK -struct _Bar; - -pub fn main() {} diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.rs b/src/test/ui/derives/deriving-meta-unknown-trait.rs deleted file mode 100644 index 6463a7664..000000000 --- a/src/test/ui/derives/deriving-meta-unknown-trait.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[derive(Eqr)] -//~^ ERROR cannot find derive macro `Eqr` in this scope -//~| ERROR cannot find derive macro `Eqr` in this scope -struct Foo; - -pub fn main() {} diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.stderr b/src/test/ui/derives/deriving-meta-unknown-trait.stderr deleted file mode 100644 index f3ff95a85..000000000 --- a/src/test/ui/derives/deriving-meta-unknown-trait.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error: cannot find derive macro `Eqr` in this scope - --> $DIR/deriving-meta-unknown-trait.rs:1:10 - | -LL | #[derive(Eqr)] - | ^^^ help: a derive macro with a similar name exists: `Eq` - | - ::: $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub macro Eq($item:item) { - | ------------ similarly named derive macro `Eq` defined here - -error: cannot find derive macro `Eqr` in this scope - --> $DIR/deriving-meta-unknown-trait.rs:1:10 - | -LL | #[derive(Eqr)] - | ^^^ help: a derive macro with a similar name exists: `Eq` - | - ::: $SRC_DIR/core/src/cmp.rs:LL:COL - | -LL | pub macro Eq($item:item) { - | ------------ similarly named derive macro `Eq` defined here - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.rs b/src/test/ui/derives/deriving-no-inner-impl-error-message.rs deleted file mode 100644 index b3ce31bf0..000000000 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.rs +++ /dev/null @@ -1,14 +0,0 @@ -struct NoCloneOrEq; - -#[derive(PartialEq)] -struct E { - x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq` -} -#[derive(Clone)] -struct C { - x: NoCloneOrEq - //~^ ERROR `NoCloneOrEq: Clone` is not satisfied -} - - -fn main() {} diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr deleted file mode 100644 index ef8c44caa..000000000 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `NoCloneOrEq` - --> $DIR/deriving-no-inner-impl-error-message.rs:5:5 - | -LL | #[derive(PartialEq)] - | --------- in this derive macro expansion -LL | struct E { -LL | x: NoCloneOrEq - | ^^^^^^^^^^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `NoCloneOrEq` - --> $DIR/deriving-no-inner-impl-error-message.rs:1:1 - | -LL | struct NoCloneOrEq; - | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `NoCloneOrEq` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] - | - -error[E0277]: the trait bound `NoCloneOrEq: Clone` is not satisfied - --> $DIR/deriving-no-inner-impl-error-message.rs:9:5 - | -LL | #[derive(Clone)] - | ----- in this derive macro expansion -LL | struct C { -LL | x: NoCloneOrEq - | ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoCloneOrEq` - | - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `NoCloneOrEq` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0277, E0369. -For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/deriving-non-type.rs b/src/test/ui/derives/deriving-non-type.rs deleted file mode 100644 index 9afffa900..000000000 --- a/src/test/ui/derives/deriving-non-type.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![allow(dead_code)] - -struct S; - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -trait T { } - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -impl S { } - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -impl T for S { } - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -static s: usize = 0; - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -const c: usize = 0; - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -mod m { } - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -extern "C" { } - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -type A = usize; - -#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to `struct`s, `enum`s and `union`s -fn main() { } diff --git a/src/test/ui/derives/deriving-non-type.stderr b/src/test/ui/derives/deriving-non-type.stderr deleted file mode 100644 index ef7ef54d1..000000000 --- a/src/test/ui/derives/deriving-non-type.stderr +++ /dev/null @@ -1,75 +0,0 @@ -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:5:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | trait T { } - | ----------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:8:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | impl S { } - | ---------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:11:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | impl T for S { } - | ---------------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:14:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | static s: usize = 0; - | -------------------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:17:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | const c: usize = 0; - | ------------------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:20:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | mod m { } - | --------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:23:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | extern "C" { } - | -------------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:26:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | type A = usize; - | --------------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/deriving-non-type.rs:29:1 - | -LL | #[derive(PartialEq)] - | ^^^^^^^^^^^^^^^^^^^^ not applicable here -LL | fn main() { } - | ------------- not a `struct`, `enum` or `union` - -error: aborting due to 9 previous errors - -For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/derives/deriving-primitive.rs b/src/test/ui/derives/deriving-primitive.rs deleted file mode 100644 index 1173eca64..000000000 --- a/src/test/ui/derives/deriving-primitive.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[derive(FromPrimitive)] //~ ERROR cannot find derive macro `FromPrimitive` in this scope - //~| ERROR cannot find derive macro `FromPrimitive` in this scope -enum Foo {} - -fn main() {} diff --git a/src/test/ui/derives/deriving-primitive.stderr b/src/test/ui/derives/deriving-primitive.stderr deleted file mode 100644 index ca64c9ee7..000000000 --- a/src/test/ui/derives/deriving-primitive.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: cannot find derive macro `FromPrimitive` in this scope - --> $DIR/deriving-primitive.rs:1:10 - | -LL | #[derive(FromPrimitive)] - | ^^^^^^^^^^^^^ - -error: cannot find derive macro `FromPrimitive` in this scope - --> $DIR/deriving-primitive.rs:1:10 - | -LL | #[derive(FromPrimitive)] - | ^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/derives/deriving-with-repr-packed.rs b/src/test/ui/derives/deriving-with-repr-packed.rs deleted file mode 100644 index 3884e3977..000000000 --- a/src/test/ui/derives/deriving-with-repr-packed.rs +++ /dev/null @@ -1,45 +0,0 @@ -#![deny(unaligned_references)] - -// Check that deriving certain builtin traits on certain packed structs cause -// errors. This happens when the derived trait would need to use a potentially -// misaligned reference. But there are two cases that are allowed: -// - If all the fields within the struct meet the required alignment: 1 for -// `repr(packed)`, or `N` for `repr(packed(N))`. -// - If `Default` is the only trait derived, because it doesn't involve any -// references. - -#[derive(Copy, Clone, Default, PartialEq, Eq)] -//~^ ERROR `Clone` can't be derived on this `#[repr(packed)]` struct with type or const parameters -//~| hard error -//~^^^ ERROR `PartialEq` can't be derived on this `#[repr(packed)]` struct with type or const parameters -//~| hard error -#[repr(packed)] -pub struct Foo(T, T, T); - -#[derive(Default, Hash)] -//~^ ERROR `Hash` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` -//~| hard error -#[repr(packed)] -pub struct Bar(u32, u32, u32); - -// This one is fine because the field alignment is 1. -#[derive(Default, Hash)] -#[repr(packed)] -pub struct Bar2(u8, i8, bool); - -// This one is fine because the field alignment is 2, matching `packed(2)`. -#[derive(Default, Hash)] -#[repr(packed(2))] -pub struct Bar3(u16, i16, bool); - -// This one is fine because it's not packed. -#[derive(Debug, Default)] -struct Y(usize); - -#[derive(Debug, Default)] -//~^ ERROR `Debug` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` -//~| hard error -#[repr(packed)] -struct X(Y); - -fn main() {} diff --git a/src/test/ui/derives/deriving-with-repr-packed.stderr b/src/test/ui/derives/deriving-with-repr-packed.stderr deleted file mode 100644 index 0ad800c39..000000000 --- a/src/test/ui/derives/deriving-with-repr-packed.stderr +++ /dev/null @@ -1,111 +0,0 @@ -error: `Clone` can't be derived on this `#[repr(packed)]` struct with type or const parameters - --> $DIR/deriving-with-repr-packed.rs:11:16 - | -LL | #[derive(Copy, Clone, Default, PartialEq, Eq)] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 -note: the lint level is defined here - --> $DIR/deriving-with-repr-packed.rs:1:9 - | -LL | #![deny(unaligned_references)] - | ^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: `PartialEq` can't be derived on this `#[repr(packed)]` struct with type or const parameters - --> $DIR/deriving-with-repr-packed.rs:11:32 - | -LL | #[derive(Copy, Clone, Default, PartialEq, Eq)] - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: `Hash` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` - --> $DIR/deriving-with-repr-packed.rs:19:19 - | -LL | #[derive(Default, Hash)] - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: `Debug` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` - --> $DIR/deriving-with-repr-packed.rs:39:10 - | -LL | #[derive(Debug, Default)] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 - = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 4 previous errors - -Future incompatibility report: Future breakage diagnostic: -error: `Clone` can't be derived on this `#[repr(packed)]` struct with type or const parameters - --> $DIR/deriving-with-repr-packed.rs:11:16 - | -LL | #[derive(Copy, Clone, Default, PartialEq, Eq)] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 -note: the lint level is defined here - --> $DIR/deriving-with-repr-packed.rs:1:9 - | -LL | #![deny(unaligned_references)] - | ^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) - -Future breakage diagnostic: -error: `PartialEq` can't be derived on this `#[repr(packed)]` struct with type or const parameters - --> $DIR/deriving-with-repr-packed.rs:11:32 - | -LL | #[derive(Copy, Clone, Default, PartialEq, Eq)] - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 -note: the lint level is defined here - --> $DIR/deriving-with-repr-packed.rs:1:9 - | -LL | #![deny(unaligned_references)] - | ^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) - -Future breakage diagnostic: -error: `Hash` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` - --> $DIR/deriving-with-repr-packed.rs:19:19 - | -LL | #[derive(Default, Hash)] - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 -note: the lint level is defined here - --> $DIR/deriving-with-repr-packed.rs:1:9 - | -LL | #![deny(unaligned_references)] - | ^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) - -Future breakage diagnostic: -error: `Debug` can't be derived on this `#[repr(packed)]` struct that does not derive `Copy` - --> $DIR/deriving-with-repr-packed.rs:39:10 - | -LL | #[derive(Debug, Default)] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82523 -note: the lint level is defined here - --> $DIR/deriving-with-repr-packed.rs:1:9 - | -LL | #![deny(unaligned_references)] - | ^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) - diff --git a/src/test/ui/derives/issue-36617.rs b/src/test/ui/derives/issue-36617.rs deleted file mode 100644 index 08f293d2e..000000000 --- a/src/test/ui/derives/issue-36617.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![derive(Copy)] //~ ERROR cannot determine resolution for the attribute macro `derive` -//~^ ERROR `derive` attribute cannot be used at crate level - -#![test]//~ ERROR cannot determine resolution for the attribute macro `test` -//~^ ERROR `test` attribute cannot be used at crate level - -#![test_case]//~ ERROR cannot determine resolution for the attribute macro `test_case` -//~^ ERROR `test_case` attribute cannot be used at crate level - -#![bench]//~ ERROR cannot determine resolution for the attribute macro `bench` -//~^ ERROR `bench` attribute cannot be used at crate level - -#![global_allocator]//~ ERROR cannot determine resolution for the attribute macro `global_allocator` -//~^ ERROR `global_allocator` attribute cannot be used at crate level - -fn main() {} diff --git a/src/test/ui/derives/issue-36617.stderr b/src/test/ui/derives/issue-36617.stderr deleted file mode 100644 index 9cc0a29b0..000000000 --- a/src/test/ui/derives/issue-36617.stderr +++ /dev/null @@ -1,97 +0,0 @@ -error: cannot determine resolution for the attribute macro `derive` - --> $DIR/issue-36617.rs:1:4 - | -LL | #![derive(Copy)] - | ^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the attribute macro `test` - --> $DIR/issue-36617.rs:4:4 - | -LL | #![test] - | ^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the attribute macro `test_case` - --> $DIR/issue-36617.rs:7:4 - | -LL | #![test_case] - | ^^^^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the attribute macro `bench` - --> $DIR/issue-36617.rs:10:4 - | -LL | #![bench] - | ^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the attribute macro `global_allocator` - --> $DIR/issue-36617.rs:13:4 - | -LL | #![global_allocator] - | ^^^^^^^^^^^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: `derive` attribute cannot be used at crate level - --> $DIR/issue-36617.rs:1:1 - | -LL | #![derive(Copy)] - | ^^^^^^^^^^^^^^^^ - | -help: perhaps you meant to use an outer attribute - | -LL | #[derive(Copy)] - | ~~~~~~~~~~~~~~~ - -error: `test` attribute cannot be used at crate level - --> $DIR/issue-36617.rs:4:1 - | -LL | #![test] - | ^^^^^^^^ - | -help: perhaps you meant to use an outer attribute - | -LL | #[test] - | ~~~~~~~ - -error: `test_case` attribute cannot be used at crate level - --> $DIR/issue-36617.rs:7:1 - | -LL | #![test_case] - | ^^^^^^^^^^^^^ - | -help: perhaps you meant to use an outer attribute - | -LL | #[test_case] - | ~~~~~~~~~~~~ - -error: `bench` attribute cannot be used at crate level - --> $DIR/issue-36617.rs:10:1 - | -LL | #![bench] - | ^^^^^^^^^ - | -help: perhaps you meant to use an outer attribute - | -LL | #[bench] - | ~~~~~~~~ - -error: `global_allocator` attribute cannot be used at crate level - --> $DIR/issue-36617.rs:13:1 - | -LL | #![global_allocator] - | ^^^^^^^^^^^^^^^^^^^^ - | -help: perhaps you meant to use an outer attribute - | -LL | #[global_allocator] - | ~~~~~~~~~~~~~~~~~~~ - -error: aborting due to 10 previous errors - diff --git a/src/test/ui/derives/issue-43023.rs b/src/test/ui/derives/issue-43023.rs deleted file mode 100644 index c0208e680..000000000 --- a/src/test/ui/derives/issue-43023.rs +++ /dev/null @@ -1,20 +0,0 @@ -struct S; - -impl S { - #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s - fn f() { - file!(); - } -} - -trait Tr1 { - #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s - fn f(); -} - -trait Tr2 { - #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s - type F; -} - -fn main() {} diff --git a/src/test/ui/derives/issue-43023.stderr b/src/test/ui/derives/issue-43023.stderr deleted file mode 100644 index 007eb2595..000000000 --- a/src/test/ui/derives/issue-43023.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/issue-43023.rs:4:5 - | -LL | #[derive(Debug)] - | ^^^^^^^^^^^^^^^^ not applicable here -LL | / fn f() { -LL | | file!(); -LL | | } - | |_____- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/issue-43023.rs:11:5 - | -LL | #[derive(Debug)] - | ^^^^^^^^^^^^^^^^ not applicable here -LL | fn f(); - | ------- not a `struct`, `enum` or `union` - -error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s - --> $DIR/issue-43023.rs:16:5 - | -LL | #[derive(Debug)] - | ^^^^^^^^^^^^^^^^ not applicable here -LL | type F; - | ------- not a `struct`, `enum` or `union` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/derives/issue-91492.rs b/src/test/ui/derives/issue-91492.rs deleted file mode 100644 index df792f118..000000000 --- a/src/test/ui/derives/issue-91492.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Reproduce the issue with vec -pub struct NoDerives; -fn fun1(foo: &mut Vec, bar: &[NoDerives]) { - foo.extend_from_slice(bar); //~ ERROR -} - -// Reproduce the issue with vec -// and demonstrate that other derives are ignored in the suggested output -#[derive(Default, PartialEq)] -pub struct SomeDerives; -fn fun2(foo: &mut Vec, bar: &[SomeDerives]) { - foo.extend_from_slice(bar); //~ ERROR -} - -// Try and fail to reproduce the issue without vec. -// No idea why it doesnt reproduce the issue but its still a useful test case. -struct Object(T, A); -impl Object { - fn use_clone(&self) {} -} -fn fun3(foo: Object) { - foo.use_clone(); //~ ERROR -} - -fn main() {} diff --git a/src/test/ui/derives/issue-91492.stderr b/src/test/ui/derives/issue-91492.stderr deleted file mode 100644 index fbd48336d..000000000 --- a/src/test/ui/derives/issue-91492.stderr +++ /dev/null @@ -1,54 +0,0 @@ -error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut Vec`, but its trait bounds were not satisfied - --> $DIR/issue-91492.rs:4:9 - | -LL | pub struct NoDerives; - | -------------------- doesn't satisfy `NoDerives: Clone` -LL | fn fun1(foo: &mut Vec, bar: &[NoDerives]) { -LL | foo.extend_from_slice(bar); - | ^^^^^^^^^^^^^^^^^ - | - = note: the following trait bounds were not satisfied: - `NoDerives: Clone` -help: consider annotating `NoDerives` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut Vec`, but its trait bounds were not satisfied - --> $DIR/issue-91492.rs:12:9 - | -LL | pub struct SomeDerives; - | ---------------------- doesn't satisfy `SomeDerives: Clone` -LL | fn fun2(foo: &mut Vec, bar: &[SomeDerives]) { -LL | foo.extend_from_slice(bar); - | ^^^^^^^^^^^^^^^^^ - | - = note: the following trait bounds were not satisfied: - `SomeDerives: Clone` -help: consider annotating `SomeDerives` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error[E0599]: the method `use_clone` exists for struct `Object`, but its trait bounds were not satisfied - --> $DIR/issue-91492.rs:22:9 - | -LL | pub struct NoDerives; - | -------------------- doesn't satisfy `NoDerives: Clone` -... -LL | struct Object(T, A); - | ------------------- method `use_clone` not found for this struct -... -LL | foo.use_clone(); - | ^^^^^^^^^ method cannot be called on `Object` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `NoDerives: Clone` -help: consider annotating `NoDerives` with `#[derive(Clone)]` - | -LL | #[derive(Clone)] - | - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/derives/issue-91550.rs b/src/test/ui/derives/issue-91550.rs deleted file mode 100644 index 56fd5ffa8..000000000 --- a/src/test/ui/derives/issue-91550.rs +++ /dev/null @@ -1,29 +0,0 @@ -use std::collections::HashSet; - -/// natural case from the issue -struct Value(u32); - -fn main() { - let hs = HashSet::::new(); - hs.insert(Value(0)); //~ ERROR -} - -/// synthetic cases -pub struct NoDerives; - -struct Object(T); -impl Object { - fn use_eq(&self) {} -} -impl Object { - fn use_ord(&self) {} -} -impl Object { - fn use_ord_and_partial_ord(&self) {} -} - -fn function(foo: Object) { - foo.use_eq(); //~ ERROR - foo.use_ord(); //~ ERROR - foo.use_ord_and_partial_ord(); //~ ERROR -} diff --git a/src/test/ui/derives/issue-91550.stderr b/src/test/ui/derives/issue-91550.stderr deleted file mode 100644 index 12be26956..000000000 --- a/src/test/ui/derives/issue-91550.stderr +++ /dev/null @@ -1,84 +0,0 @@ -error[E0599]: the method `insert` exists for struct `HashSet`, but its trait bounds were not satisfied - --> $DIR/issue-91550.rs:8:8 - | -LL | struct Value(u32); - | ------------ - | | - | doesn't satisfy `Value: Eq` - | doesn't satisfy `Value: Hash` -... -LL | hs.insert(Value(0)); - | ^^^^^^ - | - = note: the following trait bounds were not satisfied: - `Value: Eq` - `Value: Hash` -help: consider annotating `Value` with `#[derive(Eq, Hash, PartialEq)]` - | -LL | #[derive(Eq, Hash, PartialEq)] - | - -error[E0599]: the method `use_eq` exists for struct `Object`, but its trait bounds were not satisfied - --> $DIR/issue-91550.rs:26:9 - | -LL | pub struct NoDerives; - | -------------------- doesn't satisfy `NoDerives: Eq` -LL | -LL | struct Object(T); - | ---------------- method `use_eq` not found for this struct -... -LL | foo.use_eq(); - | ^^^^^^ method cannot be called on `Object` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `NoDerives: Eq` -help: consider annotating `NoDerives` with `#[derive(Eq, PartialEq)]` - | -LL | #[derive(Eq, PartialEq)] - | - -error[E0599]: the method `use_ord` exists for struct `Object`, but its trait bounds were not satisfied - --> $DIR/issue-91550.rs:27:9 - | -LL | pub struct NoDerives; - | -------------------- doesn't satisfy `NoDerives: Ord` -LL | -LL | struct Object(T); - | ---------------- method `use_ord` not found for this struct -... -LL | foo.use_ord(); - | ^^^^^^^ method cannot be called on `Object` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `NoDerives: Ord` -help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]` - | -LL | #[derive(Eq, Ord, PartialEq, PartialOrd)] - | - -error[E0599]: the method `use_ord_and_partial_ord` exists for struct `Object`, but its trait bounds were not satisfied - --> $DIR/issue-91550.rs:28:9 - | -LL | pub struct NoDerives; - | -------------------- - | | - | doesn't satisfy `NoDerives: Ord` - | doesn't satisfy `NoDerives: PartialOrd` -LL | -LL | struct Object(T); - | ---------------- method `use_ord_and_partial_ord` not found for this struct -... -LL | foo.use_ord_and_partial_ord(); - | ^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Object` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `NoDerives: Ord` - `NoDerives: PartialOrd` -help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]` - | -LL | #[derive(Eq, Ord, PartialEq, PartialOrd)] - | - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/derives/issue-97343.rs b/src/test/ui/derives/issue-97343.rs deleted file mode 100644 index 6f0e4d55a..000000000 --- a/src/test/ui/derives/issue-97343.rs +++ /dev/null @@ -1,8 +0,0 @@ -use std::fmt::Debug; - -#[derive(Debug)] -pub struct Irrelevant { //~ ERROR type arguments are not allowed on type parameter - irrelevant: Irrelevant, -} - -fn main() {} diff --git a/src/test/ui/derives/issue-97343.stderr b/src/test/ui/derives/issue-97343.stderr deleted file mode 100644 index e83bbb5b6..000000000 --- a/src/test/ui/derives/issue-97343.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0109]: type arguments are not allowed on type parameter `Irrelevant` - --> $DIR/issue-97343.rs:4:23 - | -LL | #[derive(Debug)] - | ----- - | | - | not allowed on type parameter `Irrelevant` - | in this derive macro expansion -LL | pub struct Irrelevant { - | ^^^^^^^^^^ type argument not allowed - | -note: type parameter `Irrelevant` defined here - --> $DIR/issue-97343.rs:4:23 - | -LL | pub struct Irrelevant { - | ^^^^^^^^^^ - = 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 - -For more information about this error, try `rustc --explain E0109`. -- cgit v1.2.3