about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-13 21:48:12 +0000
committerbors <bors@rust-lang.org>2018-01-13 21:48:12 +0000
commitcf4c3cbe5524608fd3a8fcd626f3c73223022be7 (patch)
treef805e0b886a4355f85d277d83731b16d19a6baad /src/libcore
parente6072a7b3835f1875e81c9fd27799f9b20a0770c (diff)
parent22598776b04cc947f001191b47c18d981b46eec7 (diff)
downloadrust-cf4c3cbe5524608fd3a8fcd626f3c73223022be7.tar.gz
rust-cf4c3cbe5524608fd3a8fcd626f3c73223022be7.zip
Auto merge of #47416 - petrochenkov:remove-impl-for-dot-dot, r=petrochenkov
Remove `impl Foo for .. {}` in favor `auto trait Foo {}`

Rebase of https://github.com/rust-lang/rust/pull/46480 with restored parsing support.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/marker.rs20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index 17e77654cf5..3032fb2de33 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -40,16 +40,11 @@ use hash::Hasher;
 /// [ub]: ../../reference/behavior-considered-undefined.html
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
-pub unsafe trait Send {
+pub unsafe auto trait Send {
     // empty.
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[allow(unknown_lints)]
-#[allow(auto_impl)]
-unsafe impl Send for .. { }
-
-#[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !Send for *const T { }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !Send for *mut T { }
@@ -345,16 +340,11 @@ pub trait Copy : Clone {
 #[stable(feature = "rust1", since = "1.0.0")]
 #[lang = "sync"]
 #[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]
-pub unsafe trait Sync {
+pub unsafe auto trait Sync {
     // Empty
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[allow(unknown_lints)]
-#[allow(auto_impl)]
-unsafe impl Sync for .. { }
-
-#[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !Sync for *const T { }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !Sync for *mut T { }
@@ -563,11 +553,7 @@ mod impls {
 /// This affects, for example, whether a `static` of that type is
 /// placed in read-only static memory or writable static memory.
 #[lang = "freeze"]
-unsafe trait Freeze {}
-
-#[allow(unknown_lints)]
-#[allow(auto_impl)]
-unsafe impl Freeze for .. {}
+unsafe auto trait Freeze {}
 
 impl<T: ?Sized> !Freeze for UnsafeCell<T> {}
 unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}