diff options
Diffstat (limited to 'src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr')
-rw-r--r-- | src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr new file mode 100644 index 000000000..e7565525a --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr @@ -0,0 +1,35 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:17:5 + | +LL | 5u32 + | ^^^^ + | +note: used non-generic type `u32` for generic parameter + --> $DIR/generic_nondefining_use.rs:7:12 + | +LL | type OneTy<T> = impl Debug; + | ^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:22:5 + | +LL | type OneLifetime<'a> = impl Debug; + | -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type +... +LL | 6u32 + | ^^^^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:27:5 + | +LL | 7u32 + | ^^^^ + | +note: used non-generic constant `123` for generic parameter + --> $DIR/generic_nondefining_use.rs:11:15 + | +LL | type OneConst<const X: usize> = impl Debug; + | ^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + |