From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/auto-traits/bad-generics-on-dyn.stderr | 2 +- tests/ui/auto-traits/has-arguments.stderr | 2 +- tests/ui/auto-traits/issue-117789.rs | 7 +++++++ tests/ui/auto-traits/issue-117789.stderr | 21 +++++++++++++++++++++ tests/ui/auto-traits/issue-23080-2.current.stderr | 2 +- tests/ui/auto-traits/issue-23080-2.next.stderr | 2 +- tests/ui/auto-traits/issue-23080-2.rs | 2 +- tests/ui/auto-traits/issue-23080.stderr | 2 +- tests/ui/auto-traits/issue-83857-ub.stderr | 2 +- tests/ui/auto-traits/issue-84075.stderr | 2 +- .../str-contains-slice-conceptually.stderr | 2 +- .../typeck-auto-trait-no-supertraits.stderr | 2 +- ...ck-default-trait-impl-constituent-types-2.stderr | 2 +- ...peck-default-trait-impl-constituent-types.stderr | 2 +- .../typeck-default-trait-impl-precedence.stderr | 2 +- 15 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 tests/ui/auto-traits/issue-117789.rs create mode 100644 tests/ui/auto-traits/issue-117789.stderr (limited to 'tests/ui/auto-traits') diff --git a/tests/ui/auto-traits/bad-generics-on-dyn.stderr b/tests/ui/auto-traits/bad-generics-on-dyn.stderr index ade69ced6..06c7cbcd7 100644 --- a/tests/ui/auto-traits/bad-generics-on-dyn.stderr +++ b/tests/ui/auto-traits/bad-generics-on-dyn.stderr @@ -6,6 +6,6 @@ LL | auto trait Trait1<'a> {} | | | auto trait cannot have generic parameters -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0567`. diff --git a/tests/ui/auto-traits/has-arguments.stderr b/tests/ui/auto-traits/has-arguments.stderr index 3bba74bad..b8a680e6a 100644 --- a/tests/ui/auto-traits/has-arguments.stderr +++ b/tests/ui/auto-traits/has-arguments.stderr @@ -6,6 +6,6 @@ LL | auto trait Trait1<'outer> {} | | | auto trait cannot have generic parameters -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0567`. diff --git a/tests/ui/auto-traits/issue-117789.rs b/tests/ui/auto-traits/issue-117789.rs new file mode 100644 index 000000000..0c30931a1 --- /dev/null +++ b/tests/ui/auto-traits/issue-117789.rs @@ -0,0 +1,7 @@ +#![deny(suspicious_auto_trait_impls)] + +auto trait Trait

{} //~ ERROR auto traits cannot have generic parameters +//~^ ERROR auto traits are experimental and possibly buggy +impl

Trait

for () {} + +fn main() {} diff --git a/tests/ui/auto-traits/issue-117789.stderr b/tests/ui/auto-traits/issue-117789.stderr new file mode 100644 index 000000000..9a3a7efed --- /dev/null +++ b/tests/ui/auto-traits/issue-117789.stderr @@ -0,0 +1,21 @@ +error[E0567]: auto traits cannot have generic parameters + --> $DIR/issue-117789.rs:3:17 + | +LL | auto trait Trait

{} + | -----^^^ help: remove the parameters + | | + | auto trait cannot have generic parameters + +error[E0658]: auto traits are experimental and possibly buggy + --> $DIR/issue-117789.rs:3:1 + | +LL | auto trait Trait

{} + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #13231 for more information + = help: add `#![feature(auto_traits)]` to the crate attributes to enable + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0567, E0658. +For more information about an error, try `rustc --explain E0567`. diff --git a/tests/ui/auto-traits/issue-23080-2.current.stderr b/tests/ui/auto-traits/issue-23080-2.current.stderr index a57c6d9b0..178bfff97 100644 --- a/tests/ui/auto-traits/issue-23080-2.current.stderr +++ b/tests/ui/auto-traits/issue-23080-2.current.stderr @@ -6,6 +6,6 @@ LL | unsafe auto trait Trait { LL | type Output; | -----^^^^^^- help: remove these associated items -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0380`. diff --git a/tests/ui/auto-traits/issue-23080-2.next.stderr b/tests/ui/auto-traits/issue-23080-2.next.stderr index a57c6d9b0..178bfff97 100644 --- a/tests/ui/auto-traits/issue-23080-2.next.stderr +++ b/tests/ui/auto-traits/issue-23080-2.next.stderr @@ -6,6 +6,6 @@ LL | unsafe auto trait Trait { LL | type Output; | -----^^^^^^- help: remove these associated items -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0380`. diff --git a/tests/ui/auto-traits/issue-23080-2.rs b/tests/ui/auto-traits/issue-23080-2.rs index 882b8f393..d63cd9d5d 100644 --- a/tests/ui/auto-traits/issue-23080-2.rs +++ b/tests/ui/auto-traits/issue-23080-2.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/auto-traits/issue-23080.stderr b/tests/ui/auto-traits/issue-23080.stderr index f5d607298..5cea45060 100644 --- a/tests/ui/auto-traits/issue-23080.stderr +++ b/tests/ui/auto-traits/issue-23080.stderr @@ -9,6 +9,6 @@ LL | | println!("Hello"); LL | | } | |_____- help: remove these associated items -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0380`. diff --git a/tests/ui/auto-traits/issue-83857-ub.stderr b/tests/ui/auto-traits/issue-83857-ub.stderr index 23a2f62d9..80f9330eb 100644 --- a/tests/ui/auto-traits/issue-83857-ub.stderr +++ b/tests/ui/auto-traits/issue-83857-ub.stderr @@ -17,6 +17,6 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn generic(v: Foo, f: fn( as WithAssoc>::Output) -> i32) where Foo: Send { | +++++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/auto-traits/issue-84075.stderr b/tests/ui/auto-traits/issue-84075.stderr index 6fbdc669b..943d521ce 100644 --- a/tests/ui/auto-traits/issue-84075.stderr +++ b/tests/ui/auto-traits/issue-84075.stderr @@ -6,6 +6,6 @@ LL | auto trait Magic where Self: Copy {} | | | auto traits cannot have super traits or lifetime bounds -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0568`. diff --git a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr index 1cf16cebd..e1dae35be 100644 --- a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr +++ b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr @@ -11,6 +11,6 @@ note: required by a bound in `needs_auto_trait` LL | fn needs_auto_trait() {} | ^^^^^^^^^ required by this bound in `needs_auto_trait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr index 80f074103..23aae1363 100644 --- a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr +++ b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr @@ -6,6 +6,6 @@ LL | auto trait Magic: Copy {} | | | auto traits cannot have super traits or lifetime bounds -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0568`. diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr index 0c4970a72..aa5585a53 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr @@ -11,6 +11,6 @@ note: required by a bound in `is_mytrait` LL | fn is_mytrait() {} | ^^^^^^^ required by this bound in `is_mytrait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr index c575c485a..668cbc8ae 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr @@ -10,6 +10,6 @@ note: required by a bound in `is_mytrait` LL | fn is_mytrait() {} | ^^^^^^^ required by this bound in `is_mytrait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr index bd7aaf6fb..2498af996 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr @@ -22,6 +22,6 @@ LL - is_defaulted::<&'static u32>(); LL + is_defaulted::(); | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3