]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/issue-100584.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / type / issue-100584.stderr
1 error: unused variable: `xyza`
2   --> $DIR/issue-100584.rs:2:8
3    |
4 LL | fn foo(xyza: &str) {
5    |        ^^^^ unused variable
6 LL |
7 LL |     let _ = "{xyza}";
8    |             -------- you might have meant to use string interpolation in this string literal
9    |
10 note: the lint level is defined here
11   --> $DIR/issue-100584.rs:1:9
12    |
13 LL | #![deny(unused)]
14    |         ^^^^^^
15    = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
16 help: string interpolation only works in `format!` invocations
17    |
18 LL |     let _ = format!("{xyza}");
19    |             ++++++++        +
20 help: if this is intentional, prefix it with an underscore
21    |
22 LL | fn foo(_xyza: &str) {
23    |        ~~~~~
24
25 error: unused variable: `xyza`
26   --> $DIR/issue-100584.rs:7:9
27    |
28 LL | fn foo3(xyza: &str) {
29    |         ^^^^ unused variable
30 LL |
31 LL |     let _ = "aaa{xyza}bbb";
32    |             -------------- you might have meant to use string interpolation in this string literal
33    |
34 help: string interpolation only works in `format!` invocations
35    |
36 LL |     let _ = format!("aaa{xyza}bbb");
37    |             ++++++++              +
38 help: if this is intentional, prefix it with an underscore
39    |
40 LL | fn foo3(_xyza: &str) {
41    |         ~~~~~
42
43 error: aborting due to 2 previous errors
44