rust/tests/ui/lifetimes/noisy-follow-up-erro.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-05-27 03:22:32 -05:00
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 ()> {
2024-07-22 17:51:53 -05:00
| ^^^ ---- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
2024-05-27 03:22:32 -05:00
|
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`.