summaryrefslogtreecommitdiffstats
path: root/tests/ui/auto-traits
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/auto-traits')
-rw-r--r--tests/ui/auto-traits/bad-generics-on-dyn.stderr2
-rw-r--r--tests/ui/auto-traits/has-arguments.stderr2
-rw-r--r--tests/ui/auto-traits/issue-117789.rs7
-rw-r--r--tests/ui/auto-traits/issue-117789.stderr21
-rw-r--r--tests/ui/auto-traits/issue-23080-2.current.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.next.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.rs2
-rw-r--r--tests/ui/auto-traits/issue-23080.stderr2
-rw-r--r--tests/ui/auto-traits/issue-83857-ub.stderr2
-rw-r--r--tests/ui/auto-traits/issue-84075.stderr2
-rw-r--r--tests/ui/auto-traits/str-contains-slice-conceptually.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr2
15 files changed, 41 insertions, 13 deletions
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<P> {} //~ ERROR auto traits cannot have generic parameters
+//~^ ERROR auto traits are experimental and possibly buggy
+impl<P> Trait<P> 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<P> {}
+ | -----^^^ 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<P> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #13231 <https://github.com/rust-lang/rust/issues/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<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) where Foo<T, U>: 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<T: AutoTrait + ?Sized>() {}
| ^^^^^^^^^ 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<T: 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<T: 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::<u32>();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.