]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-30438-c.stderr
Auto merge of #96802 - gimbles:windows_slice, r=thomcc
[rust.git] / src / test / ui / issues / issue-30438-c.stderr
1 warning: unnecessary lifetime parameter `'z`
2   --> $DIR/issue-30438-c.rs:7:74
3    |
4 LL | fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
5    |                                                                          ^^
6    |
7    = help: you can use the `'static` lifetime directly, in place of `'z`
8
9 error[E0515]: cannot return reference to local variable `x`
10   --> $DIR/issue-30438-c.rs:10:5
11    |
12 LL |     &x
13    |     ^^ returns a reference to data owned by the current function
14
15 error: aborting due to previous error; 1 warning emitted
16
17 For more information about this error, try `rustc --explain E0515`.