diff options
13 files changed, 56 insertions, 56 deletions
diff --git a/compiler/rustc_typeck/src/check/upvar.rs b/compiler/rustc_typeck/src/check/upvar.rs index bbe843f468b..6f8dd39958c 100644 --- a/compiler/rustc_typeck/src/check/upvar.rs +++ b/compiler/rustc_typeck/src/check/upvar.rs @@ -511,8 +511,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { }; let diagnostic_msg = format!( - "`{}` causes {} to be fully captured", - migration_string, migrated_variables_concat + "add a dummy let to cause {} to be fully captured", + migrated_variables_concat ); diagnostics_builder.span_suggestion( diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed index 0f4c7dcb0df..300f67e8b1e 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed @@ -14,7 +14,7 @@ fn test1_all_need_migration() { let c = || { let _ = (&t, &t1, &t2); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1`, `t2` to be fully captured let _t = t.0; let _t1 = t1.0; @@ -33,7 +33,7 @@ fn test2_only_precise_paths_need_migration() { let c = || { let _ = (&t, &t1); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1)` causes `t`, `t1` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2; @@ -49,7 +49,7 @@ fn test3_only_by_value_need_migration() { let t1 = (String::new(), String::new()); let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; println!("{}", t1.1); }; @@ -67,7 +67,7 @@ fn test4_only_non_copy_types_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _t1 = t1.0; }; @@ -85,7 +85,7 @@ fn test5_only_drop_types_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _s = s.0; }; @@ -100,7 +100,7 @@ fn test6_move_closures_non_copy_types_might_need_migration() { let t1 = (String::new(), String::new()); let c = move || { let _ = (&t1, &t); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured + //~| HELP: add a dummy let to cause `t1`, `t` to be fully captured println!("{} {}", t1.1, t.1); }; @@ -115,7 +115,7 @@ fn test7_drop_non_drop_aggregate_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs index 2472c8afc87..a17c70d3e28 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs @@ -14,7 +14,7 @@ fn test1_all_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1`, `t2` to be fully captured let _t = t.0; let _t1 = t1.0; @@ -33,7 +33,7 @@ fn test2_only_precise_paths_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1)` causes `t`, `t1` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2; @@ -49,7 +49,7 @@ fn test3_only_by_value_need_migration() { let t1 = (String::new(), String::new()); let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; println!("{}", t1.1); }; @@ -67,7 +67,7 @@ fn test4_only_non_copy_types_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _t1 = t1.0; }; @@ -85,7 +85,7 @@ fn test5_only_drop_types_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _s = s.0; }; @@ -100,7 +100,7 @@ fn test6_move_closures_non_copy_types_might_need_migration() { let t1 = (String::new(), String::new()); let c = move || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured + //~| HELP: add a dummy let to cause `t1`, `t` to be fully captured println!("{} {}", t1.1, t.1); }; @@ -115,7 +115,7 @@ fn test7_drop_non_drop_aggregate_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr index 253a906a0ec..69c12d2bb56 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr @@ -16,7 +16,7 @@ note: the lint level is defined here | LL | #![deny(disjoint_capture_drop_reorder)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: `let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured +help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured | LL | let c = || { let _ = (&t, &t1, &t2); LL | @@ -39,7 +39,7 @@ LL | | let _t2 = t2; LL | | }; | |_____^ | -help: `let _ = (&t, &t1)` causes `t`, `t1` to be fully captured +help: add a dummy let to cause `t`, `t1` to be fully captured | LL | let c = || { let _ = (&t, &t1); LL | @@ -61,7 +61,7 @@ LL | | println!("{}", t1.1); LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -83,7 +83,7 @@ LL | | let _t1 = t1.0; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -105,7 +105,7 @@ LL | | let _s = s.0; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -126,7 +126,7 @@ LL | | println!("{} {}", t1.1, t.1); LL | | }; | |_____^ | -help: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured +help: add a dummy let to cause `t1`, `t` to be fully captured | LL | let c = move || { let _ = (&t1, &t); LL | @@ -146,7 +146,7 @@ LL | | let _t = t.0; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed index f17fab8e81f..a3e51a2b8e9 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed @@ -18,7 +18,7 @@ fn closure_contains_block() { let t = (Foo(0), Foo(0)); let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -29,7 +29,7 @@ fn closure_doesnt_contain_block() { let t = (Foo(0), Foo(0)); let c = || { let _ = &t; t.0 }; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured c(); } diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs index 33aff10c520..0eb837b6888 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs @@ -18,7 +18,7 @@ fn closure_contains_block() { let t = (Foo(0), Foo(0)); let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -29,7 +29,7 @@ fn closure_doesnt_contain_block() { let t = (Foo(0), Foo(0)); let c = || t.0; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured c(); } diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr index 611fbc4fff3..e6173217edc 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr @@ -14,7 +14,7 @@ note: the lint level is defined here | LL | #![deny(disjoint_capture_drop_reorder)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -29,7 +29,7 @@ error: drop order affected for closure because of `capture_disjoint_fields` LL | let c = || t.0; | ^^^^^^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; t.0 }; | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/precise.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/precise.fixed index 06932c1ae64..b739035c784 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/precise.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/precise.fixed @@ -18,7 +18,7 @@ fn test_precise_analysis_drop_paths_not_captured_by_move() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _t = &t.1; }; @@ -41,7 +41,7 @@ fn test_precise_analysis_long_path_missing() { let c = || { let _ = &u; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &u` causes `u` to be fully captured + //~| HELP: add a dummy let to cause `u` to be fully captured let _x = u.0.0; let _x = u.0.1; let _x = u.1.0; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/precise.rs b/src/test/ui/closures/2229_closure_analysis/migrations/precise.rs index 3661c2ca7ed..e1f29c9d0e9 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/precise.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/precise.rs @@ -18,7 +18,7 @@ fn test_precise_analysis_drop_paths_not_captured_by_move() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; let _t = &t.1; }; @@ -41,7 +41,7 @@ fn test_precise_analysis_long_path_missing() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &u` causes `u` to be fully captured + //~| HELP: add a dummy let to cause `u` to be fully captured let _x = u.0.0; let _x = u.0.1; let _x = u.1.0; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr index fcfd08d61e0..7135ded13c2 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr @@ -15,7 +15,7 @@ note: the lint level is defined here | LL | #![deny(disjoint_capture_drop_reorder)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -38,7 +38,7 @@ LL | | let _x = u.1.0; LL | | }; | |_____^ | -help: `let _ = &u` causes `u` to be fully captured +help: add a dummy let to cause `u` to be fully captured | LL | let c = || { let _ = &u; LL | diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed index b44624be5f9..e1b212153f4 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed @@ -24,7 +24,7 @@ fn test1_all_need_migration() { let c = || { let _ = (&t, &t1, &t2); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1`, `t2` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2.0; @@ -42,7 +42,7 @@ fn test2_only_precise_paths_need_migration() { let c = || { let _ = (&t, &t1); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1)` causes `t`, `t1` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2; @@ -58,7 +58,7 @@ fn test3_only_by_value_need_migration() { let t1 = (Foo(0), Foo(0)); let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; println!("{:?}", t1.1); }; @@ -75,7 +75,7 @@ fn test4_type_contains_drop_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -90,7 +90,7 @@ fn test5_drop_non_drop_aggregate_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -103,7 +103,7 @@ fn test6_significant_insignificant_drop_aggregate_need_migration() { let c = || { let _ = &t; //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.1; }; @@ -118,7 +118,7 @@ fn test7_move_closures_non_copy_types_might_need_migration() { let c = move || { let _ = (&t1, &t); //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured + //~| HELP: add a dummy let to cause `t1`, `t` to be fully captured println!("{:?} {:?}", t1.1, t.1); }; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.rs b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.rs index 5cb2f611bc1..106b2933515 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.rs @@ -24,7 +24,7 @@ fn test1_all_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1`, `t2` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2.0; @@ -42,7 +42,7 @@ fn test2_only_precise_paths_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP:` let _ = (&t, &t1)` causes `t`, `t1` to be fully captured + //~| HELP: add a dummy let to cause `t`, `t1` to be fully captured let _t = t.0; let _t1 = t1.0; let _t2 = t2; @@ -58,7 +58,7 @@ fn test3_only_by_value_need_migration() { let t1 = (Foo(0), Foo(0)); let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; println!("{:?}", t1.1); }; @@ -75,7 +75,7 @@ fn test4_type_contains_drop_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -90,7 +90,7 @@ fn test5_drop_non_drop_aggregate_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.0; }; @@ -103,7 +103,7 @@ fn test6_significant_insignificant_drop_aggregate_need_migration() { let c = || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = &t` causes `t` to be fully captured + //~| HELP: add a dummy let to cause `t` to be fully captured let _t = t.1; }; @@ -118,7 +118,7 @@ fn test7_move_closures_non_copy_types_might_need_migration() { let c = move || { //~^ ERROR: drop order affected for closure because of `capture_disjoint_fields` - //~| HELP: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured + //~| HELP: add a dummy let to cause `t1`, `t` to be fully captured println!("{:?} {:?}", t1.1, t.1); }; diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr index 2ca2baa9cbc..ee29fe13060 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr @@ -16,7 +16,7 @@ note: the lint level is defined here | LL | #![deny(disjoint_capture_drop_reorder)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: `let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured +help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured | LL | let c = || { let _ = (&t, &t1, &t2); LL | @@ -39,7 +39,7 @@ LL | | let _t2 = t2; LL | | }; | |_____^ | -help: `let _ = (&t, &t1)` causes `t`, `t1` to be fully captured +help: add a dummy let to cause `t`, `t1` to be fully captured | LL | let c = || { let _ = (&t, &t1); LL | @@ -61,7 +61,7 @@ LL | | println!("{:?}", t1.1); LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -82,7 +82,7 @@ LL | | let _t = t.0; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -102,7 +102,7 @@ LL | | let _t = t.0; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -122,7 +122,7 @@ LL | | let _t = t.1; LL | | }; | |_____^ | -help: `let _ = &t` causes `t` to be fully captured +help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; LL | @@ -142,7 +142,7 @@ LL | | println!("{:?} {:?}", t1.1, t.1); LL | | }; | |_____^ | -help: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured +help: add a dummy let to cause `t1`, `t` to be fully captured | LL | let c = move || { let _ = (&t1, &t); LL | |
