summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0107.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/error-codes/E0107.stderr')
-rw-r--r--src/test/ui/error-codes/E0107.stderr149
1 files changed, 149 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr
new file mode 100644
index 000000000..5ca03b45d
--- /dev/null
+++ b/src/test/ui/error-codes/E0107.stderr
@@ -0,0 +1,149 @@
+error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied
+ --> $DIR/E0107.rs:13:11
+ |
+LL | buzz: Buzz<'a>,
+ | ^^^^ -- supplied 1 lifetime argument
+ | |
+ | expected 2 lifetime arguments
+ |
+note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
+ --> $DIR/E0107.rs:2:8
+ |
+LL | struct Buzz<'a, 'b>(&'a str, &'b str);
+ | ^^^^ -- --
+help: add missing lifetime argument
+ |
+LL | buzz: Buzz<'a, 'a>,
+ | ++++
+
+error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
+ --> $DIR/E0107.rs:17:10
+ |
+LL | bar: Bar<'a>,
+ | ^^^---- help: remove these generics
+ | |
+ | expected 0 lifetime arguments
+ |
+note: enum defined here, with 0 lifetime parameters
+ --> $DIR/E0107.rs:6:6
+ |
+LL | enum Bar {
+ | ^^^
+
+error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
+ --> $DIR/E0107.rs:21:11
+ |
+LL | foo2: Foo<'a, 'b, 'c>,
+ | ^^^ ------ help: remove these lifetime arguments
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:1:8
+ |
+LL | struct Foo<'a>(&'a str);
+ | ^^^ --
+
+error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
+ --> $DIR/E0107.rs:25:11
+ |
+LL | qux1: Qux<'a, 'b, i32>,
+ | ^^^ -- help: remove this lifetime argument
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:3:8
+ |
+LL | struct Qux<'a, T>(&'a T);
+ | ^^^ --
+
+error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
+ --> $DIR/E0107.rs:29:11
+ |
+LL | qux2: Qux<'a, i32, 'b>,
+ | ^^^ -- help: remove this lifetime argument
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:3:8
+ |
+LL | struct Qux<'a, T>(&'a T);
+ | ^^^ --
+
+error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
+ --> $DIR/E0107.rs:33:11
+ |
+LL | qux3: Qux<'a, 'b, 'c, i32>,
+ | ^^^ ------ help: remove these lifetime arguments
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:3:8
+ |
+LL | struct Qux<'a, T>(&'a T);
+ | ^^^ --
+
+error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
+ --> $DIR/E0107.rs:37:11
+ |
+LL | qux4: Qux<'a, i32, 'b, 'c>,
+ | ^^^ ------ help: remove these lifetime arguments
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:3:8
+ |
+LL | struct Qux<'a, T>(&'a T);
+ | ^^^ --
+
+error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
+ --> $DIR/E0107.rs:41:11
+ |
+LL | qux5: Qux<'a, 'b, i32, 'c>,
+ | ^^^ -- help: remove this lifetime argument
+ | |
+ | expected 1 lifetime argument
+ |
+note: struct defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/E0107.rs:3:8
+ |
+LL | struct Qux<'a, T>(&'a T);
+ | ^^^ --
+
+error[E0107]: this struct takes 0 lifetime arguments but 2 lifetime arguments were supplied
+ --> $DIR/E0107.rs:45:11
+ |
+LL | quux: Quux<'a, i32, 'b>,
+ | ^^^^ -- help: remove this lifetime argument
+ | |
+ | expected 0 lifetime arguments
+ |
+note: struct defined here, with 0 lifetime parameters
+ --> $DIR/E0107.rs:4:8
+ |
+LL | struct Quux<T>(T);
+ | ^^^^
+
+error[E0107]: this trait takes 0 generic arguments but 2 generic arguments were supplied
+ --> $DIR/E0107.rs:55:27
+ |
+LL | fn trait_bound_generic<I: T<u8, u16>>(_i: I) {
+ | ^ expected 0 generic arguments
+ |
+note: trait defined here, with 0 generic parameters
+ --> $DIR/E0107.rs:50:11
+ |
+LL | pub trait T {
+ | ^
+help: replace the generic bounds with the associated types
+ |
+LL | fn trait_bound_generic<I: T<A = u8, B = u16>>(_i: I) {
+ | ~~~~~~ ~~~~~~~
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0107`.