rustc 1.36.0-nightly (8dd4aae9a 2019-05-04)
binary: rustc
commit-hash: 8dd4aae9a83964cc08505da92d07ec68a3a2341d
commit-date: 2019-05-04
host: x86_64-pc-windows-msvc
release: 1.36.0-nightly
LLVM version: 8.0
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4f2bb9f701bdbbb3424e926989bc0f2f
#![feature(async_await)]
#![deny(unused_mut)]
pub struct S;
pub async fn foo(mut s: S) {
let _ = &mut s;
}
raises unused_mut on the s parameter of foo.
@taiki-e This is also raised in the test case you added in #60501, but I assume the test passes because it defaults to ignoring the warning.
Workaround:
-pub async fn foo(mut s: S) {
+pub async fn foo(s: S) {
+ let mut s = s;
let _ = &mut s;
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4f2bb9f701bdbbb3424e926989bc0f2f
raises
unused_muton thesparameter offoo.@taiki-e This is also raised in the test case you added in #60501, but I assume the test passes because it defaults to ignoring the warning.
Workaround: