about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-21 20:54:57 +0000
committerbors <bors@rust-lang.org>2018-09-21 20:54:57 +0000
commit63c75d375d76d0bcc586f9cb5520ced24bc58450 (patch)
tree557dfeff33222618ded12e787d0daf586c57b54a
parent1002e404e1ae6b8b907c8655edd41380d0c561cb (diff)
parenta79db050c81b214062e54aae1ed6652dfef804d5 (diff)
downloadrust-63c75d375d76d0bcc586f9cb5520ced24bc58450.tar.gz
rust-63c75d375d76d0bcc586f9cb5520ced24bc58450.zip
Auto merge of #54223 - pnkfelix:issue-53764-uiify-run-pass, r=nikomatsakis
`ui`ify run-pass

This addresses the remainder of #53764 by first converting `src/test/run-pass` into another `ui`-style test suite, and then turning on `compare-mode=nll` for that new suite.

After this lands, we can address #54047 for the short term by moving all the `src/test/ui/run-pass` tests back to `src/test/run-pass`.

(Longer term, the compiler team's current (hypothetical sketch of a) plan (see [1][], [2][]) is unify all the tests by embedding these meta-properties like "// run-pass` into their headers explicitly and dropping the significance of their location on the file system.)

[1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/subject/weekly.20meeting.202018-09-13/near/133889370
[2]: https://github.com/rust-lang/rust/issues/54047#issuecomment-421030356
-rw-r--r--src/bootstrap/test.rs5
-rw-r--r--src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs1
-rw-r--r--src/test/run-pass-fulldeps/custom-derive-partial-eq.stderr6
-rw-r--r--src/test/run-pass-fulldeps/derive-no-std-not-supported.rs1
-rw-r--r--src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs4
-rw-r--r--src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs6
-rw-r--r--src/test/run-pass-fulldeps/deriving-global.rs7
-rw-r--r--src/test/run-pass-fulldeps/deriving-hygiene.rs4
-rw-r--r--src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs1
-rw-r--r--src/test/run-pass-fulldeps/issue-11881.rs8
-rw-r--r--src/test/run-pass-fulldeps/issue-14021.rs5
-rw-r--r--src/test/run-pass-fulldeps/issue-15149.rs1
-rw-r--r--src/test/run-pass-fulldeps/issue-15924.rs2
-rw-r--r--src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs2
-rw-r--r--src/test/run-pass-fulldeps/issue-24972.rs1
-rw-r--r--src/test/run-pass-fulldeps/issue-2804.rs2
-rw-r--r--src/test/run-pass-fulldeps/issue-4016.rs1
-rw-r--r--src/test/run-pass-fulldeps/issue-40663.rs1
-rw-r--r--src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs2
-rw-r--r--src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs4
-rw-r--r--src/test/run-pass-fulldeps/macro-crate.rs2
-rw-r--r--src/test/run-pass-fulldeps/macro-quote-cond.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/call-site.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-same-struct.stdout1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-union.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/empty-crate.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/issue-39889.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/issue-50061.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/lifetimes.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/load-two.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/smoke.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/struct-field-macro.rs1
-rw-r--r--src/test/run-pass-fulldeps/qquote.rs1
-rw-r--r--src/test/run-pass-fulldeps/quote-tokens.rs3
-rw-r--r--src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs1
-rw-r--r--src/test/run-pass-fulldeps/regions-mock-tcx.rs2
-rw-r--r--src/test/run-pass-fulldeps/rename-directory.rs2
-rw-r--r--src/test/run-pass/abort-on-c-abi.rs1
-rw-r--r--src/test/run-pass/alias-uninit-value.rs3
-rw-r--r--src/test/run-pass/align-with-extern-c-fn.rs3
-rw-r--r--src/test/run-pass/alignment-gep-tup-like-1.rs3
-rw-r--r--src/test/run-pass/alloca-from-derived-tydesc.rs3
-rw-r--r--src/test/run-pass/allocator-alloc-one.rs2
-rw-r--r--src/test/run-pass/asm-in-moved.rs1
-rw-r--r--src/test/run-pass/atomic-access-bool.rs1
-rw-r--r--src/test/run-pass/atomic-compare_exchange.rs2
-rw-r--r--src/test/run-pass/atomic-print.rs2
-rw-r--r--src/test/run-pass/attr-before-view-item.rs2
-rw-r--r--src/test/run-pass/attr-before-view-item2.rs2
-rw-r--r--src/test/run-pass/attr-mix-new.rs4
-rw-r--r--src/test/run-pass/attr-on-generic-formals.rs2
-rw-r--r--src/test/run-pass/augmented-assignments.rs1
-rw-r--r--src/test/run-pass/auto-instantiate.rs1
-rw-r--r--src/test/run-pass/auto-is-contextual.rs2
-rw-r--r--src/test/run-pass/binops.rs1
-rw-r--r--src/test/run-pass/blind-item-local-shadow.rs2
-rw-r--r--src/test/run-pass/block-arg-call-as.rs1
-rw-r--r--src/test/run-pass/block-expr-precedence.rs2
-rw-r--r--src/test/run-pass/builtin-clone-unwind.rs2
-rw-r--r--src/test/run-pass/builtin-superkinds-in-metadata.rs1
-rw-r--r--src/test/run-pass/builtin-superkinds-phantom-typaram.rs1
-rw-r--r--src/test/run-pass/cast.rs2
-rw-r--r--src/test/run-pass/cell-does-not-clone.rs1
-rw-r--r--src/test/run-pass/check-static-recursion-foreign.rs1
-rw-r--r--src/test/run-pass/cleanup-arm-conditional.rs2
-rw-r--r--src/test/run-pass/cleanup-rvalue-for-scope.rs3
-rw-r--r--src/test/run-pass/cleanup-rvalue-scopes.rs2
-rw-r--r--src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs3
-rw-r--r--src/test/run-pass/clone-with-exterior.rs1
-rw-r--r--src/test/run-pass/close-over-big-then-small-data.rs1
-rw-r--r--src/test/run-pass/collections-const-new.rs1
-rw-r--r--src/test/run-pass/command-before-exec.rs1
-rw-r--r--src/test/run-pass/command-exec.rs1
-rw-r--r--src/test/run-pass/complex.rs4
-rw-r--r--src/test/run-pass/core-run-destroy.rs4
-rw-r--r--src/test/run-pass/crt-static-off-works.rs1
-rw-r--r--src/test/run-pass/crt-static-on-works.rs1
-rw-r--r--src/test/run-pass/default-method-simple.rs1
-rw-r--r--src/test/run-pass/defaults-well-formedness.rs1
-rw-r--r--src/test/run-pass/discriminant_value.rs1
-rw-r--r--src/test/run-pass/diverging-fallback-control-flow.rs4
-rw-r--r--src/test/run-pass/diverging-fallback-method-chain.rs1
-rw-r--r--src/test/run-pass/double-ref.rs1
-rw-r--r--src/test/run-pass/early-ret-binop-add.rs2
-rw-r--r--src/test/run-pass/early-vtbl-resolution.rs2
-rw-r--r--src/test/run-pass/edition-keywords-2015-2015.rs3
-rw-r--r--src/test/run-pass/edition-keywords-2015-2018.rs3
-rw-r--r--src/test/run-pass/edition-keywords-2018-2015.rs1
-rw-r--r--src/test/run-pass/edition-keywords-2018-2018.rs1
-rw-r--r--src/test/run-pass/empty-allocation-rvalue-non-null.rs1
-rw-r--r--src/test/run-pass/env-home-dir.rs2
-rw-r--r--src/test/run-pass/env-null-vars.rs2
-rw-r--r--src/test/run-pass/epoch-gate-feature.rs2
-rw-r--r--src/test/run-pass/estr-uniq.rs2
-rw-r--r--src/test/run-pass/existential_type.rs3
-rw-r--r--src/test/run-pass/explicit-i-suffix.rs1
-rw-r--r--src/test/run-pass/export-glob-imports-target.rs2
-rw-r--r--src/test/run-pass/expr-block.rs1
-rw-r--r--src/test/run-pass/expr-empty-ret.rs1
-rw-r--r--src/test/run-pass/exterior.rs1
-rw-r--r--src/test/run-pass/fixup-deref-mut.rs1
-rw-r--r--src/test/run-pass/format-hygiene.rs1
-rw-r--r--src/test/run-pass/fsu-moves-and-copies.rs2
-rw-r--r--src/test/run-pass/guards-not-exhaustive.rs1
-rw-r--r--src/test/run-pass/guards.rs1
-rw-r--r--src/test/run-pass/hashmap-memory.rs3
-rw-r--r--src/test/run-pass/html-literals.rs1
-rw-r--r--src/test/run-pass/if-ret.rs1
-rw-r--r--src/test/run-pass/ignore-all-the-things.rs3
-rw-r--r--src/test/run-pass/infer-fn-tail-expr.rs1
-rw-r--r--src/test/run-pass/init-large-type.rs1
-rw-r--r--src/test/run-pass/init-res-into-things.rs2
-rw-r--r--src/test/run-pass/instantiable.rs2
-rw-r--r--src/test/run-pass/invalid_const_promotion.rs1
-rw-r--r--src/test/run-pass/issue-53728.rs1
-rw-r--r--src/test/run-pass/item-attributes.rs5
-rw-r--r--src/test/run-pass/item-name-overload.rs1
-rw-r--r--src/test/run-pass/keyword-changes-2012-07-31.rs1
-rw-r--r--src/test/run-pass/kindck-implicit-close-over-mut-var.rs2
-rw-r--r--src/test/run-pass/lambda-infer-unresolved.rs1
-rw-r--r--src/test/run-pass/large-records.rs1
-rw-r--r--src/test/run-pass/last-use-in-block.rs2
-rw-r--r--src/test/run-pass/last-use-in-cap-clause.rs1
-rw-r--r--src/test/run-pass/last-use-is-capture.rs1
-rw-r--r--src/test/run-pass/lazy-init.rs1
-rw-r--r--src/test/run-pass/lib-defaults.rs2
-rw-r--r--src/test/run-pass/link-section.rs1
-rw-r--r--src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs1
-rw-r--r--src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs1
-rw-r--r--src/test/run-pass/list.rs1
-rw-r--r--src/test/run-pass/liveness-assign-imm-local-after-ret.rs1
-rw-r--r--src/test/run-pass/log-knows-the-names-of-variants-in-std.rs2
-rw-r--r--src/test/run-pass/log-knows-the-names-of-variants.rs2
-rw-r--r--src/test/run-pass/max-min-classes.rs1
-rw-r--r--src/test/run-pass/mid-path-type-params.rs1
-rw-r--r--src/test/run-pass/monad.rs1
-rw-r--r--src/test/run-pass/monomorphize-abi-alignment.rs1
-rw-r--r--src/test/run-pass/multiple-reprs.rs1
-rw-r--r--src/test/run-pass/mutual-recursion-group.rs2
-rw-r--r--src/test/run-pass/nested-class.rs1
-rw-r--r--src/test/run-pass/never-result.rs2
-rw-r--r--src/test/run-pass/newlambdas-ret-infer.rs1
-rw-r--r--src/test/run-pass/newlambdas-ret-infer2.rs1
-rw-r--r--src/test/run-pass/newtype-polymorphic.rs1
-rw-r--r--src/test/run-pass/newtype.rs1
-rw-r--r--src/test/run-pass/nil-decl-in-foreign.rs2
-rw-r--r--src/test/run-pass/no-core-1.rs1
-rw-r--r--src/test/run-pass/nullable-pointer-size.rs1
-rw-r--r--src/test/run-pass/operator-overloading.rs1
-rw-r--r--src/test/run-pass/optimization-fuel-0.stdout1
-rw-r--r--src/test/run-pass/optimization-fuel-1.stdout1
-rw-r--r--src/test/run-pass/option-unwrap.rs1
-rw-r--r--src/test/run-pass/out-of-stack.rs2
-rw-r--r--src/test/run-pass/output-slot-variants.rs3
-rw-r--r--src/test/run-pass/over-constrained-vregs.rs1
-rw-r--r--src/test/run-pass/parse-panic.rs1
-rw-r--r--src/test/run-pass/paths-containing-nul.rs1
-rw-r--r--src/test/run-pass/project-cache-issue-37154.rs1
-rw-r--r--src/test/run-pass/project-defer-unification.rs7
-rw-r--r--src/test/run-pass/ptr-coercion.rs1
-rw-r--r--src/test/run-pass/pure-sum.rs1
-rw-r--r--src/test/run-pass/range-type-infer.rs1
-rw-r--r--src/test/run-pass/range.rs3
-rw-r--r--src/test/run-pass/range_inclusive_gate.rs1
-rw-r--r--src/test/run-pass/rcvr-borrowed-to-region.rs1
-rw-r--r--src/test/run-pass/readalias.rs1
-rw-r--r--src/test/run-pass/resolve-issue-2428.rs2
-rw-r--r--src/test/run-pass/resource-assign-is-not-copy.rs1
-rw-r--r--src/test/run-pass/resource-destruct.rs1
-rw-r--r--src/test/run-pass/ret-none.rs2
-rw-r--r--src/test/run-pass/rustc-rust-log.rs9
-rw-r--r--src/test/run-pass/segfault-no-out-of-stack.rs1
-rw-r--r--src/test/run-pass/semistatement-in-lambda.rs1
-rw-r--r--src/test/run-pass/shadow.rs2
-rw-r--r--src/test/run-pass/shadowed-use-visibility.rs1
-rw-r--r--src/test/run-pass/sigpipe-should-be-ignored.rs1
-rw-r--r--src/test/run-pass/simple-infer.rs1
-rw-r--r--src/test/run-pass/simple_global_asm.rs1
-rw-r--r--src/test/run-pass/size-and-align.rs1
-rw-r--r--src/test/run-pass/sized-borrowed-pointer.rs1
-rw-r--r--src/test/run-pass/sized-owned-pointer.rs1
-rw-r--r--src/test/run-pass/snake-case-no-lowercase-equivalent.rs1
-rw-r--r--src/test/run-pass/sse2.rs1
-rw-r--r--src/test/run-pass/structured-compare.rs1
-rw-r--r--src/test/run-pass/super-fast-paren-parsing.rs2
-rw-r--r--src/test/run-pass/super.rs1
-rw-r--r--src/test/run-pass/swap-overlapping.rs1
-rw-r--r--src/test/run-pass/trivial-message.rs1
-rw-r--r--src/test/run-pass/try-block.rs2
-rw-r--r--src/test/run-pass/try-is-identifier-edition2015.rs1
-rw-r--r--src/test/run-pass/try-operator-hygiene.rs2
-rw-r--r--src/test/run-pass/try-operator.rs1
-rw-r--r--src/test/run-pass/try-wait.rs1
-rw-r--r--src/test/run-pass/tup.rs1
-rw-r--r--src/test/run-pass/tydesc-name.rs1
-rw-r--r--src/test/run-pass/type-ascription.rs2
-rw-r--r--src/test/run-pass/type-in-nested-module.rs2
-rw-r--r--src/test/run-pass/type-infer-generalize-ty-var.rs4
-rw-r--r--src/test/run-pass/type-param-constraints.rs2
-rw-r--r--src/test/run-pass/type-param.rs2
-rw-r--r--src/test/run-pass/type-params-in-for-each.rs1
-rw-r--r--src/test/run-pass/type-ptr.rs1
-rw-r--r--src/test/run-pass/type-sizes.rs2
-rw-r--r--src/test/run-pass/typeck_type_placeholder_1.rs1
-rw-r--r--src/test/run-pass/typeclasses-eq-example-static.rs3
-rw-r--r--src/test/run-pass/typeclasses-eq-example.rs3
-rw-r--r--src/test/run-pass/typeid-intrinsic.rs1
-rw-r--r--src/test/run-pass/typestate-cfg-nesting.rs3
-rw-r--r--src/test/run-pass/underscore-lifetimes.rs1
-rw-r--r--src/test/run-pass/unit.rs2
-rw-r--r--src/test/run-pass/unreachable-code-1.rs2
-rw-r--r--src/test/run-pass/unreachable-code.rs2
-rw-r--r--src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs1
-rw-r--r--src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs1
-rw-r--r--src/test/run-pass/unsized.rs2
-rw-r--r--src/test/run-pass/unsized2.rs4
-rw-r--r--src/test/run-pass/unwind-resource.rs1
-rw-r--r--src/test/run-pass/use-keyword-2.rs1
-rw-r--r--src/test/run-pass/use-mod.rs1
-rw-r--r--src/test/run-pass/use.rs1
-rw-r--r--src/test/run-pass/utf8_idents.rs1
-rw-r--r--src/test/run-pass/variant-attributes.rs3
-rw-r--r--src/test/run-pass/volatile-fat-ptr.rs1
-rw-r--r--src/test/run-pass/warn-ctypes-inhibit.rs1
-rw-r--r--src/test/run-pass/weird-exprs.rs4
-rw-r--r--src/test/run-pass/wf-bound-region-in-object-type.rs2
-rw-r--r--src/test/run-pass/writealias.rs1
-rw-r--r--src/test/run-pass/wrong-hashset-issue-42918.rs1
-rw-r--r--src/test/run-pass/x86stdcall2.rs1
-rw-r--r--src/test/run-pass/yield.rs2
-rw-r--r--src/test/run-pass/yield1.rs2
-rw-r--r--src/tools/compiletest/src/common.rs1
-rw-r--r--src/tools/compiletest/src/header.rs22
-rw-r--r--src/tools/compiletest/src/runtest.rs49
238 files changed, 463 insertions, 20 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 92665c09f72..0c4816dc904 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -755,10 +755,11 @@ default_test_with_compare_mode!(Ui {
     compare_mode: "nll"
 });
 
-default_test!(RunPass {
+default_test_with_compare_mode!(RunPass {
     path: "src/test/run-pass",
     mode: "run-pass",
-    suite: "run-pass"
+    suite: "run-pass",
+    compare_mode: "nll"
 });
 
 default_test!(CompileFail {
diff --git a/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs b/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
index 6a706bdb9b2..6ae06f2d561 100644
--- a/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
+++ b/src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // ignore-cross-compile
 
 #![feature(rustc_private)]
diff --git a/src/test/run-pass-fulldeps/custom-derive-partial-eq.stderr b/src/test/run-pass-fulldeps/custom-derive-partial-eq.stderr
new file mode 100644
index 00000000000..ba956e4c132
--- /dev/null
+++ b/src/test/run-pass-fulldeps/custom-derive-partial-eq.stderr
@@ -0,0 +1,6 @@
+warning: `#[derive]` for custom traits is deprecated and will be removed in the future. Prefer using procedural macro custom derive.
+  --> $DIR/custom-derive-partial-eq.rs:17:10
+   |
+LL | #[derive(CustomPartialEq)] // Check that this is not a stability error.
+   |          ^^^^^^^^^^^^^^^
+
diff --git a/src/test/run-pass-fulldeps/derive-no-std-not-supported.rs b/src/test/run-pass-fulldeps/derive-no-std-not-supported.rs
index a0747e0fbf5..1e42355f834 100644
--- a/src/test/run-pass-fulldeps/derive-no-std-not-supported.rs
+++ b/src/test/run-pass-fulldeps/derive-no-std-not-supported.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 #![feature(rustc_private)]
 #![no_std]
 
diff --git a/src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs b/src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs
index 4c5b3259902..8b56ade21f9 100644
--- a/src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs
+++ b/src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs
@@ -8,16 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 
 #![feature(box_syntax)]
 #![feature(rustc_private)]
 
 extern crate serialize;
+use serialize as rustc_serialize;
 
 use serialize::{Encodable, Decodable};
 use serialize::json;
 
-#[derive(Encodable, Decodable)]
+#[derive(RustcEncodable, RustcDecodable)]
 struct A {
     foo: Box<[bool]>,
 }
diff --git a/src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs b/src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs
index 6e5eb86c584..15edd4d4950 100644
--- a/src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs
+++ b/src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // This briefly tests the capability of `Cell` and `RefCell` to implement the
 // `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]`
 
@@ -15,17 +16,18 @@
 #![feature(rustc_private)]
 
 extern crate serialize;
+use serialize as rustc_serialize;
 
 use std::cell::{Cell, RefCell};
 use serialize::{Encodable, Decodable};
 use serialize::json;
 
-#[derive(Encodable, Decodable)]
+#[derive(RustcEncodable, RustcDecodable)]
 struct A {
     baz: isize
 }
 
-#[derive(Encodable, Decodable)]
+#[derive(RustcEncodable, RustcDecodable)]
 struct B {
     foo: Cell<bool>,
     bar: RefCell<A>,
diff --git a/src/test/run-pass-fulldeps/deriving-global.rs b/src/test/run-pass-fulldeps/deriving-global.rs
index e9678732804..b95c947d215 100644
--- a/src/test/run-pass-fulldeps/deriving-global.rs
+++ b/src/test/run-pass-fulldeps/deriving-global.rs
@@ -11,6 +11,7 @@
 #![feature(rustc_private)]
 
 extern crate serialize;
+use serialize as rustc_serialize;
 
 mod submod {
     // if any of these are implemented without global calls for any
@@ -20,21 +21,21 @@ mod submod {
                Hash,
                Clone,
                Debug,
-               Encodable, Decodable)]
+               RustcEncodable, RustcDecodable)]
     enum A { A1(usize), A2(isize) }
 
     #[derive(PartialEq, PartialOrd, Eq, Ord,
                Hash,
                Clone,
                Debug,
-               Encodable, Decodable)]
+               RustcEncodable, RustcDecodable)]
     struct B { x: usize, y: isize }
 
     #[derive(PartialEq, PartialOrd, Eq, Ord,
                Hash,
                Clone,
                Debug,
-               Encodable, Decodable)]
+               RustcEncodable, RustcDecodable)]
     struct C(usize, isize);
 
 }
diff --git a/src/test/run-pass-fulldeps/deriving-hygiene.rs b/src/test/run-pass-fulldeps/deriving-hygiene.rs
index 532f2456599..1deeb242437 100644
--- a/src/test/run-pass-fulldeps/deriving-hygiene.rs
+++ b/src/test/run-pass-fulldeps/deriving-hygiene.rs
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
 #![feature(rustc_private)]
 extern crate serialize;
+use serialize as rustc_serialize;
 
 pub const other: u8 = 1;
 pub const f: u8 = 1;
@@ -18,7 +20,7 @@ pub const s: u8 = 1;
 pub const state: u8 = 1;
 pub const cmp: u8 = 1;
 
-#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,Decodable,Encodable,Hash)]
+#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,RustcDecodable,RustcEncodable,Hash)]
 struct Foo {}
 
 fn main() {
diff --git a/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs b/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs
index db30bfbf747..48f54188796 100644
--- a/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs
+++ b/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unknown_lints)]
 // Check that an arena (TypedArena) can carry elements whose drop
 // methods might access borrowed data, as long as the borrowed data
 // has lifetime that strictly outlives the arena itself.
diff --git a/src/test/run-pass-fulldeps/issue-11881.rs b/src/test/run-pass-fulldeps/issue-11881.rs
index 4f419e70074..5121ecd6cf3 100644
--- a/src/test/run-pass-fulldeps/issue-11881.rs
+++ b/src/test/run-pass-fulldeps/issue-11881.rs
@@ -8,10 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_imports)]
 
 #![feature(rustc_private)]
 
 extern crate serialize;
+use serialize as rustc_serialize;
 
 use std::io::Cursor;
 use std::io::prelude::*;
@@ -22,12 +26,12 @@ use serialize::{Encodable, Encoder};
 use serialize::json;
 use serialize::opaque;
 
-#[derive(Encodable)]
+#[derive(RustcEncodable)]
 struct Foo {
     baz: bool,
 }
 
-#[derive(Encodable)]
+#[derive(RustcEncodable)]
 struct Bar {
     froboz: usize,
 }
diff --git a/src/test/run-pass-fulldeps/issue-14021.rs b/src/test/run-pass-fulldeps/issue-14021.rs
index 907967d115d..5426dd94637 100644
--- a/src/test/run-pass-fulldeps/issue-14021.rs
+++ b/src/test/run-pass-fulldeps/issue-14021.rs
@@ -8,14 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
+#![allow(unused_imports)]
 #![feature(rustc_private)]
 
 extern crate serialize;
+extern crate serialize as rustc_serialize;
 
 use serialize::{Encodable, Decodable};
 use serialize::json;
 
-#[derive(Encodable, Decodable, PartialEq, Debug)]
+#[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
 struct UnitLikeStruct;
 
 pub fn main() {
diff --git a/src/test/run-pass-fulldeps/issue-15149.rs b/src/test/run-pass-fulldeps/issue-15149.rs
index 15ac1d55cc8..362aeabd60e 100644
--- a/src/test/run-pass-fulldeps/issue-15149.rs
+++ b/src/test/run-pass-fulldeps/issue-15149.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 // no-prefer-dynamic
 // ignore-cross-compile
 
diff --git a/src/test/run-pass-fulldeps/issue-15924.rs b/src/test/run-pass-fulldeps/issue-15924.rs
index 0c208773884..717a35707b4 100644
--- a/src/test/run-pass-fulldeps/issue-15924.rs
+++ b/src/test/run-pass-fulldeps/issue-15924.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
+#![allow(unused_must_use)]
 // pretty-expanded FIXME #23616
 
 #![feature(rustc_private)]
diff --git a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
index 03311d76e46..016f6139529 100644
--- a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
+++ b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_imports)]
 // ignore-cross-compile
 #![feature(quote, rustc_private)]
 
diff --git a/src/test/run-pass-fulldeps/issue-24972.rs b/src/test/run-pass-fulldeps/issue-24972.rs
index ae7eb84d3e8..6abdf98bb38 100644
--- a/src/test/run-pass-fulldeps/issue-24972.rs
+++ b/src/test/run-pass-fulldeps/issue-24972.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 #![feature(rustc_private)]
 
 extern crate serialize;
diff --git a/src/test/run-pass-fulldeps/issue-2804.rs b/src/test/run-pass-fulldeps/issue-2804.rs
index f999d2d0ed9..2e1104afae0 100644
--- a/src/test/run-pass-fulldeps/issue-2804.rs
+++ b/src/test/run-pass-fulldeps/issue-2804.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 #![feature(rustc_private)]
 
 extern crate serialize;
diff --git a/src/test/run-pass-fulldeps/issue-4016.rs b/src/test/run-pass-fulldeps/issue-4016.rs
index bc3fa162e02..2d72b42a5bd 100644
--- a/src/test/run-pass-fulldeps/issue-4016.rs
+++ b/src/test/run-pass-fulldeps/issue-4016.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 #![feature(rustc_private)]
 
diff --git a/src/test/run-pass-fulldeps/issue-40663.rs b/src/test/run-pass-fulldeps/issue-40663.rs
index 8cb9dc4a1b6..8633e906082 100644
--- a/src/test/run-pass-fulldeps/issue-40663.rs
+++ b/src/test/run-pass-fulldeps/issue-40663.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // aux-build:custom_derive_plugin.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs b/src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs
index 86d7cd54d97..5d00b594434 100644
--- a/src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs
+++ b/src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(plugin_as_library)]
+#![allow(unused_imports)]
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs b/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
index 9245e85edd6..6e8314b9680 100644
--- a/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
+++ b/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(plugin_as_library)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs
index 06f78b10e5e..c3e7787cf7f 100644
--- a/src/test/run-pass-fulldeps/macro-crate.rs
+++ b/src/test/run-pass-fulldeps/macro-crate.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(plugin_as_library)]
+#![allow(dead_code)]
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/macro-quote-cond.rs b/src/test/run-pass-fulldeps/macro-quote-cond.rs
index 3eb7e8cc9a4..4c36f097ec1 100644
--- a/src/test/run-pass-fulldeps/macro-quote-cond.rs
+++ b/src/test/run-pass-fulldeps/macro-quote-cond.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_parens)]
 // aux-build:cond_plugin.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/call-site.rs b/src/test/run-pass-fulldeps/proc-macro/call-site.rs
