about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-11-10 19:08:21 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2016-11-28 04:18:11 +0200
commit9aaf26e7aa4068d7e5643b136fb70ecd689a746d (patch)
tree60fdabfe4a91fa16c2b24d8d310bc3ff50ca28cc /src/test
parentf97c132cac79ef6bdf9f950b415c67bb43af387a (diff)
downloadrust-9aaf26e7aa4068d7e5643b136fb70ecd689a746d.tar.gz
rust-9aaf26e7aa4068d7e5643b136fb70ecd689a746d.zip
rustc: rework stability to be on-demand for type-directed lookup.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs2
-rw-r--r--src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/at-the-root.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attribute.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/define-two.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/error-on-test.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/illegal-proc-macro-derive-use.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/shadow-builtin.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/signature.rs2
-rw-r--r--src/test/compile-fail/E0254.rs2
-rw-r--r--src/test/compile-fail/E0259.rs2
-rw-r--r--src/test/compile-fail/E0260.rs2
-rw-r--r--src/test/compile-fail/borrowck/borrowck-borrowed-uniq-rvalue.rs1
-rw-r--r--src/test/compile-fail/borrowck/borrowck-call-is-borrow-issue-12224.rs2
-rw-r--r--src/test/compile-fail/borrowck/borrowck-insert-during-each.rs1
-rw-r--r--src/test/compile-fail/borrowck/borrowck-overloaded-call.rs2
-rw-r--r--src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Clone-enum.rs (renamed from src/test/compile-fail/deriving-span-Clone-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Clone-struct.rs (renamed from src/test/compile-fail/deriving-span-Clone-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Clone-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-Clone-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Debug-enum.rs (renamed from src/test/compile-fail/deriving-span-Show-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Debug-struct.rs (renamed from src/test/compile-fail/deriving-span-Show-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Debug-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-Show-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Default-struct.rs (renamed from src/test/compile-fail/deriving-span-Default-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Default-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-Default-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Eq-enum.rs (renamed from src/test/compile-fail/deriving-span-TotalEq-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Eq-struct.rs (renamed from src/test/compile-fail/deriving-span-TotalEq-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Eq-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Hash-enum.rs (renamed from src/test/compile-fail/deriving-span-Hash-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Hash-struct.rs (renamed from src/test/compile-fail/deriving-span-Hash-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Hash-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-Hash-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Ord-enum.rs (renamed from src/test/compile-fail/deriving-span-TotalOrd-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Ord-struct.rs (renamed from src/test/compile-fail/deriving-span-TotalOrd-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-Ord-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-enum.rs (renamed from src/test/compile-fail/deriving-span-PartialEq-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-struct.rs (renamed from src/test/compile-fail/deriving-span-PartialEq-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs (renamed from src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-enum.rs (renamed from src/test/compile-fail/deriving-span-PartialOrd-enum.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-struct.rs (renamed from src/test/compile-fail/deriving-span-PartialOrd-struct.rs)4
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs (renamed from src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs)4
-rw-r--r--src/test/compile-fail/forget-init-unsafe.rs2
-rw-r--r--src/test/compile-fail/issue-15094.rs2
-rw-r--r--src/test/compile-fail/issue-17545.rs2
-rw-r--r--src/test/compile-fail/issue-20225.rs2
-rw-r--r--src/test/compile-fail/issue-22034.rs2
-rw-r--r--src/test/compile-fail/issue-2392.rs3
-rw-r--r--src/test/compile-fail/issue-28075.rs1
-rw-r--r--src/test/compile-fail/issue-36881.rs2
-rw-r--r--src/test/compile-fail/issue-4335.rs2
-rw-r--r--src/test/compile-fail/lint-output-format-2.rs25
-rw-r--r--src/test/compile-fail/lint-output-format.rs5
-rw-r--r--src/test/compile-fail/lint-stability-2.rs423
-rw-r--r--src/test/compile-fail/lint-stability-deprecated.rs467
-rw-r--r--src/test/compile-fail/lint-stability-fields-deprecated.rs348
-rw-r--r--src/test/compile-fail/lint-stability-fields.rs142
-rw-r--r--src/test/compile-fail/lint-stability.rs240
-rw-r--r--src/test/compile-fail/map-types.rs2
-rw-r--r--src/test/compile-fail/mir-dataflow/def-inits-1.rs2
-rw-r--r--src/test/compile-fail/mir-dataflow/inits-1.rs2
-rw-r--r--src/test/compile-fail/mir-dataflow/uninits-1.rs2
-rw-r--r--src/test/compile-fail/mir-dataflow/uninits-2.rs2
-rw-r--r--src/test/compile-fail/non-copyable-void.rs2
-rw-r--r--src/test/compile-fail/overloaded-calls-bad.rs2
-rw-r--r--src/test/compile-fail/overloaded-calls-nontuple.rs2
-rw-r--r--src/test/compile-fail/range_inclusive_gate.rs6
-rw-r--r--src/test/compile-fail/reflect-assoc.rs2
-rw-r--r--src/test/compile-fail/reflect-object-param.rs2
-rw-r--r--src/test/compile-fail/reflect.rs2
-rw-r--r--src/test/compile-fail/regions-steal-closure.rs2
-rw-r--r--src/test/compile-fail/resolve_self_super_hint.rs2
-rw-r--r--src/test/compile-fail/stability-attribute-sanity-2.rs5
-rw-r--r--src/test/compile-fail/stability-attribute-sanity-3.rs22
-rw-r--r--src/test/compile-fail/static-mut-foreign-requires-unsafe.rs2
-rw-r--r--src/test/compile-fail/task-rng-isnt-sendable.rs2
-rw-r--r--src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs2
-rw-r--r--src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs2
-rw-r--r--src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs2
-rw-r--r--src/test/ui/span/issue-23827.rs2
84 files changed, 1496 insertions, 393 deletions
diff --git a/src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs b/src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs
index bbdc59c8431..7de6e58c784 100644
--- a/src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs
+++ b/src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs
@@ -16,7 +16,7 @@
 //  which is a reduction of this code to more directly show the reason
 //  for the error message we see here.)
 
-#![feature(const_fn)]
+#![feature(const_fn, rustc_private)]
 
 extern crate arena;
 
diff --git a/src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs b/src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs
index 46cb7605574..30829847a3a 100644
--- a/src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs
+++ b/src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs
@@ -19,6 +19,8 @@
 // (Also compare against dropck_tarena_cycle_checked.rs, from which
 // this was reduced to better understand its error message.)
 
+#![feature(rustc_private)]
+
 extern crate arena;
 
 use arena::TypedArena;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/at-the-root.rs b/src/test/compile-fail-fulldeps/proc-macro/at-the-root.rs
index b03e1e4f919..bb7478d9a5f 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/at-the-root.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/at-the-root.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attribute.rs b/src/test/compile-fail-fulldeps/proc-macro/attribute.rs
index e22339694f9..abf11637631 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attribute.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attribute.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/define-two.rs b/src/test/compile-fail-fulldeps/proc-macro/define-two.rs
index 420249b2581..bdb3c09c4d7 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/define-two.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/define-two.rs
@@ -11,7 +11,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/error-on-test.rs b/src/test/compile-fail-fulldeps/proc-macro/error-on-test.rs
index 1fd48f075de..4751679ddb8 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/error-on-test.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/error-on-test.rs
@@ -11,7 +11,7 @@
 // compile-flags: --test
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/illegal-proc-macro-derive-use.rs b/src/test/compile-fail-fulldeps/proc-macro/illegal-proc-macro-derive-use.rs
index 405994b36e2..70c8db5ddd2 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/illegal-proc-macro-derive-use.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/illegal-proc-macro-derive-use.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/shadow-builtin.rs b/src/test/compile-fail-fulldeps/proc-macro/shadow-builtin.rs
index 5cb2cc59aab..1bcd4b15eb8 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/shadow-builtin.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/shadow-builtin.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/signature.rs b/src/test/compile-fail-fulldeps/proc-macro/signature.rs
index 468c970599e..d9b19d1d85a 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/signature.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/signature.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro, proc_macro_lib)]
 #![allow(warnings)]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail/E0254.rs b/src/test/compile-fail/E0254.rs
index 3e4b7b9cad2..fe7ee1c129f 100644
--- a/src/test/compile-fail/E0254.rs
+++ b/src/test/compile-fail/E0254.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(collections)]
+
 extern crate collections;
 //~^ NOTE previous import of `collections` here
 
diff --git a/src/test/compile-fail/E0259.rs b/src/test/compile-fail/E0259.rs
index d3e876e2527..95be48b5ff1 100644
--- a/src/test/compile-fail/E0259.rs
+++ b/src/test/compile-fail/E0259.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(collections, libc)]
+
 extern crate collections;
 //~^ NOTE previous import of `collections` here
 
diff --git a/src/test/compile-fail/E0260.rs b/src/test/compile-fail/E0260.rs
index 63647cb4103..ae018d2ada9 100644
--- a/src/test/compile-fail/E0260.rs
+++ b/src/test/compile-fail/E0260.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(collections)]
+
 extern crate collections;
 //~^ NOTE previous import of `collections` here
 
diff --git a/src/test/compile-fail/borrowck/borrowck-borrowed-uniq-rvalue.rs b/src/test/compile-fail/borrowck/borrowck-borrowed-uniq-rvalue.rs
index 8bbecfd48c6..e4eca7e7ece 100644
--- a/src/test/compile-fail/borrowck/borrowck-borrowed-uniq-rvalue.rs
+++ b/src/test/compile-fail/borrowck/borrowck-borrowed-uniq-rvalue.rs
@@ -12,7 +12,6 @@
 
 #![feature(box_syntax)]
 
-extern crate collections;
 use std::collections::HashMap;
 
 fn main() {
diff --git a/src/test/compile-fail/borrowck/borrowck-call-is-borrow-issue-12224.rs b/src/test/compile-fail/borrowck/borrowck-call-is-borrow-issue-12224.rs
index e4ae565fe92..ba1ae64ec33 100644
--- a/src/test/compile-fail/borrowck/borrowck-call-is-borrow-issue-12224.rs
+++ b/src/test/compile-fail/borrowck/borrowck-call-is-borrow-issue-12224.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 // Ensure that invoking a closure counts as a unique immutable borrow
 
 type Fn<'a> = Box<FnMut() + 'a>;
diff --git a/src/test/compile-fail/borrowck/borrowck-insert-during-each.rs b/src/test/compile-fail/borrowck/borrowck-insert-during-each.rs
index 2c634865983..8499ebb8ac3 100644
--- a/src/test/compile-fail/borrowck/borrowck-insert-during-each.rs
+++ b/src/test/compile-fail/borrowck/borrowck-insert-during-each.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern crate collections;
 use std::collections::HashSet;
 
 struct Foo {
diff --git a/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs b/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
index 93c37524bf5..4c20688331b 100644
--- a/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
+++ b/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 
 use std::ops::{Fn, FnMut, FnOnce};
 
diff --git a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs
index 9badb5b262d..0b73f5bebb2 100644
--- a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Clone-enum.rs b/src/test/compile-fail/derives-span-Clone-enum.rs
index 6b71610778c..6944ea38b37 100644
--- a/src/test/compile-fail/deriving-span-Clone-enum.rs
+++ b/src/test/compile-fail/derives-span-Clone-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Clone-struct.rs b/src/test/compile-fail/derives-span-Clone-struct.rs
index 845da771de8..92bf148ccbd 100644
--- a/src/test/compile-fail/deriving-span-Clone-struct.rs
+++ b/src/test/compile-fail/derives-span-Clone-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs b/src/test/compile-fail/derives-span-Clone-tuple-struct.rs
index 698e5a79bef..21adfc90301 100644
--- a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Clone-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs
index 1d9099e8ed6..da777e8a14b 100644
--- a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Show-enum.rs b/src/test/compile-fail/derives-span-Debug-enum.rs
index ab31ca95bdb..bf5d3f2d81b 100644
--- a/src/test/compile-fail/deriving-span-Show-enum.rs
+++ b/src/test/compile-fail/derives-span-Debug-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Show-struct.rs b/src/test/compile-fail/derives-span-Debug-struct.rs
index eb8ac4649f2..b0b275fa2d3 100644
--- a/src/test/compile-fail/deriving-span-Show-struct.rs
+++ b/src/test/compile-fail/derives-span-Debug-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs b/src/test/compile-fail/derives-span-Debug-tuple-struct.rs
index b93db4ab535..9689054a7be 100644
--- a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Debug-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Default-struct.rs b/src/test/compile-fail/derives-span-Default-struct.rs
index 56fb3861173..68b99ed25b8 100644
--- a/src/test/compile-fail/deriving-span-Default-struct.rs
+++ b/src/test/compile-fail/derives-span-Default-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs b/src/test/compile-fail/derives-span-Default-tuple-struct.rs
index d0b9a7a3db9..822abe975a1 100644
--- a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Default-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs
index 6994aa76fff..fdc74d5fef6 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum.rs b/src/test/compile-fail/derives-span-Eq-enum.rs
index 279368d64ab..4bf30fdf93f 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-enum.rs
+++ b/src/test/compile-fail/derives-span-Eq-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalEq-struct.rs b/src/test/compile-fail/derives-span-Eq-struct.rs
index 8672e8e050e..685188f1337 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-struct.rs
+++ b/src/test/compile-fail/derives-span-Eq-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs b/src/test/compile-fail/derives-span-Eq-tuple-struct.rs
index e79b3b97410..0e636d027dd 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Eq-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs
index d9f4bfe1028..bfb6566223c 100644
--- a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Hash-enum.rs b/src/test/compile-fail/derives-span-Hash-enum.rs
index 1f5a5d5201f..99f28b376df 100644
--- a/src/test/compile-fail/deriving-span-Hash-enum.rs
+++ b/src/test/compile-fail/derives-span-Hash-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Hash-struct.rs b/src/test/compile-fail/derives-span-Hash-struct.rs
index 55a5e9ee6b3..acfd5aa7b2a 100644
--- a/src/test/compile-fail/deriving-span-Hash-struct.rs
+++ b/src/test/compile-fail/derives-span-Hash-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs b/src/test/compile-fail/derives-span-Hash-tuple-struct.rs
index 5c81c57dbcc..3d76b29834f 100644
--- a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Hash-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs
index 6d5e1fb75d4..06ee588e69f 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(Eq,PartialOrd,PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs b/src/test/compile-fail/derives-span-Ord-enum.rs
index 5b342901334..af9cfbc9110 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs
+++ b/src/test/compile-fail/derives-span-Ord-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(Eq,PartialOrd,PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs b/src/test/compile-fail/derives-span-Ord-struct.rs
index 61d9d8a76a9..4477d933a6c 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs
+++ b/src/test/compile-fail/derives-span-Ord-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(Eq,PartialOrd,PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs b/src/test/compile-fail/derives-span-Ord-tuple-struct.rs
index caef7968756..ebc75186412 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Ord-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(Eq,PartialOrd,PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs b/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs
index c340ad8a46a..7c98dcc2a6f 100644
--- a/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialEq-enum.rs b/src/test/compile-fail/derives-span-PartialEq-enum.rs
index 9051a6371fc..fe6355e456c 100644
--- a/src/test/compile-fail/deriving-span-PartialEq-enum.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialEq-struct.rs b/src/test/compile-fail/derives-span-PartialEq-struct.rs
index 310d4ecd03f..10d9d642776 100644
--- a/src/test/compile-fail/deriving-span-PartialEq-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs b/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs
index 9b6df0e77e1..c92eb0f63c4 100644
--- a/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs
index 5a2d2063d14..898104d0ab2 100644
--- a/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialOrd-enum.rs b/src/test/compile-fail/derives-span-PartialOrd-enum.rs
index 9341b6c3e8b..c0585999473 100644
--- a/src/test/compile-fail/deriving-span-PartialOrd-enum.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialOrd-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-struct.rs
index 8a707566efa..af05434af9d 100644
--- a/src/test/compile-fail/deriving-span-PartialOrd-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs
index ae1b8b44379..1afb7bc2b4c 100644
--- a/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
-extern crate rand;
-
 #[derive(PartialEq)]
 struct Error;
 
diff --git a/src/test/compile-fail/forget-init-unsafe.rs b/src/test/compile-fail/forget-init-unsafe.rs
index 46a18c98183..521f122f8af 100644
--- a/src/test/compile-fail/forget-init-unsafe.rs
+++ b/src/test/compile-fail/forget-init-unsafe.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(core_intrinsics)]
+
 use std::intrinsics::{init, forget};
 
 // Test that the `forget` and `init` intrinsics are really unsafe
diff --git a/src/test/compile-fail/issue-15094.rs b/src/test/compile-fail/issue-15094.rs
index da48bbb3ecd..1dd6763cbe5 100644
--- a/src/test/compile-fail/issue-15094.rs
+++ b/src/test/compile-fail/issue-15094.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 
 use std::{fmt, ops};
 
diff --git a/src/test/compile-fail/issue-17545.rs b/src/test/compile-fail/issue-17545.rs
index 49435f83ce3..45bc5ee07a5 100644
--- a/src/test/compile-fail/issue-17545.rs
+++ b/src/test/compile-fail/issue-17545.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
     bar.call((
         &(), //~ ERROR borrowed value does not live long enough
diff --git a/src/test/compile-fail/issue-20225.rs b/src/test/compile-fail/issue-20225.rs
index f38961c427a..da98f21e461 100644
--- a/src/test/compile-fail/issue-20225.rs
+++ b/src/test/compile-fail/issue-20225.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 
 struct Foo;
 
diff --git a/src/test/compile-fail/issue-22034.rs b/src/test/compile-fail/issue-22034.rs
index 3e0ab6d8921..dfa9520f38b 100644
--- a/src/test/compile-fail/issue-22034.rs
+++ b/src/test/compile-fail/issue-22034.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(libc)]
+
 extern crate libc;
 
 fn main() {
diff --git a/src/test/compile-fail/issue-2392.rs b/src/test/compile-fail/issue-2392.rs
index 790b774bd21..805725dd749 100644
--- a/src/test/compile-fail/issue-2392.rs
+++ b/src/test/compile-fail/issue-2392.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(core)]
+#![feature(core, fnbox)]
+
 use std::boxed::FnBox;
 
 struct FuncContainer {
diff --git a/src/test/compile-fail/issue-28075.rs b/src/test/compile-fail/issue-28075.rs
index d75f5f606a0..3e3d898e368 100644
--- a/src/test/compile-fail/issue-28075.rs
+++ b/src/test/compile-fail/issue-28075.rs
@@ -17,7 +17,6 @@
 extern crate lint_stability;
 
 use lint_stability::{unstable, deprecated}; //~ ERROR use of unstable library feature 'test_feature'
-//~^ WARNING use of deprecated item
 
 use lint_stability::unstable::{self as u}; //~ ERROR use of unstable library feature 'test_feature'
 
diff --git a/src/test/compile-fail/issue-36881.rs b/src/test/compile-fail/issue-36881.rs
index cca20e968e0..d75ac0c7f2e 100644
--- a/src/test/compile-fail/issue-36881.rs
+++ b/src/test/compile-fail/issue-36881.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(rand)]
+
 fn main() {
     extern crate rand;
     use rand::Rng; //~ ERROR unresolved import
diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs
index 09371fbafcb..51f5fc5ee98 100644
--- a/src/test/compile-fail/issue-4335.rs
+++ b/src/test/compile-fail/issue-4335.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 fn id<T>(t: T) -> T { t }
 
 fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
diff --git a/src/test/compile-fail/lint-output-format-2.rs b/src/test/compile-fail/lint-output-format-2.rs
new file mode 100644
index 00000000000..2f74325d19c
--- /dev/null
+++ b/src/test/compile-fail/lint-output-format-2.rs
@@ -0,0 +1,25 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -F unused_features
+// aux-build:lint_output_format.rs
+
+#![feature(foo)] //~ ERROR unused or unknown feature
+
+#![feature(test_feature)]
+
+extern crate lint_output_format;
+use lint_output_format::{foo, bar};
+//~^ WARNING use of deprecated item: text,
+
+fn main() {
+    let _x = foo(); //~ WARNING #[warn(deprecated)] on by default
+    let _y = bar();
+}
diff --git a/src/test/compile-fail/lint-output-format.rs b/src/test/compile-fail/lint-output-format.rs
index c22ad3182dd..81e0b708b87 100644
--- a/src/test/compile-fail/lint-output-format.rs
+++ b/src/test/compile-fail/lint-output-format.rs
@@ -11,13 +11,12 @@
 // compile-flags: -F unused_features
 // aux-build:lint_output_format.rs
 
-#![feature(foo)] //~ ERROR unused or unknown feature
+#![allow(deprecated)]
 
 extern crate lint_output_format; //~ ERROR use of unstable library feature
 use lint_output_format::{foo, bar}; //~ ERROR use of unstable library feature
-//~^ WARNING use of deprecated item: text,
 
 fn main() {
-    let _x = foo(); //~ WARNING #[warn(deprecated)] on by default
+    let _x = foo();
     let _y = bar(); //~ ERROR use of unstable library feature
 }
diff --git a/src/test/compile-fail/lint-stability-2.rs b/src/test/compile-fail/lint-stability-2.rs
new file mode 100644
index 00000000000..77917ff3cd3
--- /dev/null
+++ b/src/test/compile-fail/lint-stability-2.rs
@@ -0,0 +1,423 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:lint_stability.rs
+// aux-build:stability_cfg1.rs
+
+#![allow(deprecated)]
+#![allow(dead_code)]
+#![feature(staged_api)]
+
+#![stable(feature = "rust1", since = "1.0.0")]
+
+#[macro_use]
+extern crate lint_stability;
+
+mod cross_crate {
+    extern crate stability_cfg1;
+
+    use lint_stability::*;
+
+    fn test() {
+        type Foo = MethodTester;
+        let foo = MethodTester;
+
+        deprecated();
+        foo.method_deprecated();
+        Foo::method_deprecated(&foo);
+        <Foo>::method_deprecated(&foo);
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+
+        deprecated_text();
+        foo.method_deprecated_text();
+        Foo::method_deprecated_text(&foo);
+        <Foo>::method_deprecated_text(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+
+        foo.method_deprecated_unstable();
+        //~^ ERROR use of unstable library feature
+        Foo::method_deprecated_unstable(&foo);
+        //~^ ERROR use of unstable library feature
+        <Foo>::method_deprecated_unstable(&foo);
+        //~^ ERROR use of unstable library feature
+        foo.trait_deprecated_unstable();
+        //~^ ERROR use of unstable library feature
+        <Foo>::trait_deprecated_unstable(&foo);
+        //~^ ERROR use of unstable library feature
+
+        foo.method_deprecated_unstable_text();
+        //~^ ERROR use of unstable library feature
+        Foo::method_deprecated_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature
+        <Foo>::method_deprecated_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature
+        foo.trait_deprecated_unstable_text();
+        //~^ ERROR use of unstable library feature
+        <Foo>::trait_deprecated_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature
+
+        foo.method_unstable(); //~ ERROR use of unstable library feature
+        Foo::method_unstable(&foo); //~ ERROR use of unstable library feature
+        <Foo>::method_unstable(&foo); //~ ERROR use of unstable library feature
+        foo.trait_unstable(); //~ ERROR use of unstable library feature
+        <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
+
+        foo.method_unstable_text();
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        Foo::method_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        <Foo>::method_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        foo.trait_unstable_text();
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        <Foo>::trait_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature 'test_feature': text
+
+        stable();
+        foo.method_stable();
+        Foo::method_stable(&foo);
+        <Foo>::method_stable(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+
+        stable_text();
+        foo.method_stable_text();
+        Foo::method_stable_text(&foo);
+        <Foo>::method_stable_text(&foo);
+        foo.trait_stable_text();
+        Trait::trait_stable_text(&foo);
+        <Foo>::trait_stable_text(&foo);
+        <Foo as Trait>::trait_stable_text(&foo);
+
+        struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
+
+        let _ = DeprecatedStruct {
+            i: 0
+        };
+        let _ = StableStruct { i: 0 };
+
+        let _ = DeprecatedUnitStruct;
+        let _ = StableUnitStruct;
+
+        let _ = Enum::DeprecatedVariant;
+        let _ = Enum::StableVariant;
+
+        let _ = DeprecatedTupleStruct (1);
+        let _ = StableTupleStruct (1);
+
+        // At the moment, the lint checker only checks stability in
+        // in the arguments of macros.
+        // Eventually, we will want to lint the contents of the
+        // macro in the module *defining* it. Also, stability levels
+        // on macros themselves are not yet linted.
+        macro_test_arg!(deprecated_text());
+        macro_test_arg!(macro_test_arg!(deprecated_text()));
+    }
+
+    fn test_method_param<Foo: Trait>(foo: Foo) {
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+        foo.trait_deprecated_unstable();
+        //~^ ERROR use of unstable library feature
+        <Foo>::trait_deprecated_unstable(&foo);
+        //~^ ERROR use of unstable library feature
+        foo.trait_deprecated_unstable_text();
+        //~^ ERROR use of unstable library feature
+        <Foo>::trait_deprecated_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature
+        foo.trait_unstable(); //~ ERROR use of unstable library feature
+        <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
+        foo.trait_unstable_text();
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        <Foo>::trait_unstable_text(&foo);
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+    }
+
+    fn test_method_object(foo: &Trait) {
+        foo.trait_deprecated();
+        foo.trait_deprecated_text();
+        foo.trait_deprecated_unstable();
+        //~^ ERROR use of unstable library feature
+        foo.trait_deprecated_unstable_text();
+        //~^ ERROR use of unstable library feature
+        foo.trait_unstable(); //~ ERROR use of unstable library feature
+        foo.trait_unstable_text();
+        //~^ ERROR use of unstable library feature 'test_feature': text
+        foo.trait_stable();
+    }
+
+    struct S;
+
+    impl DeprecatedTrait for S {}
+    trait LocalTrait2 : DeprecatedTrait { }
+}
+
+mod this_crate {
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn deprecated() {}
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn deprecated_text() {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub fn unstable() {}
+    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    pub fn unstable_text() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn stable() {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn stable_text() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct MethodTester;
+
+    impl MethodTester {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        pub fn method_deprecated(&self) {}
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        pub fn method_deprecated_text(&self) {}
+
+        #[unstable(feature = "test_feature", issue = "0")]
+        pub fn method_unstable(&self) {}
+        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        pub fn method_unstable_text(&self) {}
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        pub fn method_stable(&self) {}
+        #[stable(feature = "rust1", since = "1.0.0")]
+        pub fn method_stable_text(&self) {}
+    }
+
+    pub trait Trait {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn trait_deprecated(&self) {}
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn trait_deprecated_text(&self) {}
+
+        #[unstable(feature = "test_feature", issue = "0")]
+        fn trait_unstable(&self) {}
+        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        fn trait_unstable_text(&self) {}
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        fn trait_stable(&self) {}
+        #[stable(feature = "rust1", since = "1.0.0")]
+        fn trait_stable_text(&self) {}
+    }
+
+    impl Trait for MethodTester {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedUnitStruct;
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableUnitStruct;
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableUnitStruct;
+
+    pub enum Enum {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        DeprecatedVariant,
+        #[unstable(feature = "test_feature", issue = "0")]
+        UnstableVariant,
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        StableVariant,
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedTupleStruct(isize);
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableTupleStruct(isize);
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableTupleStruct(isize);
+
+    fn test() {
+        // Only the deprecated cases of the following should generate
+        // errors, because other stability attributes now have meaning
+        // only *across* crates, not within a single crate.
+
+        type Foo = MethodTester;
+        let foo = MethodTester;
+
+        deprecated();
+        foo.method_deprecated();
+        Foo::method_deprecated(&foo);
+        <Foo>::method_deprecated(&foo);
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+
+        deprecated_text();
+        foo.method_deprecated_text();
+        Foo::method_deprecated_text(&foo);
+        <Foo>::method_deprecated_text(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+
+        unstable();
+        foo.method_unstable();
+        Foo::method_unstable(&foo);
+        <Foo>::method_unstable(&foo);
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+
+        unstable_text();
+        foo.method_unstable_text();
+        Foo::method_unstable_text(&foo);
+        <Foo>::method_unstable_text(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+
+        stable();
+        foo.method_stable();
+        Foo::method_stable(&foo);
+        <Foo>::method_stable(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+
+        stable_text();
+        foo.method_stable_text();
+        Foo::method_stable_text(&foo);
+        <Foo>::method_stable_text(&foo);
+        foo.trait_stable_text();
+        Trait::trait_stable_text(&foo);
+        <Foo>::trait_stable_text(&foo);
+        <Foo as Trait>::trait_stable_text(&foo);
+
+        let _ = DeprecatedStruct {
+            i: 0
+        };
+        let _ = UnstableStruct { i: 0 };
+        let _ = StableStruct { i: 0 };
+
+        let _ = DeprecatedUnitStruct;
+        let _ = UnstableUnitStruct;
+        let _ = StableUnitStruct;
+
+        let _ = Enum::DeprecatedVariant;
+        let _ = Enum::UnstableVariant;
+        let _ = Enum::StableVariant;
+
+        let _ = DeprecatedTupleStruct (1);
+        let _ = UnstableTupleStruct (1);
+        let _ = StableTupleStruct (1);
+    }
+
+    fn test_method_param<Foo: Trait>(foo: Foo) {
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+    }
+
+    fn test_method_object(foo: &Trait) {
+        foo.trait_deprecated();
+        foo.trait_deprecated_text();
+        foo.trait_unstable();
+        foo.trait_unstable_text();
+        foo.trait_stable();
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn test_fn_body() {
+        fn fn_in_body() {}
+        fn_in_body();
+    }
+
+    impl MethodTester {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn test_method_body(&self) {
+            fn fn_in_body() {}
+            fn_in_body();
+        }
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub trait DeprecatedTrait {
+        fn dummy(&self) { }
+    }
+
+    struct S;
+
+    impl DeprecatedTrait for S { }
+
+    trait LocalTrait : DeprecatedTrait { }
+}
+
+fn main() {}
diff --git a/src/test/compile-fail/lint-stability-deprecated.rs b/src/test/compile-fail/lint-stability-deprecated.rs
new file mode 100644
index 00000000000..d8813b6a610
--- /dev/null
+++ b/src/test/compile-fail/lint-stability-deprecated.rs
@@ -0,0 +1,467 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:lint_stability.rs
+// aux-build:inherited_stability.rs
+// aux-build:stability_cfg1.rs
+// aux-build:stability_cfg2.rs
+
+#![deny(deprecated)]
+#![allow(dead_code)]
+#![feature(staged_api, test_feature)]
+
+#![stable(feature = "rust1", since = "1.0.0")]
+
+#[macro_use]
+extern crate lint_stability;
+
+mod cross_crate {
+    extern crate stability_cfg1;
+    extern crate stability_cfg2;
+
+    use lint_stability::*;
+
+    fn test() {
+        type Foo = MethodTester;
+        let foo = MethodTester;
+
+        deprecated(); //~ ERROR use of deprecated item
+        foo.method_deprecated(); //~ ERROR use of deprecated item
+        Foo::method_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+
+        deprecated_text(); //~ ERROR use of deprecated item: text
+        foo.method_deprecated_text(); //~ ERROR use of deprecated item: text
+        Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+
+        deprecated_unstable(); //~ ERROR use of deprecated item
+        foo.method_deprecated_unstable(); //~ ERROR use of deprecated item
+        Foo::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo>::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+
+        deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        foo.method_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        Foo::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+
+        unstable();
+        foo.method_unstable();
+        Foo::method_unstable(&foo);
+        <Foo>::method_unstable(&foo);
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+
+        unstable_text();
+        foo.method_unstable_text();
+        Foo::method_unstable_text(&foo);
+        <Foo>::method_unstable_text(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+
+        stable();
+        foo.method_stable();
+        Foo::method_stable(&foo);
+        <Foo>::method_stable(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+
+        stable_text();
+        foo.method_stable_text();
+        Foo::method_stable_text(&foo);
+        <Foo>::method_stable_text(&foo);
+        foo.trait_stable_text();
+        Trait::trait_stable_text(&foo);
+        <Foo>::trait_stable_text(&foo);
+        <Foo as Trait>::trait_stable_text(&foo);
+
+        struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
+        struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
+        //~^ ERROR use of deprecated item
+
+        let _ = DeprecatedStruct { //~ ERROR use of deprecated item
+            i: 0 //~ ERROR use of deprecated item
+        };
+        let _ = DeprecatedUnstableStruct {
+            //~^ ERROR use of deprecated item
+            i: 0 //~ ERROR use of deprecated item
+        };
+        let _ = UnstableStruct { i: 0 };
+        let _ = StableStruct { i: 0 };
+
+        let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
+        let _ = DeprecatedUnstableUnitStruct; //~ ERROR use of deprecated item
+        let _ = UnstableUnitStruct;
+        let _ = StableUnitStruct;
+
+        let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
+        let _ = Enum::DeprecatedUnstableVariant; //~ ERROR use of deprecated item
+        let _ = Enum::UnstableVariant;
+        let _ = Enum::StableVariant;
+
+        let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
+        let _ = DeprecatedUnstableTupleStruct (1); //~ ERROR use of deprecated item
+        let _ = UnstableTupleStruct (1);
+        let _ = StableTupleStruct (1);
+
+        // At the moment, the lint checker only checks stability in
+        // in the arguments of macros.
+        // Eventually, we will want to lint the contents of the
+        // macro in the module *defining* it. Also, stability levels
+        // on macros themselves are not yet linted.
+        macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item: text
+        macro_test_arg!(deprecated_unstable_text()); //~ ERROR use of deprecated item: text
+        macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item: text
+    }
+
+    fn test_method_param<Foo: Trait>(foo: Foo) {
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+    }
+
+    fn test_method_object(foo: &Trait) {
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
+        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        foo.trait_unstable();
+        foo.trait_unstable_text();
+        foo.trait_stable();
+    }
+
+    struct S;
+
+    impl UnstableTrait for S { }
+    impl DeprecatedTrait for S {} //~ ERROR use of deprecated item: text
+    trait LocalTrait : UnstableTrait { }
+    trait LocalTrait2 : DeprecatedTrait { } //~ ERROR use of deprecated item: text
+
+    impl Trait for S {
+        fn trait_stable(&self) {}
+        fn trait_unstable(&self) {}
+    }
+}
+
+mod inheritance {
+    extern crate inherited_stability;
+    use self::inherited_stability::*;
+
+    fn test_inheritance() {
+        unstable();
+        stable();
+
+        stable_mod::unstable();
+        stable_mod::stable();
+
+        unstable_mod::deprecated(); //~ ERROR use of deprecated item
+        unstable_mod::unstable();
+
+        let _ = Unstable::UnstableVariant;
+        let _ = Unstable::StableVariant;
+
+        let x: usize = 0;
+        x.unstable();
+        x.stable();
+    }
+}
+
+mod this_crate {
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn deprecated() {}
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn deprecated_text() {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub fn unstable() {}
+    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    pub fn unstable_text() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn stable() {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn stable_text() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct MethodTester;
+
+    impl MethodTester {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        pub fn method_deprecated(&self) {}
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        pub fn method_deprecated_text(&self) {}
+
+        #[unstable(feature = "test_feature", issue = "0")]
+        pub fn method_unstable(&self) {}
+        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        pub fn method_unstable_text(&self) {}
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        pub fn method_stable(&self) {}
+        #[stable(feature = "rust1", since = "1.0.0")]
+        pub fn method_stable_text(&self) {}
+    }
+
+    pub trait Trait {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn trait_deprecated(&self) {}
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn trait_deprecated_text(&self) {}
+
+        #[unstable(feature = "test_feature", issue = "0")]
+        fn trait_unstable(&self) {}
+        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        fn trait_unstable_text(&self) {}
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        fn trait_stable(&self) {}
+        #[stable(feature = "rust1", since = "1.0.0")]
+        fn trait_stable_text(&self) {}
+    }
+
+    impl Trait for MethodTester {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableStruct {
+        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedUnitStruct;
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableUnitStruct;
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableUnitStruct;
+
+    pub enum Enum {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        DeprecatedVariant,
+        #[unstable(feature = "test_feature", issue = "0")]
+        UnstableVariant,
+
+        #[stable(feature = "rust1", since = "1.0.0")]
+        StableVariant,
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub struct DeprecatedTupleStruct(isize);
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub struct UnstableTupleStruct(isize);
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub struct StableTupleStruct(isize);
+
+    fn test() {
+        // Only the deprecated cases of the following should generate
+        // errors, because other stability attributes now have meaning
+        // only *across* crates, not within a single crate.
+
+        type Foo = MethodTester;
+        let foo = MethodTester;
+
+        deprecated(); //~ ERROR use of deprecated item
+        foo.method_deprecated(); //~ ERROR use of deprecated item
+        Foo::method_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+
+        deprecated_text(); //~ ERROR use of deprecated item: text
+        foo.method_deprecated_text(); //~ ERROR use of deprecated item: text
+        Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+
+        unstable();
+        foo.method_unstable();
+        Foo::method_unstable(&foo);
+        <Foo>::method_unstable(&foo);
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+
+        unstable_text();
+        foo.method_unstable_text();
+        Foo::method_unstable_text(&foo);
+        <Foo>::method_unstable_text(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+
+        stable();
+        foo.method_stable();
+        Foo::method_stable(&foo);
+        <Foo>::method_stable(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+
+        stable_text();
+        foo.method_stable_text();
+        Foo::method_stable_text(&foo);
+        <Foo>::method_stable_text(&foo);
+        foo.trait_stable_text();
+        Trait::trait_stable_text(&foo);
+        <Foo>::trait_stable_text(&foo);
+        <Foo as Trait>::trait_stable_text(&foo);
+
+        let _ = DeprecatedStruct {
+            //~^ ERROR use of deprecated item
+            i: 0 //~ ERROR use of deprecated item
+        };
+        let _ = UnstableStruct { i: 0 };
+        let _ = StableStruct { i: 0 };
+
+        let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
+        let _ = UnstableUnitStruct;
+        let _ = StableUnitStruct;
+
+        let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
+        let _ = Enum::UnstableVariant;
+        let _ = Enum::StableVariant;
+
+        let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
+        let _ = UnstableTupleStruct (1);
+        let _ = StableTupleStruct (1);
+    }
+
+    fn test_method_param<Foo: Trait>(foo: Foo) {
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_unstable();
+        Trait::trait_unstable(&foo);
+        <Foo>::trait_unstable(&foo);
+        <Foo as Trait>::trait_unstable(&foo);
+        foo.trait_unstable_text();
+        Trait::trait_unstable_text(&foo);
+        <Foo>::trait_unstable_text(&foo);
+        <Foo as Trait>::trait_unstable_text(&foo);
+        foo.trait_stable();
+        Trait::trait_stable(&foo);
+        <Foo>::trait_stable(&foo);
+        <Foo as Trait>::trait_stable(&foo);
+    }
+
+    fn test_method_object(foo: &Trait) {
+        foo.trait_deprecated(); //~ ERROR use of deprecated item
+        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        foo.trait_unstable();
+        foo.trait_unstable_text();
+        foo.trait_stable();
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn test_fn_body() {
+        fn fn_in_body() {}
+        fn_in_body(); //~ ERROR use of deprecated item: text
+    }
+
+    impl MethodTester {
+        #[unstable(feature = "test_feature", issue = "0")]
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        fn test_method_body(&self) {
+            fn fn_in_body() {}
+            fn_in_body(); //~ ERROR use of deprecated item: text
+        }
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub trait DeprecatedTrait {
+        fn dummy(&self) { }
+    }
+
+    struct S;
+
+    impl DeprecatedTrait for S { } //~ ERROR use of deprecated item
+
+    trait LocalTrait : DeprecatedTrait { } //~ ERROR use of deprecated item
+}
+
+fn main() {}
diff --git a/src/test/compile-fail/lint-stability-fields-deprecated.rs b/src/test/compile-fail/lint-stability-fields-deprecated.rs
new file mode 100644
index 00000000000..5da3e1a930d
--- /dev/null
+++ b/src/test/compile-fail/lint-stability-fields-deprecated.rs
@@ -0,0 +1,348 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:lint_stability_fields.rs
+#![deny(deprecated)]
+#![allow(dead_code)]
+#![feature(staged_api, test_feature)]
+
+#![stable(feature = "rust1", since = "1.0.0")]
+
+mod cross_crate {
+    extern crate lint_stability_fields;
+
+    use self::lint_stability_fields::*;
+
+    pub fn foo() {
+        let x = Stable {
+            inherit: 1,
+            override1: 2,
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        let _ = x.override1;
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Stable {
+            inherit: _,
+            override1: _,
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+        // all fine
+        let Stable { .. } = x;
+
+        let x = Stable2(1, 2, 3);
+
+        let _ = x.0;
+        let _ = x.1;
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Stable2(_,
+                   _,
+                   _)
+            //~^ ERROR use of deprecated item
+            = x;
+        // all fine
+        let Stable2(..) = x;
+
+
+        let x = Unstable {
+            inherit: 1,
+            override1: 2,
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        let _ = x.override1;
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Unstable {
+            inherit: _,
+            override1: _,
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+
+        let Unstable
+            // the patterns are all fine:
+            { .. } = x;
+
+
+        let x = Unstable2(1, 2, 3);
+
+        let _ = x.0;
+        let _ = x.1;
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Unstable2
+            (_,
+             _,
+             _)
+            //~^ ERROR use of deprecated item
+            = x;
+        let Unstable2
+            // the patterns are all fine:
+            (..) = x;
+
+
+        let x = Deprecated {
+            //~^ ERROR use of deprecated item
+            inherit: 1,
+            //~^ ERROR use of deprecated item
+            override1: 2,
+            //~^ ERROR use of deprecated item
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        //~^ ERROR use of deprecated item
+        let _ = x.override1;
+        //~^ ERROR use of deprecated item
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Deprecated {
+            //~^ ERROR use of deprecated item
+            inherit: _,
+            //~^ ERROR use of deprecated item
+            override1: _,
+            //~^ ERROR use of deprecated item
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+
+        let Deprecated
+            //~^ ERROR use of deprecated item
+            // the patterns are all fine:
+            { .. } = x;
+
+        let x = Deprecated2(1, 2, 3);
+        //~^ ERROR use of deprecated item
+
+        let _ = x.0;
+        //~^ ERROR use of deprecated item
+        let _ = x.1;
+        //~^ ERROR use of deprecated item
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Deprecated2
+        //~^ ERROR use of deprecated item
+            (_,
+             //~^ ERROR use of deprecated item
+             _,
+             //~^ ERROR use of deprecated item
+             _)
+             //~^ ERROR use of deprecated item
+            = x;
+        let Deprecated2
+        //~^ ERROR use of deprecated item
+            // the patterns are all fine:
+            (..) = x;
+    }
+}
+
+mod this_crate {
+    #[stable(feature = "rust1", since = "1.0.0")]
+    struct Stable {
+        inherit: u8,
+        #[unstable(feature = "test_feature", issue = "0")]
+        override1: u8,
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        #[unstable(feature = "test_feature", issue = "0")]
+        override2: u8,
+    }
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    struct Stable2(u8,
+                   #[stable(feature = "rust1", since = "1.0.0")] u8,
+                   #[unstable(feature = "test_feature", issue = "0")]
+                   #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    struct Unstable {
+        inherit: u8,
+        #[stable(feature = "rust1", since = "1.0.0")]
+        override1: u8,
+        #[rustc_deprecated(since = "1.0.0", reason = "text")]
+        #[unstable(feature = "test_feature", issue = "0")]
+        override2: u8,
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    struct Unstable2(u8,
+                     #[stable(feature = "rust1", since = "1.0.0")] u8,
+                     #[unstable(feature = "test_feature", issue = "0")]
+                     #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    struct Deprecated {
+        inherit: u8,
+        #[stable(feature = "rust1", since = "1.0.0")]
+        override1: u8,
+        #[unstable(feature = "test_feature", issue = "0")]
+        override2: u8,
+    }
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    struct Deprecated2(u8,
+                       #[stable(feature = "rust1", since = "1.0.0")] u8,
+                       #[unstable(feature = "test_feature", issue = "0")] u8);
+
+    pub fn foo() {
+        let x = Stable {
+            inherit: 1,
+            override1: 2,
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        let _ = x.override1;
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Stable {
+            inherit: _,
+            override1: _,
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+        // all fine
+        let Stable { .. } = x;
+
+        let x = Stable2(1, 2, 3);
+
+        let _ = x.0;
+        let _ = x.1;
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Stable2(_,
+                   _,
+                   _)
+            //~^ ERROR use of deprecated item
+            = x;
+        // all fine
+        let Stable2(..) = x;
+
+
+        let x = Unstable {
+            inherit: 1,
+            override1: 2,
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        let _ = x.override1;
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Unstable {
+            inherit: _,
+            override1: _,
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+
+        let Unstable
+            // the patterns are all fine:
+            { .. } = x;
+
+
+        let x = Unstable2(1, 2, 3);
+
+        let _ = x.0;
+        let _ = x.1;
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Unstable2
+            (_,
+             _,
+             _)
+            //~^ ERROR use of deprecated item
+            = x;
+        let Unstable2
+            // the patterns are all fine:
+            (..) = x;
+
+
+        let x = Deprecated {
+            //~^ ERROR use of deprecated item
+            inherit: 1,
+            //~^ ERROR use of deprecated item
+            override1: 2,
+            //~^ ERROR use of deprecated item
+            override2: 3,
+            //~^ ERROR use of deprecated item
+        };
+
+        let _ = x.inherit;
+        //~^ ERROR use of deprecated item
+        let _ = x.override1;
+        //~^ ERROR use of deprecated item
+        let _ = x.override2;
+        //~^ ERROR use of deprecated item
+
+        let Deprecated {
+            //~^ ERROR use of deprecated item
+            inherit: _,
+            //~^ ERROR use of deprecated item
+            override1: _,
+            //~^ ERROR use of deprecated item
+            override2: _
+            //~^ ERROR use of deprecated item
+        } = x;
+
+        let Deprecated
+            //~^ ERROR use of deprecated item
+            // the patterns are all fine:
+            { .. } = x;
+
+        let x = Deprecated2(1, 2, 3);
+        //~^ ERROR use of deprecated item
+
+        let _ = x.0;
+        //~^ ERROR use of deprecated item
+        let _ = x.1;
+        //~^ ERROR use of deprecated item
+        let _ = x.2;
+        //~^ ERROR use of deprecated item
+
+        let Deprecated2
+        //~^ ERROR use of deprecated item
+            (_,
+             //~^ ERROR use of deprecated item
+             _,
+             //~^ ERROR use of deprecated item
+             _)
+            //~^ ERROR use of deprecated item
+            = x;
+        let Deprecated2
+        //~^ ERROR use of deprecated item
+            // the patterns are all fine:
+            (..) = x;
+    }
+}
+
+fn main() {}
diff --git a/src/test/compile-fail/lint-stability-fields.rs b/src/test/compile-fail/lint-stability-fields.rs
index d63e1f901f5..1b605bdb893 100644
--- a/src/test/compile-fail/lint-stability-fields.rs
+++ b/src/test/compile-fail/lint-stability-fields.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:lint_stability_fields.rs
-#![deny(deprecated)]
+#![allow(deprecated)]
 #![allow(dead_code)]
 #![feature(staged_api)]
 
@@ -24,23 +24,17 @@ mod cross_crate {
         let x = Stable {
             inherit: 1,
             override1: 2, //~ ERROR use of unstable
-            override2: 3,
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+            override2: 3, //~ ERROR use of unstable
         };
 
         let _ = x.inherit;
         let _ = x.override1; //~ ERROR use of unstable
-        let _ = x.override2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.override2; //~ ERROR use of unstable
 
         let Stable {
             inherit: _,
             override1: _, //~ ERROR use of unstable
-            override2: _
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+            override2: _ //~ ERROR use of unstable
         } = x;
         // all fine
         let Stable { .. } = x;
@@ -49,15 +43,11 @@ mod cross_crate {
 
         let _ = x.0;
         let _ = x.1; //~ ERROR use of unstable
-        let _ = x.2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.2; //~ ERROR use of unstable
 
         let Stable2(_,
                    _, //~ ERROR use of unstable
-                   _)
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+                   _) //~ ERROR use of unstable
             = x;
         // all fine
         let Stable2(..) = x;
@@ -66,23 +56,17 @@ mod cross_crate {
         let x = Unstable { //~ ERROR use of unstable
             inherit: 1, //~ ERROR use of unstable
             override1: 2,
-            override2: 3,
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+            override2: 3, //~ ERROR use of unstable
         };
 
         let _ = x.inherit; //~ ERROR use of unstable
         let _ = x.override1;
-        let _ = x.override2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.override2; //~ ERROR use of unstable
 
         let Unstable { //~ ERROR use of unstable
             inherit: _, //~ ERROR use of unstable
             override1: _,
-            override2: _
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+            override2: _ //~ ERROR use of unstable
         } = x;
 
         let Unstable  //~ ERROR use of unstable
@@ -94,91 +78,50 @@ mod cross_crate {
 
         let _ = x.0; //~ ERROR use of unstable
         let _ = x.1;
-        let _ = x.2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.2; //~ ERROR use of unstable
 
         let Unstable2  //~ ERROR use of unstable
             (_, //~ ERROR use of unstable
              _,
-             _)
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+             _) //~ ERROR use of unstable
             = x;
         let Unstable2 //~ ERROR use of unstable
             // the patterns are all fine:
             (..) = x;
 
 
-        let x = Deprecated {
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
-            inherit: 1,
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+        let x = Deprecated { //~ ERROR use of unstable
+            inherit: 1, //~ ERROR use of unstable
             override1: 2,
-            //~^ ERROR use of deprecated item
-            override2: 3,
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+            override2: 3, //~ ERROR use of unstable
         };
 
-        let _ = x.inherit;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.inherit; //~ ERROR use of unstable
         let _ = x.override1;
-        //~^ ERROR use of deprecated item
-        let _ = x.override2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.override2; //~ ERROR use of unstable
 
-        let Deprecated {
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
-            inherit: _,
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+        let Deprecated { //~ ERROR use of unstable
+            inherit: _, //~ ERROR use of unstable
             override1: _,
-            //~^ ERROR use of deprecated item
-            override2: _
-            //~^ ERROR use of unstable
-            //~^^ ERROR use of deprecated item
+            override2: _ //~ ERROR use of unstable
         } = x;
 
-        let Deprecated
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable
+        let Deprecated //~ ERROR use of unstable
             // the patterns are all fine:
             { .. } = x;
 
-        let x = Deprecated2(1, 2, 3);
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let x = Deprecated2(1, 2, 3); //~ ERROR use of unstable
 
-        let _ = x.0;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.0; //~ ERROR use of unstable
         let _ = x.1;
-        //~^ ERROR use of deprecated item
-        let _ = x.2;
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let _ = x.2; //~ ERROR use of unstable
 
-        let Deprecated2
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
-            (_,
-             //~^ ERROR use of deprecated item
-             //~^^ ERROR use of unstable
+        let Deprecated2 //~ ERROR use of unstable
+            (_, //~ ERROR use of unstable
              _,
-             //~^ ERROR use of deprecated item
-             _)
-             //~^ ERROR use of deprecated item
-             //~^^ ERROR use of unstable
+             _) //~ ERROR use of unstable
             = x;
-        let Deprecated2
-        //~^ ERROR use of deprecated item
-        //~^^ ERROR use of unstable
+        let Deprecated2 //~ ERROR use of unstable
             // the patterns are all fine:
             (..) = x;
     }
@@ -238,19 +181,16 @@ mod this_crate {
             inherit: 1,
             override1: 2,
             override2: 3,
-            //~^ ERROR use of deprecated item
         };
 
         let _ = x.inherit;
         let _ = x.override1;
         let _ = x.override2;
-        //~^ ERROR use of deprecated item
 
         let Stable {
             inherit: _,
             override1: _,
             override2: _
-            //~^ ERROR use of deprecated item
         } = x;
         // all fine
         let Stable { .. } = x;
@@ -260,12 +200,10 @@ mod this_crate {
         let _ = x.0;
         let _ = x.1;
         let _ = x.2;
-        //~^ ERROR use of deprecated item
 
         let Stable2(_,
                    _,
                    _)
-            //~^ ERROR use of deprecated item
             = x;
         // all fine
         let Stable2(..) = x;
@@ -275,19 +213,16 @@ mod this_crate {
             inherit: 1,
             override1: 2,
             override2: 3,
-            //~^ ERROR use of deprecated item
         };
 
         let _ = x.inherit;
         let _ = x.override1;
         let _ = x.override2;
-        //~^ ERROR use of deprecated item
 
         let Unstable {
             inherit: _,
             override1: _,
             override2: _
-            //~^ ERROR use of deprecated item
         } = x;
 
         let Unstable
@@ -300,13 +235,11 @@ mod this_crate {
         let _ = x.0;
         let _ = x.1;
         let _ = x.2;
-        //~^ ERROR use of deprecated item
 
         let Unstable2
             (_,
              _,
              _)
-            //~^ ERROR use of deprecated item
             = x;
         let Unstable2
             // the patterns are all fine:
@@ -314,58 +247,37 @@ mod this_crate {
 
 
         let x = Deprecated {
-            //~^ ERROR use of deprecated item
             inherit: 1,
-            //~^ ERROR use of deprecated item
             override1: 2,
-            //~^ ERROR use of deprecated item
             override2: 3,
-            //~^ ERROR use of deprecated item
         };
 
         let _ = x.inherit;
-        //~^ ERROR use of deprecated item
         let _ = x.override1;
-        //~^ ERROR use of deprecated item
         let _ = x.override2;
-        //~^ ERROR use of deprecated item
 
         let Deprecated {
-            //~^ ERROR use of deprecated item
             inherit: _,
-            //~^ ERROR use of deprecated item
             override1: _,
-            //~^ ERROR use of deprecated item
             override2: _
-            //~^ ERROR use of deprecated item
         } = x;
 
         let Deprecated
-            //~^ ERROR use of deprecated item
             // the patterns are all fine:
             { .. } = x;
 
         let x = Deprecated2(1, 2, 3);
-        //~^ ERROR use of deprecated item
 
         let _ = x.0;
-        //~^ ERROR use of deprecated item
         let _ = x.1;
-        //~^ ERROR use of deprecated item
         let _ = x.2;
-        //~^ ERROR use of deprecated item
 
         let Deprecated2
-        //~^ ERROR use of deprecated item
             (_,
-             //~^ ERROR use of deprecated item
              _,
-             //~^ ERROR use of deprecated item
              _)
-            //~^ ERROR use of deprecated item
             = x;
         let Deprecated2
-        //~^ ERROR use of deprecated item
             // the patterns are all fine:
             (..) = x;
     }
diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs
index 953cd4a2ff5..1ece7a0b8e3 100644
--- a/src/test/compile-fail/lint-stability.rs
+++ b/src/test/compile-fail/lint-stability.rs
@@ -13,7 +13,7 @@
 // aux-build:stability_cfg1.rs
 // aux-build:stability_cfg2.rs
 
-#![deny(deprecated)]
+#![allow(deprecated)]
 #![allow(dead_code)]
 #![feature(staged_api)]
 
@@ -32,81 +32,46 @@ mod cross_crate {
         type Foo = MethodTester;
         let foo = MethodTester;
 
-        deprecated(); //~ ERROR use of deprecated item
-        foo.method_deprecated(); //~ ERROR use of deprecated item
-        Foo::method_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated item
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-
-        deprecated_text(); //~ ERROR use of deprecated item: text
-        foo.method_deprecated_text(); //~ ERROR use of deprecated item: text
-        Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
-        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-
-        deprecated_unstable(); //~ ERROR use of deprecated item
+        deprecated();
+        foo.method_deprecated();
+        Foo::method_deprecated(&foo);
+        <Foo>::method_deprecated(&foo);
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+
+        deprecated_text();
+        foo.method_deprecated_text();
+        Foo::method_deprecated_text(&foo);
+        <Foo>::method_deprecated_text(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+
+        deprecated_unstable();
         //~^ ERROR use of unstable library feature
-        foo.method_deprecated_unstable(); //~ ERROR use of deprecated item
+        Trait::trait_deprecated_unstable(&foo);
         //~^ ERROR use of unstable library feature
-        Foo::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        <Foo>::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        <Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        <Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
+        <Foo as Trait>::trait_deprecated_unstable(&foo);
         //~^ ERROR use of unstable library feature
 
-        deprecated_unstable_text(); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        foo.method_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        Foo::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        <Foo>::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        deprecated_unstable_text();
         //~^ ERROR use of unstable library feature
-        Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_unstable_text(&foo);
         //~^ ERROR use of unstable library feature
-        <Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_unstable_text(&foo);
         //~^ ERROR use of unstable library feature
 
         unstable(); //~ ERROR use of unstable library feature
-        foo.method_unstable(); //~ ERROR use of unstable library feature
-        Foo::method_unstable(&foo); //~ ERROR use of unstable library feature
-        <Foo>::method_unstable(&foo); //~ ERROR use of unstable library feature
-        foo.trait_unstable(); //~ ERROR use of unstable library feature
         Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
-        <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
 
         unstable_text();
         //~^ ERROR use of unstable library feature 'test_feature': text
-        foo.method_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
-        Foo::method_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
-        <Foo>::method_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
-        foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
         Trait::trait_unstable_text(&foo);
         //~^ ERROR use of unstable library feature 'test_feature': text
-        <Foo>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
         <Foo as Trait>::trait_unstable_text(&foo);
         //~^ ERROR use of unstable library feature 'test_feature': text
 
@@ -131,33 +96,31 @@ mod cross_crate {
         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
         //~^ ERROR use of unstable library feature
         struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
-        //~^ ERROR use of deprecated item
 
-        let _ = DeprecatedStruct { //~ ERROR use of deprecated item
-            i: 0 //~ ERROR use of deprecated item
+        let _ = DeprecatedStruct {
+            i: 0
         };
         let _ = DeprecatedUnstableStruct {
-            //~^ ERROR use of deprecated item
-            //~^^ ERROR use of unstable library feature
-            i: 0 //~ ERROR use of deprecated item
+            //~^ ERROR use of unstable library feature
+            i: 0
         };
         let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable library feature
         let _ = StableStruct { i: 0 };
 
-        let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
-        let _ = DeprecatedUnstableUnitStruct; //~ ERROR use of deprecated item
+        let _ = DeprecatedUnitStruct;
+        let _ = DeprecatedUnstableUnitStruct;
         //~^ ERROR use of unstable library feature
         let _ = UnstableUnitStruct; //~ ERROR use of unstable library feature
         let _ = StableUnitStruct;
 
-        let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
-        let _ = Enum::DeprecatedUnstableVariant; //~ ERROR use of deprecated item
+        let _ = Enum::DeprecatedVariant;
+        let _ = Enum::DeprecatedUnstableVariant;
         //~^ ERROR use of unstable library feature
         let _ = Enum::UnstableVariant; //~ ERROR use of unstable library feature
         let _ = Enum::StableVariant;
 
-        let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
-        let _ = DeprecatedUnstableTupleStruct (1); //~ ERROR use of deprecated item
+        let _ = DeprecatedTupleStruct (1);
+        let _ = DeprecatedUnstableTupleStruct (1);
         //~^ ERROR use of unstable library feature
         let _ = UnstableTupleStruct (1); //~ ERROR use of unstable library feature
         let _ = StableTupleStruct (1);
@@ -167,47 +130,33 @@ mod cross_crate {
         // Eventually, we will want to lint the contents of the
         // macro in the module *defining* it. Also, stability levels
         // on macros themselves are not yet linted.
-        macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item: text
-        macro_test_arg!(deprecated_unstable_text()); //~ ERROR use of deprecated item: text
+        macro_test_arg!(deprecated_text());
+        macro_test_arg!(deprecated_unstable_text());
         //~^ ERROR use of unstable library feature
-        macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item: text
+        macro_test_arg!(macro_test_arg!(deprecated_text()));
     }
 
     fn test_method_param<Foo: Trait>(foo: Foo) {
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
-        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        <Foo>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        <Foo as Trait>::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
+        Trait::trait_deprecated_unstable(&foo);
         //~^ ERROR use of unstable library feature
-        Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_unstable(&foo);
         //~^ ERROR use of unstable library feature
-        <Foo>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        Trait::trait_deprecated_unstable_text(&foo);
         //~^ ERROR use of unstable library feature
-        <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text
+        <Foo as Trait>::trait_deprecated_unstable_text(&foo);
         //~^ ERROR use of unstable library feature
-        foo.trait_unstable(); //~ ERROR use of unstable library feature
         Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
-        <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
-        foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
         Trait::trait_unstable_text(&foo);
         //~^ ERROR use of unstable library feature 'test_feature': text
-        <Foo>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
         <Foo as Trait>::trait_unstable_text(&foo);
         //~^ ERROR use of unstable library feature 'test_feature': text
         foo.trait_stable();
@@ -217,24 +166,17 @@ mod cross_crate {
     }
 
     fn test_method_object(foo: &Trait) {
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
-        foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item
-        //~^ ERROR use of unstable library feature
-        foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text
-        //~^ ERROR use of unstable library feature
-        foo.trait_unstable(); //~ ERROR use of unstable library feature
-        foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        foo.trait_deprecated();
+        foo.trait_deprecated_text();
         foo.trait_stable();
     }
 
     struct S;
 
     impl UnstableTrait for S { } //~ ERROR use of unstable library feature
-    impl DeprecatedTrait for S {} //~ ERROR use of deprecated item: text
+    impl DeprecatedTrait for S {}
     trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library feature
-    trait LocalTrait2 : DeprecatedTrait { } //~ ERROR use of deprecated item: text
+    trait LocalTrait2 : DeprecatedTrait { }
 
     impl Trait for S {
         fn trait_stable(&self) {}
@@ -253,14 +195,13 @@ mod inheritance {
         stable_mod::unstable(); //~ ERROR use of unstable library feature
         stable_mod::stable();
 
-        unstable_mod::deprecated(); //~ ERROR use of deprecated item
+        unstable_mod::deprecated();
         unstable_mod::unstable(); //~ ERROR use of unstable library feature
 
         let _ = Unstable::UnstableVariant; //~ ERROR use of unstable library feature
         let _ = Unstable::StableVariant;
 
         let x: usize = 0;
-        x.unstable(); //~ ERROR use of unstable library feature
         x.stable();
     }
 }
@@ -375,23 +316,23 @@ mod this_crate {
         type Foo = MethodTester;
         let foo = MethodTester;
 
-        deprecated(); //~ ERROR use of deprecated item
-        foo.method_deprecated(); //~ ERROR use of deprecated item
-        Foo::method_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated item
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-
-        deprecated_text(); //~ ERROR use of deprecated item: text
-        foo.method_deprecated_text(); //~ ERROR use of deprecated item: text
-        Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
-        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        deprecated();
+        foo.method_deprecated();
+        Foo::method_deprecated(&foo);
+        <Foo>::method_deprecated(&foo);
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+
+        deprecated_text();
+        foo.method_deprecated_text();
+        Foo::method_deprecated_text(&foo);
+        <Foo>::method_deprecated_text(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
 
         unstable();
         foo.method_unstable();
@@ -430,34 +371,33 @@ mod this_crate {
         <Foo as Trait>::trait_stable_text(&foo);
 
         let _ = DeprecatedStruct {
-            //~^ ERROR use of deprecated item
-            i: 0 //~ ERROR use of deprecated item
+            i: 0
         };
         let _ = UnstableStruct { i: 0 };
         let _ = StableStruct { i: 0 };
 
-        let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
+        let _ = DeprecatedUnitStruct;
         let _ = UnstableUnitStruct;
         let _ = StableUnitStruct;
 
-        let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
+        let _ = Enum::DeprecatedVariant;
         let _ = Enum::UnstableVariant;
         let _ = Enum::StableVariant;
 
-        let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
+        let _ = DeprecatedTupleStruct (1);
         let _ = UnstableTupleStruct (1);
         let _ = StableTupleStruct (1);
     }
 
     fn test_method_param<Foo: Trait>(foo: Foo) {
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated item
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
-        Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
-        <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated();
+        Trait::trait_deprecated(&foo);
+        <Foo>::trait_deprecated(&foo);
+        <Foo as Trait>::trait_deprecated(&foo);
+        foo.trait_deprecated_text();
+        Trait::trait_deprecated_text(&foo);
+        <Foo>::trait_deprecated_text(&foo);
+        <Foo as Trait>::trait_deprecated_text(&foo);
         foo.trait_unstable();
         Trait::trait_unstable(&foo);
         <Foo>::trait_unstable(&foo);
@@ -473,8 +413,8 @@ mod this_crate {
     }
 
     fn test_method_object(foo: &Trait) {
-        foo.trait_deprecated(); //~ ERROR use of deprecated item
-        foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
+        foo.trait_deprecated();
+        foo.trait_deprecated_text();
         foo.trait_unstable();
         foo.trait_unstable_text();
         foo.trait_stable();
@@ -484,7 +424,7 @@ mod this_crate {
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn test_fn_body() {
         fn fn_in_body() {}
-        fn_in_body(); //~ ERROR use of deprecated item: text
+        fn_in_body();
     }
 
     impl MethodTester {
@@ -492,7 +432,7 @@ mod this_crate {
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn test_method_body(&self) {
             fn fn_in_body() {}
-            fn_in_body(); //~ ERROR use of deprecated item: text
+            fn_in_body();
         }
     }
 
@@ -504,9 +444,9 @@ mod this_crate {
 
     struct S;
 
-    impl DeprecatedTrait for S { } //~ ERROR use of deprecated item
+    impl DeprecatedTrait for S { }
 
-    trait LocalTrait : DeprecatedTrait { } //~ ERROR use of deprecated item
+    trait LocalTrait : DeprecatedTrait { }
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs
index a419c6480e6..e24441c5497 100644
--- a/src/test/compile-fail/map-types.rs
+++ b/src/test/compile-fail/map-types.rs
@@ -10,8 +10,6 @@
 
 #![feature(box_syntax)]
 
-extern crate collections;
-
 use std::collections::HashMap;
 
 trait Map<K, V>
diff --git a/src/test/compile-fail/mir-dataflow/def-inits-1.rs b/src/test/compile-fail/mir-dataflow/def-inits-1.rs
index 1ba1bb35bb5..f3c9f29821e 100644
--- a/src/test/compile-fail/mir-dataflow/def-inits-1.rs
+++ b/src/test/compile-fail/mir-dataflow/def-inits-1.rs
@@ -10,7 +10,7 @@
 
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(rustc_attrs)]
+#![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
 use std::mem::{drop, replace};
diff --git a/src/test/compile-fail/mir-dataflow/inits-1.rs b/src/test/compile-fail/mir-dataflow/inits-1.rs
index c8cf44adb97..8a5ab6e420a 100644
--- a/src/test/compile-fail/mir-dataflow/inits-1.rs
+++ b/src/test/compile-fail/mir-dataflow/inits-1.rs
@@ -10,7 +10,7 @@
 
 // General test of maybe_inits state computed by MIR dataflow.
 
-#![feature(rustc_attrs)]
+#![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
 use std::mem::{drop, replace};
diff --git a/src/test/compile-fail/mir-dataflow/uninits-1.rs b/src/test/compile-fail/mir-dataflow/uninits-1.rs
index a82bfc89698..8df66ea815c 100644
--- a/src/test/compile-fail/mir-dataflow/uninits-1.rs
+++ b/src/test/compile-fail/mir-dataflow/uninits-1.rs
@@ -10,7 +10,7 @@
 
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(rustc_attrs)]
+#![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
 use std::mem::{drop, replace};
diff --git a/src/test/compile-fail/mir-dataflow/uninits-2.rs b/src/test/compile-fail/mir-dataflow/uninits-2.rs
index 8cfdae50662..2edd275e786 100644
--- a/src/test/compile-fail/mir-dataflow/uninits-2.rs
+++ b/src/test/compile-fail/mir-dataflow/uninits-2.rs
@@ -10,7 +10,7 @@
 
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(rustc_attrs)]
+#![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
 use std::mem::{drop, replace};
diff --git a/src/test/compile-fail/non-copyable-void.rs b/src/test/compile-fail/non-copyable-void.rs
index 6067b71280c..4383f3ede0d 100644
--- a/src/test/compile-fail/non-copyable-void.rs
+++ b/src/test/compile-fail/non-copyable-void.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(libc)]
+
 extern crate libc;
 
 fn main() {
diff --git a/src/test/compile-fail/overloaded-calls-bad.rs b/src/test/compile-fail/overloaded-calls-bad.rs
index 0aa9af3c8da..1b8284debb4 100644
--- a/src/test/compile-fail/overloaded-calls-bad.rs
+++ b/src/test/compile-fail/overloaded-calls-bad.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 
 use std::ops::FnMut;
 
diff --git a/src/test/compile-fail/overloaded-calls-nontuple.rs b/src/test/compile-fail/overloaded-calls-nontuple.rs
index ea47d676412..7113224664b 100644
--- a/src/test/compile-fail/overloaded-calls-nontuple.rs
+++ b/src/test/compile-fail/overloaded-calls-nontuple.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 
 use std::ops::FnMut;
 
diff --git a/src/test/compile-fail/range_inclusive_gate.rs b/src/test/compile-fail/range_inclusive_gate.rs
index deac152ec85..1d1153e951b 100644
--- a/src/test/compile-fail/range_inclusive_gate.rs
+++ b/src/test/compile-fail/range_inclusive_gate.rs
@@ -16,10 +16,8 @@
 pub fn main() {
     let _: std::ops::RangeInclusive<_> = { use std::intrinsics; 1 } ... { use std::intrinsics; 2 };
     //~^ ERROR use of unstable library feature 'inclusive_range'
-    //~^^ ERROR core_intrinsics
-    //~^^^ ERROR core_intrinsics
-    //~^^^^ WARN unused_imports
-    //~^^^^^ WARN unused_imports
+    //~| ERROR core_intrinsics
+    //~| ERROR core_intrinsics
 }
 
 
diff --git a/src/test/compile-fail/reflect-assoc.rs b/src/test/compile-fail/reflect-assoc.rs
index 7cac3f41d54..47da97daaff 100644
--- a/src/test/compile-fail/reflect-assoc.rs
+++ b/src/test/compile-fail/reflect-assoc.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(reflect_marker)]
+
 // Test that types that appear in assoc bindings in an object
 // type are subject to the reflect check.
 
diff --git a/src/test/compile-fail/reflect-object-param.rs b/src/test/compile-fail/reflect-object-param.rs
index 476b498ae64..be0dbd801b7 100644
--- a/src/test/compile-fail/reflect-object-param.rs
+++ b/src/test/compile-fail/reflect-object-param.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(reflect_marker)]
+
 // Test that types that appear in input types in an object type are
 // subject to the reflect check.
 
diff --git a/src/test/compile-fail/reflect.rs b/src/test/compile-fail/reflect.rs
index fdd569e2c1b..28ff7c82c2e 100644
--- a/src/test/compile-fail/reflect.rs
+++ b/src/test/compile-fail/reflect.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(reflect_marker)]
+
 // Test that there is no way to get a generic type `T` to be
 // considered as `Reflect` (or accessible via something that is
 // considered `Reflect`) without a reflect bound, but that any
diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs
index 8ade8b239b3..59fe1ce3af1 100644
--- a/src/test/compile-fail/regions-steal-closure.rs
+++ b/src/test/compile-fail/regions-steal-closure.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 struct closure_box<'a> {
     cl: Box<FnMut() + 'a>,
 }
diff --git a/src/test/compile-fail/resolve_self_super_hint.rs b/src/test/compile-fail/resolve_self_super_hint.rs
index a23ac80fca6..530dc873f75 100644
--- a/src/test/compile-fail/resolve_self_super_hint.rs
+++ b/src/test/compile-fail/resolve_self_super_hint.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(collections)]
+
 mod a {
     extern crate collections;
     use collections::HashMap;
diff --git a/src/test/compile-fail/stability-attribute-sanity-2.rs b/src/test/compile-fail/stability-attribute-sanity-2.rs
index d978d4ce0ea..0ddc3a8dceb 100644
--- a/src/test/compile-fail/stability-attribute-sanity-2.rs
+++ b/src/test/compile-fail/stability-attribute-sanity-2.rs
@@ -23,9 +23,4 @@ fn f2() { }
 #[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue'
 fn f3() { }
 
-#[macro_export]
-macro_rules! mac { //~ ERROR This node does not have a stability attribute
-    () => ()
-}
-
 fn main() { }
diff --git a/src/test/compile-fail/stability-attribute-sanity-3.rs b/src/test/compile-fail/stability-attribute-sanity-3.rs
new file mode 100644
index 00000000000..ddefd24b92f
--- /dev/null
+++ b/src/test/compile-fail/stability-attribute-sanity-3.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// More checks that stability attributes are used correctly
+
+#![feature(staged_api)]
+
+#![stable(feature = "test_feature", since = "1.0.0")]
+
+#[macro_export]
+macro_rules! mac { //~ ERROR This node does not have a stability attribute
+    () => ()
+}
+
+fn main() { }
diff --git a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs
index 0e44af19a7f..f52b128e7e5 100644
--- a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs
+++ b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(libc)]
+
 extern crate libc;
 
 extern {
diff --git a/src/test/compile-fail/task-rng-isnt-sendable.rs b/src/test/compile-fail/task-rng-isnt-sendable.rs
index c987d9f2f4e..d85717f8ce5 100644
--- a/src/test/compile-fail/task-rng-isnt-sendable.rs
+++ b/src/test/compile-fail/task-rng-isnt-sendable.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(rand)]
+
 // ensure that the ThreadRng isn't/doesn't become accidentally sendable.
 
 use std::__rand::ThreadRng;
diff --git a/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs b/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs
index b25b3318806..2e865b2aac8 100644
--- a/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs
+++ b/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs
@@ -11,7 +11,7 @@
 // Checks that the Fn trait hierarchy rules do not permit
 // Fn to be used where FnMut is implemented.
 
-#![feature(unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 #![feature(overloaded_calls)]
 
 use std::ops::{Fn,FnMut,FnOnce};
diff --git a/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs
index 5436a855ee7..bfb24c58722 100644
--- a/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs
+++ b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 // That a closure whose expected argument types include two distinct
 // bound regions.
 
diff --git a/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs b/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs
index 23306823c72..433c0c839c5 100644
--- a/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs
+++ b/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(core,unboxed_closures)]
+#![feature(core, fn_traits, unboxed_closures)]
 
 use std::marker::PhantomData;
 
diff --git a/src/test/ui/span/issue-23827.rs b/src/test/ui/span/issue-23827.rs
index a5ab443597b..01269714c16 100644
--- a/src/test/ui/span/issue-23827.rs
+++ b/src/test/ui/span/issue-23827.rs
@@ -10,7 +10,7 @@
 
 // Regression test for #23827
 
-#![feature(core, unboxed_closures)]
+#![feature(core, fn_traits, unboxed_closures)]
 
 pub struct Prototype {
     pub target: u32