Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cf4c3cb

Browse files
committedJan 13, 2018
Auto merge of #47416 - petrochenkov:remove-impl-for-dot-dot, r=petrochenkov
Remove `impl Foo for .. {}` in favor `auto trait Foo {}` Rebase of #46480 with restored parsing support.
2 parents e6072a7 + 2259877 commit cf4c3cb

File tree

85 files changed

+193
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+193
-804
lines changed
 

‎src/libcore/marker.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,10 @@ use hash::Hasher;
4040
/// [ub]: ../../reference/behavior-considered-undefined.html
4141
#[stable(feature = "rust1", since = "1.0.0")]
4242
#[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
43-
pub unsafe trait Send {
43+
pub unsafe auto trait Send {
4444
// empty.
4545
}
4646

47-
#[stable(feature = "rust1", since = "1.0.0")]
48-
#[allow(unknown_lints)]
49-
#[allow(auto_impl)]
50-
unsafe impl Send for .. { }
51-
5247
#[stable(feature = "rust1", since = "1.0.0")]
5348
impl<T: ?Sized> !Send for *const T { }
5449
#[stable(feature = "rust1", since = "1.0.0")]
@@ -345,15 +340,10 @@ pub trait Copy : Clone {
345340
#[stable(feature = "rust1", since = "1.0.0")]
346341
#[lang = "sync"]
347342
#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]
348-
pub unsafe trait Sync {
343+
pub unsafe auto trait Sync {
349344
// Empty
350345
}
351346

352-
#[stable(feature = "rust1", since = "1.0.0")]
353-
#[allow(unknown_lints)]
354-
#[allow(auto_impl)]
355-
unsafe impl Sync for .. { }
356-
357347
#[stable(feature = "rust1", since = "1.0.0")]
358348
impl<T: ?Sized> !Sync for *const T { }
359349
#[stable(feature = "rust1", since = "1.0.0")]
@@ -563,11 +553,7 @@ mod impls {
563553
/// This affects, for example, whether a `static` of that type is
564554
/// placed in read-only static memory or writable static memory.
565555
#[lang = "freeze"]
566-
unsafe trait Freeze {}
567-
568-
#[allow(unknown_lints)]
569-
#[allow(auto_impl)]
570-
unsafe impl Freeze for .. {}
556+
unsafe auto trait Freeze {}
571557

572558
impl<T: ?Sized> !Freeze for UnsafeCell<T> {}
573559
unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}

‎src/librustc/dep_graph/dep_node.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@ define_dep_nodes!( <'tcx>
496496
[] SuperPredicatesOfItem(DefId),
497497
[] TraitDefOfItem(DefId),
498498
[] AdtDefOfItem(DefId),
499-
[] IsAutoImpl(DefId),
500499
[] ImplTraitRef(DefId),
501500
[] ImplPolarity(DefId),
502501
[] FnSignature(DefId),

0 commit comments

Comments
 (0)
Please sign in to comment.