diff options
| author | leonardo.yvens <leoyvens@gmail.com> | 2017-12-01 10:01:23 -0200 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-01-13 18:48:00 +0300 |
| commit | f93183adb43cff4cc0972ce133ce077f8cae1656 (patch) | |
| tree | 44375edf74c187abbe1cdde0c8d5b844b2b3196e /src/libcore/marker.rs | |
| parent | 9b2f8ac29eca4a42c35ce32b13231fcc1f9a3c9d (diff) | |
| download | rust-f93183adb43cff4cc0972ce133ce077f8cae1656.tar.gz rust-f93183adb43cff4cc0972ce133ce077f8cae1656.zip | |
Remove `impl Foo for ..` in favor of `auto trait Foo`
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
Diffstat (limited to 'src/libcore/marker.rs')
| -rw-r--r-- | src/libcore/marker.rs | 20 |
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> {} |
