diff options
Diffstat (limited to 'tests/ui/type/issue-100584.rs')
-rw-r--r-- | tests/ui/type/issue-100584.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/type/issue-100584.rs b/tests/ui/type/issue-100584.rs new file mode 100644 index 000000000..102846563 --- /dev/null +++ b/tests/ui/type/issue-100584.rs @@ -0,0 +1,15 @@ +#![deny(unused)] +fn foo(xyza: &str) { +//~^ ERROR unused variable: `xyza` + let _ = "{xyza}"; +} + +fn foo3(xyza: &str) { +//~^ ERROR unused variable: `xyza` + let _ = "aaa{xyza}bbb"; +} + +fn main() { + foo("x"); + foo3("xx"); +} |