diff --git a/src/librustc_borrowck/borrowck/gather_loans/move_error.rs b/src/librustc_borrowck/borrowck/gather_loans/move_error.rs index 5ebb1ab32b8f8..c1e83588570e7 100644 --- a/src/librustc_borrowck/borrowck/gather_loans/move_error.rs +++ b/src/librustc_borrowck/borrowck/gather_loans/move_error.rs @@ -152,7 +152,7 @@ fn report_cannot_move_out_of<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>, ty::TyEnum(def, _) if def.has_dtor() => { let mut err = struct_span_err!(bccx, move_from.span, E0509, "cannot move out of type `{}`, \ - which defines the `Drop` trait", + which implements the `Drop` trait", b.ty); err.span_label(move_from.span, &format!("cannot move out of here")); err diff --git a/src/test/compile-fail/borrowck/borrowck-move-error-with-note.rs b/src/test/compile-fail/borrowck/borrowck-move-error-with-note.rs index 438a548819bc7..5d9c9d0bd4615 100644 --- a/src/test/compile-fail/borrowck/borrowck-move-error-with-note.rs +++ b/src/test/compile-fail/borrowck/borrowck-move-error-with-note.rs @@ -37,7 +37,7 @@ impl Drop for S { fn move_in_match() { match (S {f: "foo".to_string(), g: "bar".to_string()}) { - S { //~ ERROR cannot move out of type `S`, which defines the `Drop` trait + S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait //~| cannot move out of here f: _s, //~ NOTE to prevent move g: _t //~ NOTE and here diff --git a/src/test/compile-fail/borrowck/borrowck-move-out-of-struct-with-dtor.rs b/src/test/compile-fail/borrowck/borrowck-move-out-of-struct-with-dtor.rs index 3d13cbe30c5a2..16302d276cee2 100644 --- a/src/test/compile-fail/borrowck/borrowck-move-out-of-struct-with-dtor.rs +++ b/src/test/compile-fail/borrowck/borrowck-move-out-of-struct-with-dtor.rs @@ -16,17 +16,17 @@ impl Drop for S { fn move_in_match() { match (S {f:"foo".to_string()}) { S {f:_s} => {} - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } } fn move_in_let() { let S {f:_s} = S {f:"foo".to_string()}; - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } fn move_in_fn_arg(S {f:_s}: S) { - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } fn main() {} diff --git a/src/test/compile-fail/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs b/src/test/compile-fail/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs index 625f71849057b..f5fedb8d487ee 100644 --- a/src/test/compile-fail/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs +++ b/src/test/compile-fail/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs @@ -16,17 +16,17 @@ impl Drop for S { fn move_in_match() { match S("foo".to_string()) { S(_s) => {} - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } } fn move_in_let() { let S(_s) = S("foo".to_string()); - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } fn move_in_fn_arg(S(_s): S) { - //~^ ERROR cannot move out of type `S`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait } fn main() {} diff --git a/src/test/compile-fail/borrowck/borrowck-struct-update-with-dtor.rs b/src/test/compile-fail/borrowck/borrowck-struct-update-with-dtor.rs index bf1497420e2a7..c364788a9cc8d 100644 --- a/src/test/compile-fail/borrowck/borrowck-struct-update-with-dtor.rs +++ b/src/test/compile-fail/borrowck/borrowck-struct-update-with-dtor.rs @@ -19,11 +19,13 @@ struct T { a: isize, mv: Box } impl Drop for T { fn drop(&mut self) { } } fn f(s0:S) { - let _s2 = S{a: 2, ..s0}; //~error: cannot move out of type `S`, which defines the `Drop` trait + let _s2 = S{a: 2, ..s0}; + //~^ error: cannot move out of type `S`, which implements the `Drop` trait } fn g(s0:T) { - let _s2 = T{a: 2, ..s0}; //~error: cannot move out of type `T`, which defines the `Drop` trait + let _s2 = T{a: 2, ..s0}; + //~^ error: cannot move out of type `T`, which implements the `Drop` trait } fn main() { } diff --git a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs index 5078009d4b222..38049209903d1 100644 --- a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs +++ b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs @@ -23,6 +23,6 @@ fn main() { match x { X { x: y } => println!("contents: {}", y) - //~^ ERROR cannot move out of type `X`, which defines the `Drop` trait + //~^ ERROR cannot move out of type `X`, which implements the `Drop` trait } }