]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / migrations / mir_calls_to_shims.fixed
index a5652154682c5b672da67568c79a30dbc1f1e384..7df0dd76b44564b768e8989ece9e037c962d9136 100644 (file)
@@ -19,8 +19,9 @@ where
     let f = panic::AssertUnwindSafe(f);
     let result = panic::catch_unwind(move || {
         let _ = &f;
-        //~^ ERROR: `UnwindSafe`, `RefUnwindSafe` trait implementation for closure
-        //~| NOTE: in Rust 2018, this closure implements `UnwindSafe`, `RefUnwindSafe` as `f` implements `UnwindSafe`, `RefUnwindSafe`, but in Rust 2021, this closure will no longer implement `UnwindSafe`, `RefUnwindSafe` as `f.0` does not implement `UnwindSafe`, `RefUnwindSafe`
+        //~^ ERROR: changes to closure capture in Rust 2021 will affect which traits the closure implements [rust_2021_incompatible_closure_captures]
+        //~| NOTE: in Rust 2018, this closure implements `UnwindSafe`
+        //~| NOTE: in Rust 2018, this closure implements `RefUnwindSafe`
         //~| NOTE: for more information, see
         //~| HELP: add a dummy let to cause `f` to be fully captured
         f.0()