index dfe97eb587c..9d2120e6764 100644
--- a/src/test/run-pass-fulldeps/proc-macro/call-site.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/call-site.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
+#![allow(unused_imports)]
 // aux-build:call-site.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs b/src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs
index 93023f8f8ed..e7e8b3d665e 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // aux-build:derive-attr-cfg.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs b/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs
index ba5a639a759..64ad57107c7 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(path_statements)]
+#![allow(dead_code)]
 // aux-build:derive-same-struct.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.stdout b/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.stdout
new file mode 100644
index 00000000000..77605de5e33
--- /dev/null
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-same-struct.stdout
@@ -0,0 +1 @@
+input1: "struct A;"
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs b/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
index 0df0288216e..9c2ba481f5e 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // aux-build:derive-two-attrs.rs
 
 extern crate derive_two_attrs as foo;
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-union.rs b/src/test/run-pass-fulldeps/proc-macro/derive-union.rs
index 71807e21d96..298a652aacc 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-union.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-union.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 // aux-build:derive-union.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/empty-crate.rs b/src/test/run-pass-fulldeps/proc-macro/empty-crate.rs
index 38a2716aee7..2b0a57dafef 100644
--- a/src/test/run-pass-fulldeps/proc-macro/empty-crate.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/empty-crate.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // aux-build:empty-crate.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs b/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
index 579e8c33773..2d15b4e60b4 100644
--- a/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_macros)]
 // aux-build:hygiene_example_codegen.rs
 // aux-build:hygiene_example.rs
 // ignore-stage1
diff --git a/src/test/run-pass-fulldeps/proc-macro/issue-39889.rs b/src/test/run-pass-fulldeps/proc-macro/issue-39889.rs
index 3fc7446815e..f7221092601 100644
--- a/src/test/run-pass-fulldeps/proc-macro/issue-39889.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/issue-39889.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // aux-build:issue-39889.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs b/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
index 410faaeb3ee..04659166575 100644
--- a/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(path_statements)]
 // aux-build:issue-50061.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs b/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
index c73441e30e6..79d6d27dc59 100644
--- a/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 // aux-build:lifetimes.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/load-two.rs b/src/test/run-pass-fulldeps/proc-macro/load-two.rs
index 67c12377814..cf1e076f270 100644
--- a/src/test/run-pass-fulldeps/proc-macro/load-two.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/load-two.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(path_statements)]
+#![allow(dead_code)]
 // aux-build:derive-atob.rs
 // aux-build:derive-ctod.rs
 // ignore-stage1
diff --git a/src/test/run-pass-fulldeps/proc-macro/smoke.rs b/src/test/run-pass-fulldeps/proc-macro/smoke.rs
index 54d651df1f9..49011e19a51 100644
--- a/src/test/run-pass-fulldeps/proc-macro/smoke.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/smoke.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(path_statements)]
 // aux-build:derive-a.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/struct-field-macro.rs b/src/test/run-pass-fulldeps/proc-macro/struct-field-macro.rs
index c9056e08d44..db52aa5d3a6 100644
--- a/src/test/run-pass-fulldeps/proc-macro/struct-field-macro.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/struct-field-macro.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // aux-build:derive-nothing.rs
 // ignore-stage1
 
diff --git a/src/test/run-pass-fulldeps/qquote.rs b/src/test/run-pass-fulldeps/qquote.rs
index 55fed8693a0..ec12ad17e8f 100644
--- a/src/test/run-pass-fulldeps/qquote.rs
+++ b/src/test/run-pass-fulldeps/qquote.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // ignore-cross-compile
 
 #![feature(quote, rustc_private)]
diff --git a/src/test/run-pass-fulldeps/quote-tokens.rs b/src/test/run-pass-fulldeps/quote-tokens.rs
index 8e6a69cb584..7f46e0928a2 100644
--- a/src/test/run-pass-fulldeps/quote-tokens.rs
+++ b/src/test/run-pass-fulldeps/quote-tokens.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
 // ignore-cross-compile
 #![feature(quote, rustc_private)]
 
diff --git a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs
index d3be1ddcb8c..7e85becfc3c 100644
--- a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs
+++ b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // ignore-cross-compile
 #![feature(quote, rustc_private)]
 #![deny(unused_variables)]
diff --git a/src/test/run-pass-fulldeps/regions-mock-tcx.rs b/src/test/run-pass-fulldeps/regions-mock-tcx.rs
index 670f5380d81..013c331d0fd 100644
--- a/src/test/run-pass-fulldeps/regions-mock-tcx.rs
+++ b/src/test/run-pass-fulldeps/regions-mock-tcx.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_imports)]
 
 // Test a sample usage pattern for regions. Makes use of the
 // following features:
diff --git a/src/test/run-pass-fulldeps/rename-directory.rs b/src/test/run-pass-fulldeps/rename-directory.rs
index 417707e8932..099f3e58c6c 100644
--- a/src/test/run-pass-fulldeps/rename-directory.rs
+++ b/src/test/run-pass-fulldeps/rename-directory.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unused_imports)]
 // This test can't be a unit test in std,
 // because it needs TempDir, which is in extra
 
diff --git a/src/test/run-pass/abort-on-c-abi.rs b/src/test/run-pass/abort-on-c-abi.rs
index ef368ed604b..17b2ee39c88 100644
--- a/src/test/run-pass/abort-on-c-abi.rs
+++ b/src/test/run-pass/abort-on-c-abi.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
 // we never unwind through them.
 
diff --git a/src/test/run-pass/alias-uninit-value.rs b/src/test/run-pass/alias-uninit-value.rs
index 77b9efb0012..5c87840fe1e 100644
--- a/src/test/run-pass/alias-uninit-value.rs
+++ b/src/test/run-pass/alias-uninit-value.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+
 
 
 // Regression test for issue #374
diff --git a/src/test/run-pass/align-with-extern-c-fn.rs b/src/test/run-pass/align-with-extern-c-fn.rs
index 6f89c5d377f..92ae68fb6a3 100644
--- a/src/test/run-pass/align-with-extern-c-fn.rs
+++ b/src/test/run-pass/align-with-extern-c-fn.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
+#![allow(unused_variables)]
+
 // #45662
 
 #![feature(repr_align)]
diff --git a/src/test/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs
index c1f75d5ee74..7188496dab9 100644
--- a/src/test/run-pass/alignment-gep-tup-like-1.rs
+++ b/src/test/run-pass/alignment-gep-tup-like-1.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+
 #![feature(box_syntax)]
 
 struct pair<A,B> {
diff --git a/src/test/run-pass/alloca-from-derived-tydesc.rs b/src/test/run-pass/alloca-from-derived-tydesc.rs
index 23a1e799801..7895e89d586 100644
--- a/src/test/run-pass/alloca-from-derived-tydesc.rs
+++ b/src/test/run-pass/alloca-from-derived-tydesc.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+
 
 // pretty-expanded FIXME #23616
 
diff --git a/src/test/run-pass/allocator-alloc-one.rs b/src/test/run-pass/allocator-alloc-one.rs
index f15b013c07b..a62bd67a5ac 100644
--- a/src/test/run-pass/allocator-alloc-one.rs
+++ b/src/test/run-pass/allocator-alloc-one.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
+
 #![feature(allocator_api, nonnull)]
 
 use std::alloc::{Alloc, Global, Layout, handle_alloc_error};
diff --git a/src/test/run-pass/asm-in-moved.rs b/src/test/run-pass/asm-in-moved.rs
index 246dd83fbef..debfcc5c552 100644
--- a/src/test/run-pass/asm-in-moved.rs
+++ b/src/test/run-pass/asm-in-moved.rs
@@ -12,6 +12,7 @@
 //[mir]compile-flags: -Z borrowck=mir
 
 #![feature(asm)]
+#![allow(dead_code)]
 
 use std::cell::Cell;
 
diff --git a/src/test/run-pass/atomic-access-bool.rs b/src/test/run-pass/atomic-access-bool.rs
index 286c92ce50e..1d8923af479 100644
--- a/src/test/run-pass/atomic-access-bool.rs
+++ b/src/test/run-pass/atomic-access-bool.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 #![feature(atomic_access)]
 use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT};
 use std::sync::atomic::Ordering::*;
diff --git a/src/test/run-pass/atomic-compare_exchange.rs b/src/test/run-pass/atomic-compare_exchange.rs
index 2f33eb9ca40..5829f764eba 100644
--- a/src/test/run-pass/atomic-compare_exchange.rs
+++ b/src/test/run-pass/atomic-compare_exchange.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
+
 #![feature(extended_compare_and_swap)]
 use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT};
 use std::sync::atomic::Ordering::*;
diff --git a/src/test/run-pass/atomic-print.rs b/src/test/run-pass/atomic-print.rs
index 2d478e954e7..25f4c6fd10b 100644
--- a/src/test/run-pass/atomic-print.rs
+++ b/src/test/run-pass/atomic-print.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(deprecated)]
 // ignore-cloudabi no process support
 // ignore-emscripten no threads support
 
diff --git a/src/test/run-pass/attr-before-view-item.rs b/src/test/run-pass/attr-before-view-item.rs
index 2a86489c69a..4ea78d352e3 100644
--- a/src/test/run-pass/attr-before-view-item.rs
+++ b/src/test/run-pass/attr-before-view-item.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_attributes)]
+
 // pretty-expanded FIXME #23616
 
 #![feature(custom_attribute, test)]
diff --git a/src/test/run-pass/attr-before-view-item2.rs b/src/test/run-pass/attr-before-view-item2.rs
index c8683f2d147..34a8b62f9fc 100644
--- a/src/test/run-pass/attr-before-view-item2.rs
+++ b/src/test/run-pass/attr-before-view-item2.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_attributes)]
+
 // pretty-expanded FIXME #23616
 
 #![feature(custom_attribute, test)]
diff --git a/src/test/run-pass/attr-mix-new.rs b/src/test/run-pass/attr-mix-new.rs
index bcfb4b330f5..5b89cec70c0 100644
--- a/src/test/run-pass/attr-mix-new.rs
+++ b/src/test/run-pass/attr-mix-new.rs
@@ -7,6 +7,10 @@
 // <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.
+
+#![allow(unused_attributes)]
+#![allow(unknown_lints)]
+
 // pretty-expanded FIXME #23616
 
 #![allow(unused_attribute)]
diff --git a/src/test/run-pass/attr-on-generic-formals.rs b/src/test/run-pass/attr-on-generic-formals.rs
index e87b9e3d82a..827da72bc44 100644
--- a/src/test/run-pass/attr-on-generic-formals.rs
+++ b/src/test/run-pass/attr-on-generic-formals.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_attributes)]
+
 // This test ensures we can attach attributes to the formals in all
 // places where generic parameter lists occur, assuming appropriate
 // feature gates are enabled.
diff --git a/src/test/run-pass/augmented-assignments.rs b/src/test/run-pass/augmented-assignments.rs
index 3ed9e8548dc..b8bfad8cfcb 100644
--- a/src/test/run-pass/augmented-assignments.rs
+++ b/src/test/run-pass/augmented-assignments.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 #![deny(unused_assignments)]
 
 use std::mem;
diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs
index 4a1bfa3eb42..0fe347fc43c 100644
--- a/src/test/run-pass/auto-instantiate.rs
+++ b/src/test/run-pass/auto-instantiate.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 #[derive(Debug)]
 struct Pair<T, U> { a: T, b: U }
 struct Triple { x: isize, y: isize, z: isize }
diff --git a/src/test/run-pass/auto-is-contextual.rs b/src/test/run-pass/auto-is-contextual.rs
index ad433cc26a7..efddcaa14d3 100644
--- a/src/test/run-pass/auto-is-contextual.rs
+++ b/src/test/run-pass/auto-is-contextual.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(path_statements)]
+#![allow(dead_code)]
 macro_rules! auto {
     () => (struct S;)
 }
diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs
index 2b8fcd303b6..0b2098b0f05 100644
--- a/src/test/run-pass/binops.rs
+++ b/src/test/run-pass/binops.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 // Binop corner cases
 
 fn test_nil() {
diff --git a/src/test/run-pass/blind-item-local-shadow.rs b/src/test/run-pass/blind-item-local-shadow.rs
index bb654b1a20b..6066bc32b26 100644
--- a/src/test/run-pass/blind-item-local-shadow.rs
+++ b/src/test/run-pass/blind-item-local-shadow.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_imports)]
 mod bar {
     pub fn foo() -> bool { true }
 }
diff --git a/src/test/run-pass/block-arg-call-as.rs b/src/test/run-pass/block-arg-call-as.rs
index 73cba2e4e0a..342f67ae44f 100644
--- a/src/test/run-pass/block-arg-call-as.rs
+++ b/src/test/run-pass/block-arg-call-as.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_snake_case)]
 
 fn asBlock<F>(f: F) -> usize where F: FnOnce() -> usize {
    return f();
diff --git a/src/test/run-pass/block-expr-precedence.rs b/src/test/run-pass/block-expr-precedence.rs
index ac8f5012573..acb0f2dd298 100644
--- a/src/test/run-pass/block-expr-precedence.rs
+++ b/src/test/run-pass/block-expr-precedence.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unused_parens)]
 // This test has some extra semis in it that the pretty-printer won't
 // reproduce so we don't want to automatically reformat it
 
