]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-84160.stderr
Auto merge of #84267 - dtolnay:ptrunit, r=nagisa
[rust.git] / src / test / ui / typeck / issue-84160.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-84160.rs:5:12
3    |
4 LL | fn mismatched_types_with_reference(x: &u32) -> &u32 {
5    |                                                ---- expected `&u32` because of return type
6 ...
7 LL |     return "test";
8    |            ^^^^^^ expected `u32`, found `str`
9    |
10    = note: expected reference `&u32`
11               found reference `&'static str`
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0308`.