diff options
Diffstat (limited to 'src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr')
-rw-r--r-- | src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr new file mode 100644 index 000000000..bf74dd7de --- /dev/null +++ b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr @@ -0,0 +1,87 @@ +error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:1:11 + | +LL | fn foo1<T:Copy<U>, U>(x: T) {} + | ^^^^--- help: remove these generics + | | + | expected 0 generic arguments + | +note: trait defined here, with 0 generic parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14 + | +LL | trait Trait: Copy<dyn Send> {} + | ^^^^---------- help: remove these generics + | | + | expected 0 generic arguments + | +note: trait defined here, with 0 generic parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:7:21 + | +LL | struct MyStruct1<T: Copy<T>>; + | ^^^^--- help: remove these generics + | | + | expected 0 generic arguments + | +note: trait defined here, with 0 generic parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:10:25 + | +LL | struct MyStruct2<'a, T: Copy<'a>>; + | ^^^^---- help: remove these generics + | | + | expected 0 lifetime arguments + | +note: trait defined here, with 0 lifetime parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15 + | +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} + | ^^^^ -- help: remove this lifetime argument + | | + | expected 0 lifetime arguments + | +note: trait defined here, with 0 lifetime parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15 + | +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} + | ^^^^ - help: remove this generic argument + | | + | expected 0 generic arguments + | +note: trait defined here, with 0 generic parameters + --> $SRC_DIR/core/src/marker.rs:LL:COL + | +LL | pub trait Copy: Clone { + | ^^^^ + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0107`. |