From 9d181ac2de9ccc9647155938fc1aef4d66d4a6f7 Mon Sep 17 00:00:00 2001 From: "leonardo.yvens" Date: Sat, 14 Oct 2017 19:14:31 -0300 Subject: [PATCH] Fix tests and rebase conflict --- src/librustc_incremental/persist/dirty_clean.rs | 2 +- src/test/compile-fail/auto-impl-future-compat.rs | 4 ++++ src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs | 1 + src/test/compile-fail/typeck-default-trait-impl-precedence.rs | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/librustc_incremental/persist/dirty_clean.rs b/src/librustc_incremental/persist/dirty_clean.rs index 0cb920a111d..e871c0dbdab 100644 --- a/src/librustc_incremental/persist/dirty_clean.rs +++ b/src/librustc_incremental/persist/dirty_clean.rs @@ -409,7 +409,7 @@ impl<'a, 'tcx> DirtyCleanVisitor<'a, 'tcx> { //HirItem::ItemTrait(..) => ("ItemTrait", LABELS_TRAIT), // `impl Trait for .. {}` - HirItem::ItemDefaultImpl(..) => ("ItemDefaultImpl", LABELS_IMPL), + HirItem::ItemAutoImpl(..) => ("ItemAutoImpl", LABELS_IMPL), // An implementation, eg `impl Trait for Foo { .. }` HirItem::ItemImpl(..) => ("ItemImpl", LABELS_IMPL), diff --git a/src/test/compile-fail/auto-impl-future-compat.rs b/src/test/compile-fail/auto-impl-future-compat.rs index 295564ca6a3..5c32a756398 100644 --- a/src/test/compile-fail/auto-impl-future-compat.rs +++ b/src/test/compile-fail/auto-impl-future-compat.rs @@ -8,5 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(optin_builtin_traits)] + trait Foo {} impl Foo for .. {} +//~^ ERROR The form `impl Foo for .. {}` will be removed, please use `auto trait Foo {}` +//~^^ WARN this was previously accepted by the compiler diff --git a/src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs b/src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs index 2e425ac96c5..1e1c55de87e 100644 --- a/src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs +++ b/src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs @@ -12,6 +12,7 @@ #![crate_type = "rlib"] pub trait DefaultedTrait { } +#[allow(auto_impl)] impl DefaultedTrait for .. { } pub struct Something { t: T } diff --git a/src/test/compile-fail/typeck-default-trait-impl-precedence.rs b/src/test/compile-fail/typeck-default-trait-impl-precedence.rs index 66c7a1c75ff..bdd6487b86d 100644 --- a/src/test/compile-fail/typeck-default-trait-impl-precedence.rs +++ b/src/test/compile-fail/typeck-default-trait-impl-precedence.rs @@ -16,6 +16,7 @@ #![feature(optin_builtin_traits)] trait Defaulted { } +#[allow(auto_impl)] impl Defaulted for .. { } impl<'a,T:Signed> Defaulted for &'a T { } impl<'a,T:Signed> Defaulted for &'a mut T { }