Skip to content

Commit 7ed9066

Browse files
committed
review comments
1 parent 0f306a7 commit 7ed9066

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/ui/issues/issue-66958.rs src/test/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// edition:2018
22

3-
struct Ia<S>(u32, S);
3+
struct Ia<S>(S);
44

55
impl<S> Ia<S> {
66
fn partial(_: S) {}
77
fn full(self) {}
88

99
async fn crash(self) {
10-
Self::partial(self.1);
10+
Self::partial(self.0);
1111
Self::full(self); //~ ERROR use of moved value: `self`
1212
}
1313
}

src/test/ui/issues/issue-66958.stderr src/test/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error[E0382]: use of moved value: `self`
2-
--> $DIR/issue-66958.rs:11:20
2+
--> $DIR/issue-66958-non-copy-infered-type-arg.rs:11:20
33
|
4-
LL | Self::partial(self.1);
4+
LL | Self::partial(self.0);
55
| ------ value moved here
66
LL | Self::full(self);
77
| ^^^^ value used here after partial move
88
|
9-
= note: move occurs because `self.1` has type `S`, which does not implement the `Copy` trait
9+
= note: move occurs because `self.0` has type `S`, which does not implement the `Copy` trait
1010

1111
error: aborting due to previous error
1212

0 commit comments

Comments
 (0)