Improve 'mut ' diagnostic.

This commit is contained in:
Mazdak Farrokhzad
2019-08-27 23:44:44 +02:00
parent dbbe3363c9
commit 42e895d4d9
7 changed files with 82 additions and 37 deletions

View File

@@ -6,6 +6,9 @@
#![allow(warnings)]
pub fn main() {
let mut _ = 0; //~ ERROR `mut` must be followed by a named binding
let mut (_, _) = (0, 0); //~ ERROR `mut` must be followed by a named binding
let mut mut x = 0;
//~^ ERROR `mut` on a binding may not be repeated
//~| remove the additional `mut`s