rust/tests/ui/issues/issue-30438-c.stderr

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

18 lines
642 B
Plaintext
Raw Normal View History

2022-03-14 09:56:37 -05:00
warning: unnecessary lifetime parameter `'z`
--> $DIR/issue-30438-c.rs:7:74
|
LL | fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
| ^^
|
= help: you can use the `'static` lifetime directly, in place of `'z`
error[E0515]: cannot return reference to local variable `x`
2022-03-14 09:56:37 -05:00
--> $DIR/issue-30438-c.rs:10:5
2018-07-15 16:11:54 -05:00
|
LL | &x
| ^^ returns a reference to data owned by the current function
2018-07-15 16:11:54 -05:00
2022-03-14 09:56:37 -05:00
error: aborting due to previous error; 1 warning emitted
2018-07-15 16:11:54 -05:00
For more information about this error, try `rustc --explain E0515`.