Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 6, 2019
1 parent 0f306a7 commit 7ed9066
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
@@ -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`
}
}
Expand Down
@@ -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

Expand Down

0 comments on commit 7ed9066

Please sign in to comment.