From 4e9bcb5d54d8cba113ebd9c94d293f376ac040ef Mon Sep 17 00:00:00 2001 From: Charles Lew Date: Sun, 11 Sep 2022 14:21:40 +0800 Subject: [PATCH] Update unit test outputs --- .../ui/generator/clone-impl-static.stderr | 8 +- src/test/ui/generator/clone-impl.stderr | 111 +++++++----------- 2 files changed, 45 insertions(+), 74 deletions(-) diff --git a/src/test/ui/generator/clone-impl-static.stderr b/src/test/ui/generator/clone-impl-static.stderr index cc15c4afd779..cbadf6f156a9 100644 --- a/src/test/ui/generator/clone-impl-static.stderr +++ b/src/test/ui/generator/clone-impl-static.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `[static generator@$DIR/clone-impl-static.rs:7:15: 9:6]: Copy` is not satisfied +error[E0277]: the trait bound `[static generator@$DIR/clone-impl-static.rs:7:15: 7:29]: Copy` is not satisfied --> $DIR/clone-impl-static.rs:10:16 | LL | check_copy(&gen); - | ---------- ^^^^ the trait `Copy` is not implemented for `[static generator@$DIR/clone-impl-static.rs:7:15: 9:6]` + | ---------- ^^^^ the trait `Copy` is not implemented for `[static generator@$DIR/clone-impl-static.rs:7:15: 7:29]` | | | required by a bound introduced by this call | @@ -12,11 +12,11 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `[static generator@$DIR/clone-impl-static.rs:7:15: 9:6]: Clone` is not satisfied +error[E0277]: the trait bound `[static generator@$DIR/clone-impl-static.rs:7:15: 7:29]: Clone` is not satisfied --> $DIR/clone-impl-static.rs:12:17 | LL | check_clone(&gen); - | ----------- ^^^^ the trait `Clone` is not implemented for `[static generator@$DIR/clone-impl-static.rs:7:15: 9:6]` + | ----------- ^^^^ the trait `Clone` is not implemented for `[static generator@$DIR/clone-impl-static.rs:7:15: 7:29]` | | | required by a bound introduced by this call | diff --git a/src/test/ui/generator/clone-impl.stderr b/src/test/ui/generator/clone-impl.stderr index e097250cca86..a92646b198cf 100644 --- a/src/test/ui/generator/clone-impl.stderr +++ b/src/test/ui/generator/clone-impl.stderr @@ -1,16 +1,11 @@ -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:36:23: 41:6]` - --> $DIR/clone-impl.rs:42:5 +error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:36:23: 36:30]` + --> $DIR/clone-impl.rs:42:16 | -LL | let gen_clone_0 = move || { - | _______________________- -LL | | let v = vec!['a']; -LL | | yield; -LL | | drop(v); -LL | | drop(clonable_0); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:36:23: 41:6]` -LL | check_copy(&gen_clone_0); - | ^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 41:6]`, the trait `Copy` is not implemented for `Vec` +LL | let gen_clone_0 = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:36:23: 36:30]` +... +LL | check_copy(&gen_clone_0); + | ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 36:30]`, the trait `Copy` is not implemented for `Vec` | note: captured value does not implement `Copy` --> $DIR/clone-impl.rs:40:14 @@ -23,19 +18,14 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:36:23: 41:6]` - --> $DIR/clone-impl.rs:42:5 +error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:36:23: 36:30]` + --> $DIR/clone-impl.rs:42:16 | -LL | let gen_clone_0 = move || { - | _______________________- -LL | | let v = vec!['a']; -LL | | yield; -LL | | drop(v); -LL | | drop(clonable_0); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:36:23: 41:6]` -LL | check_copy(&gen_clone_0); - | ^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 41:6]`, the trait `Copy` is not implemented for `Vec` +LL | let gen_clone_0 = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:36:23: 36:30]` +... +LL | check_copy(&gen_clone_0); + | ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 36:30]`, the trait `Copy` is not implemented for `Vec` | note: generator does not implement `Copy` as this value is used across a yield --> $DIR/clone-impl.rs:38:9 @@ -53,20 +43,14 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:46:23: 57:6]` - --> $DIR/clone-impl.rs:58:5 +error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:46:23: 46:30]` + --> $DIR/clone-impl.rs:58:16 | -LL | let gen_clone_1 = move || { - | _______________________- -LL | | let v = vec!['a']; -LL | | /* -LL | | let n = NonClone; -... | -LL | | drop(clonable_1); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:46:23: 57:6]` -LL | check_copy(&gen_clone_1); - | ^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:46:23: 57:6]`, the trait `Copy` is not implemented for `Vec` +LL | let gen_clone_1 = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:46:23: 46:30]` +... +LL | check_copy(&gen_clone_1); + | ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:46:23: 46:30]`, the trait `Copy` is not implemented for `Vec` | note: captured value does not implement `Copy` --> $DIR/clone-impl.rs:56:14 @@ -79,20 +63,14 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:46:23: 57:6]` - --> $DIR/clone-impl.rs:58:5 +error[E0277]: the trait bound `Vec: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:46:23: 46:30]` + --> $DIR/clone-impl.rs:58:16 | -LL | let gen_clone_1 = move || { - | _______________________- -LL | | let v = vec!['a']; -LL | | /* -LL | | let n = NonClone; -... | -LL | | drop(clonable_1); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:46:23: 57:6]` -LL | check_copy(&gen_clone_1); - | ^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:46:23: 57:6]`, the trait `Copy` is not implemented for `Vec` +LL | let gen_clone_1 = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:46:23: 46:30]` +... +LL | check_copy(&gen_clone_1); + | ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:46:23: 46:30]`, the trait `Copy` is not implemented for `Vec` | note: generator does not implement `Copy` as this value is used across a yield --> $DIR/clone-impl.rs:52:9 @@ -111,17 +89,14 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:62:25: 65:6]` - --> $DIR/clone-impl.rs:66:5 +error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:62:25: 62:32]` + --> $DIR/clone-impl.rs:66:16 | -LL | let gen_non_clone = move || { - | _________________________- -LL | | yield; -LL | | drop(non_clonable); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:62:25: 65:6]` -LL | check_copy(&gen_non_clone); - | ^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:62:25: 65:6]`, the trait `Copy` is not implemented for `NonClone` +LL | let gen_non_clone = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:62:25: 62:32]` +... +LL | check_copy(&gen_non_clone); + | ^^^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:62:25: 62:32]`, the trait `Copy` is not implemented for `NonClone` | note: captured value does not implement `Copy` --> $DIR/clone-impl.rs:64:14 @@ -138,18 +113,14 @@ help: consider annotating `NonClone` with `#[derive(Copy)]` LL | #[derive(Copy)] | -error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `[generator@$DIR/clone-impl.rs:62:25: 65:6]` - --> $DIR/clone-impl.rs:68:5 +error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `[generator@$DIR/clone-impl.rs:62:25: 62:32]` + --> $DIR/clone-impl.rs:68:17 | -LL | let gen_non_clone = move || { - | _________________________- -LL | | yield; -LL | | drop(non_clonable); -LL | | }; - | |_____- within this `[generator@$DIR/clone-impl.rs:62:25: 65:6]` +LL | let gen_non_clone = move || { + | ------- within this `[generator@$DIR/clone-impl.rs:62:25: 62:32]` ... -LL | check_clone(&gen_non_clone); - | ^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:62:25: 65:6]`, the trait `Clone` is not implemented for `NonClone` +LL | check_clone(&gen_non_clone); + | ^^^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:62:25: 62:32]`, the trait `Clone` is not implemented for `NonClone` | note: captured value does not implement `Clone` --> $DIR/clone-impl.rs:64:14