diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-31 13:45:26 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-09 21:08:16 +0000 |
| commit | 0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c (patch) | |
| tree | 088de30be238d47fcc5889f5e5eae9298366e92b /tests/ui/stability-attribute | |
| parent | be00c5a9b89161b7f45ba80340f709e8e41122f9 (diff) | |
| download | rust-0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c.tar.gz rust-0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c.zip | |
Avoid silencing relevant follow-up errors
Diffstat (limited to 'tests/ui/stability-attribute')
| -rw-r--r-- | tests/ui/stability-attribute/generics-default-stability-where.rs | 1 | ||||
| -rw-r--r-- | tests/ui/stability-attribute/generics-default-stability-where.stderr | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/ui/stability-attribute/generics-default-stability-where.rs b/tests/ui/stability-attribute/generics-default-stability-where.rs index 4afbca26264..142de12e152 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.rs +++ b/tests/ui/stability-attribute/generics-default-stability-where.rs @@ -5,6 +5,7 @@ extern crate unstable_generic_param; use unstable_generic_param::*; impl<T> Trait3<usize> for T where T: Trait2<usize> { //~ ERROR use of unstable library feature 'unstable_default' +//~^ ERROR `T` must be used as the type parameter for some local type fn foo() -> usize { T::foo() } } diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr index ce34f96771c..16b560e8a4b 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.stderr +++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr @@ -6,6 +6,16 @@ LL | impl<T> Trait3<usize> for T where T: Trait2<usize> { | = help: add `#![feature(unstable_default)]` to the crate attributes to enable -error: aborting due to 1 previous error +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) + --> $DIR/generics-default-stability-where.rs:7:6 + | +LL | impl<T> Trait3<usize> for T where T: Trait2<usize> { + | ^ type parameter `T` must be used as the type parameter for some local type + | + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local + = note: only traits defined in the current crate can be implemented for a type parameter + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0658`. +Some errors have detailed explanations: E0210, E0658. +For more information about an error, try `rustc --explain E0210`. |
