diff options
| author | Roxane <roxane.fruytier@hotmail.com> | 2021-07-09 10:18:55 -0400 |
|---|---|---|
| committer | Roxane <roxane.fruytier@hotmail.com> | 2021-07-09 10:18:55 -0400 |
| commit | 8cbeaf738267c8ddb5ab205dae4404e2f25eeeeb (patch) | |
| tree | bd3481fecdebf1103e56ab3afa5f051b74a5d23c /src | |
| parent | ca443729575da9c81e47da80adcbf1b14fa1e09b (diff) | |
| download | rust-8cbeaf738267c8ddb5ab205dae4404e2f25eeeeb.tar.gz rust-8cbeaf738267c8ddb5ab205dae4404e2f25eeeeb.zip | |
Address comments
Diffstat (limited to 'src')
6 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed index 42863b440fc..e2b7b8f0275 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed @@ -56,7 +56,7 @@ impl Clone for U { fn test_clone_trait() { let f = U(S(String::from("Hello World")), T(0)); let c = || { let _ = &f; - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f.1` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f` to be fully captured diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.rs b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.rs index ae987f526d0..6c56ca27475 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.rs @@ -56,7 +56,7 @@ impl Clone for U { fn test_clone_trait() { let f = U(S(String::from("Hello World")), T(0)); let c = || { - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f.1` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f` to be fully captured diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr index 2af85852c01..9c954b1465d 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr @@ -43,7 +43,7 @@ LL | LL | *fptr.0.0 = 20; ... -error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure, and drop order +error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order --> $DIR/auto_traits.rs:58:13 | LL | let c = || { diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed index e5102fee588..98f578abc44 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed +++ b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed @@ -21,7 +21,7 @@ fn test_multi_issues() { let f1 = U(S(String::from("foo")), T(0)); let f2 = U(S(String::from("bar")), T(0)); let c = || { let _ = (&f1, &f2); - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f1.0` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f1`, `f2` to be fully captured @@ -84,7 +84,7 @@ fn test_capturing_several_disjoint_fields_individually_1() { fn test_capturing_several_disjoint_fields_individually_2() { let f1 = U1(S(String::from("foo")), T(0), S(String::from("bar"))); let c = || { let _ = &f1; - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f1.0` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f1` to be fully captured diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs index d05c0bc1bbc..1577b91c960 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs +++ b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs @@ -21,7 +21,7 @@ fn test_multi_issues() { let f1 = U(S(String::from("foo")), T(0)); let f2 = U(S(String::from("bar")), T(0)); let c = || { - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f1.0` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f1`, `f2` to be fully captured @@ -84,7 +84,7 @@ fn test_capturing_several_disjoint_fields_individually_1() { fn test_capturing_several_disjoint_fields_individually_2() { let f1 = U1(S(String::from("foo")), T(0), S(String::from("bar"))); let c = || { - //~^ ERROR: `Clone` trait implementation for closure, and drop order + //~^ ERROR: `Clone` trait implementation for closure and drop order //~| NOTE: in Rust 2018, this closure would implement `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure would no longer implement `Clone` as `f1.0` does not implement `Clone` //~| NOTE: for more information, see //~| HELP: add a dummy let to cause `f1` to be fully captured diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr index 5f09230d45c..856fbdf5f9f 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr @@ -1,4 +1,4 @@ -error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure, and drop order +error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order --> $DIR/multi_diagnostics.rs:23:13 | LL | let c = || { @@ -75,7 +75,7 @@ LL | LL | ... -error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure, and drop order +error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order --> $DIR/multi_diagnostics.rs:86:13 | LL | let c = || { @@ -90,8 +90,8 @@ LL | let _f_1 = f1.1; LL | } | - | | - | in Rust 2018, `f1` would be dropped here, but in Rust 2021, only `f1.0` would be dropped here alongside the closure | in Rust 2018, `f1` would be dropped here, but in Rust 2021, only `f1.1` would be dropped here alongside the closure + | in Rust 2018, `f1` would be dropped here, but in Rust 2021, only `f1.0` would be dropped here alongside the closure | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> help: add a dummy let to cause `f1` to be fully captured |