diff --git a/src/test/run-pass/builtin-clone-unwind.rs b/src/test/run-pass/builtin-clone-unwind.rs
index 7e7c5ee4125..6f8cdd1b4fc 100644
--- a/src/test/run-pass/builtin-clone-unwind.rs
+++ b/src/test/run-pass/builtin-clone-unwind.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
+#![allow(unused_imports)]
 // ignore-wasm32-bare compiled with panic=abort by default
 
 // Test that builtin implementations of `Clone` cleanup everything
diff --git a/src/test/run-pass/builtin-superkinds-in-metadata.rs b/src/test/run-pass/builtin-superkinds-in-metadata.rs
index 3259b1cc067..287e6829487 100644
--- a/src/test/run-pass/builtin-superkinds-in-metadata.rs
+++ b/src/test/run-pass/builtin-superkinds-in-metadata.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 
 // aux-build:trait_superkinds_in_metadata.rs
 
diff --git a/src/test/run-pass/builtin-superkinds-phantom-typaram.rs b/src/test/run-pass/builtin-superkinds-phantom-typaram.rs
index 6bc81f4a36b..84601f68d16 100644
--- a/src/test/run-pass/builtin-superkinds-phantom-typaram.rs
+++ b/src/test/run-pass/builtin-superkinds-phantom-typaram.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Tests that even when a type parameter doesn't implement a required
 // super-builtin-kind of a trait, if the type parameter is never used,
 // the type can implement the trait anyway.
diff --git a/src/test/run-pass/cast.rs b/src/test/run-pass/cast.rs
index 80fa5362a8b..b88854cd7fa 100644
--- a/src/test/run-pass/cast.rs
+++ b/src/test/run-pass/cast.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
 
 pub fn main() {
     let i: isize = 'Q' as isize;
diff --git a/src/test/run-pass/cell-does-not-clone.rs b/src/test/run-pass/cell-does-not-clone.rs
index c1fcf496546..9f26ee818e6 100644
--- a/src/test/run-pass/cell-does-not-clone.rs
+++ b/src/test/run-pass/cell-does-not-clone.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 use std::cell::Cell;
 
diff --git a/src/test/run-pass/check-static-recursion-foreign.rs b/src/test/run-pass/check-static-recursion-foreign.rs
index 9c87f2ca682..a95870c2b27 100644
--- a/src/test/run-pass/check-static-recursion-foreign.rs
+++ b/src/test/run-pass/check-static-recursion-foreign.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Static recursion check shouldn't fail when given a foreign item (#18279)
 
 // aux-build:check_static_recursion_foreign_helper.rs
diff --git a/src/test/run-pass/cleanup-arm-conditional.rs b/src/test/run-pass/cleanup-arm-conditional.rs
index dd900c56b40..6ff3aff45cb 100644
--- a/src/test/run-pass/cleanup-arm-conditional.rs
+++ b/src/test/run-pass/cleanup-arm-conditional.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
+#![allow(unused_imports)]
 // Test that cleanup scope for temporaries created in a match
 // arm is confined to the match arm itself.
 
diff --git a/src/test/run-pass/cleanup-rvalue-for-scope.rs b/src/test/run-pass/cleanup-rvalue-for-scope.rs
index f69a0332cc4..4f8ded9012f 100644
--- a/src/test/run-pass/cleanup-rvalue-for-scope.rs
+++ b/src/test/run-pass/cleanup-rvalue-for-scope.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // Test that the lifetime of rvalues in for loops is extended
 // to the for loop itself.
 
diff --git a/src/test/run-pass/cleanup-rvalue-scopes.rs b/src/test/run-pass/cleanup-rvalue-scopes.rs
index b5bf35a7006..8cf014a4d2a 100644
--- a/src/test/run-pass/cleanup-rvalue-scopes.rs
+++ b/src/test/run-pass/cleanup-rvalue-scopes.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_snake_case)]
+#![allow(unused_variables)]
 // Test that destructors for rvalue temporaries run either at end of
 // statement or end of block, as appropriate given the temporary
 // lifetime rules.
diff --git a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs
index ae455d916b6..90b2031afd4 100644
--- a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs
+++ b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // Test cleanup of rvalue temporary that occurs while `box` construction
 // is in progress. This scenario revealed a rather terrible bug.  The
 // ingredients are:
diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs
index 6ac7acd2a6b..0358eec0d76 100644
--- a/src/test/run-pass/clone-with-exterior.rs
+++ b/src/test/run-pass/clone-with-exterior.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // ignore-emscripten no threads support
 
 #![feature(box_syntax)]
diff --git a/src/test/run-pass/close-over-big-then-small-data.rs b/src/test/run-pass/close-over-big-then-small-data.rs
index ba700e4e326..44778517c44 100644
--- a/src/test/run-pass/close-over-big-then-small-data.rs
+++ b/src/test/run-pass/close-over-big-then-small-data.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // If we use GEPi rather than GEP_tup_like when
 // storing closure data (as we used to do), the u64 would
 // overwrite the u16.
diff --git a/src/test/run-pass/collections-const-new.rs b/src/test/run-pass/collections-const-new.rs
index 4003c2ec4f7..462dc42dbc2 100644
--- a/src/test/run-pass/collections-const-new.rs
+++ b/src/test/run-pass/collections-const-new.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Test several functions can be used for constants
 // 1. Vec::new()
 // 2. String::new()
diff --git a/src/test/run-pass/command-before-exec.rs b/src/test/run-pass/command-before-exec.rs
index c4fc9ee53fd..5d8bc31c2a3 100644
--- a/src/test/run-pass/command-before-exec.rs
+++ b/src/test/run-pass/command-before-exec.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // ignore-windows - this is a unix-specific test
 // ignore-cloudabi no processes
 // ignore-emscripten no processes
diff --git a/src/test/run-pass/command-exec.rs b/src/test/run-pass/command-exec.rs
index d6d0c2b36f6..46b409fb13a 100644
--- a/src/test/run-pass/command-exec.rs
+++ b/src/test/run-pass/command-exec.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // ignore-windows - this is a unix-specific test
 // ignore-pretty issue #37199
 // ignore-cloudabi no processes
diff --git a/src/test/run-pass/complex.rs b/src/test/run-pass/complex.rs
index 6bb9503c2b0..b31f4d39f82 100644
--- a/src/test/run-pass/complex.rs
+++ b/src/test/run-pass/complex.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unconditional_recursion)]
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
 
 
 
diff --git a/src/test/run-pass/core-run-destroy.rs b/src/test/run-pass/core-run-destroy.rs
index eaec9b1926a..aaf017c0ad3 100644
--- a/src/test/run-pass/core-run-destroy.rs
+++ b/src/test/run-pass/core-run-destroy.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(stable_features)]
+#![allow(deprecated)]
+#![allow(unused_imports)]
 // compile-flags:--test
 // ignore-cloudabi no processes
 // ignore-emscripten no processes
diff --git a/src/test/run-pass/crt-static-off-works.rs b/src/test/run-pass/crt-static-off-works.rs
index c94c877c12c..14f5913e377 100644
--- a/src/test/run-pass/crt-static-off-works.rs
+++ b/src/test/run-pass/crt-static-off-works.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // compile-flags:-C target-feature=-crt-static -Z unstable-options
 // ignore-musl - requires changing the linker which is hard
 
diff --git a/src/test/run-pass/crt-static-on-works.rs b/src/test/run-pass/crt-static-on-works.rs
index ae8e5f62970..dbc483241ab 100644
--- a/src/test/run-pass/crt-static-on-works.rs
+++ b/src/test/run-pass/crt-static-on-works.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // compile-flags:-C target-feature=+crt-static -Z unstable-options
 
 #![feature(cfg_target_feature)]
diff --git a/src/test/run-pass/default-method-simple.rs b/src/test/run-pass/default-method-simple.rs
index 61de804a80a..d4e25bb5c3c 100644
--- a/src/test/run-pass/default-method-simple.rs
+++ b/src/test/run-pass/default-method-simple.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 trait Foo {
     fn f(&self) {
diff --git a/src/test/run-pass/defaults-well-formedness.rs b/src/test/run-pass/defaults-well-formedness.rs
index 9b06bf837ae..fce5e911c57 100644
--- a/src/test/run-pass/defaults-well-formedness.rs
+++ b/src/test/run-pass/defaults-well-formedness.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 trait Trait<T> {}
 struct Foo<U, V=i32>(U, V) where U: Trait<V>;
 
diff --git a/src/test/run-pass/discriminant_value.rs b/src/test/run-pass/discriminant_value.rs
index 13257529ed9..06d4f16826f 100644
--- a/src/test/run-pass/discriminant_value.rs
+++ b/src/test/run-pass/discriminant_value.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 #![feature(core, core_intrinsics)]
 
 extern crate core;
diff --git a/src/test/run-pass/diverging-fallback-control-flow.rs b/src/test/run-pass/diverging-fallback-control-flow.rs
index 723a98bcdfa..9f54f50e540 100644
--- a/src/test/run-pass/diverging-fallback-control-flow.rs
+++ b/src/test/run-pass/diverging-fallback-control-flow.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
+#![allow(unreachable_code)]
 // Test various cases where we permit an unconstrained variable
 // to fallback based on control-flow.
 //
diff --git a/src/test/run-pass/diverging-fallback-method-chain.rs b/src/test/run-pass/diverging-fallback-method-chain.rs
index 664a329c228..195c55d374b 100644
--- a/src/test/run-pass/diverging-fallback-method-chain.rs
+++ b/src/test/run-pass/diverging-fallback-method-chain.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // Test a regression found when building compiler. The `produce()`
 // error type `T` winds up getting unified with result of `x.parse()`;
 // the type of the closure given to `unwrap_or_else` needs to be
diff --git a/src/test/run-pass/double-ref.rs b/src/test/run-pass/double-ref.rs
index 13ce6a07e36..9fa3fbca071 100644
--- a/src/test/run-pass/double-ref.rs
+++ b/src/test/run-pass/double-ref.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 fn check_expr() {
diff --git a/src/test/run-pass/early-ret-binop-add.rs b/src/test/run-pass/early-ret-binop-add.rs
index 0a490466ef7..c4401781f59 100644
--- a/src/test/run-pass/early-ret-binop-add.rs
+++ b/src/test/run-pass/early-ret-binop-add.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unreachable_code)]
 // pretty-expanded FIXME #23616
 
 use std::ops::Add;
diff --git a/src/test/run-pass/early-vtbl-resolution.rs b/src/test/run-pass/early-vtbl-resolution.rs
index 2d2cf6fbf0a..985ed08d34d 100644
--- a/src/test/run-pass/early-vtbl-resolution.rs
+++ b/src/test/run-pass/early-vtbl-resolution.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 trait thing<A> {
diff --git a/src/test/run-pass/edition-keywords-2015-2015.rs b/src/test/run-pass/edition-keywords-2015-2015.rs
index 1751eacc6b7..b805b01ae39 100644
--- a/src/test/run-pass/edition-keywords-2015-2015.rs
+++ b/src/test/run-pass/edition-keywords-2015-2015.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
 // edition:2015
 // aux-build:edition-kw-macro-2015.rs
 
diff --git a/src/test/run-pass/edition-keywords-2015-2018.rs b/src/test/run-pass/edition-keywords-2015-2018.rs
index f2794a4b8d8..1e3d0c5f777 100644
--- a/src/test/run-pass/edition-keywords-2015-2018.rs
+++ b/src/test/run-pass/edition-keywords-2015-2018.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
 // edition:2015
 // aux-build:edition-kw-macro-2018.rs
 
diff --git a/src/test/run-pass/edition-keywords-2018-2015.rs b/src/test/run-pass/edition-keywords-2018-2015.rs
index 7d5de00cdb8..9b2e49c5111 100644
--- a/src/test/run-pass/edition-keywords-2018-2015.rs
+++ b/src/test/run-pass/edition-keywords-2018-2015.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_assignments)]
 // edition:2018
 // aux-build:edition-kw-macro-2015.rs
 
diff --git a/src/test/run-pass/edition-keywords-2018-2018.rs b/src/test/run-pass/edition-keywords-2018-2018.rs
index 6462fc4da60..be632b11374 100644
--- a/src/test/run-pass/edition-keywords-2018-2018.rs
+++ b/src/test/run-pass/edition-keywords-2018-2018.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_assignments)]
 // edition:2018
 // aux-build:edition-kw-macro-2018.rs
 
diff --git a/src/test/run-pass/empty-allocation-rvalue-non-null.rs b/src/test/run-pass/empty-allocation-rvalue-non-null.rs
index f52a21a997d..28bfb368b6e 100644
--- a/src/test/run-pass/empty-allocation-rvalue-non-null.rs
+++ b/src/test/run-pass/empty-allocation-rvalue-non-null.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 // pretty-expanded FIXME #23616
 
 pub fn main() {
diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs
index e92f24a2751..6bb2fe4b34d 100644
--- a/src/test/run-pass/env-home-dir.rs
+++ b/src/test/run-pass/env-home-dir.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
+#![allow(deprecated)]
 // ignore-cloudabi no environment variables present
 // ignore-emscripten env vars don't work?
 
diff --git a/src/test/run-pass/env-null-vars.rs b/src/test/run-pass/env-null-vars.rs
index 296764269de..9a461991c1e 100644
--- a/src/test/run-pass/env-null-vars.rs
+++ b/src/test/run-pass/env-null-vars.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
+
 // ignore-windows
 // ignore-wasm32-bare no libc to test ffi with
 
diff --git a/src/test/run-pass/epoch-gate-feature.rs b/src/test/run-pass/epoch-gate-feature.rs
index e3cd1edd209..754e30f3adf 100644
--- a/src/test/run-pass/epoch-gate-feature.rs
+++ b/src/test/run-pass/epoch-gate-feature.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // Checks if the correct registers are being used to pass arguments
 // when the sysv64 ABI is specified.
 
diff --git a/src/test/run-pass/estr-uniq.rs b/src/test/run-pass/estr-uniq.rs
index 4dfb1541840..e8047b3cb7f 100644
--- a/src/test/run-pass/estr-uniq.rs
+++ b/src/test/run-pass/estr-uniq.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_assignments)]
+#![allow(unknown_lints)]
 
 #![allow(dead_assignment)]
 
