diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-23 15:14:04 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-23 15:33:39 +0300 |
| commit | e1d871e2d97f8afe056642c6afc433c7d1d1ee1d (patch) | |
| tree | 443ed654bed16290a89a1925d1a10f7f71c529b4 /src/test | |
| parent | a96ba969156d257e5d5b692946fa8fe40ed6543a (diff) | |
| download | rust-e1d871e2d97f8afe056642c6afc433c7d1d1ee1d.tar.gz rust-e1d871e2d97f8afe056642c6afc433c7d1d1ee1d.zip | |
Remove built-in derive macros `Send` and `Sync`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/derives/deriving-bounds.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/derives/deriving-bounds.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-33571.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-33571.stderr | 8 |
4 files changed, 24 insertions, 6 deletions
diff --git a/src/test/ui/derives/deriving-bounds.rs b/src/test/ui/derives/deriving-bounds.rs index 607cfa1bb2c..52659bd11e0 100644 --- a/src/test/ui/derives/deriving-bounds.rs +++ b/src/test/ui/derives/deriving-bounds.rs @@ -1,9 +1,9 @@ #[derive(Send)] -//~^ ERROR this unsafe trait should be implemented explicitly +//~^ ERROR cannot find derive macro `Send` in this scope struct Test; #[derive(Sync)] -//~^ ERROR this unsafe trait should be implemented explicitly +//~^ ERROR cannot find derive macro `Sync` in this scope struct Test1; pub fn main() {} diff --git a/src/test/ui/derives/deriving-bounds.stderr b/src/test/ui/derives/deriving-bounds.stderr index deb84fd99bd..99976da72da 100644 --- a/src/test/ui/derives/deriving-bounds.stderr +++ b/src/test/ui/derives/deriving-bounds.stderr @@ -1,10 +1,22 @@ -error: this unsafe trait should be implemented explicitly +error: cannot find derive macro `Send` in this scope + --> $DIR/deriving-bounds.rs:1:10 + | +LL | #[derive(Send)] + | ^^^^ + | +note: unsafe traits like `Send` should be implemented explicitly --> $DIR/deriving-bounds.rs:1:10 | LL | #[derive(Send)] | ^^^^ -error: this unsafe trait should be implemented explicitly +error: cannot find derive macro `Sync` in this scope + --> $DIR/deriving-bounds.rs:5:10 + | +LL | #[derive(Sync)] + | ^^^^ + | +note: unsafe traits like `Sync` should be implemented explicitly --> $DIR/deriving-bounds.rs:5:10 | LL | #[derive(Sync)] diff --git a/src/test/ui/issues/issue-33571.rs b/src/test/ui/issues/issue-33571.rs index 223bbc3ff5e..147fb3fa8cf 100644 --- a/src/test/ui/issues/issue-33571.rs +++ b/src/test/ui/issues/issue-33571.rs @@ -1,5 +1,5 @@ #[derive(Clone, - Sync, //~ ERROR this unsafe trait should be implemented explicitly + Sync, //~ ERROR cannot find derive macro `Sync` in this scope Copy)] enum Foo {} diff --git a/src/test/ui/issues/issue-33571.stderr b/src/test/ui/issues/issue-33571.stderr index 5d83a08e907..78e72020774 100644 --- a/src/test/ui/issues/issue-33571.stderr +++ b/src/test/ui/issues/issue-33571.stderr @@ -1,4 +1,10 @@ -error: this unsafe trait should be implemented explicitly +error: cannot find derive macro `Sync` in this scope + --> $DIR/issue-33571.rs:2:10 + | +LL | Sync, + | ^^^^ + | +note: unsafe traits like `Sync` should be implemented explicitly --> $DIR/issue-33571.rs:2:10 | LL | Sync, |
