]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs
Fix incorrect use mut diagnostics
[rust.git] / src / test / ui / closures / 2229_closure_analysis / diagnostics / mut_ref.rs
index 732c47298242a85b6f66f0f6cfd4c0d8d7e9a45d..676fde558dfbc684d81a732cef204de7effe072b 100644 (file)
@@ -13,7 +13,6 @@ fn imm_mut_ref() {
     let c = || {
     //~^ ERROR: cannot borrow `**ref_mref_x` as mutable, as it is behind a `&` reference
         **ref_mref_x = y;
-        //~^ERROR: cannot assign to `ref_mref_x`, as it is not declared as mutable
     };
 
     c();
@@ -28,7 +27,6 @@ fn mut_imm_ref() {
     let c = || {
     //~^ ERROR: cannot borrow `**mref_ref_x` as mutable, as it is behind a `&` reference
         **mref_ref_x = y;
-        //~^ERROR: cannot assign to `mref_ref_x`, as it is not declared as mutable
     };
 
     c();