diff --git a/src/test/run-pass/existential_type.rs b/src/test/run-pass/existential_type.rs
index e63d5c2293a..0193fe4b833 100644
--- a/src/test/run-pass/existential_type.rs
+++ b/src/test/run-pass/existential_type.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
 #![feature(existential_type)]
 
 fn main() {
diff --git a/src/test/run-pass/explicit-i-suffix.rs b/src/test/run-pass/explicit-i-suffix.rs
index fa3970b6280..b86af5d2fab 100644
--- a/src/test/run-pass/explicit-i-suffix.rs
+++ b/src/test/run-pass/explicit-i-suffix.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // pretty-expanded FIXME #23616
 
 pub fn main() {
diff --git a/src/test/run-pass/export-glob-imports-target.rs b/src/test/run-pass/export-glob-imports-target.rs
index 4f821ebcc18..36724f0b648 100644
--- a/src/test/run-pass/export-glob-imports-target.rs
+++ b/src/test/run-pass/export-glob-imports-target.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
+#![allow(dead_code)]
 // Test that a glob-export functions as an import
 // when referenced within its own local scope.
 
diff --git a/src/test/run-pass/expr-block.rs b/src/test/run-pass/expr-block.rs
index 664555caf26..3459b3c84c5 100644
--- a/src/test/run-pass/expr-block.rs
+++ b/src/test/run-pass/expr-block.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 
 
diff --git a/src/test/run-pass/expr-empty-ret.rs b/src/test/run-pass/expr-empty-ret.rs
index 02ac2a0b67b..9fb0f07b6a0 100644
--- a/src/test/run-pass/expr-empty-ret.rs
+++ b/src/test/run-pass/expr-empty-ret.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Issue #521
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/exterior.rs b/src/test/run-pass/exterior.rs
index 5ab6c7774d5..938c556038f 100644
--- a/src/test/run-pass/exterior.rs
+++ b/src/test/run-pass/exterior.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 
 use std::cell::Cell;
diff --git a/src/test/run-pass/fixup-deref-mut.rs b/src/test/run-pass/fixup-deref-mut.rs
index 900da3c2d6a..903e97b3158 100644
--- a/src/test/run-pass/fixup-deref-mut.rs
+++ b/src/test/run-pass/fixup-deref-mut.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 use std::ops::{Deref, DerefMut};
diff --git a/src/test/run-pass/format-hygiene.rs b/src/test/run-pass/format-hygiene.rs
index 6971f775231..892fae417ad 100644
--- a/src/test/run-pass/format-hygiene.rs
+++ b/src/test/run-pass/format-hygiene.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
 pub const arg0: u8 = 1;
 
 pub fn main() {
diff --git a/src/test/run-pass/fsu-moves-and-copies.rs b/src/test/run-pass/fsu-moves-and-copies.rs
index efd7f66e93b..3be15552dc1 100644
--- a/src/test/run-pass/fsu-moves-and-copies.rs
+++ b/src/test/run-pass/fsu-moves-and-copies.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(stable_features)]
 // Issue 4691: Ensure that functional-struct-updates operates
 // correctly and moves rather than copy when appropriate.
 
diff --git a/src/test/run-pass/guards-not-exhaustive.rs b/src/test/run-pass/guards-not-exhaustive.rs
index 53c3eff5b81..32f262c5a40 100644
--- a/src/test/run-pass/guards-not-exhaustive.rs
+++ b/src/test/run-pass/guards-not-exhaustive.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_snake_case)]
 
 #[derive(Copy, Clone)]
 enum Q { R(Option<usize>) }
diff --git a/src/test/run-pass/guards.rs b/src/test/run-pass/guards.rs
index d79dbabac2d..af4e2efb2ba 100644
--- a/src/test/run-pass/guards.rs
+++ b/src/test/run-pass/guards.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_shorthand_field_patterns)]
 
 #[derive(Copy, Clone)]
 struct Pair { x: isize, y: isize }
diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs
index 2e98e0fe5ca..2b30b5ca9fc 100644
--- a/src/test/run-pass/hashmap-memory.rs
+++ b/src/test/run-pass/hashmap-memory.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
 // ignore-emscripten No support for threads
 
 /**
diff --git a/src/test/run-pass/html-literals.rs b/src/test/run-pass/html-literals.rs
index 1e1fde4d1e2..1aed2844c96 100644
--- a/src/test/run-pass/html-literals.rs
+++ b/src/test/run-pass/html-literals.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 // A test of the macro system. Can we do HTML literals?
 
 /*
diff --git a/src/test/run-pass/if-ret.rs b/src/test/run-pass/if-ret.rs
index 8d475a99b81..5c5c4c80ab1 100644
--- a/src/test/run-pass/if-ret.rs
+++ b/src/test/run-pass/if-ret.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_parens)]
 // pretty-expanded FIXME #23616
 
 fn foo() { if (return) { } }
diff --git a/src/test/run-pass/ignore-all-the-things.rs b/src/test/run-pass/ignore-all-the-things.rs
index c14f3dc7291..90d858c2858 100644
--- a/src/test/run-pass/ignore-all-the-things.rs
+++ b/src/test/run-pass/ignore-all-the-things.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_shorthand_field_patterns)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // pretty-expanded FIXME #23616
 
 #![feature(slice_patterns)]
diff --git a/src/test/run-pass/infer-fn-tail-expr.rs b/src/test/run-pass/infer-fn-tail-expr.rs
index f00005fc7d0..a3e0f9dc039 100644
--- a/src/test/run-pass/infer-fn-tail-expr.rs
+++ b/src/test/run-pass/infer-fn-tail-expr.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // issue #680
 
 
diff --git a/src/test/run-pass/init-large-type.rs b/src/test/run-pass/init-large-type.rs
index c8f9a0e4cab..0ad0ecf8ce9 100644
--- a/src/test/run-pass/init-large-type.rs
+++ b/src/test/run-pass/init-large-type.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // Makes sure that zero-initializing large types is reasonably fast,
 // Doing it incorrectly causes massive slowdown in LLVM during
 // optimisation.
diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs
index a270b003981..dd838ef98db 100644
--- a/src/test/run-pass/init-res-into-things.rs
+++ b/src/test/run-pass/init-res-into-things.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 #![feature(box_syntax)]
 
 use std::cell::Cell;
diff --git a/src/test/run-pass/instantiable.rs b/src/test/run-pass/instantiable.rs
index 28fba70eb24..7d708b475fc 100644
--- a/src/test/run-pass/instantiable.rs
+++ b/src/test/run-pass/instantiable.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 use std::ptr;
diff --git a/src/test/run-pass/invalid_const_promotion.rs b/src/test/run-pass/invalid_const_promotion.rs
index a18d82fb7a4..e861f217629 100644
--- a/src/test/run-pass/invalid_const_promotion.rs
+++ b/src/test/run-pass/invalid_const_promotion.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
 // ignore-wasm32
 // ignore-emscripten
 
diff --git a/src/test/run-pass/issue-53728.rs b/src/test/run-pass/issue-53728.rs
index f9cb5da29a7..2eaa73ed6f7 100644
--- a/src/test/run-pass/issue-53728.rs
+++ b/src/test/run-pass/issue-53728.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 #[repr(u16)]
 enum DeviceKind {
     Nil = 0,
diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs
index 0fc13319b87..97fa8d36d13 100644
--- a/src/test/run-pass/item-attributes.rs
+++ b/src/test/run-pass/item-attributes.rs
@@ -8,6 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
+#![allow(unused_attributes)]
+#![allow(dead_code)]
+#![allow(unknown_lints)]
 // These are attributes of the implicit crate. Really this just needs to parse
 // for completeness since .rs files linked from .rc files support this
 // notation to specify their module's attributes
diff --git a/src/test/run-pass/item-name-overload.rs b/src/test/run-pass/item-name-overload.rs
index 2827a6df337..b07b0359a2d 100644
--- a/src/test/run-pass/item-name-overload.rs
+++ b/src/test/run-pass/item-name-overload.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 
 
diff --git a/src/test/run-pass/keyword-changes-2012-07-31.rs b/src/test/run-pass/keyword-changes-2012-07-31.rs
index 9838fe62394..6dbfacf0474 100644
--- a/src/test/run-pass/keyword-changes-2012-07-31.rs
+++ b/src/test/run-pass/keyword-changes-2012-07-31.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // return -> return
 // mod -> module
 // match -> match
diff --git a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
index 1c5d8a69bf3..9788b1e0603 100644
--- a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
+++ b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(dead_code)]
 use std::thread;
 
 fn user(_i: isize) {}
diff --git a/src/test/run-pass/lambda-infer-unresolved.rs b/src/test/run-pass/lambda-infer-unresolved.rs
index 5109c6fc777..ec12f257f61 100644
--- a/src/test/run-pass/lambda-infer-unresolved.rs
+++ b/src/test/run-pass/lambda-infer-unresolved.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
 // This should typecheck even though the type of e is not fully
 // resolved when we finish typechecking the ||.
 
diff --git a/src/test/run-pass/large-records.rs b/src/test/run-pass/large-records.rs
index e9c66093fb0..bd685dd4244 100644
--- a/src/test/run-pass/large-records.rs
+++ b/src/test/run-pass/large-records.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 
 
diff --git a/src/test/run-pass/last-use-in-block.rs b/src/test/run-pass/last-use-in-block.rs
index a2b01f29ae1..bed94de7b95 100644
--- a/src/test/run-pass/last-use-in-block.rs
+++ b/src/test/run-pass/last-use-in-block.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_parens)]
 // Issue #1818
 
 
diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs
index 5fbcfadf870..d63a712c1aa 100644
--- a/src/test/run-pass/last-use-in-cap-clause.rs
+++ b/src/test/run-pass/last-use-in-cap-clause.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Make sure #1399 stays fixed
 
 struct A { a: Box<isize> }
diff --git a/src/test/run-pass/last-use-is-capture.rs b/src/test/run-pass/last-use-is-capture.rs
index cb2a2061406..747c7d2eae4 100644
--- a/src/test/run-pass/last-use-is-capture.rs
+++ b/src/test/run-pass/last-use-is-capture.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Make sure #1399 stays fixed
 
 #![feature(box_syntax)]
diff --git a/src/test/run-pass/lazy-init.rs b/src/test/run-pass/lazy-init.rs
index d71d7e751a0..a4a3edf71c0 100644
--- a/src/test/run-pass/lazy-init.rs
+++ b/src/test/run-pass/lazy-init.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
 
 
 fn foo(x: isize) { println!("{}", x); }
diff --git a/src/test/run-pass/lib-defaults.rs b/src/test/run-pass/lib-defaults.rs
index fcaeda9a549..19340ed0e97 100644
--- a/src/test/run-pass/lib-defaults.rs
+++ b/src/test/run-pass/lib-defaults.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// dont-check-compiler-stderr (rust-lang/rust#54222)
+
 // ignore-wasm32-bare no libc to test ffi with
 
 // compile-flags: -lrust_test_helpers
diff --git a/src/test/run-pass/link-section.rs b/src/test/run-pass/link-section.rs
index 3336ce7e723..e2369e85d56 100644
--- a/src/test/run-pass/link-section.rs
+++ b/src/test/run-pass/link-section.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
 #[cfg(not(target_os = "macos"))]
 #[link_section=".moretext"]
 fn i_live_in_more_text() -> &'static str {
diff --git a/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs b/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs
index 6e65cb2afd4..14ef8c1f51f 100644
--- a/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs
+++ b/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
+#![allow(dead_code)]
 
 
 #![forbid(non_camel_case_types)]
diff --git a/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs b/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs
index 3b4bd001e8d..8115a2c50e3 100644
--- a/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs
+++ b/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // This is ok because we often use the trailing underscore to mean 'prime'
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/list.rs b/src/test/run-pass/list.rs
index 37612415555..bab777d0973 100644
--- a/src/test/run-pass/list.rs
+++ b/src/test/run-pass/list.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 // pretty-expanded FIXME #23616
 
 #![feature(box_syntax)]
diff --git a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs
index 76b44832a8a..bccc939e85e 100644
--- a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs
+++ b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unreachable_code)]
 // pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs
index 1991e2b178d..4c501a78b57 100644
--- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs
+++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 #[derive(Clone, Debug)]
 enum foo {
   a(usize),
diff --git a/src/test/run-pass/log-knows-the-names-of-variants.rs b/src/test/run-pass/log-knows-the-names-of-variants.rs
index e8852377957..19a7c7105c9 100644
--- a/src/test/run-pass/log-knows-the-names-of-variants.rs
+++ b/src/test/run-pass/log-knows-the-names-of-variants.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 #[derive(Debug)]
 enum foo {
   a(usize),
diff --git a/src/test/run-pass/max-min-classes.rs b/src/test/run-pass/max-min-classes.rs
index f0844b8e1eb..f34d5cbd9e3 100644
--- a/src/test/run-pass/max-min-classes.rs
+++ b/src/test/run-pass/max-min-classes.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_snake_case)]
 trait Product {
     fn product(&self) -> isize;
 }
diff --git a/src/test/run-pass/mid-path-type-params.rs b/src/test/run-pass/mid-path-type-params.rs
index 3055f90ee25..7e06530b38c 100644
--- a/src/test/run-pass/mid-path-type-params.rs
+++ b/src/test/run-pass/mid-path-type-params.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 struct S<T> {
diff --git a/src/test/run-pass/monad.rs b/src/test/run-pass/monad.rs
index 211827f9222..6c7c39e5aa5 100644
--- a/src/test/run-pass/monad.rs
+++ b/src/test/run-pass/monad.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 
 
 
diff --git a/src/test/run-pass/monomorphize-abi-alignment.rs b/src/test/run-pass/monomorphize-abi-alignment.rs
index 00e97ebc24e..899f3f4ba30 100644
--- a/src/test/run-pass/monomorphize-abi-alignment.rs
+++ b/src/test/run-pass/monomorphize-abi-alignment.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
 /*!
  * On x86_64-linux-gnu and possibly other platforms, structs get 8-byte "preferred" alignment,
  * but their "ABI" alignment (i.e., what actually matters for data layout) is the largest alignment
diff --git a/src/test/run-pass/multiple-reprs.rs b/src/test/run-pass/multiple-reprs.rs
index d8eafb806f7..c00fb68f9f7 100644
--- a/src/test/run-pass/multiple-reprs.rs
+++ b/src/test/run-pass/multiple-reprs.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 use std::mem::{size_of, align_of};
 use std::os::raw::c_int;
diff --git a/src/test/run-pass/mutual-recursion-group.rs b/src/test/run-pass/mutual-recursion-group.rs
index 72a8847094b..87879e08414 100644
--- a/src/test/run-pass/mutual-recursion-group.rs
+++ b/src/test/run-pass/mutual-recursion-group.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
 // pretty-expanded FIXME #23616
 
diff --git a/src/test/run-pass/nested-class.rs b/src/test/run-pass/nested-class.rs
index 1ad68cb9de0..ca869386856 100644
--- a/src/test/run-pass/nested-class.rs
+++ b/src/test/run-pass/nested-class.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 
 pub fn main() {
     struct b {
diff --git a/src/test/run-pass/never-result.rs b/src/test/run-pass/never-result.rs
index 5c0af392f44..a1b9eda8b89 100644
--- a/src/test/run-pass/never-result.rs
+++ b/src/test/run-pass/never-result.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
+#![allow(unreachable_code)]
 // Test that we can extract a ! through pattern matching then use it as several different types.
 
 #![feature(never_type)]
diff --git a/src/test/run-pass/newlambdas-ret-infer.rs b/src/test/run-pass/newlambdas-ret-infer.rs
index 428eed0787a..c2871469de1 100644
--- a/src/test/run-pass/newlambdas-ret-infer.rs
+++ b/src/test/run-pass/newlambdas-ret-infer.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
diff --git a/src/test/run-pass/newlambdas-ret-infer2.rs b/src/test/run-pass/newlambdas-ret-infer2.rs
index 439ea3f2b57..4d545c7a969 100644
--- a/src/test/run-pass/newlambdas-ret-infer2.rs
+++ b/src/test/run-pass/newlambdas-ret-infer2.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
diff --git a/src/test/run-pass/newtype-polymorphic.rs b/src/test/run-pass/newtype-polymorphic.rs
index e7da8d7bf93..20817cddd05 100644
--- a/src/test/run-pass/newtype-polymorphic.rs
+++ b/src/test/run-pass/newtype-polymorphic.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 
 
 #[derive(Clone)]
diff --git a/src/test/run-pass/newtype.rs b/src/test/run-pass/newtype.rs
index 818ea4c9f23..3dbad08f1d8 100644
--- a/src/test/run-pass/newtype.rs
+++ b/src/test/run-pass/newtype.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 #[derive(Copy, Clone)]
 struct mytype(Mytype);
 
diff --git a/src/test/run-pass/nil-decl-in-foreign.rs b/src/test/run-pass/nil-decl-in-foreign.rs
index 97ee237771f..96bc80c2125 100644
--- a/src/test/run-pass/nil-decl-in-foreign.rs
+++ b/src/test/run-pass/nil-decl-in-foreign.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(improper_ctypes)]
+#![allow(dead_code)]
 // Issue #901
 // pretty-expanded FIXME #23616
 
diff --git a/src/test/run-pass/no-core-1.rs b/src/test/run-pass/no-core-1.rs
index 7868077fbf2..f5f08969118 100644
--- a/src/test/run-pass/no-core-1.rs
+++ b/src/test/run-pass/no-core-1.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 #![feature(no_core, core)]
 #![no_core]
 
diff --git a/src/test/run-pass/nullable-pointer-size.rs b/src/test/run-pass/nullable-pointer-size.rs
index b097d350c8d..bdeae618c8b 100644
--- a/src/test/run-pass/nullable-pointer-size.rs
+++ b/src/test/run-pass/nullable-pointer-size.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 use std::mem;
 
diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs
index c3a1164ba9c..1d66388275e 100644
--- a/src/test/run-pass/operator-overloading.rs
+++ b/src/test/run-pass/operator-overloading.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 use std::cmp;
 use std::ops;
 
diff --git a/src/test/run-pass/optimization-fuel-0.stdout b/src/test/run-pass/optimization-fuel-0.stdout
new file mode 100644
index 00000000000..3ad405b2b50
--- /dev/null
+++ b/src/test/run-pass/optimization-fuel-0.stdout
@@ -0,0 +1 @@
+optimization-fuel-exhausted: Reorder fields of "S1"
diff --git a/src/test/run-pass/optimization-fuel-1.stdout b/src/test/run-pass/optimization-fuel-1.stdout
new file mode 100644
index 00000000000..197e45219c3
--- /dev/null
+++ b/src/test/run-pass/optimization-fuel-1.stdout
@@ -0,0 +1 @@
+optimization-fuel-exhausted: Reorder fields of "S2"
diff --git a/src/test/run-pass/option-unwrap.rs b/src/test/run-pass/option-unwrap.rs
index e22edb3caed..32faab4c12c 100644
--- a/src/test/run-pass/option-unwrap.rs
+++ b/src/test/run-pass/option-unwrap.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 use std::cell::Cell;
 
 struct dtor<'a> {
diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs
index 6ed07fb2f7d..cd0f7cdbf6d 100644
--- a/src/test/run-pass/out-of-stack.rs
+++ b/src/test/run-pass/out-of-stack.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unconditional_recursion)]
 // ignore-android: FIXME (#20004)
 // ignore-musl
 // ignore-cloudabi no processes
diff --git a/src/test/run-pass/output-slot-variants.rs b/src/test/run-pass/output-slot-variants.rs
index 2171b8c481d..e4013854e78 100644
--- a/src/test/run-pass/output-slot-variants.rs
+++ b/src/test/run-pass/output-slot-variants.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unknown_lints)]
 // pretty-expanded FIXME #23616
 
 #![allow(dead_assignment)]
diff --git a/src/test/run-pass/over-constrained-vregs.rs b/src/test/run-pass/over-constrained-vregs.rs
index e4e07941470..edbb311fcda 100644
--- a/src/test/run-pass/over-constrained-vregs.rs
+++ b/src/test/run-pass/over-constrained-vregs.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // Regression test for issue #152.
 pub fn main() {
     let mut b: usize = 1_usize;
diff --git a/src/test/run-pass/parse-panic.rs b/src/test/run-pass/parse-panic.rs
index 22b24ebb3b5..5c904295bb4 100644
--- a/src/test/run-pass/parse-panic.rs
+++ b/src/test/run-pass/parse-panic.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 #![allow(unreachable_code)]
 
 fn dont_call_me() { panic!(); println!("{}", 1); }
diff --git a/src/test/run-pass/paths-containing-nul.rs b/src/test/run-pass/paths-containing-nul.rs
index e0fe1ea72df..3359f1064c9 100644
--- a/src/test/run-pass/paths-containing-nul.rs
+++ b/src/test/run-pass/paths-containing-nul.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(deprecated)]
 // ignore-cloudabi no files or I/O
 // ignore-wasm32-bare no files or I/O
 
diff --git a/src/test/run-pass/project-cache-issue-37154.rs b/src/test/run-pass/project-cache-issue-37154.rs
index 29dc6984e23..24fb400150a 100644
--- a/src/test/run-pass/project-cache-issue-37154.rs
+++ b/src/test/run-pass/project-cache-issue-37154.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Regression test for #37154: the problem here was that the cache
 // results in a false error because it was caching skolemized results
 // even after those skolemized regions had been popped.
diff --git a/src/test/run-pass/project-defer-unification.rs b/src/test/run-pass/project-defer-unification.rs
index 9a6ea2272fe..c4a3856bcbc 100644
--- a/src/test/run-pass/project-defer-unification.rs
+++ b/src/test/run-pass/project-defer-unification.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unreachable_code)]
 // A regression test extracted from image-0.3.11. The point of
 // failure was in `index_colors` below.
 
@@ -92,6 +95,10 @@ pub fn index_colors<Pix>(image: &ImageBuffer<Pix, Vec<u8>>)
                          -> ImageBuffer<Luma<u8>, Vec<u8>>
 where Pix: Pixel<Subpixel=u8> + 'static,
 {
+    // When NLL-enabled, `let mut` below is deemed unnecessary (due to
+    // the remaining code being unreachable); so ignore that lint.
+    #![allow(unused_mut)]
+
     let mut indices: ImageBuffer<_,Vec<_>> = loop { };
     for (pixel, idx) in image.pixels().zip(indices.pixels_mut()) {
         // failured occurred here ^^ because we were requiring that we
diff --git a/src/test/run-pass/ptr-coercion.rs b/src/test/run-pass/ptr-coercion.rs
index ac1b6aebec5..3a4d2b3e602 100644
--- a/src/test/run-pass/ptr-coercion.rs
+++ b/src/test/run-pass/ptr-coercion.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 // Test coercions between pointers which don't do anything fancy like unsizing.
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/pure-sum.rs b/src/test/run-pass/pure-sum.rs
index 3313196a5ec..5f6b9b17e36 100644
--- a/src/test/run-pass/pure-sum.rs
+++ b/src/test/run-pass/pure-sum.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Check that functions can modify local state.
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/range-type-infer.rs b/src/test/run-pass/range-type-infer.rs
index b6d4d09d697..809c1ba702b 100644
--- a/src/test/run-pass/range-type-infer.rs
+++ b/src/test/run-pass/range-type-infer.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // Make sure the type inference for the new range expression work as
 // good as the old one. Check out issue #21672, #21595 and #21649 for
 // more details.
diff --git a/src/test/run-pass/range.rs b/src/test/run-pass/range.rs
index 4c249bbe1f7..2fae4d3cf26 100644
--- a/src/test/run-pass/range.rs
+++ b/src/test/run-pass/range.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_comparisons)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
 // Test range syntax.
 
 
diff --git a/src/test/run-pass/range_inclusive_gate.rs b/src/test/run-pass/range_inclusive_gate.rs
index 6c2731fa5a9..09132efe18c 100644
--- a/src/test/run-pass/range_inclusive_gate.rs
+++ b/src/test/run-pass/range_inclusive_gate.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_comparisons)]
 // Test that you only need the syntax gate if you don't mention the structs.
 // (Obsoleted since both features are stabilized)
 
diff --git a/src/test/run-pass/rcvr-borrowed-to-region.rs b/src/test/run-pass/rcvr-borrowed-to-region.rs
index bc869113fe9..02392be7e4f 100644
--- a/src/test/run-pass/rcvr-borrowed-to-region.rs
+++ b/src/test/run-pass/rcvr-borrowed-to-region.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 #![feature(box_syntax)]
 
 trait get {
diff --git a/src/test/run-pass/readalias.rs b/src/test/run-pass/readalias.rs
index 56b15c24361..d7ddd9505d7 100644
--- a/src/test/run-pass/readalias.rs
+++ b/src/test/run-pass/readalias.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 
 
diff --git a/src/test/run-pass/resolve-issue-2428.rs b/src/test/run-pass/resolve-issue-2428.rs
index 6159b24165e..0ad97e78d1a 100644
--- a/src/test/run-pass/resolve-issue-2428.rs
+++ b/src/test/run-pass/resolve-issue-2428.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
 
 const foo: isize = 4 >> 1;
 enum bs { thing = foo }
diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs
index 4d0c2900a0f..ccc3396e50c 100644
--- a/src/test/run-pass/resource-assign-is-not-copy.rs
+++ b/src/test/run-pass/resource-assign-is-not-copy.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 use std::cell::Cell;
 
 #[derive(Debug)]
diff --git a/src/test/run-pass/resource-destruct.rs b/src/test/run-pass/resource-destruct.rs
index c92a9ca8480..d3ba221b34a 100644
--- a/src/test/run-pass/resource-destruct.rs
+++ b/src/test/run-pass/resource-destruct.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 use std::cell::Cell;
 
 struct shrinky_pointer<'a> {
diff --git a/src/test/run-pass/ret-none.rs b/src/test/run-pass/ret-none.rs
index 032a4b662cb..72ee3dbfe2d 100644
--- a/src/test/run-pass/ret-none.rs
+++ b/src/test/run-pass/ret-none.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/rustc-rust-log.rs b/src/test/run-pass/rustc-rust-log.rs
index 629387d4cb1..8c3e4b391e9 100644
--- a/src/test/run-pass/rustc-rust-log.rs
+++ b/src/test/run-pass/rustc-rust-log.rs
@@ -8,6 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// This test is just checking that we won't ICE if logging is turned
+// on; don't bother trying to compare that (copious) output. (Note
+// also that this test potentially silly, since we do not build+test
+// debug versions of rustc as part of our continuous integration
+// process...)
+//
+// dont-check-compiler-stdout
+// dont-check-compiler-stderr
+
 // rustc-env:RUST_LOG=debug
 
 fn main() {}
diff --git a/src/test/run-pass/segfault-no-out-of-stack.rs b/src/test/run-pass/segfault-no-out-of-stack.rs
index 307ead4b74f..a85fe6733dd 100644
--- a/src/test/run-pass/segfault-no-out-of-stack.rs
+++ b/src/test/run-pass/segfault-no-out-of-stack.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // ignore-cloudabi can't run commands
 // ignore-emscripten can't run commands
 
diff --git a/src/test/run-pass/semistatement-in-lambda.rs b/src/test/run-pass/semistatement-in-lambda.rs
index 0fc5fe498a6..c9ab466e445 100644
--- a/src/test/run-pass/semistatement-in-lambda.rs
+++ b/src/test/run-pass/semistatement-in-lambda.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 
 pub fn main() {
     // Test that lambdas behave as unary expressions with block-like expressions
diff --git a/src/test/run-pass/shadow.rs b/src/test/run-pass/shadow.rs
index b764fc6f1ec..b2028927da4 100644
--- a/src/test/run-pass/shadow.rs
+++ b/src/test/run-pass/shadow.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 fn foo(c: Vec<isize> ) {
     let a: isize = 5;
     let mut b: Vec<isize> = Vec::new();
diff --git a/src/test/run-pass/shadowed-use-visibility.rs b/src/test/run-pass/shadowed-use-visibility.rs
index d2a32da4fea..b54ba3d2ce7 100644
--- a/src/test/run-pass/shadowed-use-visibility.rs
+++ b/src/test/run-pass/shadowed-use-visibility.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 mod foo {
     pub fn f() {}
 
diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs
index f5e2239538f..c964bcb94ef 100644
--- a/src/test/run-pass/sigpipe-should-be-ignored.rs
+++ b/src/test/run-pass/sigpipe-should-be-ignored.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 // Be sure that when a SIGPIPE would have been received that the entire process
 // doesn't die in a ball of fire, but rather it's gracefully handled.
 
diff --git a/src/test/run-pass/simple-infer.rs b/src/test/run-pass/simple-infer.rs
index 04c1af4326b..6feb2da5fac 100644
--- a/src/test/run-pass/simple-infer.rs
+++ b/src/test/run-pass/simple-infer.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_mut)]
 
 
 pub fn main() { let mut n; n = 1; println!("{}", n); }
diff --git a/src/test/run-pass/simple_global_asm.rs b/src/test/run-pass/simple_global_asm.rs
index cd8273c6bc2..2d8ac6d99f7 100644
--- a/src/test/run-pass/simple_global_asm.rs
+++ b/src/test/run-pass/simple_global_asm.rs
@@ -10,6 +10,7 @@
 
 #![feature(global_asm)]
 #![feature(naked_functions)]
+#![allow(dead_code)]
 
 #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
 global_asm!(r#"
diff --git a/src/test/run-pass/size-and-align.rs b/src/test/run-pass/size-and-align.rs
index 13d55e0172e..0da63f93cc6 100644
--- a/src/test/run-pass/size-and-align.rs
+++ b/src/test/run-pass/size-and-align.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 enum clam<T> { a(T, isize), b, }
 
 fn uhoh<T>(v: Vec<clam<T>> ) {
diff --git a/src/test/run-pass/sized-borrowed-pointer.rs b/src/test/run-pass/sized-borrowed-pointer.rs
index 76c06d560d7..03425e04725 100644
--- a/src/test/run-pass/sized-borrowed-pointer.rs
+++ b/src/test/run-pass/sized-borrowed-pointer.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Possibly-dynamic size of typaram should be cleared at pointer boundary.
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/sized-owned-pointer.rs b/src/test/run-pass/sized-owned-pointer.rs
index d3a6b104dba..5624910cee9 100644
--- a/src/test/run-pass/sized-owned-pointer.rs
+++ b/src/test/run-pass/sized-owned-pointer.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Possibly-dynamic size of typaram should be cleared at pointer boundary.
 
 
diff --git a/src/test/run-pass/snake-case-no-lowercase-equivalent.rs b/src/test/run-pass/snake-case-no-lowercase-equivalent.rs
index 90ea7537c6e..49fb4176755 100644
--- a/src/test/run-pass/snake-case-no-lowercase-equivalent.rs
+++ b/src/test/run-pass/snake-case-no-lowercase-equivalent.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 #![feature(non_ascii_idents)]
diff --git a/src/test/run-pass/sse2.rs b/src/test/run-pass/sse2.rs
index b1d7e5435c4..041286fe656 100644
--- a/src/test/run-pass/sse2.rs
+++ b/src/test/run-pass/sse2.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // min-llvm-version 6.0
 // ^ needs MCSubtargetInfo::checkFeatures()
 // ignore-cloudabi no std::env
diff --git a/src/test/run-pass/structured-compare.rs b/src/test/run-pass/structured-compare.rs
index 7974366c395..22d1eeb0e0a 100644
--- a/src/test/run-pass/structured-compare.rs
+++ b/src/test/run-pass/structured-compare.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 
 
 #[derive(Copy, Clone, Debug)]
diff --git a/src/test/run-pass/super-fast-paren-parsing.rs b/src/test/run-pass/super-fast-paren-parsing.rs
index a1bbd190211..5e120bd80ee 100644
--- a/src/test/run-pass/super-fast-paren-parsing.rs
+++ b/src/test/run-pass/super-fast-paren-parsing.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
+#![allow(dead_code)]
 // exec-env:RUST_MIN_STACK=16000000
 // rustc-env:RUST_MIN_STACK=16000000
 //
diff --git a/src/test/run-pass/super.rs b/src/test/run-pass/super.rs
index 51520c77751..5958565823f 100644
--- a/src/test/run-pass/super.rs
+++ b/src/test/run-pass/super.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 pub mod a {
diff --git a/src/test/run-pass/swap-overlapping.rs b/src/test/run-pass/swap-overlapping.rs
index 2e5386d6866..8fcbfce0f7a 100644
--- a/src/test/run-pass/swap-overlapping.rs
+++ b/src/test/run-pass/swap-overlapping.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/trivial-message.rs b/src/test/run-pass/trivial-message.rs
index fd60c614638..c6445190c0a 100644
--- a/src/test/run-pass/trivial-message.rs
+++ b/src/test/run-pass/trivial-message.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
 /*
   This is about the simplest program that can successfully send a
   message.
diff --git a/src/test/run-pass/try-block.rs b/src/test/run-pass/try-block.rs
index a7e7cc20620..f618d16c598 100644
--- a/src/test/run-pass/try-block.rs
+++ b/src/test/run-pass/try-block.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 // compile-flags: --edition 2018
 
 #![feature(try_blocks)]
diff --git a/src/test/run-pass/try-is-identifier-edition2015.rs b/src/test/run-pass/try-is-identifier-edition2015.rs
index aafb52e4c49..94e2d579993 100644
--- a/src/test/run-pass/try-is-identifier-edition2015.rs
+++ b/src/test/run-pass/try-is-identifier-edition2015.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 // compile-flags: --edition 2015
 
 fn main() {
diff --git a/src/test/run-pass/try-operator-hygiene.rs b/src/test/run-pass/try-operator-hygiene.rs
index 53d6185020a..045a8a50320 100644
--- a/src/test/run-pass/try-operator-hygiene.rs
+++ b/src/test/run-pass/try-operator-hygiene.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
+#![allow(dead_code)]
 // `expr?` expands to:
 //
 // match expr {
diff --git a/src/test/run-pass/try-operator.rs b/src/test/run-pass/try-operator.rs
index d615c5f1034..f212e560bf2 100644
--- a/src/test/run-pass/try-operator.rs
+++ b/src/test/run-pass/try-operator.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // ignore-cloudabi no std::fs
 
 use std::fs::File;
diff --git a/src/test/run-pass/try-wait.rs b/src/test/run-pass/try-wait.rs
index b8c0d80c5a6..7c2333ffdaa 100644
--- a/src/test/run-pass/try-wait.rs
+++ b/src/test/run-pass/try-wait.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // ignore-cloudabi no processes
 // ignore-emscripten no processes
 
diff --git a/src/test/run-pass/tup.rs b/src/test/run-pass/tup.rs
index 86ca37deb02..b6fb2119308 100644
--- a/src/test/run-pass/tup.rs
+++ b/src/test/run-pass/tup.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 
 type point = (isize, isize);
 
diff --git a/src/test/run-pass/tydesc-name.rs b/src/test/run-pass/tydesc-name.rs
index 4a169c0a384..a66830e23df 100644
--- a/src/test/run-pass/tydesc-name.rs
+++ b/src/test/run-pass/tydesc-name.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 #![feature(core_intrinsics)]
 
diff --git a/src/test/run-pass/type-ascription.rs b/src/test/run-pass/type-ascription.rs
index 18fb8e2e408..b5eb2fe1705 100644
--- a/src/test/run-pass/type-ascription.rs
+++ b/src/test/run-pass/type-ascription.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // Type ascription doesn't lead to unsoundness
 
 #![feature(type_ascription)]
diff --git a/src/test/run-pass/type-in-nested-module.rs b/src/test/run-pass/type-in-nested-module.rs
index 7e2360caa93..8fef294c0cf 100644
--- a/src/test/run-pass/type-in-nested-module.rs
+++ b/src/test/run-pass/type-in-nested-module.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/type-infer-generalize-ty-var.rs b/src/test/run-pass/type-infer-generalize-ty-var.rs
index d7fb85ca484..b918c3fc396 100644
--- a/src/test/run-pass/type-infer-generalize-ty-var.rs
+++ b/src/test/run-pass/type-infer-generalize-ty-var.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_upper_case_globals)]
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
 // Test a scenario where we generate a constraint like `?1 <: &?2`.
 // In such a case, it is important that we instantiate `?1` with `&?3`
 // where `?3 <: ?2`, and not with `&?2`. This is a regression test for
diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs
index 1a3bdcca7a1..e05f6f153a4 100644
--- a/src/test/run-pass/type-param-constraints.rs
+++ b/src/test/run-pass/type-param-constraints.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 #![feature(box_syntax)]
diff --git a/src/test/run-pass/type-param.rs b/src/test/run-pass/type-param.rs
index c59e40934fb..246cf209efb 100644
--- a/src/test/run-pass/type-param.rs
+++ b/src/test/run-pass/type-param.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/type-params-in-for-each.rs b/src/test/run-pass/type-params-in-for-each.rs
index fea2bd978eb..76ac2d14b93 100644
--- a/src/test/run-pass/type-params-in-for-each.rs
+++ b/src/test/run-pass/type-params-in-for-each.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 // pretty-expanded FIXME #23616
 
diff --git a/src/test/run-pass/type-ptr.rs b/src/test/run-pass/type-ptr.rs
index 67ead80c89b..94d46b1a96e 100644
--- a/src/test/run-pass/type-ptr.rs
+++ b/src/test/run-pass/type-ptr.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
 fn f(a: *const isize) -> *const isize { return a; }
diff --git a/src/test/run-pass/type-sizes.rs b/src/test/run-pass/type-sizes.rs
index 5eb079988f5..26cadf16e29 100644
--- a/src/test/run-pass/type-sizes.rs
+++ b/src/test/run-pass/type-sizes.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 #![feature(never_type)]
 
 use std::mem::size_of;
diff --git a/src/test/run-pass/typeck_type_placeholder_1.rs b/src/test/run-pass/typeck_type_placeholder_1.rs
index 113d52ffb35..ee482ea3c52 100644
--- a/src/test/run-pass/typeck_type_placeholder_1.rs
+++ b/src/test/run-pass/typeck_type_placeholder_1.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // This test checks that the `_` type placeholder works
 // correctly for enabling type inference.
 
diff --git a/src/test/run-pass/typeclasses-eq-example-static.rs b/src/test/run-pass/typeclasses-eq-example-static.rs
index d386f27d8c2..fecc6d70509 100644
--- a/src/test/run-pass/typeclasses-eq-example-static.rs
+++ b/src/test/run-pass/typeclasses-eq-example-static.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
 #![feature(box_syntax)]
 
 // Example from lkuper's intern talk, August 2012 -- now with static
diff --git a/src/test/run-pass/typeclasses-eq-example.rs b/src/test/run-pass/typeclasses-eq-example.rs
index 8e8fd9bf648..f2b6e9cd255 100644
--- a/src/test/run-pass/typeclasses-eq-example.rs
+++ b/src/test/run-pass/typeclasses-eq-example.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
 #![feature(box_syntax)]
 
 // Example from lkuper's intern talk, August 2012.
diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs
index 54d5415a553..2dbe2c0a402 100644
--- a/src/test/run-pass/typeid-intrinsic.rs
+++ b/src/test/run-pass/typeid-intrinsic.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(deprecated)]
 // aux-build:typeid-intrinsic-aux1.rs
 // aux-build:typeid-intrinsic-aux2.rs
 
diff --git a/src/test/run-pass/typestate-cfg-nesting.rs b/src/test/run-pass/typestate-cfg-nesting.rs
index 2acaff26269..a1047d47b4b 100644
--- a/src/test/run-pass/typestate-cfg-nesting.rs
+++ b/src/test/run-pass/typestate-cfg-nesting.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unknown_lints)]
 // pretty-expanded FIXME #23616
 
 #![allow(dead_assignment)]
diff --git a/src/test/run-pass/underscore-lifetimes.rs b/src/test/run-pass/underscore-lifetimes.rs
index 4dd1a565c9f..0f601021f6a 100644
--- a/src/test/run-pass/underscore-lifetimes.rs
+++ b/src/test/run-pass/underscore-lifetimes.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 struct Foo<'a>(&'a u8);
 
 fn foo(x: &u8) -> Foo<'_> {
diff --git a/src/test/run-pass/unit.rs b/src/test/run-pass/unit.rs
index 67eceba020c..17ed465f995 100644
--- a/src/test/run-pass/unit.rs
+++ b/src/test/run-pass/unit.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_assignments)]
+#![allow(unknown_lints)]
 // pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
diff --git a/src/test/run-pass/unreachable-code-1.rs b/src/test/run-pass/unreachable-code-1.rs
index 6448056fb11..4e257069506 100644
--- a/src/test/run-pass/unreachable-code-1.rs
+++ b/src/test/run-pass/unreachable-code-1.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unreachable_code)]
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
diff --git a/src/test/run-pass/unreachable-code.rs b/src/test/run-pass/unreachable-code.rs
index 5cb5e8c4f99..4fffe98e4b2 100644
--- a/src/test/run-pass/unreachable-code.rs
+++ b/src/test/run-pass/unreachable-code.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(dead_code)]
 
 #![allow(path_statements)]
 #![allow(unreachable_code)]
diff --git a/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs b/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs
index f3a2ad749a1..ac5a0db1cd2 100644
--- a/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs
+++ b/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 //
 // See also: compile-fail/unsafe-fn-called-from-safe.rs
 
diff --git a/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs b/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs
index 37c72ba8ab0..a40a764bfc2 100644
--- a/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs
+++ b/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 //
 // See also: compile-fail/unsafe-fn-called-from-safe.rs
 
diff --git a/src/test/run-pass/unsized.rs b/src/test/run-pass/unsized.rs
index 26f7b767988..6a58c9aa90b 100644
--- a/src/test/run-pass/unsized.rs
+++ b/src/test/run-pass/unsized.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(type_alias_bounds)]
+#![allow(dead_code)]
 // Test syntax checks for `?Sized` syntax.
 
 use std::marker::PhantomData;
diff --git a/src/test/run-pass/unsized2.rs b/src/test/run-pass/unsized2.rs
index 90b99f98533..e4480d7e97a 100644
--- a/src/test/run-pass/unsized2.rs
+++ b/src/test/run-pass/unsized2.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unconditional_recursion)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
 #![feature(box_syntax)]
 
 // Test sized-ness checking in substitution.
diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs
index 85ee21e0902..e0ddc854fa0 100644
--- a/src/test/run-pass/unwind-resource.rs
+++ b/src/test/run-pass/unwind-resource.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 // ignore-emscripten no threads support
 
 use std::sync::mpsc::{channel, Sender};
diff --git a/src/test/run-pass/use-keyword-2.rs b/src/test/run-pass/use-keyword-2.rs
index 60016f59594..c669b522ab2 100644
--- a/src/test/run-pass/use-keyword-2.rs
+++ b/src/test/run-pass/use-keyword-2.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_variables)]
 pub struct A;
 
 mod test {
diff --git a/src/test/run-pass/use-mod.rs b/src/test/run-pass/use-mod.rs
index 49ad171eaa2..3115a359ff1 100644
--- a/src/test/run-pass/use-mod.rs
+++ b/src/test/run-pass/use-mod.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_imports)]
 // pretty-expanded FIXME #23616
 
 pub use foo::bar::{self, First};
diff --git a/src/test/run-pass/use.rs b/src/test/run-pass/use.rs
index 09a3849b915..d6899e79152 100644
--- a/src/test/run-pass/use.rs
+++ b/src/test/run-pass/use.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 // pretty-expanded FIXME #23616
 
 #![allow(unused_imports)]
diff --git a/src/test/run-pass/utf8_idents.rs b/src/test/run-pass/utf8_idents.rs
index 579070a295a..4614e47609a 100644
--- a/src/test/run-pass/utf8_idents.rs
+++ b/src/test/run-pass/utf8_idents.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
+#![allow(non_snake_case)]
 
 #![feature(non_ascii_idents)]
 
diff --git a/src/test/run-pass/variant-attributes.rs b/src/test/run-pass/variant-attributes.rs
index 18987d1e016..0c92778cec4 100644
--- a/src/test/run-pass/variant-attributes.rs
+++ b/src/test/run-pass/variant-attributes.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_attributes)]
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 // pp-exact - Make sure we actually print the attributes
 // pretty-expanded FIXME #23616
 
diff --git a/src/test/run-pass/volatile-fat-ptr.rs b/src/test/run-pass/volatile-fat-ptr.rs
index 03ba5587fce..799917c4b05 100644
--- a/src/test/run-pass/volatile-fat-ptr.rs
+++ b/src/test/run-pass/volatile-fat-ptr.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(stable_features)]
 #![feature(volatile)]
 use std::ptr::{read_volatile, write_volatile};
 
diff --git a/src/test/run-pass/warn-ctypes-inhibit.rs b/src/test/run-pass/warn-ctypes-inhibit.rs
index 81a3c94eec3..0c059cb607e 100644
--- a/src/test/run-pass/warn-ctypes-inhibit.rs
+++ b/src/test/run-pass/warn-ctypes-inhibit.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 // compile-flags:-D improper-ctypes
 
 // pretty-expanded FIXME #23616
diff --git a/src/test/run-pass/weird-exprs.rs b/src/test/run-pass/weird-exprs.rs
index 35120e428a7..c688ec540da 100644
--- a/src/test/run-pass/weird-exprs.rs
+++ b/src/test/run-pass/weird-exprs.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
+#![allow(unreachable_code)]
+#![allow(unused_parens)]
 // compile-flags: -Z borrowck=compare
 
 #![recursion_limit = "128"]
diff --git a/src/test/run-pass/wf-bound-region-in-object-type.rs b/src/test/run-pass/wf-bound-region-in-object-type.rs
index cdb5e3fe1d4..b71f633bef4 100644
--- a/src/test/run-pass/wf-bound-region-in-object-type.rs
+++ b/src/test/run-pass/wf-bound-region-in-object-type.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
+#![allow(unused_variables)]
 // Test that the `wf` checker properly handles bound regions in object
 // types. Compiling this code used to trigger an ICE.
 
diff --git a/src/test/run-pass/writealias.rs b/src/test/run-pass/writealias.rs
index 7339fe47dc2..d190e91575e 100644
--- a/src/test/run-pass/writealias.rs
+++ b/src/test/run-pass/writealias.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(dead_code)]
 
 use std::sync::Mutex;
 
diff --git a/src/test/run-pass/wrong-hashset-issue-42918.rs b/src/test/run-pass/wrong-hashset-issue-42918.rs
index 5a23adeceb5..0fcd3efd9ce 100644
--- a/src/test/run-pass/wrong-hashset-issue-42918.rs
+++ b/src/test/run-pass/wrong-hashset-issue-42918.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
+#![allow(dead_code)]
 // compile-flags: -O
 
 use std::collections::HashSet;
diff --git a/src/test/run-pass/x86stdcall2.rs b/src/test/run-pass/x86stdcall2.rs
index bbdd65f7e5b..8ea7ec67f1b 100644
--- a/src/test/run-pass/x86stdcall2.rs
+++ b/src/test/run-pass/x86stdcall2.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types)]
 pub type HANDLE = usize;
 pub type DWORD = u32;
 pub type SIZE_T = u32;
diff --git a/src/test/run-pass/yield.rs b/src/test/run-pass/yield.rs
index db884638622..9910c534926 100644
--- a/src/test/run-pass/yield.rs
+++ b/src/test/run-pass/yield.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unused_mut)]
 // ignore-emscripten no threads support
 
 use std::thread;
diff --git a/src/test/run-pass/yield1.rs b/src/test/run-pass/yield1.rs
index cab68794e1c..0b603452339 100644
--- a/src/test/run-pass/yield1.rs
+++ b/src/test/run-pass/yield1.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unused_must_use)]
+#![allow(unused_mut)]
 // ignore-emscripten no threads support
 
 use std::thread;
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index 6679ec79c1d..a4d839275c3 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -21,6 +21,7 @@ pub enum Mode {
     CompileFail,
     ParseFail,
     RunFail,
+    /// This now behaves like a `ui` test that has an implict `// run-pass`.
     RunPass,
     RunPassValgrind,
     Pretty,
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index db856a1dcf9..8829d880836 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -199,6 +199,10 @@ pub struct TestProps {
     pub force_host: bool,
     // Check stdout for error-pattern output as well as stderr
     pub check_stdout: bool,
+    // For UI tests, allows compiler to generate arbitrary output to stdout
+    pub dont_check_compiler_stdout: bool,
+    // For UI tests, allows compiler to generate arbitrary output to stderr
+    pub dont_check_compiler_stderr: bool,
     // Don't force a --crate-type=dylib flag on the command line
     pub no_prefer_dynamic: bool,
     // Run --pretty expanded when running pretty printing tests
@@ -249,6 +253,8 @@ impl TestProps {
             build_aux_docs: false,
             force_host: false,
             check_stdout: false,
+            dont_check_compiler_stdout: false,
+            dont_check_compiler_stderr: false,
             no_prefer_dynamic: false,
             pretty_expanded: false,
             pretty_mode: "normal".to_string(),
@@ -327,6 +333,14 @@ impl TestProps {
                 self.check_stdout = config.parse_check_stdout(ln);
             }
 
+            if !self.dont_check_compiler_stdout {
+                self.dont_check_compiler_stdout = config.parse_dont_check_compiler_stdout(ln);
+            }
+
+            if !self.dont_check_compiler_stderr {
+                self.dont_check_compiler_stderr = config.parse_dont_check_compiler_stderr(ln);
+            }
+
             if !self.no_prefer_dynamic {
                 self.no_prefer_dynamic = config.parse_no_prefer_dynamic(ln);
             }
@@ -510,6 +524,14 @@ impl Config {
         self.parse_name_directive(line, "check-stdout")
     }
 
+    fn parse_dont_check_compiler_stdout(&self, line: &str) -> bool {
+        self.parse_name_directive(line, "dont-check-compiler-stdout")
+    }
+
+    fn parse_dont_check_compiler_stderr(&self, line: &str) -> bool {
+        self.parse_name_directive(line, "dont-check-compiler-stderr")
+    }
+
     fn parse_no_prefer_dynamic(&self, line: &str) -> bool {
         self.parse_name_directive(line, "no-prefer-dynamic")
     }
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 2d49c83edb9..401dec7b184 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -247,7 +247,6 @@ impl<'test> TestCx<'test> {
         match self.config.mode {
             CompileFail | ParseFail => self.run_cfail_test(),
             RunFail => self.run_rfail_test(),
-            RunPass => self.run_rpass_test(),
             RunPassValgrind => self.run_valgrind_test(),
             Pretty => self.run_pretty_test(),
             DebugInfoGdb => self.run_debuginfo_gdb_test(),
@@ -257,13 +256,43 @@ impl<'test> TestCx<'test> {
             CodegenUnits => self.run_codegen_units_test(),
             Incremental => self.run_incremental_test(),
             RunMake => self.run_rmake_test(),
-            Ui => self.run_ui_test(),
+            RunPass | Ui => self.run_ui_test(),
             MirOpt => self.run_mir_opt_test(),
         }
     }
 
+    fn should_run_successfully(&self) -> bool {
+        let run_pass = match self.config.mode {
+            RunPass => true,
+            Ui => self.props.run_pass,
+            _ => unimplemented!(),
+        };
+        return run_pass && !self.props.skip_codegen;
+    }
+
+    fn should_compile_successfully(&self) -> bool {
+        match self.config.mode {
+            ParseFail | CompileFail => self.props.compile_pass,
+            RunPass => true,
+            Ui => self.props.compile_pass,
+            Incremental => {
+                let revision = self.revision
+                    .expect("incremental tests require a list of revisions");
+                if revision.starts_with("rpass") || revision.starts_with("rfail") {
+                    true
+                } else if revision.starts_with("cfail") {
+                    // FIXME: would be nice if incremental revs could start with "cpass"
+                    self.props.compile_pass
+                } else {
+                    panic!("revision name must begin with rpass, rfail, or cfail");
+                }
+            }
+            mode => panic!("unimplemented for mode {:?}", mode),
+        }
+    }
+
     fn check_if_test_should_compile(&self, proc_res: &ProcRes) {
-        if self.props.compile_pass {
+        if self.should_compile_successfully() {
             if !proc_res.status.success() {
                 self.fatal_proc_rec("test compilation failed although it shouldn't!", proc_res);
             }
@@ -1677,7 +1706,7 @@ impl<'test> TestCx<'test> {
                     rustc.arg("-Zui-testing");
                 }
             }
-            Ui => {
+            RunPass | Ui => {
                 if !self
                     .props
                     .compile_flags
@@ -1706,7 +1735,7 @@ impl<'test> TestCx<'test> {
 
                 rustc.arg(dir_opt);
             }
-            RunPass | RunFail | RunPassValgrind | Pretty | DebugInfoGdb | DebugInfoLldb
+            RunFail | RunPassValgrind | Pretty | DebugInfoGdb | DebugInfoLldb
             | Codegen | Rustdoc | RunMake | CodegenUnits => {
                 // do not use JSON output
             }
@@ -2638,8 +2667,12 @@ impl<'test> TestCx<'test> {
         let normalized_stderr = self.normalize_output(&stderr, &self.props.normalize_stderr);
 
         let mut errors = 0;
-        errors += self.compare_output("stdout", &normalized_stdout, &expected_stdout);
-        errors += self.compare_output("stderr", &normalized_stderr, &expected_stderr);
+        if !self.props.dont_check_compiler_stdout {
+            errors += self.compare_output("stdout", &normalized_stdout, &expected_stdout);
+        }
+        if !self.props.dont_check_compiler_stderr {
+            errors += self.compare_output("stderr", &normalized_stderr, &expected_stderr);
+        }
 
         let modes_to_prune = vec![CompareMode::Nll];
         self.prune_duplicate_outputs(&modes_to_prune);
@@ -2691,7 +2724,7 @@ impl<'test> TestCx<'test> {
 
         let expected_errors = errors::load_errors(&self.testpaths.file, self.revision);
 
-        if self.props.run_pass {
+        if self.should_run_successfully() {
             let proc_res = self.exec_compiled_test();
 
             if !proc_res.status.success() {