review comments
This commit is contained in:
parent
0f306a7db4
commit
7ed9066766
@ -1,13 +1,13 @@
|
||||
// edition:2018
|
||||
|
||||
struct Ia<S>(u32, S);
|
||||
struct Ia<S>(S);
|
||||
|
||||
impl<S> Ia<S> {
|
||||
fn partial(_: S) {}
|
||||
fn full(self) {}
|
||||
|
||||
async fn crash(self) {
|
||||
Self::partial(self.1);
|
||||
Self::partial(self.0);
|
||||
Self::full(self); //~ ERROR use of moved value: `self`
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
error[E0382]: use of moved value: `self`
|
||||
--> $DIR/issue-66958.rs:11:20
|
||||
--> $DIR/issue-66958-non-copy-infered-type-arg.rs:11:20
|
||||
|
|
||||
LL | Self::partial(self.1);
|
||||
LL | Self::partial(self.0);
|
||||
| ------ value moved here
|
||||
LL | Self::full(self);
|
||||
| ^^^^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `self.1` has type `S`, which does not implement the `Copy` trait
|
||||
= note: move occurs because `self.0` has type `S`, which does not implement the `Copy` trait
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue
Block a user