]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/return-local-binding-from-desugaring.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / return-local-binding-from-desugaring.stderr
1 error[E0515]: cannot return value referencing temporary value
2   --> $DIR/return-local-binding-from-desugaring.rs:30:5
3    |
4 LL |     for ref x in xs {
5    |                  -- temporary value created here
6 ...
7 LL |     result
8    |     ^^^^^^ returns a value referencing data owned by the current function
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0515`.