]> git.lizzy.rs Git - rust.git/blob - tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr
Rollup merge of #106779 - RReverser:patch-2, r=Mark-Simulacrum
[rust.git] / tests / ui / implied-bounds / assoc-ty-wf-used-to-get-assoc-ty.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/assoc-ty-wf-used-to-get-assoc-ty.rs:24:31
3    |
4 LL |     let x: u8 = 3;
5    |         - binding `x` declared here
6 LL |     let _: &'static u8 = test(&x, &&3);
7    |                          -----^^------
8    |                          |    |
9    |                          |    borrowed value does not live long enough
10    |                          argument requires that `x` is borrowed for `'static`
11 ...
12 LL | }
13    | - `x` dropped here while still borrowed
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0597`.