Move unsafe destructor check from kind.rs into wf.rs
This commit is contained in:
parent
c31623b0e4
commit
7119974f82
6 changed files with 78 additions and 83 deletions
|
|
@ -16,7 +16,27 @@ struct Foo {
|
|||
}
|
||||
|
||||
impl Drop for Foo {
|
||||
//~^ ERROR cannot implement a destructor on a structure or enumeration that does not satisfy Send
|
||||
//~^ ERROR the trait `core::kinds::Send` is not implemented for the type `Foo`
|
||||
//~^^ NOTE cannot implement a destructor on a structure or enumeration that does not satisfy Send
|
||||
fn drop(&mut self) {
|
||||
}
|
||||
}
|
||||
|
||||
struct Bar<'a> {
|
||||
f: &'a int,
|
||||
}
|
||||
|
||||
impl<'a> Drop for Bar<'a> {
|
||||
//~^ ERROR E0141
|
||||
fn drop(&mut self) {
|
||||
}
|
||||
}
|
||||
|
||||
struct Baz {
|
||||
f: &'static int,
|
||||
}
|
||||
|
||||
impl Drop for Baz {
|
||||
fn drop(&mut self) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue