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`
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
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
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^ 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
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
For more information about this error, try `rustc --explain E0515`.
|