mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
|
--> $DIR/noisy-follow-up-erro.rs:12:30
|
|
|
|
|
LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
|
|
| ^^^ ---- help: remove the lifetime argument
|
|
| |
|
|
| expected 2 lifetime arguments
|
|
|
|
|
note: struct defined here, with 2 lifetime parameters: `'c`, `'d`
|
|
--> $DIR/noisy-follow-up-erro.rs:1:8
|
|
|
|
|
LL | struct Foo<'c, 'd>(&'c (), &'d ());
|
|
| ^^^ -- --
|
|
|
|
error[E0621]: explicit lifetime required in the type of `foo`
|
|
--> $DIR/noisy-follow-up-erro.rs:14:9
|
|
|
|
|
LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
|
|
| -------------------- help: add explicit lifetime `'a` to the type of `foo`: `&mut Foo<'_, 'a>`
|
|
LL |
|
|
LL | self.bar().map_err(|()| foo.acc(self))?;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0107, E0621.
|
|
For more information about an error, try `rustc --explain E0107`.
|