mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
a5b639dc01
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`, the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have articles, so it seems unnecessary to have one here.
150 lines
4.4 KiB
Plaintext
150 lines
4.4 KiB
Plaintext
error[E0107]: 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]: 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]: 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]: 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]: 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]: 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]: 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]: 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]: 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]: 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`.
|