about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-07-17 18:13:38 +0800
committerkennytm <kennytm@gmail.com>2018-07-17 19:24:50 +0800
commita07f213974cee627a621c82e303b00ddaa8359e5 (patch)
treef5af8ce17c126464e91d6cc7c6f5c9ce4472a477 /src
parent6af3e2d707230cf4d0879dc81ceccc83e72fed25 (diff)
parent9e10b12f332a027a6397e3aa6b58effc2d64bb38 (diff)
downloadrust-a07f213974cee627a621c82e303b00ddaa8359e5.tar.gz
rust-a07f213974cee627a621c82e303b00ddaa8359e5.zip
Rollup merge of #52338 - RalfJung:miri, r=oli-obk
update miri
Diffstat (limited to 'src')
-rw-r--r--src/Cargo.lock27
-rw-r--r--src/doc/unstable-book/src/language-features/proc-macro.md241
-rw-r--r--src/libproc_macro/diagnostic.rs16
-rw-r--r--src/libproc_macro/lib.rs222
-rw-r--r--src/librustc/cfg/construct.rs78
-rw-r--r--src/librustc/hir/check_attr.rs20
-rw-r--r--src/librustc/hir/intravisit.rs131
-rw-r--r--src/librustc/hir/lowering.rs290
-rw-r--r--src/librustc/hir/map/blocks.rs10
-rw-r--r--src/librustc/hir/map/collector.rs2
-rw-r--r--src/librustc/hir/map/hir_id_validator.rs2
-rw-r--r--src/librustc/hir/map/mod.rs123
-rw-r--r--src/librustc/hir/mod.rs480
-rw-r--r--src/librustc/hir/print.rs238
-rw-r--r--src/librustc/ich/impls_hir.rs194
-rw-r--r--src/librustc/infer/anon_types/mod.rs2
-rw-r--r--src/librustc/infer/error_reporting/mod.rs24
-rw-r--r--src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs14
-rw-r--r--src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs4
-rw-r--r--src/librustc/middle/dead.rs60
-rw-r--r--src/librustc/middle/entry.rs4
-rw-r--r--src/librustc/middle/expr_use_visitor.rs68
-rw-r--r--src/librustc/middle/intrinsicck.rs2
-rw-r--r--src/librustc/middle/liveness.rs148
-rw-r--r--src/librustc/middle/mem_categorization.rs32
-rw-r--r--src/librustc/middle/reachable.rs43
-rw-r--r--src/librustc/middle/region.rs46
-rw-r--r--src/librustc/middle/resolve_lifetime.rs102
-rw-r--r--src/librustc/middle/stability.rs14
-rw-r--r--src/librustc/mir/tcx.rs34
-rw-r--r--src/librustc/traits/error_reporting.rs10
-rw-r--r--src/librustc/traits/util.rs2
-rw-r--r--src/librustc/ty/context.rs2
-rw-r--r--src/librustc/ty/mod.rs10
-rw-r--r--src/librustc/ty/util.rs4
-rw-r--r--src/librustc_borrowck/borrowck/check_loans.rs2
-rw-r--r--src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs2
-rw-r--r--src/librustc_borrowck/borrowck/mod.rs8
-rw-r--r--src/librustc_codegen_llvm/back/symbol_export.rs4
-rw-r--r--src/librustc_codegen_llvm/base.rs34
-rw-r--r--src/librustc_codegen_llvm/common.rs4
-rw-r--r--src/librustc_codegen_llvm/consts.rs4
-rw-r--r--src/librustc_codegen_llvm/intrinsic.rs12
-rw-r--r--src/librustc_codegen_llvm/mono_item.rs2
-rw-r--r--src/librustc_driver/test.rs36
-rw-r--r--src/librustc_incremental/persist/dirty_clean.rs30
-rw-r--r--src/librustc_lint/bad_style.rs16
-rw-r--r--src/librustc_lint/builtin.rs88
-rw-r--r--src/librustc_lint/types.rs51
-rw-r--r--src/librustc_lint/unused.rs41
-rw-r--r--src/librustc_metadata/encoder.rs172
-rw-r--r--src/librustc_metadata/foreign_modules.rs2
-rw-r--r--src/librustc_metadata/link_args.rs2
-rw-r--r--src/librustc_metadata/native_libs.rs2
-rw-r--r--src/librustc_mir/borrow_check/error_reporting.rs4
-rw-r--r--src/librustc_mir/borrow_check/mod.rs2
-rw-r--r--src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs20
-rw-r--r--src/librustc_mir/hair/cx/block.rs10
-rw-r--r--src/librustc_mir/hair/cx/expr.rs114
-rw-r--r--src/librustc_mir/hair/pattern/check_match.rs2
-rw-r--r--src/librustc_mir/hair/pattern/mod.rs8
-rw-r--r--src/librustc_mir/monomorphize/collector.rs38
-rw-r--r--src/librustc_mir/transform/add_validation.rs2
-rw-r--r--src/librustc_mir/transform/check_unsafety.rs2
-rw-r--r--src/librustc_passes/loops.rs16
-rw-r--r--src/librustc_passes/rvalue_promotion.rs74
-rw-r--r--src/librustc_plugin/build.rs2
-rw-r--r--src/librustc_privacy/lib.rs125
-rw-r--r--src/librustc_resolve/lib.rs8
-rw-r--r--src/librustc_resolve/macros.rs2
-rw-r--r--src/librustc_save_analysis/lib.rs10
-rw-r--r--src/librustc_typeck/astconv.rs32
-rw-r--r--src/librustc_typeck/check/_match.rs2
-rw-r--r--src/librustc_typeck/check/callee.rs6
-rw-r--r--src/librustc_typeck/check/compare_method.rs6
-rw-r--r--src/librustc_typeck/check/demand.rs19
-rw-r--r--src/librustc_typeck/check/intrinsic.rs4
-rw-r--r--src/librustc_typeck/check/method/confirm.rs10
-rw-r--r--src/librustc_typeck/check/method/suggest.rs14
-rw-r--r--src/librustc_typeck/check/mod.rs212
-rw-r--r--src/librustc_typeck/check/op.rs151
-rw-r--r--src/librustc_typeck/check/regionck.rs42
-rw-r--r--src/librustc_typeck/check/upvar.rs2
-rw-r--r--src/librustc_typeck/check/wfcheck.rs16
-rw-r--r--src/librustc_typeck/check/writeback.rs19
-rw-r--r--src/librustc_typeck/check_unused.rs4
-rw-r--r--src/librustc_typeck/coherence/builtin.rs10
-rw-r--r--src/librustc_typeck/coherence/inherent_impls.rs2
-rw-r--r--src/librustc_typeck/coherence/inherent_impls_overlap.rs8
-rw-r--r--src/librustc_typeck/coherence/orphan.rs2
-rw-r--r--src/librustc_typeck/coherence/unsafety.rs2
-rw-r--r--src/librustc_typeck/collect.rs186
-rw-r--r--src/librustc_typeck/impl_wf_check.rs2
-rw-r--r--src/librustc_typeck/lib.rs4
-rw-r--r--src/librustc_typeck/outlives/implicit_infer.rs2
-rw-r--r--src/librustc_typeck/outlives/mod.rs2
-rw-r--r--src/librustc_typeck/variance/constraints.rs12
-rw-r--r--src/librustc_typeck/variance/mod.rs10
-rw-r--r--src/librustc_typeck/variance/terms.rs12
-rw-r--r--src/librustdoc/clean/auto_trait.rs11
-rw-r--r--src/librustdoc/clean/mod.rs46
-rw-r--r--src/librustdoc/test.rs2
-rw-r--r--src/librustdoc/visit_ast.rs36
-rw-r--r--src/libsyntax/ext/expand.rs8
-rw-r--r--src/libsyntax/feature_gate.rs37
-rw-r--r--src/test/compile-fail-fulldeps/issue-15778-fail.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attribute-with-error.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attributes-included.rs12
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr_proc_macro.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/attribute-with-error.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/attributes-included.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro2.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue-41211.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_50493.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/more-gates.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/proc-macro-gates.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/auxiliary/test-macros.rs1
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/feature-gate-proc_macro.rs23
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/issue-41211.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/macro-use-attr.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/macros-in-extern.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/more-gates.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs5
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs2
-rw-r--r--src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs2
-rw-r--r--src/test/compile-fail/issue-26548.rs7
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs2
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/hello_macro.rs2
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs6
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs6
-rw-r--r--src/test/run-pass-fulldeps/derive-totalsum-attr.rs6
-rw-r--r--src/test/run-pass-fulldeps/issue-15778-pass.rs12
-rw-r--r--src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs14
-rw-r--r--src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs14
-rw-r--r--src/test/run-pass-fulldeps/macro-crate.rs8
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/attr-args.rs7
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/attr-cfg.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/attr-on-trait.rs6
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-cfg.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-on-trait.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/bang-macro.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/call-site.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/gen-lifetime-token.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-42708.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-50061.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/lifetimes.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/modify-ast.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/negative-token.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/not-joint.rs1
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/span-api-tests.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/test-macros.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-b.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/gen-lifetime-token.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/issue-42708.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/issue-50061.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/lifetimes.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/modify-ast.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/not-joint.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc_macro.rs2
-rw-r--r--src/test/ui-fulldeps/auxiliary/invalid-punct-ident.rs2
-rw-r--r--src/test/ui-fulldeps/lifetimes.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/auxiliary/macro-brackets.rs1
-rw-r--r--src/test/ui-fulldeps/proc-macro/auxiliary/parent-source-spans.rs3
-rw-r--r--src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs3
-rw-r--r--src/test/ui-fulldeps/proc-macro/generate-mod.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/macro-brackets.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/macro-namespace-reserved-2.rs2
-rw-r--r--src/test/ui-fulldeps/resolve-error.rs2
-rw-r--r--src/test/ui/issue-10176.rs (renamed from src/test/compile-fail/issue-10176.rs)0
-rw-r--r--src/test/ui/issue-10176.stderr14
-rw-r--r--src/test/ui/issue-10200.rs (renamed from src/test/compile-fail/issue-10200.rs)0
-rw-r--r--src/test/ui/issue-10200.stderr9
-rw-r--r--src/test/ui/issue-10291.nll.stderr14
-rw-r--r--src/test/ui/issue-10291.rs (renamed from src/test/compile-fail/issue-10291.rs)0
-rw-r--r--src/test/ui/issue-10291.stderr23
-rw-r--r--src/test/ui/issue-10398.nll.stderr13
-rw-r--r--src/test/ui/issue-10398.rs (renamed from src/test/compile-fail/issue-10398.rs)0
-rw-r--r--src/test/ui/issue-10398.stderr13
-rw-r--r--src/test/ui/issue-10401.rs (renamed from src/test/compile-fail/issue-10401.rs)0
-rw-r--r--src/test/ui/issue-10401.stderr16
-rw-r--r--src/test/ui/issue-10412.rs (renamed from src/test/compile-fail/issue-10412.rs)0
-rw-r--r--src/test/ui/issue-10412.stderr51
-rw-r--r--src/test/ui/issue-10465.rs (renamed from src/test/compile-fail/issue-10465.rs)0
-rw-r--r--src/test/ui/issue-10465.stderr13
-rw-r--r--src/test/ui/issue-10536.rs (renamed from src/test/compile-fail/issue-10536.rs)2
-rw-r--r--src/test/ui/issue-10536.stderr14
-rw-r--r--src/test/ui/issue-10545.rs (renamed from src/test/compile-fail/issue-10545.rs)0
-rw-r--r--src/test/ui/issue-10545.stderr9
-rw-r--r--src/test/ui/issue-10656.rs (renamed from src/test/compile-fail/issue-10656.rs)3
-rw-r--r--src/test/ui/issue-10656.stderr15
-rw-r--r--src/test/ui/issue-10764.rs (renamed from src/test/compile-fail/issue-10764.rs)0
-rw-r--r--src/test/ui/issue-10764.stderr12
-rw-r--r--src/test/ui/issue-10877.rs (renamed from src/test/compile-fail/issue-10877.rs)0
-rw-r--r--src/test/ui/issue-10877.stderr27
-rw-r--r--src/test/ui/issue-10991.rs (renamed from src/test/compile-fail/issue-10991.rs)0
-rw-r--r--src/test/ui/issue-10991.stderr11
-rw-r--r--src/test/ui/issue-11154.rs (renamed from src/test/compile-fail/issue-11154.rs)0
-rw-r--r--src/test/ui/issue-11154.stderr6
-rw-r--r--src/test/ui/issue-11192.nll.stderr18
-rw-r--r--src/test/ui/issue-11192.rs (renamed from src/test/compile-fail/issue-11192.rs)0
-rw-r--r--src/test/ui/issue-11192.stderr18
-rw-r--r--src/test/ui/issue-11374.rs (renamed from src/test/compile-fail/issue-11374.rs)0
-rw-r--r--src/test/ui/issue-11374.stderr15
-rw-r--r--src/test/ui/issue-11493.ast.stderr16
-rw-r--r--src/test/ui/issue-11493.mir.stderr16
-rw-r--r--src/test/ui/issue-11493.rs (renamed from src/test/compile-fail/issue-11493.rs)8
-rw-r--r--src/test/ui/issue-11515.rs (renamed from src/test/compile-fail/issue-11515.rs)0
-rw-r--r--src/test/ui/issue-11515.stderr12
-rw-r--r--src/test/ui/issue-11681.rs (renamed from src/test/compile-fail/issue-11681.rs)0
-rw-r--r--src/test/ui/issue-11681.stderr18
-rw-r--r--src/test/ui/issue-11692-1.rs (renamed from src/test/compile-fail/issue-11692-1.rs)0
-rw-r--r--src/test/ui/issue-11692-1.stderr8
-rw-r--r--src/test/ui/issue-11692-2.rs (renamed from src/test/compile-fail/issue-11692-2.rs)0
-rw-r--r--src/test/ui/issue-11692-2.stderr8
-rw-r--r--src/test/ui/issue-11740.rs (renamed from src/test/compile-fail/issue-11740.rs)0
-rw-r--r--src/test/ui/issue-11740.stderr11
-rw-r--r--src/test/ui/issue-11771.rs (renamed from src/test/compile-fail/issue-11771.rs)0
-rw-r--r--src/test/ui/issue-11771.stderr19
-rw-r--r--src/test/ui/issue-11844.rs (renamed from src/test/compile-fail/issue-11844.rs)0
-rw-r--r--src/test/ui/issue-11844.stderr12
-rw-r--r--src/test/ui/issue-11873.nll.stderr14
-rw-r--r--src/test/ui/issue-11873.rs (renamed from src/test/compile-fail/issue-11873.rs)0
-rw-r--r--src/test/ui/issue-11873.stderr11
-rw-r--r--src/test/ui/issue-12028.rs (renamed from src/test/compile-fail/issue-12028.rs)0
-rw-r--r--src/test/ui/issue-12028.stderr9
-rw-r--r--src/test/ui/issue-12041.nll.stderr11
-rw-r--r--src/test/ui/issue-12041.rs (renamed from src/test/compile-fail/issue-12041.rs)0
-rw-r--r--src/test/ui/issue-12041.stderr11
-rw-r--r--src/test/ui/issue-12116.rs (renamed from src/test/compile-fail/issue-12116.rs)0
-rw-r--r--src/test/ui/issue-12116.stderr14
-rw-r--r--src/test/ui/issue-12127.rs (renamed from src/test/compile-fail/issue-12127.rs)0
-rw-r--r--src/test/ui/issue-12127.stderr13
-rw-r--r--src/test/ui/issue-12369.rs (renamed from src/test/compile-fail/issue-12369.rs)0
-rw-r--r--src/test/ui/issue-12369.stderr14
-rw-r--r--src/test/ui/issue-12470.nll.stderr18
-rw-r--r--src/test/ui/issue-12470.rs (renamed from src/test/compile-fail/issue-12470.rs)0
-rw-r--r--src/test/ui/issue-12470.stderr18
-rw-r--r--src/test/ui/issue-12552.rs (renamed from src/test/compile-fail/issue-12552.rs)0
-rw-r--r--src/test/ui/issue-12552.stderr21
-rw-r--r--src/test/ui/issue-12567.nll.stderr31
-rw-r--r--src/test/ui/issue-12567.rs (renamed from src/test/compile-fail/issue-12567.rs)0
-rw-r--r--src/test/ui/issue-12567.stderr39
-rw-r--r--src/test/ui/issue-12796.rs (renamed from src/test/compile-fail/issue-12796.rs)0
-rw-r--r--src/test/ui/issue-12796.stderr11
-rw-r--r--src/test/ui/issue-12863.rs (renamed from src/test/compile-fail/issue-12863.rs)0
-rw-r--r--src/test/ui/issue-12863.stderr9
-rw-r--r--src/test/ui/issue-12997-1.rs (renamed from src/test/compile-fail/issue-12997-1.rs)0
-rw-r--r--src/test/ui/issue-12997-1.stderr14
-rw-r--r--src/test/ui/issue-12997-2.rs (renamed from src/test/compile-fail/issue-12997-2.rs)0
-rw-r--r--src/test/ui/issue-12997-2.stderr12
-rw-r--r--src/test/ui/issue-13033.rs (renamed from src/test/compile-fail/issue-13033.rs)0
-rw-r--r--src/test/ui/issue-13033.stderr15
-rw-r--r--src/test/ui/issue-13352.rs (renamed from src/test/compile-fail/issue-13352.rs)0
-rw-r--r--src/test/ui/issue-13352.stderr11
-rw-r--r--src/test/ui/issue-13359.rs (renamed from src/test/compile-fail/issue-13359.rs)0
-rw-r--r--src/test/ui/issue-13359.stderr15
-rw-r--r--src/test/ui/issue-13404.rs (renamed from src/test/compile-fail/issue-13404.rs)0
-rw-r--r--src/test/ui/issue-13404.stderr9
-rw-r--r--src/test/ui/issue-13407.rs (renamed from src/test/compile-fail/issue-13407.rs)0
-rw-r--r--src/test/ui/issue-13407.stderr25
-rw-r--r--src/test/ui/issue-13446.rs (renamed from src/test/compile-fail/issue-13446.rs)0
-rw-r--r--src/test/ui/issue-13446.stderr13
-rw-r--r--src/test/ui/issue-13466.rs (renamed from src/test/compile-fail/issue-13466.rs)0
-rw-r--r--src/test/ui/issue-13466.stderr21
-rw-r--r--src/test/ui/issue-13482-2.rs (renamed from src/test/compile-fail/issue-13482-2.rs)0
-rw-r--r--src/test/ui/issue-13482-2.stderr9
-rw-r--r--src/test/ui/issue-13482.rs (renamed from src/test/compile-fail/issue-13482.rs)0
-rw-r--r--src/test/ui/issue-13482.stderr9
-rw-r--r--src/test/ui/issue-13497-2.rs (renamed from src/test/compile-fail/issue-13497-2.rs)0
-rw-r--r--src/test/ui/issue-13497-2.stderr18
-rw-r--r--src/test/ui/issue-13497.rs (renamed from src/test/compile-fail/issue-13497.rs)0
-rw-r--r--src/test/ui/issue-13497.stderr12
-rw-r--r--src/test/ui/issue-1362.rs (renamed from src/test/compile-fail/issue-1362.rs)0
-rw-r--r--src/test/ui/issue-1362.stderr9
-rw-r--r--src/test/ui/issue-13641.rs (renamed from src/test/compile-fail/issue-13641.rs)0
-rw-r--r--src/test/ui/issue-13641.stderr15
-rw-r--r--src/test/ui/issue-13727.rs (renamed from src/test/compile-fail/issue-13727.rs)0
-rw-r--r--src/test/ui/issue-13727.stderr14
-rw-r--r--src/test/ui/issue-13847.rs (renamed from src/test/compile-fail/issue-13847.rs)0
-rw-r--r--src/test/ui/issue-13847.stderr9
-rw-r--r--src/test/ui/issue-13853-2.rs (renamed from src/test/compile-fail/issue-13853-2.rs)0
-rw-r--r--src/test/ui/issue-13853-2.stderr11
-rw-r--r--src/test/ui/issue-13853-5.rs (renamed from src/test/compile-fail/issue-13853-5.rs)0
-rw-r--r--src/test/ui/issue-13853-5.stderr9
-rw-r--r--src/test/ui/issue-13853.rs (renamed from src/test/compile-fail/issue-13853.rs)0
-rw-r--r--src/test/ui/issue-13853.stderr34
-rw-r--r--src/test/ui/issue-14091-2.rs (renamed from src/test/compile-fail/issue-14091-2.rs)3
-rw-r--r--src/test/ui/issue-14091-2.stderr11
-rw-r--r--src/test/ui/issue-14091.rs (renamed from src/test/compile-fail/issue-14091.rs)7
-rw-r--r--src/test/ui/issue-14091.stderr12
-rw-r--r--src/test/ui/issue-14221.rs (renamed from src/test/compile-fail/issue-14221.rs)0
-rw-r--r--src/test/ui/issue-14221.stderr30
-rw-r--r--src/test/ui/issue-14227.rs (renamed from src/test/compile-fail/issue-14227.rs)0
-rw-r--r--src/test/ui/issue-14227.stderr9
-rw-r--r--src/test/ui/issue-14285.nll.stderr17
-rw-r--r--src/test/ui/issue-14285.rs (renamed from src/test/compile-fail/issue-14285.rs)0
-rw-r--r--src/test/ui/issue-14285.stderr11
-rw-r--r--src/test/ui/issue-14309.rs (renamed from src/test/compile-fail/issue-14309.rs)0
-rw-r--r--src/test/ui/issue-14309.stderr82
-rw-r--r--src/test/ui/issue-14366.rs (renamed from src/test/compile-fail/issue-14366.rs)0
-rw-r--r--src/test/ui/issue-14366.stderr13
-rw-r--r--src/test/ui/issue-1448-2.rs (renamed from src/test/compile-fail/issue-1448-2.rs)0
-rw-r--r--src/test/ui/issue-1448-2.stderr9
-rw-r--r--src/test/ui/issue-14541.rs (renamed from src/test/compile-fail/issue-14541.rs)0
-rw-r--r--src/test/ui/issue-14541.stderr12
-rw-r--r--src/test/ui/issue-14721.rs (renamed from src/test/compile-fail/issue-14721.rs)0
-rw-r--r--src/test/ui/issue-14721.stderr9
-rw-r--r--src/test/ui/issue-1476.rs (renamed from src/test/compile-fail/issue-1476.rs)0
-rw-r--r--src/test/ui/issue-1476.stderr9
-rw-r--r--src/test/ui/issue-14772.rs (renamed from src/test/compile-fail/issue-14772.rs)0
-rw-r--r--src/test/ui/issue-14772.stderr8
-rw-r--r--src/test/ui/issue-14845.rs (renamed from src/test/compile-fail/issue-14845.rs)0
-rw-r--r--src/test/ui/issue-14845.stderr15
-rw-r--r--src/test/ui/issue-14853.rs (renamed from src/test/compile-fail/issue-14853.rs)0
-rw-r--r--src/test/ui/issue-14853.stderr12
-rw-r--r--src/test/ui/issue-14915.rs (renamed from src/test/compile-fail/issue-14915.rs)0
-rw-r--r--src/test/ui/issue-14915.stderr11
-rw-r--r--src/test/ui/issue-15034.nll.stderr17
-rw-r--r--src/test/ui/issue-15034.rs (renamed from src/test/compile-fail/issue-15034.rs)0
-rw-r--r--src/test/ui/issue-15034.stderr11
-rw-r--r--src/test/ui/issue-15094.rs (renamed from src/test/compile-fail/issue-15094.rs)0
-rw-r--r--src/test/ui/issue-15094.stderr12
-rw-r--r--src/test/ui/issue-15129.rs (renamed from src/test/compile-fail/issue-15129.rs)0
-rw-r--r--src/test/ui/issue-15129.stderr9
-rw-r--r--src/test/ui/issue-15167.rs (renamed from src/test/compile-fail/issue-15167.rs)0
-rw-r--r--src/test/ui/issue-15167.stderr39
-rw-r--r--src/test/ui/issue-15207.rs (renamed from src/test/compile-fail/issue-15207.rs)0
-rw-r--r--src/test/ui/issue-15207.stderr9
-rw-r--r--src/test/ui/issue-15381.rs (renamed from src/test/compile-fail/issue-15381.rs)0
-rw-r--r--src/test/ui/issue-15381.stderr9
-rw-r--r--src/test/ui/issue-15756.rs (renamed from src/test/compile-fail/issue-15756.rs)0
-rw-r--r--src/test/ui/issue-15756.stderr13
-rw-r--r--src/test/ui/issue-15783.rs (renamed from src/test/compile-fail/issue-15783.rs)0
-rw-r--r--src/test/ui/issue-15783.stderr12
-rw-r--r--src/test/ui/issue-15896.rs (renamed from src/test/compile-fail/issue-15896.rs)0
-rw-r--r--src/test/ui/issue-15896.stderr12
-rw-r--r--src/test/ui/issue-15965.rs (renamed from src/test/compile-fail/issue-15965.rs)0
-rw-r--r--src/test/ui/issue-15965.stderr13
-rw-r--r--src/test/ui/issue-16048.rs (renamed from src/test/compile-fail/issue-16048.rs)0
-rw-r--r--src/test/ui/issue-16048.stderr12
-rw-r--r--src/test/ui/issue-16098.rs (renamed from src/test/compile-fail/issue-16098.rs)0
-rw-r--r--src/test/ui/issue-16098.stderr13
-rw-r--r--src/test/ui/issue-16149.rs (renamed from src/test/compile-fail/issue-16149.rs)0
-rw-r--r--src/test/ui/issue-16149.stderr12
-rw-r--r--src/test/ui/issue-16250.rs (renamed from src/test/compile-fail/issue-16250.rs)0
-rw-r--r--src/test/ui/issue-16250.stderr21
-rw-r--r--src/test/ui/issue-16338.rs (renamed from src/test/compile-fail/issue-16338.rs)0
-rw-r--r--src/test/ui/issue-16338.stderr12
-rw-r--r--src/test/ui/issue-16401.rs (renamed from src/test/compile-fail/issue-16401.rs)0
-rw-r--r--src/test/ui/issue-16401.stderr12
-rw-r--r--src/test/ui/issue-16538.rs (renamed from src/test/compile-fail/issue-16538.rs)0
-rw-r--r--src/test/ui/issue-16538.stderr19
-rw-r--r--src/test/ui/issue-16562.rs (renamed from src/test/compile-fail/issue-16562.rs)0
-rw-r--r--src/test/ui/issue-16562.stderr9
-rw-r--r--src/test/ui/issue-16683.nll.stderr22
-rw-r--r--src/test/ui/issue-16683.rs (renamed from src/test/compile-fail/issue-16683.rs)0
-rw-r--r--src/test/ui/issue-16683.stderr30
-rw-r--r--src/test/ui/issue-16922.nll.stderr17
-rw-r--r--src/test/ui/issue-16922.rs (renamed from src/test/compile-fail/issue-16922.rs)0
-rw-r--r--src/test/ui/issue-16922.stderr11
-rw-r--r--src/test/ui/issue-16939.rs (renamed from src/test/compile-fail/issue-16939.rs)0
-rw-r--r--src/test/ui/issue-16939.stderr9
-rw-r--r--src/test/ui/issue-16966.rs (renamed from src/test/compile-fail/issue-16966.rs)0
-rw-r--r--src/test/ui/issue-16966.stderr13
-rw-r--r--src/test/ui/issue-1697.rs (renamed from src/test/compile-fail/issue-1697.rs)0
-rw-r--r--src/test/ui/issue-1697.stderr9
-rw-r--r--src/test/ui/issue-16994.rs (renamed from src/test/compile-fail/issue-16994.rs)0
-rw-r--r--src/test/ui/issue-16994.stderr10
-rw-r--r--src/test/ui/issue-17001.rs (renamed from src/test/compile-fail/issue-17001.rs)0
-rw-r--r--src/test/ui/issue-17001.stderr9
-rw-r--r--src/test/ui/issue-17025.rs (renamed from src/test/compile-fail/issue-17025.rs)0
-rw-r--r--src/test/ui/issue-17033.rs (renamed from src/test/compile-fail/issue-17033.rs)0
-rw-r--r--src/test/ui/issue-17033.stderr15
-rw-r--r--src/test/ui/issue-17252.rs (renamed from src/test/compile-fail/issue-17252.rs)0
-rw-r--r--src/test/ui/issue-17252.stderr16
-rw-r--r--src/test/ui/issue-17337.rs (renamed from src/test/compile-fail/issue-17337.rs)0
-rw-r--r--src/test/ui/issue-17337.stderr14
-rw-r--r--src/test/ui/issue-17373.rs (renamed from src/test/compile-fail/issue-17373.rs)0
-rw-r--r--src/test/ui/issue-17373.stderr9
-rw-r--r--src/test/ui/issue-17385.nll.stderr77
-rw-r--r--src/test/ui/issue-17385.rs (renamed from src/test/compile-fail/issue-17385.rs)0
-rw-r--r--src/test/ui/issue-17385.stderr23
-rw-r--r--src/test/ui/issue-17405.rs (renamed from src/test/compile-fail/issue-17405.rs)0
-rw-r--r--src/test/ui/issue-17405.stderr9
-rw-r--r--src/test/ui/issue-17431-1.rs (renamed from src/test/compile-fail/issue-17431-1.rs)0
-rw-r--r--src/test/ui/issue-17431-1.stderr13
-rw-r--r--src/test/ui/issue-17431-2.rs (renamed from src/test/compile-fail/issue-17431-2.rs)0
-rw-r--r--src/test/ui/issue-17431-2.stderr23
-rw-r--r--src/test/ui/issue-17431-3.rs (renamed from src/test/compile-fail/issue-17431-3.rs)0
-rw-r--r--src/test/ui/issue-17431-3.stderr13
-rw-r--r--src/test/ui/issue-17431-4.rs (renamed from src/test/compile-fail/issue-17431-4.rs)0
-rw-r--r--src/test/ui/issue-17431-4.stderr13
-rw-r--r--src/test/ui/issue-17431-5.rs (renamed from src/test/compile-fail/issue-17431-5.rs)0
-rw-r--r--src/test/ui/issue-17431-5.stderr13
-rw-r--r--src/test/ui/issue-17431-6.rs (renamed from src/test/compile-fail/issue-17431-6.rs)0
-rw-r--r--src/test/ui/issue-17431-6.stderr13
-rw-r--r--src/test/ui/issue-17431-7.rs (renamed from src/test/compile-fail/issue-17431-7.rs)0
-rw-r--r--src/test/ui/issue-17431-7.stderr13
-rw-r--r--src/test/ui/issue-17444.rs (renamed from src/test/compile-fail/issue-17444.rs)0
-rw-r--r--src/test/ui/issue-17444.stderr9
-rw-r--r--src/test/ui/issue-17458.rs (renamed from src/test/compile-fail/issue-17458.rs)0
-rw-r--r--src/test/ui/issue-17458.stderr9
-rw-r--r--src/test/ui/issue-17545.nll.stderr17
-rw-r--r--src/test/ui/issue-17545.rs (renamed from src/test/compile-fail/issue-17545.rs)0
-rw-r--r--src/test/ui/issue-17545.stderr18
-rw-r--r--src/test/ui/issue-17546.rs (renamed from src/test/compile-fail/issue-17546.rs)0
-rw-r--r--src/test/ui/issue-17546.stderr55
-rw-r--r--src/test/ui/issue-17551.rs (renamed from src/test/compile-fail/issue-17551.rs)0
-rw-r--r--src/test/ui/issue-17551.stderr11
-rw-r--r--src/test/ui/issue-17651.rs (renamed from src/test/compile-fail/issue-17651.rs)0
-rw-r--r--src/test/ui/issue-17651.stderr13
-rw-r--r--src/test/ui/issue-17718-const-bad-values.rs (renamed from src/test/compile-fail/issue-17718-const-bad-values.rs)0
-rw-r--r--src/test/ui/issue-17718-const-bad-values.stderr28
-rw-r--r--src/test/ui/issue-17718-const-borrow.rs (renamed from src/test/compile-fail/issue-17718-const-borrow.rs)0
-rw-r--r--src/test/ui/issue-17718-const-borrow.stderr21
-rw-r--r--src/test/ui/issue-17718-const-naming.rs (renamed from src/test/compile-fail/issue-17718-const-naming.rs)0
-rw-r--r--src/test/ui/issue-17718-const-naming.stderr28
-rw-r--r--src/test/ui/issue-17718-constants-not-static.rs (renamed from src/test/compile-fail/issue-17718-constants-not-static.rs)0
-rw-r--r--src/test/ui/issue-17718-constants-not-static.stderr13
-rw-r--r--src/test/ui/issue-17718-patterns.rs (renamed from src/test/compile-fail/issue-17718-patterns.rs)0
-rw-r--r--src/test/ui/issue-17718-patterns.stderr21
-rw-r--r--src/test/ui/issue-17718-references.rs (renamed from src/test/compile-fail/issue-17718-references.rs)0
-rw-r--r--src/test/ui/issue-17718-references.stderr21
-rw-r--r--src/test/ui/issue-17718-static-move.rs (renamed from src/test/compile-fail/issue-17718-static-move.rs)0
-rw-r--r--src/test/ui/issue-17718-static-move.stderr12
-rw-r--r--src/test/ui/issue-17718-static-sync.rs (renamed from src/test/compile-fail/issue-17718-static-sync.rs)0
-rw-r--r--src/test/ui/issue-17718-static-sync.stderr12
-rw-r--r--src/test/ui/issue-17728.nll.stderr25
-rw-r--r--src/test/ui/issue-17728.rs (renamed from src/test/compile-fail/issue-17728.rs)0
-rw-r--r--src/test/ui/issue-17728.stderr31
-rw-r--r--src/test/ui/issue-17740.rs (renamed from src/test/compile-fail/issue-17740.rs)0
-rw-r--r--src/test/ui/issue-17740.stderr53
-rw-r--r--src/test/ui/issue-17758.nll.stderr22
-rw-r--r--src/test/ui/issue-17758.rs (renamed from src/test/compile-fail/issue-17758.rs)0
-rw-r--r--src/test/ui/issue-17758.stderr31
-rw-r--r--src/test/ui/issue-17800.rs (renamed from src/test/compile-fail/issue-17800.rs)0
-rw-r--r--src/test/ui/issue-17800.stderr18
-rw-r--r--src/test/ui/issue-17904-2.rs (renamed from src/test/compile-fail/issue-17904-2.rs)0
-rw-r--r--src/test/ui/issue-17904-2.stderr11
-rw-r--r--src/test/ui/issue-17905.rs (renamed from src/test/compile-fail/issue-17905.rs)0
-rw-r--r--src/test/ui/issue-17905.stderr9
-rw-r--r--src/test/ui/issue-17933.rs (renamed from src/test/compile-fail/issue-17933.rs)0
-rw-r--r--src/test/ui/issue-17933.stderr9
-rw-r--r--src/test/ui/issue-17954.ast.nll.stderr14
-rw-r--r--src/test/ui/issue-17954.ast.stderr14
-rw-r--r--src/test/ui/issue-17954.mir.stderr14
-rw-r--r--src/test/ui/issue-17954.rs (renamed from src/test/compile-fail/issue-17954.rs)0
-rw-r--r--src/test/ui/issue-17959.rs (renamed from src/test/compile-fail/issue-17959.rs)0
-rw-r--r--src/test/ui/issue-17959.stderr23
-rw-r--r--src/test/ui/issue-17994.rs (renamed from src/test/compile-fail/issue-17994.rs)0
-rw-r--r--src/test/ui/issue-17994.stderr9
-rw-r--r--src/test/ui/issue-17999.rs (renamed from src/test/compile-fail/issue-17999.rs)0
-rw-r--r--src/test/ui/issue-17999.stderr20
-rw-r--r--src/test/ui/issue-18058.rs (renamed from src/test/compile-fail/issue-18058.rs)0
-rw-r--r--src/test/ui/issue-18058.stderr9
-rw-r--r--src/test/ui/issue-18107.rs (renamed from src/test/compile-fail/issue-18107.rs)0
-rw-r--r--src/test/ui/issue-18107.stderr13
-rw-r--r--src/test/ui/issue-18118-2.rs (renamed from src/test/compile-fail/issue-18118-2.rs)0
-rw-r--r--src/test/ui/issue-18118-2.stderr9
-rw-r--r--src/test/ui/issue-18118.nll.stderr67
-rw-r--r--src/test/ui/issue-18118.rs (renamed from src/test/compile-fail/issue-18118.rs)0
-rw-r--r--src/test/ui/issue-18118.stderr67
-rw-r--r--src/test/ui/issue-18119.rs (renamed from src/test/compile-fail/issue-18119.rs)0
-rw-r--r--src/test/ui/issue-18119.stderr21
-rw-r--r--src/test/ui/issue-18159.rs (renamed from src/test/compile-fail/issue-18159.rs)0
-rw-r--r--src/test/ui/issue-18159.stderr12
-rw-r--r--src/test/ui/issue-18294.rs (renamed from src/test/compile-fail/issue-18294.rs)0
-rw-r--r--src/test/ui/issue-18294.stderr9
-rw-r--r--src/test/ui/issue-18389.rs (renamed from src/test/compile-fail/issue-18389.rs)0
-rw-r--r--src/test/ui/issue-18389.stderr15
-rw-r--r--src/test/ui/issue-18400.rs (renamed from src/test/compile-fail/issue-18400.rs)0
-rw-r--r--src/test/ui/issue-18400.stderr75
-rw-r--r--src/test/ui/issue-18423.rs (renamed from src/test/compile-fail/issue-18423.rs)0
-rw-r--r--src/test/ui/issue-18423.stderr9
-rw-r--r--src/test/ui/issue-18446.rs (renamed from src/test/compile-fail/issue-18446.rs)0
-rw-r--r--src/test/ui/issue-18446.stderr21
-rw-r--r--src/test/ui/issue-18532.rs (renamed from src/test/compile-fail/issue-18532.rs)0
-rw-r--r--src/test/ui/issue-18532.stderr9
-rw-r--r--src/test/ui/issue-18566.nll.stderr13
-rw-r--r--src/test/ui/issue-18566.rs (renamed from src/test/compile-fail/issue-18566.rs)0
-rw-r--r--src/test/ui/issue-18566.stderr12
-rw-r--r--src/test/ui/issue-18611.rs (renamed from src/test/compile-fail/issue-18611.rs)0
-rw-r--r--src/test/ui/issue-18611.stderr11
-rw-r--r--src/test/ui/issue-1871.rs (renamed from src/test/compile-fail/issue-1871.rs)0
-rw-r--r--src/test/ui/issue-1871.stderr9
-rw-r--r--src/test/ui/issue-18783.nll.stderr33
-rw-r--r--src/test/ui/issue-18783.rs (renamed from src/test/compile-fail/issue-18783.rs)0
-rw-r--r--src/test/ui/issue-18783.stderr33
-rw-r--r--src/test/ui/issue-18919.rs (renamed from src/test/compile-fail/issue-18919.rs)0
-rw-r--r--src/test/ui/issue-18919.stderr15
-rw-r--r--src/test/ui/issue-18937.rs (renamed from src/test/compile-fail/issue-18937.rs)0
-rw-r--r--src/test/ui/issue-18937.stderr18
-rw-r--r--src/test/ui/issue-18959.rs (renamed from src/test/compile-fail/issue-18959.rs)0
-rw-r--r--src/test/ui/issue-18959.stderr11
-rw-r--r--src/test/ui/issue-1900.rs (renamed from src/test/compile-fail/issue-1900.rs)2
-rw-r--r--src/test/ui/issue-1900.stderr9
-rw-r--r--src/test/ui/issue-19086.rs (renamed from src/test/compile-fail/issue-19086.rs)0
-rw-r--r--src/test/ui/issue-19086.stderr9
-rw-r--r--src/test/ui/issue-19244-1.rs (renamed from src/test/compile-fail/issue-19244-1.rs)0
-rw-r--r--src/test/ui/issue-19244-1.stderr9
-rw-r--r--src/test/ui/issue-19244-2.rs (renamed from src/test/compile-fail/issue-19244-2.rs)0
-rw-r--r--src/test/ui/issue-19244-2.stderr11
-rw-r--r--src/test/ui/issue-19380.rs (renamed from src/test/compile-fail/issue-19380.rs)0
-rw-r--r--src/test/ui/issue-19380.stderr11
-rw-r--r--src/test/ui/issue-19482.rs (renamed from src/test/compile-fail/issue-19482.rs)0
-rw-r--r--src/test/ui/issue-19482.stderr9
-rw-r--r--src/test/ui/issue-19521.rs (renamed from src/test/compile-fail/issue-19521.rs)0
-rw-r--r--src/test/ui/issue-19521.stderr9
-rw-r--r--src/test/ui/issue-19538.rs (renamed from src/test/compile-fail/issue-19538.rs)0
-rw-r--r--src/test/ui/issue-19538.stderr20
-rw-r--r--src/test/ui/issue-19601.rs (renamed from src/test/compile-fail/issue-19601.rs)0
-rw-r--r--src/test/ui/issue-19601.stderr9
-rw-r--r--src/test/ui/issue-19660.rs (renamed from src/test/compile-fail/issue-19660.rs)0
-rw-r--r--src/test/ui/issue-19660.stderr4
-rw-r--r--src/test/ui/issue-19692.rs (renamed from src/test/compile-fail/issue-19692.rs)0
-rw-r--r--src/test/ui/issue-19692.stderr12
-rw-r--r--src/test/ui/issue-19734.rs (renamed from src/test/compile-fail/issue-19734.rs)0
-rw-r--r--src/test/ui/issue-19734.stderr8
-rw-r--r--src/test/ui/issue-19883.rs (renamed from src/test/compile-fail/issue-19883.rs)0
-rw-r--r--src/test/ui/issue-19883.stderr9
-rw-r--r--src/test/ui/issue-19982.rs (renamed from src/test/compile-fail/issue-19982.rs)0
-rw-r--r--src/test/ui/issue-19982.stderr9
-rw-r--r--src/test/ui/issue-19991.rs (renamed from src/test/compile-fail/issue-19991.rs)0
-rw-r--r--src/test/ui/issue-19991.stderr17
-rw-r--r--src/test/ui/issue-20005.rs (renamed from src/test/compile-fail/issue-20005.rs)0
-rw-r--r--src/test/ui/issue-20005.stderr22
-rw-r--r--src/test/ui/issue-20162.rs (renamed from src/test/compile-fail/issue-20162.rs)0
-rw-r--r--src/test/ui/issue-20162.stderr9
-rw-r--r--src/test/ui/issue-20225.rs (renamed from src/test/compile-fail/issue-20225.rs)0
-rw-r--r--src/test/ui/issue-20225.stderr30
-rw-r--r--src/test/ui/issue-20261.rs (renamed from src/test/compile-fail/issue-20261.rs)0
-rw-r--r--src/test/ui/issue-20261.stderr13
-rw-r--r--src/test/ui/issue-20313.rs (renamed from src/test/compile-fail/issue-20313.rs)0
-rw-r--r--src/test/ui/issue-20313.stderr11
-rw-r--r--src/test/ui/issue-20413.rs (renamed from src/test/compile-fail/issue-20413.rs)0
-rw-r--r--src/test/ui/issue-20413.stderr94
-rw-r--r--src/test/ui/issue-20433.rs (renamed from src/test/compile-fail/issue-20433.rs)0
-rw-r--r--src/test/ui/issue-20433.stderr13
-rw-r--r--src/test/ui/issue-20605.rs (renamed from src/test/compile-fail/issue-20605.rs)0
-rw-r--r--src/test/ui/issue-20605.stderr13
-rw-r--r--src/test/ui/issue-20616-1.rs (renamed from src/test/compile-fail/issue-20616-1.rs)0
-rw-r--r--src/test/ui/issue-20616-1.stderr8
-rw-r--r--src/test/ui/issue-20616-2.rs (renamed from src/test/compile-fail/issue-20616-2.rs)0
-rw-r--r--src/test/ui/issue-20616-2.stderr8
-rw-r--r--src/test/ui/issue-20616-3.rs (renamed from src/test/compile-fail/issue-20616-3.rs)0
-rw-r--r--src/test/ui/issue-20616-3.stderr8
-rw-r--r--src/test/ui/issue-20616-4.rs (renamed from src/test/compile-fail/issue-20616-4.rs)0
-rw-r--r--src/test/ui/issue-20616-4.stderr8
-rw-r--r--src/test/ui/issue-20616-5.rs (renamed from src/test/compile-fail/issue-20616-5.rs)0
-rw-r--r--src/test/ui/issue-20616-5.stderr8
-rw-r--r--src/test/ui/issue-20616-6.rs (renamed from src/test/compile-fail/issue-20616-6.rs)0
-rw-r--r--src/test/ui/issue-20616-6.stderr8
-rw-r--r--src/test/ui/issue-20616-7.rs (renamed from src/test/compile-fail/issue-20616-7.rs)0
-rw-r--r--src/test/ui/issue-20616-7.stderr8
-rw-r--r--src/test/ui/issue-20616-8.rs (renamed from src/test/compile-fail/issue-20616-8.rs)0
-rw-r--r--src/test/ui/issue-20616-8.stderr8
-rw-r--r--src/test/ui/issue-20616-9.rs (renamed from src/test/compile-fail/issue-20616-9.rs)0
-rw-r--r--src/test/ui/issue-20616-9.stderr8
-rw-r--r--src/test/ui/issue-20714.rs (renamed from src/test/compile-fail/issue-20714.rs)0
-rw-r--r--src/test/ui/issue-20714.stderr12
-rw-r--r--src/test/ui/issue-20772.rs (renamed from src/test/compile-fail/issue-20772.rs)0
-rw-r--r--src/test/ui/issue-20772.stderr21
-rw-r--r--src/test/ui/issue-20801.nll.stderr8
-rw-r--r--src/test/ui/issue-20801.rs (renamed from src/test/compile-fail/issue-20801.rs)0
-rw-r--r--src/test/ui/issue-20801.stderr27
-rw-r--r--src/test/ui/issue-20825.rs (renamed from src/test/compile-fail/issue-20825.rs)0
-rw-r--r--src/test/ui/issue-20825.stderr11
-rw-r--r--src/test/ui/issue-20831-debruijn.rs (renamed from src/test/compile-fail/issue-20831-debruijn.rs)0
-rw-r--r--src/test/ui/issue-20831-debruijn.stderr35
-rw-r--r--src/test/ui/issue-20939.rs (renamed from src/test/compile-fail/issue-20939.rs)0
-rw-r--r--src/test/ui/issue-20939.stderr9
-rw-r--r--src/test/ui/issue-2111.rs (renamed from src/test/compile-fail/issue-2111.rs)0
-rw-r--r--src/test/ui/issue-2111.stderr9
-rw-r--r--src/test/ui/issue-21160.rs (renamed from src/test/compile-fail/issue-21160.rs)0
-rw-r--r--src/test/ui/issue-21160.stderr11
-rw-r--r--src/test/ui/issue-21174.rs (renamed from src/test/compile-fail/issue-21174.rs)0
-rw-r--r--src/test/ui/issue-21174.stderr12
-rw-r--r--src/test/ui/issue-21177.rs (renamed from src/test/compile-fail/issue-21177.rs)0
-rw-r--r--src/test/ui/issue-21177.stderr23
-rw-r--r--src/test/ui/issue-21332.rs (renamed from src/test/compile-fail/issue-21332.rs)0
-rw-r--r--src/test/ui/issue-21332.stderr12
-rw-r--r--src/test/ui/issue-21356.rs (renamed from src/test/compile-fail/issue-21356.rs)0
-rw-r--r--src/test/ui/issue-21356.stderr10
-rw-r--r--src/test/ui/issue-21449.rs (renamed from src/test/compile-fail/issue-21449.rs)0
-rw-r--r--src/test/ui/issue-21449.stderr9
-rw-r--r--src/test/ui/issue-2149.rs (renamed from src/test/compile-fail/issue-2149.rs)0
-rw-r--r--src/test/ui/issue-2149.stderr22
-rw-r--r--src/test/ui/issue-2150.rs (renamed from src/test/compile-fail/issue-2150.rs)0
-rw-r--r--src/test/ui/issue-2150.stderr14
-rw-r--r--src/test/ui/issue-2151.rs (renamed from src/test/compile-fail/issue-2151.rs)0
-rw-r--r--src/test/ui/issue-2151.stderr13
-rw-r--r--src/test/ui/issue-21554.rs (renamed from src/test/compile-fail/issue-21554.rs)0
-rw-r--r--src/test/ui/issue-21554.stderr9
-rw-r--r--src/test/ui/issue-21701.rs (renamed from src/test/compile-fail/issue-21701.rs)0
-rw-r--r--src/test/ui/issue-21701.stderr20
-rw-r--r--src/test/ui/issue-21763.rs (renamed from src/test/compile-fail/issue-21763.rs)0
-rw-r--r--src/test/ui/issue-21763.stderr20
-rw-r--r--src/test/ui/issue-21837.rs (renamed from src/test/compile-fail/issue-21837.rs)0
-rw-r--r--src/test/ui/issue-21837.stderr16
-rw-r--r--src/test/ui/issue-21946.rs (renamed from src/test/compile-fail/issue-21946.rs)0
-rw-r--r--src/test/ui/issue-21946.stderr9
-rw-r--r--src/test/ui/issue-21974.rs (renamed from src/test/compile-fail/issue-21974.rs)0
-rw-r--r--src/test/ui/issue-21974.stderr21
-rw-r--r--src/test/ui/issue-22034.rs (renamed from src/test/compile-fail/issue-22034.rs)0
-rw-r--r--src/test/ui/issue-22034.stderr11
-rw-r--r--src/test/ui/issue-22037.rs (renamed from src/test/compile-fail/issue-22037.rs)0
-rw-r--r--src/test/ui/issue-22037.stderr9
-rw-r--r--src/test/ui/issue-22289.rs (renamed from src/test/compile-fail/issue-22289.rs)0
-rw-r--r--src/test/ui/issue-22289.stderr11
-rw-r--r--src/test/ui/issue-22312.rs (renamed from src/test/compile-fail/issue-22312.rs)0
-rw-r--r--src/test/ui/issue-22312.stderr11
-rw-r--r--src/test/ui/issue-22384.rs (renamed from src/test/compile-fail/issue-22384.rs)0
-rw-r--r--src/test/ui/issue-22384.stderr9
-rw-r--r--src/test/ui/issue-22434.rs (renamed from src/test/compile-fail/issue-22434.rs)0
-rw-r--r--src/test/ui/issue-22434.stderr9
-rw-r--r--src/test/ui/issue-22468.rs (renamed from src/test/compile-fail/issue-22468.rs)0
-rw-r--r--src/test/ui/issue-22468.stderr11
-rw-r--r--src/test/ui/issue-22599.rs (renamed from src/test/compile-fail/issue-22599.rs)0
-rw-r--r--src/test/ui/issue-22599.stderr14
-rw-r--r--src/test/ui/issue-22603.rs (renamed from src/test/compile-fail/issue-22603.rs)0
-rw-r--r--src/test/ui/issue-22603.stderr10
-rw-r--r--src/test/ui/issue-22673.rs (renamed from src/test/compile-fail/issue-22673.rs)0
-rw-r--r--src/test/ui/issue-22673.stderr11
-rw-r--r--src/test/ui/issue-22684.rs (renamed from src/test/compile-fail/issue-22684.rs)0
-rw-r--r--src/test/ui/issue-22684.stderr12
-rw-r--r--src/test/ui/issue-22706.rs (renamed from src/test/compile-fail/issue-22706.rs)0
-rw-r--r--src/test/ui/issue-22706.stderr9
-rw-r--r--src/test/ui/issue-22789.rs (renamed from src/test/compile-fail/issue-22789.rs)0
-rw-r--r--src/test/ui/issue-22789.stderr11
-rw-r--r--src/test/ui/issue-2281-part1.rs (renamed from src/test/compile-fail/issue-2281-part1.rs)0
-rw-r--r--src/test/ui/issue-2281-part1.stderr9
-rw-r--r--src/test/ui/issue-22874.rs (renamed from src/test/compile-fail/issue-22874.rs)0
-rw-r--r--src/test/ui/issue-22874.stderr13
-rw-r--r--src/test/ui/issue-22933-1.rs (renamed from src/test/compile-fail/issue-22933-1.rs)0
-rw-r--r--src/test/ui/issue-22933-1.stderr8
-rw-r--r--src/test/ui/issue-22933-3.rs (renamed from src/test/compile-fail/issue-22933-3.rs)0
-rw-r--r--src/test/ui/issue-22933-3.stderr9
-rw-r--r--src/test/ui/issue-23024.rs (renamed from src/test/compile-fail/issue-23024.rs)0
-rw-r--r--src/test/ui/issue-23024.stderr24
-rw-r--r--src/test/ui/issue-23046.rs (renamed from src/test/compile-fail/issue-23046.rs)0
-rw-r--r--src/test/ui/issue-23046.stderr9
-rw-r--r--src/test/ui/issue-23073.rs (renamed from src/test/compile-fail/issue-23073.rs)0
-rw-r--r--src/test/ui/issue-23073.stderr11
-rw-r--r--src/test/ui/issue-23080-2.rs (renamed from src/test/compile-fail/issue-23080-2.rs)0
-rw-r--r--src/test/ui/issue-23080-2.stderr18
-rw-r--r--src/test/ui/issue-23080.rs (renamed from src/test/compile-fail/issue-23080.rs)0
-rw-r--r--src/test/ui/issue-23080.stderr14
-rw-r--r--src/test/ui/issue-23122-1.rs (renamed from src/test/compile-fail/issue-23122-1.rs)0
-rw-r--r--src/test/ui/issue-23122-1.stderr9
-rw-r--r--src/test/ui/issue-23122-2.rs (renamed from src/test/compile-fail/issue-23122-2.rs)0
-rw-r--r--src/test/ui/issue-23122-2.stderr11
-rw-r--r--src/test/ui/issue-23253.rs (renamed from src/test/compile-fail/issue-23253.rs)0
-rw-r--r--src/test/ui/issue-23253.stderr9
-rw-r--r--src/test/ui/issue-23281.rs (renamed from src/test/compile-fail/issue-23281.rs)0
-rw-r--r--src/test/ui/issue-23281.stderr13
-rw-r--r--src/test/ui/issue-2330.rs (renamed from src/test/compile-fail/issue-2330.rs)0
-rw-r--r--src/test/ui/issue-2330.stderr9
-rw-r--r--src/test/ui/issue-23589.rs (renamed from src/test/compile-fail/issue-23589.rs)0
-rw-r--r--src/test/ui/issue-23589.stderr9
-rw-r--r--src/test/ui/issue-23595-2.rs (renamed from src/test/compile-fail/issue-23595-2.rs)0
-rw-r--r--src/test/ui/issue-23595-2.stderr9
-rw-r--r--src/test/ui/issue-23966.rs (renamed from src/test/compile-fail/issue-23966.rs)0
-rw-r--r--src/test/ui/issue-23966.stderr9
-rw-r--r--src/test/ui/issue-24013.rs (renamed from src/test/compile-fail/issue-24013.rs)0
-rw-r--r--src/test/ui/issue-24013.stderr9
-rw-r--r--src/test/ui/issue-24204.rs (renamed from src/test/compile-fail/issue-24204.rs)0
-rw-r--r--src/test/ui/issue-24204.stderr17
-rw-r--r--src/test/ui/issue-24267-flow-exit.nll.stderr15
-rw-r--r--src/test/ui/issue-24267-flow-exit.rs (renamed from src/test/compile-fail/issue-24267-flow-exit.rs)0
-rw-r--r--src/test/ui/issue-24267-flow-exit.stderr15
-rw-r--r--src/test/ui/issue-24322.rs (renamed from src/test/compile-fail/issue-24322.rs)0
-rw-r--r--src/test/ui/issue-24322.stderr12
-rw-r--r--src/test/ui/issue-24352.rs (renamed from src/test/compile-fail/issue-24352.rs)0
-rw-r--r--src/test/ui/issue-24352.stderr11
-rw-r--r--src/test/ui/issue-24357.nll.stderr14
-rw-r--r--src/test/ui/issue-24357.rs (renamed from src/test/compile-fail/issue-24357.rs)0
-rw-r--r--src/test/ui/issue-24357.stderr14
-rw-r--r--src/test/ui/issue-24363.rs (renamed from src/test/compile-fail/issue-24363.rs)0
-rw-r--r--src/test/ui/issue-24363.stderr18
-rw-r--r--src/test/ui/issue-24365.rs (renamed from src/test/compile-fail/issue-24365.rs)0
-rw-r--r--src/test/ui/issue-24365.stderr21
-rw-r--r--src/test/ui/issue-24446.rs (renamed from src/test/compile-fail/issue-24446.rs)0
-rw-r--r--src/test/ui/issue-24446.stderr33
-rw-r--r--src/test/ui/issue-24682.rs (renamed from src/test/compile-fail/issue-24682.rs)0
-rw-r--r--src/test/ui/issue-24682.stderr22
-rw-r--r--src/test/ui/issue-24819.rs (renamed from src/test/compile-fail/issue-24819.rs)0
-rw-r--r--src/test/ui/issue-24819.stderr12
-rw-r--r--src/test/ui/issue-24883.rs (renamed from src/test/compile-fail/issue-24883.rs)0
-rw-r--r--src/test/ui/issue-24883.stderr11
-rw-r--r--src/test/ui/issue-25076.rs (renamed from src/test/compile-fail/issue-25076.rs)0
-rw-r--r--src/test/ui/issue-25076.stderr15
-rw-r--r--src/test/ui/issue-25368.rs (renamed from src/test/compile-fail/issue-25368.rs)0
-rw-r--r--src/test/ui/issue-25368.stderr12
-rw-r--r--src/test/ui/issue-25386.rs (renamed from src/test/compile-fail/issue-25386.rs)0
-rw-r--r--src/test/ui/issue-25386.stderr21
-rw-r--r--src/test/ui/issue-25396.rs (renamed from src/test/compile-fail/issue-25396.rs)0
-rw-r--r--src/test/ui/issue-25396.stderr59
-rw-r--r--src/test/ui/issue-25439.rs (renamed from src/test/compile-fail/issue-25439.rs)0
-rw-r--r--src/test/ui/issue-25439.stderr13
-rw-r--r--src/test/ui/issue-25579.ast.nll.stderr9
-rw-r--r--src/test/ui/issue-25579.ast.stderr21
-rw-r--r--src/test/ui/issue-25579.mir.stderr9
-rw-r--r--src/test/ui/issue-25579.rs (renamed from src/test/compile-fail/issue-25579.rs)0
-rw-r--r--src/test/ui/issue-25700.rs (renamed from src/test/compile-fail/issue-25700.rs)0
-rw-r--r--src/test/ui/issue-25700.stderr13
-rw-r--r--src/test/ui/issue-2590.nll.stderr9
-rw-r--r--src/test/ui/issue-2590.rs (renamed from src/test/compile-fail/issue-2590.rs)0
-rw-r--r--src/test/ui/issue-2590.stderr9
-rw-r--r--src/test/ui/issue-25901.rs (renamed from src/test/compile-fail/issue-25901.rs)0
-rw-r--r--src/test/ui/issue-25901.stderr9
-rw-r--r--src/test/ui/issue-26094.rs (renamed from src/test/compile-fail/issue-26094.rs)0
-rw-r--r--src/test/ui/issue-26094.stderr15
-rw-r--r--src/test/ui/issue-26158.rs (renamed from src/test/compile-fail/issue-26158.rs)0
-rw-r--r--src/test/ui/issue-26158.stderr9
-rw-r--r--src/test/ui/issue-26217.nll.stderr15
-rw-r--r--src/test/ui/issue-26217.rs (renamed from src/test/compile-fail/issue-26217.rs)0
-rw-r--r--src/test/ui/issue-26217.stderr11
-rw-r--r--src/test/ui/issue-26237.rs (renamed from src/test/compile-fail/issue-26237.rs)0
-rw-r--r--src/test/ui/issue-26237.stderr15
-rw-r--r--src/test/ui/issue-26262.rs (renamed from src/test/compile-fail/issue-26262.rs)0
-rw-r--r--src/test/ui/issue-26262.stderr15
-rw-r--r--src/test/ui/issue-26459.rs (renamed from src/test/compile-fail/issue-26459.rs)0
-rw-r--r--src/test/ui/issue-26459.stderr9
-rw-r--r--src/test/ui/issue-26614.rs (renamed from src/test/compile-fail/issue-26614.rs)0
-rw-r--r--src/test/ui/issue-26614.stderr11
-rw-r--r--src/test/ui/issue-26812.rs (renamed from src/test/compile-fail/issue-26812.rs)0
-rw-r--r--src/test/ui/issue-26812.stderr9
-rw-r--r--src/test/ui/issue-26905.rs (renamed from src/test/compile-fail/issue-26905.rs)0
-rw-r--r--src/test/ui/issue-26905.stderr12
-rw-r--r--src/test/ui/issue-26930.rs (renamed from src/test/compile-fail/issue-26930.rs)0
-rw-r--r--src/test/ui/issue-26930.stderr8
-rw-r--r--src/test/ui/issue-26948.rs (renamed from src/test/compile-fail/issue-26948.rs)0
-rw-r--r--src/test/ui/issue-26948.stderr9
-rw-r--r--src/test/ui/issue-27008.rs (renamed from src/test/compile-fail/issue-27008.rs)0
-rw-r--r--src/test/ui/issue-27008.stderr12
-rw-r--r--src/test/ui/issue-27033.rs (renamed from src/test/compile-fail/issue-27033.rs)0
-rw-r--r--src/test/ui/issue-27033.stderr18
-rw-r--r--src/test/ui/issue-27042.rs (renamed from src/test/compile-fail/issue-27042.rs)0
-rw-r--r--src/test/ui/issue-27042.stderr42
-rw-r--r--src/test/ui/issue-27060-2.rs (renamed from src/test/compile-fail/issue-27060-2.rs)0
-rw-r--r--src/test/ui/issue-27060-2.stderr14
-rw-r--r--src/test/ui/issue-27078.rs (renamed from src/test/compile-fail/issue-27078.rs)0
-rw-r--r--src/test/ui/issue-27078.stderr14
-rw-r--r--src/test/ui/issue-2718-a.rs (renamed from src/test/compile-fail/issue-2718-a.rs)0
-rw-r--r--src/test/ui/issue-2718-a.stderr14
-rw-r--r--src/test/ui/issue-27340.rs (renamed from src/test/compile-fail/issue-27340.rs)0
-rw-r--r--src/test/ui/issue-27340.stderr12
-rw-r--r--src/test/ui/issue-27433.rs (renamed from src/test/compile-fail/issue-27433.rs)0
-rw-r--r--src/test/ui/issue-27433.stderr11
-rw-r--r--src/test/ui/issue-27592.nll.stderr19
-rw-r--r--src/test/ui/issue-27592.rs (renamed from src/test/compile-fail/issue-27592.rs)0
-rw-r--r--src/test/ui/issue-27592.stderr21
-rw-r--r--src/test/ui/issue-27815.rs (renamed from src/test/compile-fail/issue-27815.rs)0
-rw-r--r--src/test/ui/issue-27815.stderr27
-rw-r--r--src/test/ui/issue-27895.rs (renamed from src/test/compile-fail/issue-27895.rs)0
-rw-r--r--src/test/ui/issue-27895.stderr9
-rw-r--r--src/test/ui/issue-28098.rs (renamed from src/test/compile-fail/issue-28098.rs)0
-rw-r--r--src/test/ui/issue-28098.stderr57
-rw-r--r--src/test/ui/issue-28105.rs (renamed from src/test/compile-fail/issue-28105.rs)0
-rw-r--r--src/test/ui/issue-28105.stderr15
-rw-r--r--src/test/ui/issue-28109.rs (renamed from src/test/compile-fail/issue-28109.rs)0
-rw-r--r--src/test/ui/issue-28109.stderr15
-rw-r--r--src/test/ui/issue-28113.rs (renamed from src/test/compile-fail/issue-28113.rs)0
-rw-r--r--src/test/ui/issue-28113.stderr9
-rw-r--r--src/test/ui/issue-2823.rs (renamed from src/test/compile-fail/issue-2823.rs)0
-rw-r--r--src/test/ui/issue-2823.stderr16
-rw-r--r--src/test/ui/issue-28324.rs (renamed from src/test/compile-fail/issue-28324.rs)0
-rw-r--r--src/test/ui/issue-28324.stderr9
-rw-r--r--src/test/ui/issue-28344.rs (renamed from src/test/compile-fail/issue-28344.rs)0
-rw-r--r--src/test/ui/issue-28344.stderr32
-rw-r--r--src/test/ui/issue-28433.rs (renamed from src/test/compile-fail/issue-28433.rs)0
-rw-r--r--src/test/ui/issue-28433.stderr14
-rw-r--r--src/test/ui/issue-28472.rs (renamed from src/test/compile-fail/issue-28472.rs)0
-rw-r--r--src/test/ui/issue-28472.stderr27
-rw-r--r--src/test/ui/issue-2849.rs (renamed from src/test/compile-fail/issue-2849.rs)0
-rw-r--r--src/test/ui/issue-2849.stderr11
-rw-r--r--src/test/ui/issue-28576.rs (renamed from src/test/compile-fail/issue-28576.rs)0
-rw-r--r--src/test/ui/issue-28576.stderr12
-rw-r--r--src/test/ui/issue-28586.rs (renamed from src/test/compile-fail/issue-28586.rs)0
-rw-r--r--src/test/ui/issue-28586.stderr9
-rw-r--r--src/test/ui/issue-28992-empty.rs (renamed from src/test/compile-fail/issue-28992-empty.rs)0
-rw-r--r--src/test/ui/issue-28992-empty.stderr16
-rw-r--r--src/test/ui/issue-29084.rs (renamed from src/test/compile-fail/issue-29084.rs)0
-rw-r--r--src/test/ui/issue-29084.stderr15
-rw-r--r--src/test/ui/issue-29147.rs (renamed from src/test/compile-fail/issue-29147.rs)0
-rw-r--r--src/test/ui/issue-29147.stderr15
-rw-r--r--src/test/ui/issue-29161.rs (renamed from src/test/compile-fail/issue-29161.rs)0
-rw-r--r--src/test/ui/issue-29161.stderr16
-rw-r--r--src/test/ui/issue-29184.rs (renamed from src/test/compile-fail/issue-29184.rs)0
-rw-r--r--src/test/ui/issue-29184.stderr9
-rw-r--r--src/test/ui/issue-2937.rs (renamed from src/test/compile-fail/issue-2937.rs)0
-rw-r--r--src/test/ui/issue-2937.stderr9
-rw-r--r--src/test/ui/issue-2951.rs (renamed from src/test/compile-fail/issue-2951.rs)0
-rw-r--r--src/test/ui/issue-2951.stderr12
-rw-r--r--src/test/ui/issue-29857.rs (renamed from src/test/compile-fail/issue-29857.rs)0
-rw-r--r--src/test/ui/issue-29857.stderr8
-rw-r--r--src/test/ui/issue-29861.rs (renamed from src/test/compile-fail/issue-29861.rs)0
-rw-r--r--src/test/ui/issue-29861.stderr9
-rw-r--r--src/test/ui/issue-2995.rs (renamed from src/test/compile-fail/issue-2995.rs)0
-rw-r--r--src/test/ui/issue-2995.stderr11
-rw-r--r--src/test/ui/issue-30079.rs (renamed from src/test/compile-fail/issue-30079.rs)0
-rw-r--r--src/test/ui/issue-30079.stderr31
-rw-r--r--src/test/ui/issue-3008-3.rs (renamed from src/test/compile-fail/issue-3008-3.rs)0
-rw-r--r--src/test/ui/issue-3008-3.stderr13
-rw-r--r--src/test/ui/issue-3021-b.rs (renamed from src/test/compile-fail/issue-3021-b.rs)0
-rw-r--r--src/test/ui/issue-3021-b.stderr11
-rw-r--r--src/test/ui/issue-3021-c.rs (renamed from src/test/compile-fail/issue-3021-c.rs)0
-rw-r--r--src/test/ui/issue-3021-c.stderr25
-rw-r--r--src/test/ui/issue-3021-d.rs (renamed from src/test/compile-fail/issue-3021-d.rs)0
-rw-r--r--src/test/ui/issue-3021-d.stderr19
-rw-r--r--src/test/ui/issue-3021.rs (renamed from src/test/compile-fail/issue-3021.rs)0
-rw-r--r--src/test/ui/issue-3021.stderr11
-rw-r--r--src/test/ui/issue-30225.rs (renamed from src/test/compile-fail/issue-30225.rs)0
-rw-r--r--src/test/ui/issue-30225.stderr12
-rw-r--r--src/test/ui/issue-30236.rs (renamed from src/test/compile-fail/issue-30236.rs)0
-rw-r--r--src/test/ui/issue-30236.stderr9
-rw-r--r--src/test/ui/issue-30240-b.rs (renamed from src/test/compile-fail/issue-30240-b.rs)0
-rw-r--r--src/test/ui/issue-30240-b.stderr14
-rw-r--r--src/test/ui/issue-30240.rs (renamed from src/test/compile-fail/issue-30240.rs)0
-rw-r--r--src/test/ui/issue-30240.stderr15
-rw-r--r--src/test/ui/issue-30355.nll.stderr22
-rw-r--r--src/test/ui/issue-30355.rs (renamed from src/test/compile-fail/issue-30355.rs)0
-rw-r--r--src/test/ui/issue-30355.stderr22
-rw-r--r--src/test/ui/issue-3038.rs (renamed from src/test/compile-fail/issue-3038.rs)0
-rw-r--r--src/test/ui/issue-3038.stderr21
-rw-r--r--src/test/ui/issue-30438-a.nll.stderr20
-rw-r--r--src/test/ui/issue-30438-a.rs (renamed from src/test/compile-fail/issue-30438-a.rs)0
-rw-r--r--src/test/ui/issue-30438-a.stderr21
-rw-r--r--src/test/ui/issue-30438-b.rs (renamed from src/test/compile-fail/issue-30438-b.rs)0
-rw-r--r--src/test/ui/issue-30438-b.stderr21
-rw-r--r--src/test/ui/issue-30438-c.nll.stderr18
-rw-r--r--src/test/ui/issue-30438-c.rs (renamed from src/test/compile-fail/issue-30438-c.rs)0
-rw-r--r--src/test/ui/issue-30438-c.stderr18
-rw-r--r--src/test/ui/issue-30560.rs (renamed from src/test/compile-fail/issue-30560.rs)0
-rw-r--r--src/test/ui/issue-30560.stderr21
-rw-r--r--src/test/ui/issue-30589.rs (renamed from src/test/compile-fail/issue-30589.rs)0
-rw-r--r--src/test/ui/issue-30589.stderr9
-rw-r--r--src/test/ui/issue-3080.rs (renamed from src/test/compile-fail/issue-3080.rs)0
-rw-r--r--src/test/ui/issue-3080.stderr11
-rw-r--r--src/test/ui/issue-3096-1.rs (renamed from src/test/compile-fail/issue-3096-1.rs)0
-rw-r--r--src/test/ui/issue-3096-1.stderr15
-rw-r--r--src/test/ui/issue-3096-2.rs (renamed from src/test/compile-fail/issue-3096-2.rs)0
-rw-r--r--src/test/ui/issue-3096-2.stderr15
-rw-r--r--src/test/ui/issue-3099-a.rs (renamed from src/test/compile-fail/issue-3099-a.rs)0
-rw-r--r--src/test/ui/issue-3099-a.stderr14
-rw-r--r--src/test/ui/issue-3099-b.rs (renamed from src/test/compile-fail/issue-3099-b.rs)0
-rw-r--r--src/test/ui/issue-3099-b.stderr14
-rw-r--r--src/test/ui/issue-3099.rs (renamed from src/test/compile-fail/issue-3099.rs)0
-rw-r--r--src/test/ui/issue-3099.stderr14
-rw-r--r--src/test/ui/issue-31011.rs (renamed from src/test/compile-fail/issue-31011.rs)0
-rw-r--r--src/test/ui/issue-31011.stderr12
-rw-r--r--src/test/ui/issue-31109.rs (renamed from src/test/compile-fail/issue-31109.rs)0
-rw-r--r--src/test/ui/issue-31109.stderr8
-rw-r--r--src/test/ui/issue-31173.rs (renamed from src/test/compile-fail/issue-31173.rs)0
-rw-r--r--src/test/ui/issue-31173.stderr23
-rw-r--r--src/test/ui/issue-31212.rs (renamed from src/test/compile-fail/issue-31212.rs)0
-rw-r--r--src/test/ui/issue-31212.stderr16
-rw-r--r--src/test/ui/issue-31495.rs (renamed from src/test/compile-fail/issue-31495.rs)0
-rw-r--r--src/test/ui/issue-31511.rs (renamed from src/test/compile-fail/issue-31511.rs)0
-rw-r--r--src/test/ui/issue-31511.stderr9
-rw-r--r--src/test/ui/issue-3154.nll.stderr23
-rw-r--r--src/test/ui/issue-3154.rs (renamed from src/test/compile-fail/issue-3154.rs)0
-rw-r--r--src/test/ui/issue-3154.stderr11
-rw-r--r--src/test/ui/issue-31561.rs (renamed from src/test/compile-fail/issue-31561.rs)0
-rw-r--r--src/test/ui/issue-31561.stderr9
-rw-r--r--src/test/ui/issue-31769.rs (renamed from src/test/compile-fail/issue-31769.rs)0
-rw-r--r--src/test/ui/issue-31769.stderr16
-rw-r--r--src/test/ui/issue-31804.rs (renamed from src/test/compile-fail/issue-31804.rs)0
-rw-r--r--src/test/ui/issue-31804.stderr8
-rw-r--r--src/test/ui/issue-31845.rs (renamed from src/test/compile-fail/issue-31845.rs)0
-rw-r--r--src/test/ui/issue-31845.stderr9
-rw-r--r--src/test/ui/issue-31910.rs (renamed from src/test/compile-fail/issue-31910.rs)0
-rw-r--r--src/test/ui/issue-31910.stderr9
-rw-r--r--src/test/ui/issue-31924-non-snake-ffi.rs (renamed from src/test/compile-fail/issue-31924-non-snake-ffi.rs)0
-rw-r--r--src/test/ui/issue-31924-non-snake-ffi.stderr8
-rw-r--r--src/test/ui/issue-32004.rs (renamed from src/test/compile-fail/issue-32004.rs)0
-rw-r--r--src/test/ui/issue-32004.stderr17
-rw-r--r--src/test/ui/issue-32086.rs (renamed from src/test/compile-fail/issue-32086.rs)0
-rw-r--r--src/test/ui/issue-32086.stderr15
-rw-r--r--src/test/ui/issue-32119.rs (renamed from src/test/compile-fail/issue-32119.rs)0
-rw-r--r--src/test/ui/issue-32119.stderr8
-rw-r--r--src/test/ui/issue-3214.rs (renamed from src/test/compile-fail/issue-3214.rs)0
-rw-r--r--src/test/ui/issue-3214.stderr21
-rw-r--r--src/test/ui/issue-32201.rs (renamed from src/test/compile-fail/issue-32201.rs)0
-rw-r--r--src/test/ui/issue-32201.stderr9
-rw-r--r--src/test/ui/issue-32222.rs (renamed from src/test/compile-fail/issue-32222.rs)0
-rw-r--r--src/test/ui/issue-32222.stderr8
-rw-r--r--src/test/ui/issue-32323.rs (renamed from src/test/compile-fail/issue-32323.rs)0
-rw-r--r--src/test/ui/issue-32323.stderr12
-rw-r--r--src/test/ui/issue-32655.rs (renamed from src/test/compile-fail/issue-32655.rs)0
-rw-r--r--src/test/ui/issue-32655.stderr22
-rw-r--r--src/test/ui/issue-32709.rs (renamed from src/test/compile-fail/issue-32709.rs)0
-rw-r--r--src/test/ui/issue-32709.stderr11
-rw-r--r--src/test/ui/issue-32782.rs (renamed from src/test/compile-fail/issue-32782.rs)0
-rw-r--r--src/test/ui/issue-32782.stderr14
-rw-r--r--src/test/ui/issue-32797.rs (renamed from src/test/compile-fail/issue-32797.rs)0
-rw-r--r--src/test/ui/issue-32797.stderr8
-rw-r--r--src/test/ui/issue-32829.rs (renamed from src/test/compile-fail/issue-32829.rs)0
-rw-r--r--src/test/ui/issue-32829.stderr11
-rw-r--r--src/test/ui/issue-32833.rs (renamed from src/test/compile-fail/issue-32833.rs)0
-rw-r--r--src/test/ui/issue-32833.stderr9
-rw-r--r--src/test/ui/issue-32922.rs (renamed from src/test/compile-fail/issue-32922.rs)0
-rw-r--r--src/test/ui/issue-32922.stderr14
-rw-r--r--src/test/ui/issue-32963.rs (renamed from src/test/compile-fail/issue-32963.rs)0
-rw-r--r--src/test/ui/issue-32963.stderr22
-rw-r--r--src/test/ui/issue-32995-2.rs (renamed from src/test/compile-fail/issue-32995-2.rs)0
-rw-r--r--src/test/ui/issue-32995-2.stderr30
-rw-r--r--src/test/ui/issue-32995.rs (renamed from src/test/compile-fail/issue-32995.rs)0
-rw-r--r--src/test/ui/issue-32995.stderr66
-rw-r--r--src/test/ui/issue-33241.rs (renamed from src/test/compile-fail/issue-33241.rs)0
-rw-r--r--src/test/ui/issue-33241.stderr11
-rw-r--r--src/test/ui/issue-33293.rs (renamed from src/test/compile-fail/issue-33293.rs)0
-rw-r--r--src/test/ui/issue-33293.stderr9
-rw-r--r--src/test/ui/issue-3344.rs (renamed from src/test/compile-fail/issue-3344.rs)0
-rw-r--r--src/test/ui/issue-3344.stderr11
-rw-r--r--src/test/ui/issue-33464.rs (renamed from src/test/compile-fail/issue-33464.rs)0
-rw-r--r--src/test/ui/issue-33464.stderr21
-rw-r--r--src/test/ui/issue-33504.rs (renamed from src/test/compile-fail/issue-33504.rs)0
-rw-r--r--src/test/ui/issue-33504.stderr12
-rw-r--r--src/test/ui/issue-33571.rs (renamed from src/test/compile-fail/issue-33571.rs)0
-rw-r--r--src/test/ui/issue-33571.stderr8
-rw-r--r--src/test/ui/issue-33819.nll.stderr12
-rw-r--r--src/test/ui/issue-33819.rs (renamed from src/test/compile-fail/issue-33819.rs)0
-rw-r--r--src/test/ui/issue-33819.stderr9
-rw-r--r--src/test/ui/issue-34028.rs (renamed from src/test/compile-fail/issue-34028.rs)0
-rw-r--r--src/test/ui/issue-34028.stderr8
-rw-r--r--src/test/ui/issue-34171.rs (renamed from src/test/compile-fail/issue-34171.rs)0
-rw-r--r--src/test/ui/issue-34171.stderr10
-rw-r--r--src/test/ui/issue-34222-1.rs (renamed from src/test/compile-fail/issue-34222-1.rs)0
-rw-r--r--src/test/ui/issue-34222-1.stderr11
-rw-r--r--src/test/ui/issue-34334.rs (renamed from src/test/compile-fail/issue-34334.rs)0
-rw-r--r--src/test/ui/issue-34334.stderr10
-rw-r--r--src/test/ui/issue-34349.rs (renamed from src/test/compile-fail/issue-34349.rs)0
-rw-r--r--src/test/ui/issue-34349.stderr14
-rw-r--r--src/test/ui/issue-34373.rs (renamed from src/test/compile-fail/issue-34373.rs)0
-rw-r--r--src/test/ui/issue-34373.stderr16
-rw-r--r--src/test/ui/issue-34418.rs (renamed from src/test/compile-fail/issue-34418.rs)0
-rw-r--r--src/test/ui/issue-34418.stderr8
-rw-r--r--src/test/ui/issue-3477.rs (renamed from src/test/compile-fail/issue-3477.rs)0
-rw-r--r--src/test/ui/issue-3477.stderr9
-rw-r--r--src/test/ui/issue-34839.rs (renamed from src/test/compile-fail/issue-34839.rs)0
-rw-r--r--src/test/ui/issue-34839.stderr8
-rw-r--r--src/test/ui/issue-35075.rs (renamed from src/test/compile-fail/issue-35075.rs)0
-rw-r--r--src/test/ui/issue-35075.stderr21
-rw-r--r--src/test/ui/issue-3521-2.rs (renamed from src/test/compile-fail/issue-3521-2.rs)0
-rw-r--r--src/test/ui/issue-3521-2.stderr11
-rw-r--r--src/test/ui/issue-3521.rs (renamed from src/test/compile-fail/issue-3521.rs)0
-rw-r--r--src/test/ui/issue-3521.stderr9
-rw-r--r--src/test/ui/issue-35450.rs (renamed from src/test/compile-fail/issue-35450.rs)0
-rw-r--r--src/test/ui/issue-35450.stderr8
-rw-r--r--src/test/ui/issue-35570.rs (renamed from src/test/compile-fail/issue-35570.rs)0
-rw-r--r--src/test/ui/issue-35570.stderr10
-rw-r--r--src/test/ui/issue-35668.rs (renamed from src/test/compile-fail/issue-35668.rs)0
-rw-r--r--src/test/ui/issue-35668.stderr11
-rw-r--r--src/test/ui/issue-35988.rs (renamed from src/test/compile-fail/issue-35988.rs)0
-rw-r--r--src/test/ui/issue-35988.stderr13
-rw-r--r--src/test/ui/issue-3601.rs (renamed from src/test/compile-fail/issue-3601.rs)0
-rw-r--r--src/test/ui/issue-3601.stderr9
-rw-r--r--src/test/ui/issue-36082.ast.nll.stderr14
-rw-r--r--src/test/ui/issue-36082.ast.stderr16
-rw-r--r--src/test/ui/issue-36082.mir.stderr14
-rw-r--r--src/test/ui/issue-36082.rs (renamed from src/test/compile-fail/issue-36082.rs)0
-rw-r--r--src/test/ui/issue-36116.rs (renamed from src/test/compile-fail/issue-36116.rs)0
-rw-r--r--src/test/ui/issue-36116.stderr20
-rw-r--r--src/test/ui/issue-36299.rs (renamed from src/test/compile-fail/issue-36299.rs)0
-rw-r--r--src/test/ui/issue-36299.stderr19
-rw-r--r--src/test/ui/issue-36379.rs (renamed from src/test/compile-fail/issue-36379.rs)0
-rw-r--r--src/test/ui/issue-36379.stderr8
-rw-r--r--src/test/ui/issue-36617.rs (renamed from src/test/compile-fail/issue-36617.rs)0
-rw-r--r--src/test/ui/issue-36617.stderr8
-rw-r--r--src/test/ui/issue-36638.rs (renamed from src/test/compile-fail/issue-36638.rs)0
-rw-r--r--src/test/ui/issue-36638.stderr14
-rw-r--r--src/test/ui/issue-3668-2.rs (renamed from src/test/compile-fail/issue-3668-2.rs)0
-rw-r--r--src/test/ui/issue-3668-2.stderr11
-rw-r--r--src/test/ui/issue-3668.rs (renamed from src/test/compile-fail/issue-3668.rs)0
-rw-r--r--src/test/ui/issue-3668.stderr11
-rw-r--r--src/test/ui/issue-3680.rs (renamed from src/test/compile-fail/issue-3680.rs)0
-rw-r--r--src/test/ui/issue-3680.stderr12
-rw-r--r--src/test/ui/issue-36839.rs (renamed from src/test/compile-fail/issue-36839.rs)0
-rw-r--r--src/test/ui/issue-36839.stderr10
-rw-r--r--src/test/ui/issue-3702-2.rs (renamed from src/test/compile-fail/issue-3702-2.rs)0
-rw-r--r--src/test/ui/issue-3702-2.stderr20
-rw-r--r--src/test/ui/issue-37026.rs (renamed from src/test/compile-fail/issue-37026.rs)0
-rw-r--r--src/test/ui/issue-37026.stderr21
-rw-r--r--src/test/ui/issue-37051.rs (renamed from src/test/compile-fail/issue-37051.rs)0
-rw-r--r--src/test/ui/issue-37051.stderr9
-rw-r--r--src/test/ui/issue-3707.rs (renamed from src/test/compile-fail/issue-3707.rs)0
-rw-r--r--src/test/ui/issue-3707.stderr19
-rw-r--r--src/test/ui/issue-37323.rs (renamed from src/test/compile-fail/issue-37323.rs)0
-rw-r--r--src/test/ui/issue-37323.stderr20
-rw-r--r--src/test/ui/issue-37366.rs (renamed from src/test/compile-fail/issue-37366.rs)0
-rw-r--r--src/test/ui/issue-37366.stderr9
-rw-r--r--src/test/ui/issue-37510.rs (renamed from src/test/compile-fail/issue-37510.rs)0
-rw-r--r--src/test/ui/issue-37510.stderr14
-rw-r--r--src/test/ui/issue-37515.rs (renamed from src/test/compile-fail/issue-37515.rs)0
-rw-r--r--src/test/ui/issue-37515.stderr22
-rw-r--r--src/test/ui/issue-37534.rs (renamed from src/test/compile-fail/issue-37534.rs)0
-rw-r--r--src/test/ui/issue-37534.stderr28
-rw-r--r--src/test/ui/issue-37550.rs (renamed from src/test/compile-fail/issue-37550.rs)0
-rw-r--r--src/test/ui/issue-37550.stderr35
-rw-r--r--src/test/ui/issue-37576.rs (renamed from src/test/compile-fail/issue-37576.rs)0
-rw-r--r--src/test/ui/issue-37576.stderr51
-rw-r--r--src/test/ui/issue-3763.rs (renamed from src/test/compile-fail/issue-3763.rs)0
-rw-r--r--src/test/ui/issue-3763.stderr34
-rw-r--r--src/test/ui/issue-37665.rs (renamed from src/test/compile-fail/issue-37665.rs)0
-rw-r--r--src/test/ui/issue-37665.stderr12
-rw-r--r--src/test/ui/issue-37887.rs (renamed from src/test/compile-fail/issue-37887.rs)0
-rw-r--r--src/test/ui/issue-37887.stderr18
-rw-r--r--src/test/ui/issue-38160.rs (renamed from src/test/compile-fail/issue-38160.rs)0
-rw-r--r--src/test/ui/issue-38160.stderr8
-rw-r--r--src/test/ui/issue-3820.rs (renamed from src/test/compile-fail/issue-3820.rs)0
-rw-r--r--src/test/ui/issue-3820.stderr11
-rw-r--r--src/test/ui/issue-38293.rs (renamed from src/test/compile-fail/issue-38293.rs)0
-rw-r--r--src/test/ui/issue-38293.stderr20
-rw-r--r--src/test/ui/issue-38381.rs (renamed from src/test/compile-fail/issue-38381.rs)0
-rw-r--r--src/test/ui/issue-38381.stderr10
-rw-r--r--src/test/ui/issue-38404.rs (renamed from src/test/compile-fail/issue-38404.rs)0
-rw-r--r--src/test/ui/issue-38404.stderr11
-rw-r--r--src/test/ui/issue-38412.rs (renamed from src/test/compile-fail/issue-38412.rs)0
-rw-r--r--src/test/ui/issue-38412.stderr9
-rw-r--r--src/test/ui/issue-38458.rs (renamed from src/test/compile-fail/issue-38458.rs)0
-rw-r--r--src/test/ui/issue-38458.stderr9
-rw-r--r--src/test/ui/issue-38604.rs (renamed from src/test/compile-fail/issue-38604.rs)0
-rw-r--r--src/test/ui/issue-38604.stderr20
-rw-r--r--src/test/ui/issue-38857.rs (renamed from src/test/compile-fail/issue-38857.rs)0
-rw-r--r--src/test/ui/issue-38857.stderr16
-rw-r--r--src/test/ui/issue-38868.rs (renamed from src/test/compile-fail/issue-38868.rs)0
-rw-r--r--src/test/ui/issue-38868.stderr21
-rw-r--r--src/test/ui/issue-38919.rs (renamed from src/test/compile-fail/issue-38919.rs)0
-rw-r--r--src/test/ui/issue-38919.stderr9
-rw-r--r--src/test/ui/issue-38954.rs (renamed from src/test/compile-fail/issue-38954.rs)0
-rw-r--r--src/test/ui/issue-38954.stderr12
-rw-r--r--src/test/ui/issue-39211.rs (renamed from src/test/compile-fail/issue-39211.rs)0
-rw-r--r--src/test/ui/issue-39211.stderr9
-rw-r--r--src/test/ui/issue-39362.rs (renamed from src/test/compile-fail/issue-39362.rs)0
-rw-r--r--src/test/ui/issue-39362.stderr9
-rw-r--r--src/test/ui/issue-39388.rs (renamed from src/test/compile-fail/issue-39388.rs)0
-rw-r--r--src/test/ui/issue-39388.stderr8
-rw-r--r--src/test/ui/issue-39404.rs (renamed from src/test/compile-fail/issue-39404.rs)0
-rw-r--r--src/test/ui/issue-39404.stderr12
-rw-r--r--src/test/ui/issue-39559-2.rs (renamed from src/test/compile-fail/issue-39559-2.rs)0
-rw-r--r--src/test/ui/issue-39559-2.stderr30
-rw-r--r--src/test/ui/issue-39559.rs (renamed from src/test/compile-fail/issue-39559.rs)0
-rw-r--r--src/test/ui/issue-39559.stderr13
-rw-r--r--src/test/ui/issue-39616.rs (renamed from src/test/compile-fail/issue-39616.rs)0
-rw-r--r--src/test/ui/issue-39616.stderr14
-rw-r--r--src/test/ui/issue-39687.rs (renamed from src/test/compile-fail/issue-39687.rs)0
-rw-r--r--src/test/ui/issue-39687.stderr9
-rw-r--r--src/test/ui/issue-3973.rs (renamed from src/test/compile-fail/issue-3973.rs)0
-rw-r--r--src/test/ui/issue-3973.stderr22
-rw-r--r--src/test/ui/issue-39848.rs (renamed from src/test/compile-fail/issue-39848.rs)0
-rw-r--r--src/test/ui/issue-39848.stderr13
-rw-r--r--src/test/ui/issue-3993.rs (renamed from src/test/compile-fail/issue-3993.rs)0
-rw-r--r--src/test/ui/issue-3993.stderr9
-rw-r--r--src/test/ui/issue-39970.rs (renamed from src/test/compile-fail/issue-39970.rs)0
-rw-r--r--src/test/ui/issue-39970.stderr18
-rw-r--r--src/test/ui/issue-39974.rs (renamed from src/test/compile-fail/issue-39974.rs)0
-rw-r--r--src/test/ui/issue-39974.stderr9
-rw-r--r--src/test/ui/issue-40000.rs (renamed from src/test/compile-fail/issue-40000.rs)0
-rw-r--r--src/test/ui/issue-40000.stderr12
-rw-r--r--src/test/ui/issue-40288-2.nll.stderr55
-rw-r--r--src/test/ui/issue-40288-2.rs (renamed from src/test/compile-fail/issue-40288-2.rs)0
-rw-r--r--src/test/ui/issue-40288-2.stderr21
-rw-r--r--src/test/ui/issue-40288.nll.stderr15
-rw-r--r--src/test/ui/issue-40288.rs (renamed from src/test/compile-fail/issue-40288.rs)0
-rw-r--r--src/test/ui/issue-40288.stderr12
-rw-r--r--src/test/ui/issue-40350.rs (renamed from src/test/compile-fail/issue-40350.rs)0
-rw-r--r--src/test/ui/issue-40350.stderr8
-rw-r--r--src/test/ui/issue-40510-1.nll.stderr17
-rw-r--r--src/test/ui/issue-40510-1.rs (renamed from src/test/compile-fail/issue-40510-1.rs)0
-rw-r--r--src/test/ui/issue-40510-1.stderr8
-rw-r--r--src/test/ui/issue-40510-2.rs (renamed from src/test/compile-fail/issue-40510-2.rs)0
-rw-r--r--src/test/ui/issue-40510-2.stderr8
-rw-r--r--src/test/ui/issue-40510-3.nll.stderr20
-rw-r--r--src/test/ui/issue-40510-3.rs (renamed from src/test/compile-fail/issue-40510-3.rs)0
-rw-r--r--src/test/ui/issue-40510-3.stderr8
-rw-r--r--src/test/ui/issue-40510-4.rs (renamed from src/test/compile-fail/issue-40510-4.rs)0
-rw-r--r--src/test/ui/issue-40510-4.stderr8
-rw-r--r--src/test/ui/issue-40610.rs (renamed from src/test/compile-fail/issue-40610.rs)0
-rw-r--r--src/test/ui/issue-40610.stderr11
-rw-r--r--src/test/ui/issue-40749.rs (renamed from src/test/compile-fail/issue-40749.rs)0
-rw-r--r--src/test/ui/issue-40749.stderr12
-rw-r--r--src/test/ui/issue-40845.rs (renamed from src/test/compile-fail/issue-40845.rs)0
-rw-r--r--src/test/ui/issue-40845.stderr14
-rw-r--r--src/test/ui/issue-40861.rs (renamed from src/test/compile-fail/issue-40861.rs)0
-rw-r--r--src/test/ui/issue-40861.stderr11
-rw-r--r--src/test/ui/issue-41139.nll.stderr9
-rw-r--r--src/test/ui/issue-41139.rs (renamed from src/test/compile-fail/issue-41139.rs)0
-rw-r--r--src/test/ui/issue-41139.stderr9
-rw-r--r--src/test/ui/issue-41229-ref-str.rs (renamed from src/test/compile-fail/issue-41229-ref-str.rs)0
-rw-r--r--src/test/ui/issue-41229-ref-str.stderr12
-rw-r--r--src/test/ui/issue-41255.rs (renamed from src/test/compile-fail/issue-41255.rs)0
-rw-r--r--src/test/ui/issue-41255.stderr88
-rw-r--r--src/test/ui/issue-41394.rs (renamed from src/test/compile-fail/issue-41394.rs)0
-rw-r--r--src/test/ui/issue-41394.stderr11
-rw-r--r--src/test/ui/issue-41726.nll.stderr9
-rw-r--r--src/test/ui/issue-41726.rs (renamed from src/test/compile-fail/issue-41726.rs)0
-rw-r--r--src/test/ui/issue-41726.stderr9
-rw-r--r--src/test/ui/issue-41742.rs (renamed from src/test/compile-fail/issue-41742.rs)0
-rw-r--r--src/test/ui/issue-41742.stderr12
-rw-r--r--src/test/ui/issue-41776.rs (renamed from src/test/compile-fail/issue-41776.rs)0
-rw-r--r--src/test/ui/issue-41776.stderr8
-rw-r--r--src/test/ui/issue-41880.rs (renamed from src/test/compile-fail/issue-41880.rs)0
-rw-r--r--src/test/ui/issue-41880.stderr12
-rw-r--r--src/test/ui/issue-41974.rs (renamed from src/test/compile-fail/issue-41974.rs)0
-rw-r--r--src/test/ui/issue-41974.stderr29
-rw-r--r--src/test/ui/issue-41998.rs (renamed from src/test/compile-fail/issue-41998.rs)0
-rw-r--r--src/test/ui/issue-41998.stderr14
-rw-r--r--src/test/ui/issue-4201.rs (renamed from src/test/compile-fail/issue-4201.rs)0
-rw-r--r--src/test/ui/issue-4201.stderr19
-rw-r--r--src/test/ui/issue-42312.rs (renamed from src/test/compile-fail/issue-42312.rs)0
-rw-r--r--src/test/ui/issue-42312.stderr22
-rw-r--r--src/test/ui/issue-42344.nll.stderr9
-rw-r--r--src/test/ui/issue-42344.rs (renamed from src/test/compile-fail/issue-42344.rs)0
-rw-r--r--src/test/ui/issue-42344.stderr9
-rw-r--r--src/test/ui/issue-4265.rs (renamed from src/test/compile-fail/issue-4265.rs)0
-rw-r--r--src/test/ui/issue-4265.stderr15
-rw-r--r--src/test/ui/issue-42755.rs (renamed from src/test/compile-fail/issue-42755.rs)0
-rw-r--r--src/test/ui/issue-42755.stderr13
-rw-r--r--src/test/ui/issue-42796.nll.stderr14
-rw-r--r--src/test/ui/issue-42796.rs (renamed from src/test/compile-fail/issue-42796.rs)0
-rw-r--r--src/test/ui/issue-42796.stderr14
-rw-r--r--src/test/ui/issue-42880.rs (renamed from src/test/compile-fail/issue-42880.rs)0
-rw-r--r--src/test/ui/issue-42880.stderr9
-rw-r--r--src/test/ui/issue-43023.rs (renamed from src/test/compile-fail/issue-43023.rs)0
-rw-r--r--src/test/ui/issue-43023.stderr20
-rw-r--r--src/test/ui/issue-43105.rs (renamed from src/test/compile-fail/issue-43105.rs)0
-rw-r--r--src/test/ui/issue-43105.stderr19
-rw-r--r--src/test/ui/issue-43162.rs (renamed from src/test/compile-fail/issue-43162.rs)0
-rw-r--r--src/test/ui/issue-43162.stderr30
-rw-r--r--src/test/ui/issue-4321.rs (renamed from src/test/compile-fail/issue-4321.rs)0
-rw-r--r--src/test/ui/issue-4321.stderr9
-rw-r--r--src/test/ui/issue-43250.rs (renamed from src/test/compile-fail/issue-43250.rs)0
-rw-r--r--src/test/ui/issue-43250.stderr14
-rw-r--r--src/test/ui/issue-43355.rs (renamed from src/test/compile-fail/issue-43355.rs)0
-rw-r--r--src/test/ui/issue-43355.stderr16
-rw-r--r--src/test/ui/issue-43424.rs (renamed from src/test/compile-fail/issue-43424.rs)0
-rw-r--r--src/test/ui/issue-43424.stderr8
-rw-r--r--src/test/ui/issue-43431.rs (renamed from src/test/compile-fail/issue-43431.rs)0
-rw-r--r--src/test/ui/issue-43431.stderr9
-rw-r--r--src/test/ui/issue-4366-2.rs (renamed from src/test/compile-fail/issue-4366-2.rs)0
-rw-r--r--src/test/ui/issue-4366-2.stderr26
-rw-r--r--src/test/ui/issue-4366.rs (renamed from src/test/compile-fail/issue-4366.rs)0
-rw-r--r--src/test/ui/issue-4366.stderr15
-rw-r--r--src/test/ui/issue-43733.rs (renamed from src/test/compile-fail/issue-43733.rs)0
-rw-r--r--src/test/ui/issue-43733.stderr19
-rw-r--r--src/test/ui/issue-43784-associated-type.rs (renamed from src/test/compile-fail/issue-43784-associated-type.rs)0
-rw-r--r--src/test/ui/issue-43784-associated-type.stderr16
-rw-r--r--src/test/ui/issue-43784-supertrait.rs (renamed from src/test/compile-fail/issue-43784-supertrait.rs)0
-rw-r--r--src/test/ui/issue-43784-supertrait.stderr16
-rw-r--r--src/test/ui/issue-43925.rs (renamed from src/test/compile-fail/issue-43925.rs)0
-rw-r--r--src/test/ui/issue-43925.stderr8
-rw-r--r--src/test/ui/issue-43926.rs (renamed from src/test/compile-fail/issue-43926.rs)0
-rw-r--r--src/test/ui/issue-43926.stderr8
-rw-r--r--src/test/ui/issue-43988.rs (renamed from src/test/compile-fail/issue-43988.rs)0
-rw-r--r--src/test/ui/issue-43988.stderr79
-rw-r--r--src/test/ui/issue-44021.rs (renamed from src/test/compile-fail/issue-44021.rs)0
-rw-r--r--src/test/ui/issue-44021.stderr8
-rw-r--r--src/test/ui/issue-44239.rs (renamed from src/test/compile-fail/issue-44239.rs)0
-rw-r--r--src/test/ui/issue-44239.stderr9
-rw-r--r--src/test/ui/issue-44373.rs (renamed from src/test/compile-fail/issue-44373.rs)0
-rw-r--r--src/test/ui/issue-44373.stderr13
-rw-r--r--src/test/ui/issue-44415.rs (renamed from src/test/compile-fail/issue-44415.rs)2
-rw-r--r--src/test/ui/issue-44415.stderr18
-rw-r--r--src/test/ui/issue-45087-unreachable-unsafe.rs (renamed from src/test/compile-fail/issue-45087-unreachable-unsafe.rs)0
-rw-r--r--src/test/ui/issue-45087-unreachable-unsafe.stderr11
-rw-r--r--src/test/ui/issue-4517.rs (renamed from src/test/compile-fail/issue-4517.rs)0
-rw-r--r--src/test/ui/issue-4517.stderr12
-rw-r--r--src/test/ui/issue-45199.ast.nll.stderr36
-rw-r--r--src/test/ui/issue-45199.ast.stderr30
-rw-r--r--src/test/ui/issue-45199.mir.stderr36
-rw-r--r--src/test/ui/issue-45199.rs (renamed from src/test/compile-fail/issue-45199.rs)0
-rw-r--r--src/test/ui/issue-45729-unsafe-in-generator.rs (renamed from src/test/compile-fail/issue-45729-unsafe-in-generator.rs)0
-rw-r--r--src/test/ui/issue-45729-unsafe-in-generator.stderr11
-rw-r--r--src/test/ui/issue-45801.rs (renamed from src/test/compile-fail/issue-45801.rs)0
-rw-r--r--src/test/ui/issue-45801.stderr12
-rw-r--r--src/test/ui/issue-45965.rs (renamed from src/test/compile-fail/issue-45965.rs)0
-rw-r--r--src/test/ui/issue-45965.stderr9
-rw-r--r--src/test/ui/issue-46023.ast.nll.stderr9
-rw-r--r--src/test/ui/issue-46023.ast.stderr12
-rw-r--r--src/test/ui/issue-46023.mir.stderr9
-rw-r--r--src/test/ui/issue-46023.rs (renamed from src/test/compile-fail/issue-46023.rs)0
-rw-r--r--src/test/ui/issue-46036.rs (renamed from src/test/compile-fail/issue-46036.rs)0
-rw-r--r--src/test/ui/issue-46036.stderr14
-rw-r--r--src/test/ui/issue-46311.rs (renamed from src/test/compile-fail/issue-46311.rs)0
-rw-r--r--src/test/ui/issue-46311.stderr8
-rw-r--r--src/test/ui/issue-46438.rs (renamed from src/test/compile-fail/issue-46438.rs)0
-rw-r--r--src/test/ui/issue-46438.stderr8
-rw-r--r--src/test/ui/issue-46604.ast.nll.stderr16
-rw-r--r--src/test/ui/issue-46604.ast.stderr16
-rw-r--r--src/test/ui/issue-46604.mir.stderr16
-rw-r--r--src/test/ui/issue-46604.rs (renamed from src/test/compile-fail/issue-46604.rs)0
-rw-r--r--src/test/ui/issue-46771.rs (renamed from src/test/compile-fail/issue-46771.rs)0
-rw-r--r--src/test/ui/issue-46771.stderr11
-rw-r--r--src/test/ui/issue-46843.rs (renamed from src/test/compile-fail/issue-46843.rs)0
-rw-r--r--src/test/ui/issue-46843.stderr16
-rw-r--r--src/test/ui/issue-47309.rs (renamed from src/test/compile-fail/issue-47309.rs)0
-rw-r--r--src/test/ui/issue-4736.rs (renamed from src/test/compile-fail/issue-4736.rs)0
-rw-r--r--src/test/ui/issue-4736.stderr9
-rw-r--r--src/test/ui/issue-47412.rs (renamed from src/test/compile-fail/issue-47412.rs)0
-rw-r--r--src/test/ui/issue-47412.stderr19
-rw-r--r--src/test/ui/issue-47715.rs (renamed from src/test/compile-fail/issue-47715.rs)0
-rw-r--r--src/test/ui/issue-47715.stderr27
-rw-r--r--src/test/ui/issue-48131.rs (renamed from src/test/compile-fail/issue-48131.rs)0
-rw-r--r--src/test/ui/issue-48131.stderr20
-rw-r--r--src/test/ui/issue-48838.rs (renamed from src/test/compile-fail/issue-48838.rs)0
-rw-r--r--src/test/ui/issue-48838.stderr12
-rw-r--r--src/test/ui/issue-4968.rs (renamed from src/test/compile-fail/issue-4968.rs)0
-rw-r--r--src/test/ui/issue-4968.stderr12
-rw-r--r--src/test/ui/issue-4972.rs (renamed from src/test/compile-fail/issue-4972.rs)0
-rw-r--r--src/test/ui/issue-4972.stderr9
-rw-r--r--src/test/ui/issue-50471.rs (renamed from src/test/compile-fail/issue-50471.rs)0
-rw-r--r--src/test/ui/issue-50600.rs (renamed from src/test/compile-fail/issue-50600.rs)0
-rw-r--r--src/test/ui/issue-50600.stderr12
-rw-r--r--src/test/ui/issue-5062.rs (renamed from src/test/compile-fail/issue-5062.rs)0
-rw-r--r--src/test/ui/issue-5062.stderr9
-rw-r--r--src/test/ui/issue-5067.rs (renamed from src/test/compile-fail/issue-5067.rs)0
-rw-r--r--src/test/ui/issue-5067.stderr62
-rw-r--r--src/test/ui/issue-50688.rs (renamed from src/test/compile-fail/issue-50688.rs)0
-rw-r--r--src/test/ui/issue-50688.stderr12
-rw-r--r--src/test/ui/issue-5099.rs (renamed from src/test/compile-fail/issue-5099.rs)0
-rw-r--r--src/test/ui/issue-5099.stderr9
-rw-r--r--src/test/ui/issue-5100.rs (renamed from src/test/compile-fail/issue-5100.rs)0
-rw-r--r--src/test/ui/issue-5100.stderr63
-rw-r--r--src/test/ui/issue-5153.rs (renamed from src/test/compile-fail/issue-5153.rs)0
-rw-r--r--src/test/ui/issue-5153.stderr13
-rw-r--r--src/test/ui/issue-5216.rs (renamed from src/test/compile-fail/issue-5216.rs)0
-rw-r--r--src/test/ui/issue-5216.stderr21
-rw-r--r--src/test/ui/issue-52213.nll.stderr14
-rw-r--r--src/test/ui/issue-52213.rs (renamed from src/test/compile-fail/issue-52213.rs)0
-rw-r--r--src/test/ui/issue-52213.stderr28
-rw-r--r--src/test/ui/issue-5358-1.rs (renamed from src/test/compile-fail/issue-5358-1.rs)0
-rw-r--r--src/test/ui/issue-5358-1.stderr12
-rw-r--r--src/test/ui/issue-5439.rs (renamed from src/test/compile-fail/issue-5439.rs)0
-rw-r--r--src/test/ui/issue-5439.stderr11
-rw-r--r--src/test/ui/issue-5883.rs (renamed from src/test/compile-fail/issue-5883.rs)0
-rw-r--r--src/test/ui/issue-5883.stderr24
-rw-r--r--src/test/ui/issue-5927.rs (renamed from src/test/compile-fail/issue-5927.rs)0
-rw-r--r--src/test/ui/issue-5927.stderr16
-rw-r--r--src/test/ui/issue-5997-enum.rs (renamed from src/test/compile-fail/issue-5997-enum.rs)0
-rw-r--r--src/test/ui/issue-5997-enum.stderr13
-rw-r--r--src/test/ui/issue-5997-struct.rs (renamed from src/test/compile-fail/issue-5997-struct.rs)0
-rw-r--r--src/test/ui/issue-5997-struct.stderr13
-rw-r--r--src/test/ui/issue-6458-2.rs (renamed from src/test/compile-fail/issue-6458-2.rs)0
-rw-r--r--src/test/ui/issue-6458-2.stderr9
-rw-r--r--src/test/ui/issue-6596-1.rs (renamed from src/test/compile-fail/issue-6596-1.rs)2
-rw-r--r--src/test/ui/issue-6596-1.stderr11
-rw-r--r--src/test/ui/issue-6596-2.rs (renamed from src/test/compile-fail/issue-6596-2.rs)4
-rw-r--r--src/test/ui/issue-6596-2.stderr20
-rw-r--r--src/test/ui/issue-6642.rs (renamed from src/test/compile-fail/issue-6642.rs)0
-rw-r--r--src/test/ui/issue-6642.stderr11
-rw-r--r--src/test/ui/issue-6738.rs (renamed from src/test/compile-fail/issue-6738.rs)0
-rw-r--r--src/test/ui/issue-6738.stderr13
-rw-r--r--src/test/ui/issue-6801.nll.stderr14
-rw-r--r--src/test/ui/issue-6801.rs (renamed from src/test/compile-fail/issue-6801.rs)0
-rw-r--r--src/test/ui/issue-6801.stderr12
-rw-r--r--src/test/ui/issue-6804.rs (renamed from src/test/compile-fail/issue-6804.rs)0
-rw-r--r--src/test/ui/issue-6804.stderr25
-rw-r--r--src/test/ui/issue-6936.rs (renamed from src/test/compile-fail/issue-6936.rs)0
-rw-r--r--src/test/ui/issue-6936.stderr43
-rw-r--r--src/test/ui/issue-7013.rs (renamed from src/test/compile-fail/issue-7013.rs)0
-rw-r--r--src/test/ui/issue-7013.stderr14
-rw-r--r--src/test/ui/issue-7044.rs (renamed from src/test/compile-fail/issue-7044.rs)0
-rw-r--r--src/test/ui/issue-7044.stderr13
-rw-r--r--src/test/ui/issue-7061.rs (renamed from src/test/compile-fail/issue-7061.rs)0
-rw-r--r--src/test/ui/issue-7061.stderr14
-rw-r--r--src/test/ui/issue-7092.rs (renamed from src/test/compile-fail/issue-7092.rs)0
-rw-r--r--src/test/ui/issue-7092.stderr12
-rw-r--r--src/test/ui/issue-7246.rs (renamed from src/test/compile-fail/issue-7246.rs)0
-rw-r--r--src/test/ui/issue-7246.stderr14
-rw-r--r--src/test/ui/issue-7364.rs (renamed from src/test/compile-fail/issue-7364.rs)0
-rw-r--r--src/test/ui/issue-7364.stderr21
-rw-r--r--src/test/ui/issue-7607-1.rs (renamed from src/test/compile-fail/issue-7607-1.rs)0
-rw-r--r--src/test/ui/issue-7607-1.stderr9
-rw-r--r--src/test/ui/issue-7867.rs (renamed from src/test/compile-fail/issue-7867.rs)0
-rw-r--r--src/test/ui/issue-7867.stderr12
-rw-r--r--src/test/ui/issue-7950.rs (renamed from src/test/compile-fail/issue-7950.rs)0
-rw-r--r--src/test/ui/issue-7950.stderr12
-rw-r--r--src/test/ui/issue-7970a.rs (renamed from src/test/compile-fail/issue-7970a.rs)0
-rw-r--r--src/test/ui/issue-7970a.stderr8
-rw-r--r--src/test/ui/issue-7970b.rs (renamed from src/test/compile-fail/issue-7970b.rs)0
-rw-r--r--src/test/ui/issue-7970b.stderr8
-rw-r--r--src/test/ui/issue-8153.rs (renamed from src/test/compile-fail/issue-8153.rs)0
-rw-r--r--src/test/ui/issue-8153.stderr11
-rw-r--r--src/test/ui/issue-8208.rs (renamed from src/test/compile-fail/issue-8208.rs)0
-rw-r--r--src/test/ui/issue-8208.stderr21
-rw-r--r--src/test/ui/issue-8460-const.rs (renamed from src/test/compile-fail/issue-8460-const.rs)0
-rw-r--r--src/test/ui/issue-8460-const.stderr248
-rw-r--r--src/test/ui/issue-8640.rs (renamed from src/test/compile-fail/issue-8640.rs)0
-rw-r--r--src/test/ui/issue-8640.stderr17
-rw-r--r--src/test/ui/issue-8727.rs (renamed from src/test/compile-fail/issue-8727.rs)5
-rw-r--r--src/test/ui/issue-8727.stderr21
-rw-r--r--src/test/ui/issue-8761.rs (renamed from src/test/compile-fail/issue-8761.rs)0
-rw-r--r--src/test/ui/issue-8761.stderr15
-rw-r--r--src/test/ui/issue-8767.rs (renamed from src/test/compile-fail/issue-8767.rs)0
-rw-r--r--src/test/ui/issue-8767.stderr9
-rw-r--r--src/test/ui/issue-9575.rs (renamed from src/test/compile-fail/issue-9575.rs)0
-rw-r--r--src/test/ui/issue-9575.stderr12
-rw-r--r--src/test/ui/issue-9725.rs (renamed from src/test/compile-fail/issue-9725.rs)0
-rw-r--r--src/test/ui/issue-9725.stderr18
-rw-r--r--src/test/ui/issue-9814.rs (renamed from src/test/compile-fail/issue-9814.rs)0
-rw-r--r--src/test/ui/issue-9814.stderr9
-rw-r--r--src/test/ui/issue-pr29383.rs (renamed from src/test/compile-fail/issue-pr29383.rs)0
-rw-r--r--src/test/ui/issue-pr29383.stderr15
m---------src/tools/clippy13
m---------src/tools/miri24
1318 files changed, 11927 insertions, 2511 deletions
diff --git a/src/Cargo.lock b/src/Cargo.lock
index 27abcf61d63..ccc1ccce87a 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -244,6 +244,18 @@ dependencies = [
 ]
 
 [[package]]
+name = "cargo_metadata"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
 name = "cargotest2"
 version = "0.1.0"
 
@@ -630,6 +642,14 @@ dependencies = [
 ]
 
 [[package]]
+name = "error-chain"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
 name = "error_index_generator"
 version = "0.0.0"
 dependencies = [
@@ -1216,12 +1236,13 @@ name = "miri"
 version = "0.1.0"
 dependencies = [
  "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cargo_metadata 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "compiletest_rs 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -3031,6 +3052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
 "checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9"
 "checksum cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1efca0b863ca03ed4c109fb1c55e0bc4bbeb221d3e103d86251046b06a526bd0"
+"checksum cargo_metadata 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6809b327f87369e6f3651efd2c5a96c49847a3ed2559477ecba79014751ee1"
 "checksum cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "49ec142f5768efb5b7622aebc3fdbdbb8950a4b9ba996393cb76ef7466e8747d"
 "checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e"
 "checksum chalk-engine 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a146c19172c7eea48ea55a7123ac95da786639bc665097f1e14034ee5f1d8699"
@@ -3062,6 +3084,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a"
 "checksum environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4b14e20978669064c33b4c1e0fb4083412e40fe56cbea2eae80fd7591503ee"
 "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
+"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
 "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82"
 "checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b"
 "checksum filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da4b9849e77b13195302c174324b5ba73eec9b236b24c221a61000daefb95c5f"
diff --git a/src/doc/unstable-book/src/language-features/proc-macro.md b/src/doc/unstable-book/src/language-features/proc-macro.md
deleted file mode 100644
index 1bd8c41629e..00000000000
--- a/src/doc/unstable-book/src/language-features/proc-macro.md
+++ /dev/null
@@ -1,241 +0,0 @@
-# `proc_macro`
-
-The tracking issue for this feature is: [#38356]
-
-[#38356]: https://github.com/rust-lang/rust/issues/38356
-
-------------------------
-
-This feature flag guards the new procedural macro features as laid out by [RFC 1566], which alongside the now-stable 
-[custom derives], provide stabilizable alternatives to the compiler plugin API (which requires the use of 
-perma-unstable internal APIs) for programmatically modifying Rust code at compile-time.
-
-The two new procedural macro kinds are:
- 
-* Function-like procedural macros which are invoked like regular declarative macros, and:
-
-* Attribute-like procedural macros which can be applied to any item which built-in attributes can
-be applied to, and which can take arguments in their invocation as well.
-
-Additionally, this feature flag implicitly enables the [`use_extern_macros`](language-features/use-extern-macros.html) feature,
-which allows macros to be imported like any other item with `use` statements, as compared to 
-applying `#[macro_use]` to an `extern crate` declaration. It is important to note that procedural macros may
-**only** be imported in this manner, and will throw an error otherwise.
-
-You **must** declare the `proc_macro` feature in both the crate declaring these new procedural macro kinds as well as 
-in any crates that use them.
-
-### Common Concepts
-
-As with custom derives, procedural macros may only be declared in crates of the `proc-macro` type, and must be public
-functions. No other public items may be declared in `proc-macro` crates, but private items are fine.
-
-To declare your crate as a `proc-macro` crate, simply add:
-
-```toml
-[lib]
-proc-macro = true
-```
-
-to your `Cargo.toml`. 
-
-Unlike custom derives, however, the name of the function implementing the procedural macro is used directly as the 
-procedural macro's name, so choose carefully.
-
-Additionally, both new kinds of procedural macros return a `TokenStream` which *wholly* replaces the original 
-invocation and its input.
-
-#### Importing
-
-As referenced above, the new procedural macros are not meant to be imported via `#[macro_use]` and will throw an 
-error if they are. Instead, they are meant to be imported like any other item in Rust, with `use` statements:
-
-```rust,ignore
-#![feature(proc_macro)]
-
-// Where `my_proc_macros` is some crate of type `proc_macro`
-extern crate my_proc_macros;
-
-// And declares a `#[proc_macro] pub fn my_bang_macro()` at its root.
-use my_proc_macros::my_bang_macro;
-
-fn main() {
-    println!("{}", my_bang_macro!());
-}
-```
-
-#### Error Reporting
-
-Any panics in a procedural macro implementation will be caught by the compiler and turned into an error message pointing 
-to the problematic invocation. Thus, it is important to make your panic messages as informative as possible: use 
-`Option::expect` instead of `Option::unwrap` and `Result::expect` instead of `Result::unwrap`, and inform the user of 
-the error condition as unambiguously as you can.
- 
-#### `TokenStream`
-
-The `proc_macro::TokenStream` type is hardcoded into the signatures of procedural macro functions for both input and 
-output. It is a wrapper around the compiler's internal representation for a given chunk of Rust code.
-
-### Function-like Procedural Macros
-
-These are procedural macros that are invoked like regular declarative macros. They are declared as public functions in 
-crates of the `proc_macro` type and using the `#[proc_macro]` attribute. The name of the declared function becomes the 
-name of the macro as it is to be imported and used. The function must be of the kind `fn(TokenStream) -> TokenStream` 
-where the sole argument is the input to the macro and the return type is the macro's output.
-
-This kind of macro can expand to anything that is valid for the context it is invoked in, including expressions and
-statements, as well as items.
-
-**Note**: invocations of this kind of macro require a wrapping `[]`, `{}` or `()` like regular macros, but these do not 
-appear in the input, only the tokens between them. The tokens between the braces do not need to be valid Rust syntax.
-
-<span class="filename">my_macro_crate/src/lib.rs</span>
-
-```rust,ignore
-#![feature(proc_macro)]
-
-// This is always necessary to get the `TokenStream` typedef.
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn say_hello(_input: TokenStream) -> TokenStream {
-    // This macro will accept any input because it ignores it. 
-    // To enforce correctness in macros which don't take input,
-    // you may want to add `assert!(_input.to_string().is_empty());`.
-    "println!(\"Hello, world!\")".parse().unwrap()
-}
-```
-
-<span class="filename">my_macro_user/Cargo.toml</span>
-
-```toml
-[dependencies]
-my_macro_crate = { path = "<relative path to my_macro_crate>" }
-```
-
-<span class="filename">my_macro_user/src/lib.rs</span>
-
-```rust,ignore
-#![feature(proc_macro)]
-
-extern crate my_macro_crate;
-
-use my_macro_crate::say_hello;
-
-fn main() {
-    say_hello!();
-}
-```
-
-As expected, this prints `Hello, world!`.
-
-### Attribute-like Procedural Macros
-
-These are arguably the most powerful flavor of procedural macro as they can be applied anywhere attributes are allowed. 
-
-They are declared as public functions in crates of the `proc-macro` type, using the `#[proc_macro_attribute]` attribute. 
-The name of the function becomes the name of the attribute as it is to be imported and used. The function must be of the 
-kind `fn(TokenStream, TokenStream) -> TokenStream` where:
-
-The first argument represents any metadata for the attribute (see [the reference chapter on attributes][refr-attr]). 
-Only the metadata itself will appear in this argument, for example:
- 
- * `#[my_macro]` will get an empty string.
- * `#[my_macro = "string"]` will get `= "string"`.
- * `#[my_macro(ident)]` will get `(ident)`.
- * etc.
- 
-The second argument is the item that the attribute is applied to. It can be a function, a type definition, 
-an impl block, an `extern` block, or a module—attribute invocations can take the inner form (`#![my_attr]`) 
-or outer form (`#[my_attr]`).
-
-The return type is the output of the macro which *wholly* replaces the item it was applied to. Thus, if your intention
-is to merely modify an item, it *must* be copied to the output. The output must be an item; expressions, statements
-and bare blocks are not allowed.
-
-There is no restriction on how many items an attribute-like procedural macro can emit as long as they are valid in 
-the given context.
-
-<span class="filename">my_macro_crate/src/lib.rs</span>
-
-```rust,ignore
-#![feature(proc_macro)]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-/// Adds a `/// ### Panics` docstring to the end of the input's documentation
-///
-/// Does not assert that its receiver is a function or method.
-#[proc_macro_attribute]
-pub fn panics_note(args: TokenStream, input: TokenStream) -> TokenStream {
-    let args = args.to_string();
-    let mut input = input.to_string();
-
-    assert!(args.starts_with("= \""), "`#[panics_note]` requires an argument of the form \
-                                       `#[panics_note = \"panic note here\"]`");
-
-    // Get just the bare note string
-    let panics_note = args.trim_matches(&['=', ' ', '"'][..]);
-
-    // The input will include all docstrings regardless of where the attribute is placed,
-    // so we need to find the last index before the start of the item
-    let insert_idx = idx_after_last_docstring(&input);
-
-    // And insert our `### Panics` note there so it always appears at the end of an item's docs
-    input.insert_str(insert_idx, &format!("/// # Panics \n/// {}\n", panics_note));
-
-    input.parse().unwrap()
-}
-
-// `proc-macro` crates can contain any kind of private item still
-fn idx_after_last_docstring(input: &str) -> usize {
-    // Skip docstring lines to find the start of the item proper
-    input.lines().skip_while(|line| line.trim_left().starts_with("///")).next()
-        // Find the index of the first non-docstring line in the input
-        // Note: assumes this exact line is unique in the input
-        .and_then(|line_after| input.find(line_after))
-        // No docstrings in the input
-        .unwrap_or(0)
-}
-```
-
-<span class="filename">my_macro_user/Cargo.toml</span>
-
-```toml
-[dependencies]
-my_macro_crate = { path = "<relative path to my_macro_crate>" }
-```
-
-<span class="filename">my_macro_user/src/lib.rs</span>
-
-```rust,ignore
-#![feature(proc_macro)]
-
-extern crate my_macro_crate;
-
-use my_macro_crate::panics_note;
-
-/// Do the `foo` thing.
-#[panics_note = "Always."]
-pub fn foo() {
-    panic!()
-}
-```
-
-Then the rendered documentation for `pub fn foo` will look like this:
-
-> `pub fn foo()`
-> 
-> ----
-> Do the `foo` thing.
-> # Panics
-> Always.
-
-[RFC 1566]: https://github.com/rust-lang/rfcs/blob/master/text/1566-proc-macros.md
-[custom derives]: https://doc.rust-lang.org/book/procedural-macros.html
-[rust-lang/rust#41430]: https://github.com/rust-lang/rust/issues/41430
-[refr-attr]: https://doc.rust-lang.org/reference/attributes.html
diff --git a/src/libproc_macro/diagnostic.rs b/src/libproc_macro/diagnostic.rs
index a82e3dcb060..06939a9d1e1 100644
--- a/src/libproc_macro/diagnostic.rs
+++ b/src/libproc_macro/diagnostic.rs
@@ -13,7 +13,7 @@ use Span;
 use rustc_errors as rustc;
 
 /// An enum representing a diagnostic level.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
 #[derive(Copy, Clone, Debug)]
 pub enum Level {
     /// An error.
@@ -30,7 +30,7 @@ pub enum Level {
 
 /// A structure representing a diagnostic message and associated children
 /// messages.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
 #[derive(Clone, Debug)]
 pub struct Diagnostic {
     level: Level,
@@ -43,7 +43,7 @@ macro_rules! diagnostic_child_methods {
     ($spanned:ident, $regular:ident, $level:expr) => (
         /// Add a new child diagnostic message to `self` with the level
         /// identified by this methods name with the given `span` and `message`.
-        #[unstable(feature = "proc_macro", issue = "38356")]
+        #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
         pub fn $spanned<T: Into<String>>(mut self, span: Span, message: T) -> Diagnostic {
             self.children.push(Diagnostic::spanned(span, $level, message));
             self
@@ -51,7 +51,7 @@ macro_rules! diagnostic_child_methods {
 
         /// Add a new child diagnostic message to `self` with the level
         /// identified by this method's name with the given `message`.
-        #[unstable(feature = "proc_macro", issue = "38356")]
+        #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
         pub fn $regular<T: Into<String>>(mut self, message: T) -> Diagnostic {
             self.children.push(Diagnostic::new($level, message));
             self
@@ -61,7 +61,7 @@ macro_rules! diagnostic_child_methods {
 
 impl Diagnostic {
     /// Create a new diagnostic with the given `level` and `message`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
     pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic {
         Diagnostic {
             level: level,
@@ -73,7 +73,7 @@ impl Diagnostic {
 
     /// Create a new diagnostic with the given `level` and `message` pointing to
     /// the given `span`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
     pub fn spanned<T: Into<String>>(span: Span, level: Level, message: T) -> Diagnostic {
         Diagnostic {
             level: level,
@@ -89,13 +89,13 @@ impl Diagnostic {
     diagnostic_child_methods!(span_help, help, Level::Help);
 
     /// Returns the diagnostic `level` for `self`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
     pub fn level(&self) -> Level {
         self.level
     }
 
     /// Emit the diagnostic.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
     pub fn emit(self) {
         ::__internal::with_sess(move |sess, _| {
             let handler = &sess.span_diagnostic;
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs
index ecc66e869ae..f5a7c88a1b7 100644
--- a/src/libproc_macro/lib.rs
+++ b/src/libproc_macro/lib.rs
@@ -46,7 +46,7 @@ extern crate rustc_data_structures;
 
 mod diagnostic;
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
 pub use diagnostic::{Diagnostic, Level};
 
 use std::{ascii, fmt, iter};
@@ -94,13 +94,13 @@ impl !Sync for LexError {}
 
 impl TokenStream {
     /// Returns an empty `TokenStream` containing no token trees.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn new() -> TokenStream {
         TokenStream(tokenstream::TokenStream::empty())
     }
 
     /// Checks if this `TokenStream` is empty.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn is_empty(&self) -> bool {
         self.0.is_empty()
     }
@@ -146,7 +146,7 @@ impl fmt::Debug for TokenStream {
 }
 
 /// Creates a token stream containing a single token tree.
-#[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl From<TokenTree> for TokenStream {
     fn from(tree: TokenTree) -> TokenStream {
         TokenStream(tree.to_internal())
@@ -154,7 +154,7 @@ impl From<TokenTree> for TokenStream {
 }
 
 /// Collects a number of token trees into a single stream.
-#[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl iter::FromIterator<TokenTree> for TokenStream {
     fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self {
         trees.into_iter().map(TokenStream::from).collect()
@@ -175,7 +175,7 @@ impl iter::FromIterator<TokenStream> for TokenStream {
 }
 
 /// Public implementation details for the `TokenStream` type, such as iterators.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub mod token_stream {
     use syntax::tokenstream;
     use {TokenTree, TokenStream, Delimiter};
@@ -184,13 +184,13 @@ pub mod token_stream {
     /// The iteration is "shallow", e.g. the iterator doesn't recurse into delimited groups,
     /// and returns whole groups as token trees.
     #[derive(Clone)]
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub struct IntoIter {
         cursor: tokenstream::Cursor,
         stack: Vec<TokenTree>,
     }
 
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     impl Iterator for IntoIter {
         type Item = TokenTree;
 
@@ -219,7 +219,7 @@ pub mod token_stream {
         }
     }
 
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     impl IntoIterator for TokenStream {
         type Item = TokenTree;
         type IntoIter = IntoIter;
@@ -238,7 +238,7 @@ pub mod token_stream {
 /// To quote `$` itself, use `$$`.
 ///
 /// This is a dummy macro, the actual implementation is in quote::Quoter
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_quote", issue = "38356")]
 #[macro_export]
 macro_rules! quote { () => {} }
 
@@ -248,26 +248,26 @@ mod quote;
 
 /// Quote a `Span` into a `TokenStream`.
 /// This is needed to implement a custom quoter.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_quote", issue = "38356")]
 pub fn quote_span(span: Span) -> TokenStream {
     quote::Quote::quote(span)
 }
 
 /// A region of source code, along with macro expansion information.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 #[derive(Copy, Clone)]
 pub struct Span(syntax_pos::Span);
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for Span {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for Span {}
 
 macro_rules! diagnostic_method {
     ($name:ident, $level:expr) => (
         /// Create a new `Diagnostic` with the given `message` at the span
         /// `self`.
-        #[unstable(feature = "proc_macro", issue = "38356")]
+        #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
         pub fn $name<T: Into<String>>(self, message: T) -> Diagnostic {
             Diagnostic::spanned(self, $level, message)
         }
@@ -276,7 +276,7 @@ macro_rules! diagnostic_method {
 
 impl Span {
     /// A span that resolves at the macro definition site.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn def_site() -> Span {
         ::__internal::with_sess(|_, data| data.def_site)
     }
@@ -285,13 +285,13 @@ impl Span {
     /// Identifiers created with this span will be resolved as if they were written
     /// directly at the macro call location (call-site hygiene) and other code
     /// at the macro call site will be able to refer to them as well.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn call_site() -> Span {
         ::__internal::with_sess(|_, data| data.call_site)
     }
 
     /// The original source file into which this span points.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn source_file(&self) -> SourceFile {
         SourceFile {
             filemap: __internal::lookup_char_pos(self.0.lo()).file,
@@ -300,7 +300,7 @@ impl Span {
 
     /// The `Span` for the tokens in the previous macro expansion from which
     /// `self` was generated from, if any.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn parent(&self) -> Option<Span> {
         self.0.parent().map(Span)
     }
@@ -308,13 +308,13 @@ impl Span {
     /// The span for the origin source code that `self` was generated from. If
     /// this `Span` wasn't generated from other macro expansions then the return
     /// value is the same as `*self`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn source(&self) -> Span {
         Span(self.0.source_callsite())
     }
 
     /// Get the starting line/column in the source file for this span.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn start(&self) -> LineColumn {
         let loc = __internal::lookup_char_pos(self.0.lo());
         LineColumn {
@@ -324,7 +324,7 @@ impl Span {
     }
 
     /// Get the ending line/column in the source file for this span.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn end(&self) -> LineColumn {
         let loc = __internal::lookup_char_pos(self.0.hi());
         LineColumn {
@@ -336,7 +336,7 @@ impl Span {
     /// Create a new span encompassing `self` and `other`.
     ///
     /// Returns `None` if `self` and `other` are from different files.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn join(&self, other: Span) -> Option<Span> {
         let self_loc = __internal::lookup_char_pos(self.0.lo());
         let other_loc = __internal::lookup_char_pos(other.0.lo());
@@ -348,20 +348,20 @@ impl Span {
 
     /// Creates a new span with the same line/column information as `self` but
     /// that resolves symbols as though it were at `other`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn resolved_at(&self, other: Span) -> Span {
         Span(self.0.with_ctxt(other.0.ctxt()))
     }
 
     /// Creates a new span with the same name resolution behavior as `self` but
     /// with the line/column information of `other`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn located_at(&self, other: Span) -> Span {
         other.resolved_at(*self)
     }
 
     /// Compares to spans to see if they're equal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn eq(&self, other: &Span) -> bool {
         self.0 == other.0
     }
@@ -373,7 +373,7 @@ impl Span {
 }
 
 /// Prints a span in a form convenient for debugging.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Debug for Span {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "{:?} bytes({}..{})",
@@ -384,33 +384,33 @@ impl fmt::Debug for Span {
 }
 
 /// A line-column pair representing the start or end of a `Span`.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
 pub struct LineColumn {
     /// The 1-indexed line in the source file on which the span starts or ends (inclusive).
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub line: usize,
     /// The 0-indexed column (in UTF-8 characters) in the source file on which
     /// the span starts or ends (inclusive).
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub column: usize
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl !Send for LineColumn {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl !Sync for LineColumn {}
 
 /// The source file of a given `Span`.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 #[derive(Clone)]
 pub struct SourceFile {
     filemap: Lrc<FileMap>,
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl !Send for SourceFile {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl !Sync for SourceFile {}
 
 impl SourceFile {
@@ -424,14 +424,14 @@ impl SourceFile {
     /// the command line, the path as given may not actually be valid.
     ///
     /// [`is_real`]: #method.is_real
-    # [unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn path(&self) -> &FileName {
         &self.filemap.name
     }
 
     /// Returns `true` if this source file is a real source file, and not generated by an external
     /// macro's expansion.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_span", issue = "38356")]
     pub fn is_real(&self) -> bool {
         // This is a hack until intercrate spans are implemented and we can have real source files
         // for spans generated in external macros.
@@ -440,14 +440,14 @@ impl SourceFile {
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl AsRef<FileName> for SourceFile {
     fn as_ref(&self) -> &FileName {
         self.path()
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl fmt::Debug for SourceFile {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("SourceFile")
@@ -457,17 +457,17 @@ impl fmt::Debug for SourceFile {
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl PartialEq for SourceFile {
     fn eq(&self, other: &Self) -> bool {
         Lrc::ptr_eq(&self.filemap, &other.filemap)
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl Eq for SourceFile {}
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[unstable(feature = "proc_macro_span", issue = "38356")]
 impl PartialEq<FileName> for SourceFile {
     fn eq(&self, other: &FileName) -> bool {
         self.as_ref() == other
@@ -475,28 +475,44 @@ impl PartialEq<FileName> for SourceFile {
 }
 
 /// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`).
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 #[derive(Clone)]
 pub enum TokenTree {
     /// A token stream surrounded by bracket delimiters.
-    Group(Group),
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+    Group(
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+        Group
+    ),
     /// An identifier.
-    Ident(Ident),
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+    Ident(
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+        Ident
+    ),
     /// A single punctuation character (`+`, `,`, `$`, etc.).
-    Punct(Punct),
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+    Punct(
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+        Punct
+    ),
     /// A literal character (`'a'`), string (`"hello"`), number (`2.3`), etc.
-    Literal(Literal),
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+    Literal(
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+        Literal
+    ),
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for TokenTree {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for TokenTree {}
 
 impl TokenTree {
     /// Returns the span of this tree, delegating to the `span` method of
     /// the contained token or a delimited stream.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn span(&self) -> Span {
         match *self {
             TokenTree::Group(ref t) => t.span(),
@@ -511,7 +527,7 @@ impl TokenTree {
     /// Note that if this token is a `Group` then this method will not configure
     /// the span of each of the internal tokens, this will simply delegate to
     /// the `set_span` method of each variant.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn set_span(&mut self, span: Span) {
         match *self {
             TokenTree::Group(ref mut t) => t.set_span(span),
@@ -523,7 +539,7 @@ impl TokenTree {
 }
 
 /// Prints token treee in a form convenient for debugging.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Debug for TokenTree {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         // Each of these has the name in the struct type in the derived debug,
@@ -537,28 +553,28 @@ impl fmt::Debug for TokenTree {
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl From<Group> for TokenTree {
     fn from(g: Group) -> TokenTree {
         TokenTree::Group(g)
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl From<Ident> for TokenTree {
     fn from(g: Ident) -> TokenTree {
         TokenTree::Ident(g)
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl From<Punct> for TokenTree {
     fn from(g: Punct) -> TokenTree {
         TokenTree::Punct(g)
     }
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl From<Literal> for TokenTree {
     fn from(g: Literal) -> TokenTree {
         TokenTree::Literal(g)
@@ -568,7 +584,7 @@ impl From<Literal> for TokenTree {
 /// Prints the token tree as a string that is supposed to be losslessly convertible back
 /// into the same token tree (modulo spans), except for possibly `TokenTree::Group`s
 /// with `Delimiter::None` delimiters and negative numeric literals.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Display for TokenTree {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
@@ -584,33 +600,37 @@ impl fmt::Display for TokenTree {
 ///
 /// A `Group` internally contains a `TokenStream` which is surrounded by `Delimiter`s.
 #[derive(Clone, Debug)]
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub struct Group {
     delimiter: Delimiter,
     stream: TokenStream,
     span: Span,
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for Group {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for Group {}
 
 /// Describes how a sequence of token trees is delimited.
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub enum Delimiter {
     /// `( ... )`
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     Parenthesis,
     /// `{ ... }`
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     Brace,
     /// `[ ... ]`
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     Bracket,
     /// `Ø ... Ø`
     /// An implicit delimiter, that may, for example, appear around tokens coming from a
     /// "macro variable" `$var`. It is important to preserve operator priorities in cases like
     /// `$var * 3` where `$var` is `1 + 2`.
     /// Implicit delimiters may not survive roundtrip of a token stream through a string.
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     None,
 }
 
@@ -620,7 +640,7 @@ impl Group {
     /// This constructor will set the span for this group to
     /// `Span::call_site()`. To change the span you can use the `set_span`
     /// method below.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn new(delimiter: Delimiter, stream: TokenStream) -> Group {
         Group {
             delimiter: delimiter,
@@ -630,7 +650,7 @@ impl Group {
     }
 
     /// Returns the delimiter of this `Group`
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn delimiter(&self) -> Delimiter {
         self.delimiter
     }
@@ -639,14 +659,14 @@ impl Group {
     ///
     /// Note that the returned token stream does not include the delimiter
     /// returned above.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn stream(&self) -> TokenStream {
         self.stream.clone()
     }
 
     /// Returns the span for the delimiters of this token stream, spanning the
     /// entire `Group`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn span(&self) -> Span {
         self.span
     }
@@ -657,7 +677,7 @@ impl Group {
     /// This method will **not** set the span of all the internal tokens spanned
     /// by this group, but rather it will only set the span of the delimiter
     /// tokens at the level of the `Group`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn set_span(&mut self, span: Span) {
         self.span = span;
     }
@@ -666,7 +686,7 @@ impl Group {
 /// Prints the group as a string that should be losslessly convertible back
 /// into the same group (modulo spans), except for possibly `TokenTree::Group`s
 /// with `Delimiter::None` delimiters.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Display for Group {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         TokenStream::from(TokenTree::from(self.clone())).fmt(f)
@@ -677,7 +697,7 @@ impl fmt::Display for Group {
 ///
 /// Multicharacter operators like `+=` are represented as two instances of `Punct` with different
 /// forms of `Spacing` returned.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 #[derive(Clone, Debug)]
 pub struct Punct {
     ch: char,
@@ -685,20 +705,22 @@ pub struct Punct {
     span: Span,
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for Punct {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for Punct {}
 
 /// Whether an `Punct` is followed immediately by another `Punct` or
 /// followed by another token or whitespace.
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub enum Spacing {
     /// E.g. `+` is `Alone` in `+ =`, `+ident` or `+()`.
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     Alone,
     /// E.g. `+` is `Joint` in `+=` or `'#`.
     /// Additionally, single quote `'` can join with identifiers to form lifetimes `'ident`.
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     Joint,
 }
 
@@ -709,7 +731,7 @@ impl Punct {
     ///
     /// The returned `Punct` will have the default span of `Span::call_site()`
     /// which can be further configured with the `set_span` method below.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn new(ch: char, spacing: Spacing) -> Punct {
         const LEGAL_CHARS: &[char] = &['=', '<', '>', '!', '~', '+', '-', '*', '/', '%', '^',
                                        '&', '|', '@', '.', ',', ';', ':', '#', '$', '?', '\''];
@@ -724,7 +746,7 @@ impl Punct {
     }
 
     /// Returns the value of this punctuation character as `char`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn as_char(&self) -> char {
         self.ch
     }
@@ -733,19 +755,19 @@ impl Punct {
     /// followed by another `Punct` in the token stream, so they can potentially be combined into
     /// a multicharacter operator (`Joint`), or it's followed by some other token or whitespace
     /// (`Alone`) so the operator has certainly ended.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn spacing(&self) -> Spacing {
         self.spacing
     }
 
     /// Returns the span for this punctuation character.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn span(&self) -> Span {
         self.span
     }
 
     /// Configure the span for this punctuation character.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn set_span(&mut self, span: Span) {
         self.span = span;
     }
@@ -753,7 +775,7 @@ impl Punct {
 
 /// Prints the punctuation character as a string that should be losslessly convertible
 /// back into the same character.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Display for Punct {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         TokenStream::from(TokenTree::from(self.clone())).fmt(f)
@@ -762,16 +784,16 @@ impl fmt::Display for Punct {
 
 /// An identifier (`ident`).
 #[derive(Clone, Debug)]
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub struct Ident {
     sym: Symbol,
     span: Span,
     is_raw: bool,
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for Ident {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for Ident {}
 
 impl Ident {
@@ -794,7 +816,7 @@ impl Ident {
     ///
     /// Due to the current importance of hygiene this constructor, unlike other
     /// tokens, requires a `Span` to be specified at construction.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn new(string: &str, span: Span) -> Ident {
         if !lexer::is_valid_ident(string) {
             panic!("`{:?}` is not a valid identifier", string)
@@ -807,7 +829,7 @@ impl Ident {
     }
 
     /// Same as `Ident::new`, but creates a raw identifier (`r#ident`).
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[unstable(feature = "proc_macro_raw_ident", issue = "38356")]
     pub fn new_raw(string: &str, span: Span) -> Ident {
         let mut ident = Ident::new(string, span);
         if ident.sym == keywords::Underscore.name() ||
@@ -820,13 +842,13 @@ impl Ident {
 
     /// Returns the span of this `Ident`, encompassing the entire string returned
     /// by `as_str`.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn span(&self) -> Span {
         self.span
     }
 
     /// Configures the span of this `Ident`, possibly changing its hygiene context.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn set_span(&mut self, span: Span) {
         self.span = span;
     }
@@ -834,7 +856,7 @@ impl Ident {
 
 /// Prints the identifier as a string that should be losslessly convertible
 /// back into the same identifier.
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Display for Ident {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         if self.is_raw {
@@ -849,16 +871,16 @@ impl fmt::Display for Ident {
 /// with or without a suffix (`1`, `1u8`, `2.3`, `2.3f32`).
 /// Boolean literals like `true` and `false` do not belong here, they are `Ident`s.
 #[derive(Clone, Debug)]
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 pub struct Literal {
     lit: token::Lit,
     suffix: Option<ast::Name>,
     span: Span,
 }
 
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Send for Literal {}
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl !Sync for Literal {}
 
 macro_rules! suffixed_int_literals {
@@ -874,7 +896,7 @@ macro_rules! suffixed_int_literals {
         /// Literals created through this method have the `Span::call_site()`
         /// span by default, which can be configured with the `set_span` method
         /// below.
-        #[unstable(feature = "proc_macro", issue = "38356")]
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
         pub fn $name(n: $kind) -> Literal {
             Literal {
                 lit: token::Lit::Integer(Symbol::intern(&n.to_string())),
@@ -900,7 +922,7 @@ macro_rules! unsuffixed_int_literals {
         /// Literals created through this method have the `Span::call_site()`
         /// span by default, which can be configured with the `set_span` method
         /// below.
-        #[unstable(feature = "proc_macro", issue = "38356")]
+        #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
         pub fn $name(n: $kind) -> Literal {
             Literal {
                 lit: token::Lit::Integer(Symbol::intern(&n.to_string())),
@@ -954,7 +976,7 @@ impl Literal {
     ///
     /// This function requires that the specified float is finite, for
     /// example if it is infinity or NaN this function will panic.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn f32_unsuffixed(n: f32) -> Literal {
         if !n.is_finite() {
             panic!("Invalid float literal {}", n);
@@ -979,7 +1001,7 @@ impl Literal {
     ///
     /// This function requires that the specified float is finite, for
     /// example if it is infinity or NaN this function will panic.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn f32_suffixed(n: f32) -> Literal {
         if !n.is_finite() {
             panic!("Invalid float literal {}", n);
@@ -1003,7 +1025,7 @@ impl Literal {
     ///
     /// This function requires that the specified float is finite, for
     /// example if it is infinity or NaN this function will panic.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn f64_unsuffixed(n: f64) -> Literal {
         if !n.is_finite() {
             panic!("Invalid float literal {}", n);
@@ -1028,7 +1050,7 @@ impl Literal {
     ///
     /// This function requires that the specified float is finite, for
     /// example if it is infinity or NaN this function will panic.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn f64_suffixed(n: f64) -> Literal {
         if !n.is_finite() {
             panic!("Invalid float literal {}", n);
@@ -1041,7 +1063,7 @@ impl Literal {
     }
 
     /// String literal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn string(string: &str) -> Literal {
         let mut escaped = String::new();
         for ch in string.chars() {
@@ -1055,7 +1077,7 @@ impl Literal {
     }
 
     /// Character literal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn character(ch: char) -> Literal {
         let mut escaped = String::new();
         escaped.extend(ch.escape_unicode());
@@ -1067,7 +1089,7 @@ impl Literal {
     }
 
     /// Byte string literal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn byte_string(bytes: &[u8]) -> Literal {
         let string = bytes.iter().cloned().flat_map(ascii::escape_default)
             .map(Into::<char>::into).collect::<String>();
@@ -1079,13 +1101,13 @@ impl Literal {
     }
 
     /// Returns the span encompassing this literal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn span(&self) -> Span {
         self.span
     }
 
     /// Configures the span associated for this literal.
-    #[unstable(feature = "proc_macro", issue = "38356")]
+    #[stable(feature = "proc_macro_lib2", since = "1.29.0")]
     pub fn set_span(&mut self, span: Span) {
         self.span = span;
     }
@@ -1093,7 +1115,7 @@ impl Literal {
 
 /// Prints the literal as a string that should be losslessly convertible
 /// back into the same literal (except for possible rounding for floating point literals).
-#[unstable(feature = "proc_macro", issue = "38356")]
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
 impl fmt::Display for Literal {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         TokenStream::from(TokenTree::from(self.clone())).fmt(f)
diff --git a/src/librustc/cfg/construct.rs b/src/librustc/cfg/construct.rs
index aab70456dc1..f1e27946915 100644
--- a/src/librustc/cfg/construct.rs
+++ b/src/librustc/cfg/construct.rs
@@ -111,13 +111,13 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
     fn stmt(&mut self, stmt: &hir::Stmt, pred: CFGIndex) -> CFGIndex {
         let hir_id = self.tcx.hir.node_to_hir_id(stmt.node.id());
         match stmt.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 let exit = self.decl(&decl, pred);
                 self.add_ast_node(hir_id.local_id, &[exit])
             }
 
-            hir::StmtExpr(ref expr, _) |
-            hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) |
+            hir::StmtKind::Semi(ref expr, _) => {
                 let exit = self.expr(&expr, pred);
                 self.add_ast_node(hir_id.local_id, &[exit])
             }
@@ -126,12 +126,12 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
 
     fn decl(&mut self, decl: &hir::Decl, pred: CFGIndex) -> CFGIndex {
         match decl.node {
-            hir::DeclLocal(ref local) => {
+            hir::DeclKind::Local(ref local) => {
                 let init_exit = self.opt_expr(&local.init, pred);
                 self.pat(&local.pat, init_exit)
             }
 
-            hir::DeclItem(_) => pred,
+            hir::DeclKind::Item(_) => pred,
         }
     }
 
@@ -179,12 +179,12 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
 
     fn expr(&mut self, expr: &hir::Expr, pred: CFGIndex) -> CFGIndex {
         match expr.node {
-            hir::ExprBlock(ref blk, _) => {
+            hir::ExprKind::Block(ref blk, _) => {
                 let blk_exit = self.block(&blk, pred);
                 self.add_ast_node(expr.hir_id.local_id, &[blk_exit])
             }
 
-            hir::ExprIf(ref cond, ref then, None) => {
+            hir::ExprKind::If(ref cond, ref then, None) => {
                 //
                 //     [pred]
                 //       |
@@ -204,7 +204,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.add_ast_node(expr.hir_id.local_id, &[cond_exit, then_exit])      // 3,4
             }
 
-            hir::ExprIf(ref cond, ref then, Some(ref otherwise)) => {
+            hir::ExprKind::If(ref cond, ref then, Some(ref otherwise)) => {
                 //
                 //     [pred]
                 //       |
@@ -225,7 +225,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.add_ast_node(expr.hir_id.local_id, &[then_exit, else_exit])      // 4, 5
             }
 
-            hir::ExprWhile(ref cond, ref body, _) => {
+            hir::ExprKind::While(ref cond, ref body, _) => {
                 //
                 //         [pred]
                 //           |
@@ -267,7 +267,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 expr_exit
             }
 
-            hir::ExprLoop(ref body, _, _) => {
+            hir::ExprKind::Loop(ref body, _, _) => {
                 //
                 //     [pred]
                 //       |
@@ -295,11 +295,11 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 expr_exit
             }
 
-            hir::ExprMatch(ref discr, ref arms, _) => {
+            hir::ExprKind::Match(ref discr, ref arms, _) => {
                 self.match_(expr.hir_id.local_id, &discr, &arms, pred)
             }
 
-            hir::ExprBinary(op, ref l, ref r) if op.node.is_lazy() => {
+            hir::ExprKind::Binary(op, ref l, ref r) if op.node.is_lazy() => {
                 //
                 //     [pred]
                 //       |
@@ -319,14 +319,14 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.add_ast_node(expr.hir_id.local_id, &[l_exit, r_exit])            // 3,4
             }
 
-            hir::ExprRet(ref v) => {
+            hir::ExprKind::Ret(ref v) => {
                 let v_exit = self.opt_expr(v, pred);
                 let b = self.add_ast_node(expr.hir_id.local_id, &[v_exit]);
                 self.add_returning_edge(expr, b);
                 self.add_unreachable_node()
             }
 
-            hir::ExprBreak(destination, ref opt_expr) => {
+            hir::ExprKind::Break(destination, ref opt_expr) => {
                 let v = self.opt_expr(opt_expr, pred);
                 let (target_scope, break_dest) =
                     self.find_scope_edge(expr, destination, ScopeCfKind::Break);
@@ -335,7 +335,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.add_unreachable_node()
             }
 
-            hir::ExprContinue(destination) => {
+            hir::ExprKind::Continue(destination) => {
                 let (target_scope, cont_dest) =
                     self.find_scope_edge(expr, destination, ScopeCfKind::Continue);
                 let a = self.add_ast_node(expr.hir_id.local_id, &[pred]);
@@ -343,66 +343,66 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.add_unreachable_node()
             }
 
-            hir::ExprArray(ref elems) => {
+            hir::ExprKind::Array(ref elems) => {
                 self.straightline(expr, pred, elems.iter().map(|e| &*e))
             }
 
-            hir::ExprCall(ref func, ref args) => {
+            hir::ExprKind::Call(ref func, ref args) => {
                 self.call(expr, pred, &func, args.iter().map(|e| &*e))
             }
 
-            hir::ExprMethodCall(.., ref args) => {
+            hir::ExprKind::MethodCall(.., ref args) => {
                 self.call(expr, pred, &args[0], args[1..].iter().map(|e| &*e))
             }
 
-            hir::ExprIndex(ref l, ref r) |
-            hir::ExprBinary(_, ref l, ref r) if self.tables.is_method_call(expr) => {
+            hir::ExprKind::Index(ref l, ref r) |
+            hir::ExprKind::Binary(_, ref l, ref r) if self.tables.is_method_call(expr) => {
                 self.call(expr, pred, &l, Some(&**r).into_iter())
             }
 
-            hir::ExprUnary(_, ref e) if self.tables.is_method_call(expr) => {
+            hir::ExprKind::Unary(_, ref e) if self.tables.is_method_call(expr) => {
                 self.call(expr, pred, &e, None::<hir::Expr>.iter())
             }
 
-            hir::ExprTup(ref exprs) => {
+            hir::ExprKind::Tup(ref exprs) => {
                 self.straightline(expr, pred, exprs.iter().map(|e| &*e))
             }
 
-            hir::ExprStruct(_, ref fields, ref base) => {
+            hir::ExprKind::Struct(_, ref fields, ref base) => {
                 let field_cfg = self.straightline(expr, pred, fields.iter().map(|f| &*f.expr));
                 self.opt_expr(base, field_cfg)
             }
 
-            hir::ExprAssign(ref l, ref r) |
-            hir::ExprAssignOp(_, ref l, ref r) => {
+            hir::ExprKind::Assign(ref l, ref r) |
+            hir::ExprKind::AssignOp(_, ref l, ref r) => {
                 self.straightline(expr, pred, [r, l].iter().map(|&e| &**e))
             }
 
-            hir::ExprIndex(ref l, ref r) |
-            hir::ExprBinary(_, ref l, ref r) => { // NB: && and || handled earlier
+            hir::ExprKind::Index(ref l, ref r) |
+            hir::ExprKind::Binary(_, ref l, ref r) => { // NB: && and || handled earlier
                 self.straightline(expr, pred, [l, r].iter().map(|&e| &**e))
             }
 
-            hir::ExprBox(ref e) |
-            hir::ExprAddrOf(_, ref e) |
-            hir::ExprCast(ref e, _) |
-            hir::ExprType(ref e, _) |
-            hir::ExprUnary(_, ref e) |
-            hir::ExprField(ref e, _) |
-            hir::ExprYield(ref e) |
-            hir::ExprRepeat(ref e, _) => {
+            hir::ExprKind::Box(ref e) |
+            hir::ExprKind::AddrOf(_, ref e) |
+            hir::ExprKind::Cast(ref e, _) |
+            hir::ExprKind::Type(ref e, _) |
+            hir::ExprKind::Unary(_, ref e) |
+            hir::ExprKind::Field(ref e, _) |
+            hir::ExprKind::Yield(ref e) |
+            hir::ExprKind::Repeat(ref e, _) => {
                 self.straightline(expr, pred, Some(&**e).into_iter())
             }
 
-            hir::ExprInlineAsm(_, ref outputs, ref inputs) => {
+            hir::ExprKind::InlineAsm(_, ref outputs, ref inputs) => {
                 let post_outputs = self.exprs(outputs.iter().map(|e| &*e), pred);
                 let post_inputs = self.exprs(inputs.iter().map(|e| &*e), post_outputs);
                 self.add_ast_node(expr.hir_id.local_id, &[post_inputs])
             }
 
-            hir::ExprClosure(..) |
-            hir::ExprLit(..) |
-            hir::ExprPath(_) => {
+            hir::ExprKind::Closure(..) |
+            hir::ExprKind::Lit(..) |
+            hir::ExprKind::Path(_) => {
                 self.straightline(expr, pred, None::<hir::Expr>.iter())
             }
         }
diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs
index 2d83c158fe0..3f6d34617c8 100644
--- a/src/librustc/hir/check_attr.rs
+++ b/src/librustc/hir/check_attr.rs
@@ -38,13 +38,13 @@ enum Target {
 impl Target {
     fn from_item(item: &hir::Item) -> Target {
         match item.node {
-            hir::ItemFn(..) => Target::Fn,
-            hir::ItemStruct(..) => Target::Struct,
-            hir::ItemUnion(..) => Target::Union,
-            hir::ItemEnum(..) => Target::Enum,
-            hir::ItemConst(..) => Target::Const,
-            hir::ItemForeignMod(..) => Target::ForeignMod,
-            hir::ItemStatic(..) => Target::Static,
+            hir::ItemKind::Fn(..) => Target::Fn,
+            hir::ItemKind::Struct(..) => Target::Struct,
+            hir::ItemKind::Union(..) => Target::Union,
+            hir::ItemKind::Enum(..) => Target::Enum,
+            hir::ItemKind::Const(..) => Target::Const,
+            hir::ItemKind::ForeignMod(..) => Target::ForeignMod,
+            hir::ItemKind::Static(..) => Target::Static,
             _ => Target::Other,
         }
     }
@@ -264,7 +264,7 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> {
 
     fn check_stmt_attributes(&self, stmt: &hir::Stmt) {
         // When checking statements ignore expressions, they will be checked later
-        if let hir::Stmt_::StmtDecl(_, _) = stmt.node {
+        if let hir::StmtKind::Decl(_, _) = stmt.node {
             for attr in stmt.node.attrs() {
                 if attr.check_name("inline") {
                     self.check_inline(attr, &stmt.span, Target::Statement);
@@ -283,7 +283,7 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> {
 
     fn check_expr_attributes(&self, expr: &hir::Expr) {
         let target = match expr.node {
-            hir::ExprClosure(..) => Target::Closure,
+            hir::ExprKind::Closure(..) => Target::Closure,
             _ => Target::Expression,
         };
         for attr in expr.attrs.iter() {
@@ -340,7 +340,7 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
 }
 
 fn is_c_like_enum(item: &hir::Item) -> bool {
-    if let hir::ItemEnum(ref def, _) = item.node {
+    if let hir::ItemKind::Enum(ref def, _) = item.node {
         for variant in &def.variants {
             match variant.node.data {
                 hir::VariantData::Unit(_) => { /* continue */ }
diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs
index e2c0020db2f..2fefd2b3318 100644
--- a/src/librustc/hir/intravisit.rs
+++ b/src/librustc/hir/intravisit.rs
@@ -50,6 +50,7 @@ use super::itemlikevisit::DeepVisitor;
 
 use std::cmp;
 use std::u32;
+use std::result::Result::Err;
 
 #[derive(Copy, Clone)]
 pub enum FnKind<'a> {
@@ -462,23 +463,23 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
     visitor.visit_vis(&item.vis);
     visitor.visit_name(item.span, item.name);
     match item.node {
-        ItemExternCrate(orig_name) => {
+        ItemKind::ExternCrate(orig_name) => {
             visitor.visit_id(item.id);
             if let Some(orig_name) = orig_name {
                 visitor.visit_name(item.span, orig_name);
             }
         }
-        ItemUse(ref path, _) => {
+        ItemKind::Use(ref path, _) => {
             visitor.visit_id(item.id);
             visitor.visit_path(path, item.id);
         }
-        ItemStatic(ref typ, _, body) |
-        ItemConst(ref typ, body) => {
+        ItemKind::Static(ref typ, _, body) |
+        ItemKind::Const(ref typ, body) => {
             visitor.visit_id(item.id);
             visitor.visit_ty(typ);
             visitor.visit_nested_body(body);
         }
-        ItemFn(ref declaration, header, ref generics, body_id) => {
+        ItemKind::Fn(ref declaration, header, ref generics, body_id) => {
             visitor.visit_fn(FnKind::ItemFn(item.name,
                                             generics,
                                             header,
@@ -489,23 +490,23 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
                              item.span,
                              item.id)
         }
-        ItemMod(ref module) => {
+        ItemKind::Mod(ref module) => {
             // visit_mod() takes care of visiting the Item's NodeId
             visitor.visit_mod(module, item.span, item.id)
         }
-        ItemForeignMod(ref foreign_module) => {
+        ItemKind::ForeignMod(ref foreign_module) => {
             visitor.visit_id(item.id);
             walk_list!(visitor, visit_foreign_item, &foreign_module.items);
         }
-        ItemGlobalAsm(_) => {
+        ItemKind::GlobalAsm(_) => {
             visitor.visit_id(item.id);
         }
-        ItemTy(ref typ, ref type_parameters) => {
+        ItemKind::Ty(ref typ, ref type_parameters) => {
             visitor.visit_id(item.id);
             visitor.visit_ty(typ);
             visitor.visit_generics(type_parameters)
         }
-        ItemExistential(ExistTy {ref generics, ref bounds, impl_trait_fn}) => {
+        ItemKind::Existential(ExistTy {ref generics, ref bounds, impl_trait_fn}) => {
             visitor.visit_id(item.id);
             walk_generics(visitor, generics);
             walk_list!(visitor, visit_param_bound, bounds);
@@ -513,31 +514,37 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
                 visitor.visit_def_mention(Def::Fn(impl_trait_fn))
             }
         }
-        ItemEnum(ref enum_definition, ref type_parameters) => {
+        ItemKind::Enum(ref enum_definition, ref type_parameters) => {
             visitor.visit_generics(type_parameters);
             // visit_enum_def() takes care of visiting the Item's NodeId
             visitor.visit_enum_def(enum_definition, type_parameters, item.id, item.span)
         }
-        ItemImpl(.., ref type_parameters, ref opt_trait_reference, ref typ, ref impl_item_refs) => {
+        ItemKind::Impl(
+            ..,
+            ref type_parameters,
+            ref opt_trait_reference,
+            ref typ,
+            ref impl_item_refs
+        ) => {
             visitor.visit_id(item.id);
             visitor.visit_generics(type_parameters);
             walk_list!(visitor, visit_trait_ref, opt_trait_reference);
             visitor.visit_ty(typ);
             walk_list!(visitor, visit_impl_item_ref, impl_item_refs);
         }
-        ItemStruct(ref struct_definition, ref generics) |
-        ItemUnion(ref struct_definition, ref generics) => {
+        ItemKind::Struct(ref struct_definition, ref generics) |
+        ItemKind::Union(ref struct_definition, ref generics) => {
             visitor.visit_generics(generics);
             visitor.visit_id(item.id);
             visitor.visit_variant_data(struct_definition, item.name, generics, item.id, item.span);
         }
-        ItemTrait(.., ref generics, ref bounds, ref trait_item_refs) => {
+        ItemKind::Trait(.., ref generics, ref bounds, ref trait_item_refs) => {
             visitor.visit_id(item.id);
             visitor.visit_generics(generics);
             walk_list!(visitor, visit_param_bound, bounds);
             walk_list!(visitor, visit_trait_item_ref, trait_item_refs);
         }
-        ItemTraitAlias(ref generics, ref bounds) => {
+        ItemKind::TraitAlias(ref generics, ref bounds) => {
             visitor.visit_id(item.id);
             visitor.visit_generics(generics);
             walk_list!(visitor, visit_param_bound, bounds);
@@ -576,41 +583,41 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
     visitor.visit_id(typ.id);
 
     match typ.node {
-        TySlice(ref ty) => {
+        TyKind::Slice(ref ty) => {
             visitor.visit_ty(ty)
         }
-        TyPtr(ref mutable_type) => {
+        TyKind::Ptr(ref mutable_type) => {
             visitor.visit_ty(&mutable_type.ty)
         }
-        TyRptr(ref lifetime, ref mutable_type) => {
+        TyKind::Rptr(ref lifetime, ref mutable_type) => {
             visitor.visit_lifetime(lifetime);
             visitor.visit_ty(&mutable_type.ty)
         }
-        TyNever => {},
-        TyTup(ref tuple_element_types) => {
+        TyKind::Never => {},
+        TyKind::Tup(ref tuple_element_types) => {
             walk_list!(visitor, visit_ty, tuple_element_types);
         }
-        TyBareFn(ref function_declaration) => {
+        TyKind::BareFn(ref function_declaration) => {
             walk_list!(visitor, visit_generic_param, &function_declaration.generic_params);
             visitor.visit_fn_decl(&function_declaration.decl);
         }
-        TyPath(ref qpath) => {
+        TyKind::Path(ref qpath) => {
             visitor.visit_qpath(qpath, typ.id, typ.span);
         }
-        TyArray(ref ty, ref length) => {
+        TyKind::Array(ref ty, ref length) => {
             visitor.visit_ty(ty);
             visitor.visit_anon_const(length)
         }
-        TyTraitObject(ref bounds, ref lifetime) => {
+        TyKind::TraitObject(ref bounds, ref lifetime) => {
             for bound in bounds {
                 visitor.visit_poly_trait_ref(bound, TraitBoundModifier::None);
             }
             visitor.visit_lifetime(lifetime);
         }
-        TyTypeof(ref expression) => {
+        TyKind::Typeof(ref expression) => {
             visitor.visit_anon_const(expression)
         }
-        TyInfer | TyErr => {}
+        TyKind::Infer | TyKind::Err => {}
     }
 }
 
@@ -709,15 +716,15 @@ pub fn walk_foreign_item<'v, V: Visitor<'v>>(visitor: &mut V, foreign_item: &'v
     visitor.visit_name(foreign_item.span, foreign_item.name);
 
     match foreign_item.node {
-        ForeignItemFn(ref function_declaration, ref param_names, ref generics) => {
+        ForeignItemKind::Fn(ref function_declaration, ref param_names, ref generics) => {
             visitor.visit_generics(generics);
             visitor.visit_fn_decl(function_declaration);
             for &param_name in param_names {
                 visitor.visit_ident(param_name);
             }
         }
-        ForeignItemStatic(ref typ, _) => visitor.visit_ty(typ),
-        ForeignItemType => (),
+        ForeignItemKind::Static(ref typ, _) => visitor.visit_ty(typ),
+        ForeignItemKind::Type => (),
     }
 
     walk_list!(visitor, visit_attribute, &foreign_item.attrs);
@@ -935,12 +942,12 @@ pub fn walk_block<'v, V: Visitor<'v>>(visitor: &mut V, block: &'v Block) {
 
 pub fn walk_stmt<'v, V: Visitor<'v>>(visitor: &mut V, statement: &'v Stmt) {
     match statement.node {
-        StmtDecl(ref declaration, id) => {
+        StmtKind::Decl(ref declaration, id) => {
             visitor.visit_id(id);
             visitor.visit_decl(declaration)
         }
-        StmtExpr(ref expression, id) |
-        StmtSemi(ref expression, id) => {
+        StmtKind::Expr(ref expression, id) |
+        StmtKind::Semi(ref expression, id) => {
             visitor.visit_id(id);
             visitor.visit_expr(expression)
         }
@@ -949,8 +956,8 @@ pub fn walk_stmt<'v, V: Visitor<'v>>(visitor: &mut V, statement: &'v Stmt) {
 
 pub fn walk_decl<'v, V: Visitor<'v>>(visitor: &mut V, declaration: &'v Decl) {
     match declaration.node {
-        DeclLocal(ref local) => visitor.visit_local(local),
-        DeclItem(item) => visitor.visit_nested_item(item),
+        DeclKind::Local(ref local) => visitor.visit_local(local),
+        DeclKind::Item(item) => visitor.visit_nested_item(item),
     }
 }
 
@@ -963,17 +970,17 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
     visitor.visit_id(expression.id);
     walk_list!(visitor, visit_attribute, expression.attrs.iter());
     match expression.node {
-        ExprBox(ref subexpression) => {
+        ExprKind::Box(ref subexpression) => {
             visitor.visit_expr(subexpression)
         }
-        ExprArray(ref subexpressions) => {
+        ExprKind::Array(ref subexpressions) => {
             walk_list!(visitor, visit_expr, subexpressions);
         }
-        ExprRepeat(ref element, ref count) => {
+        ExprKind::Repeat(ref element, ref count) => {
             visitor.visit_expr(element);
             visitor.visit_anon_const(count)
         }
-        ExprStruct(ref qpath, ref fields, ref optional_base) => {
+        ExprKind::Struct(ref qpath, ref fields, ref optional_base) => {
             visitor.visit_qpath(qpath, expression.id, expression.span);
             for field in fields {
                 visitor.visit_id(field.id);
@@ -982,78 +989,78 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
             }
             walk_list!(visitor, visit_expr, optional_base);
         }
-        ExprTup(ref subexpressions) => {
+        ExprKind::Tup(ref subexpressions) => {
             walk_list!(visitor, visit_expr, subexpressions);
         }
-        ExprCall(ref callee_expression, ref arguments) => {
+        ExprKind::Call(ref callee_expression, ref arguments) => {
             visitor.visit_expr(callee_expression);
             walk_list!(visitor, visit_expr, arguments);
         }
-        ExprMethodCall(ref segment, _, ref arguments) => {
+        ExprKind::MethodCall(ref segment, _, ref arguments) => {
             visitor.visit_path_segment(expression.span, segment);
             walk_list!(visitor, visit_expr, arguments);
         }
-        ExprBinary(_, ref left_expression, ref right_expression) => {
+        ExprKind::Binary(_, ref left_expression, ref right_expression) => {
             visitor.visit_expr(left_expression);
             visitor.visit_expr(right_expression)
         }
-        ExprAddrOf(_, ref subexpression) | ExprUnary(_, ref subexpression) => {
+        ExprKind::AddrOf(_, ref subexpression) | ExprKind::Unary(_, ref subexpression) => {
             visitor.visit_expr(subexpression)
         }
-        ExprLit(_) => {}
-        ExprCast(ref subexpression, ref typ) | ExprType(ref subexpression, ref typ) => {
+        ExprKind::Lit(_) => {}
+        ExprKind::Cast(ref subexpression, ref typ) | ExprKind::Type(ref subexpression, ref typ) => {
             visitor.visit_expr(subexpression);
             visitor.visit_ty(typ)
         }
-        ExprIf(ref head_expression, ref if_block, ref optional_else) => {
+        ExprKind::If(ref head_expression, ref if_block, ref optional_else) => {
             visitor.visit_expr(head_expression);
             visitor.visit_expr(if_block);
             walk_list!(visitor, visit_expr, optional_else);
         }
-        ExprWhile(ref subexpression, ref block, ref opt_label) => {
+        ExprKind::While(ref subexpression, ref block, ref opt_label) => {
             walk_list!(visitor, visit_label, opt_label);
             visitor.visit_expr(subexpression);
             visitor.visit_block(block);
         }
-        ExprLoop(ref block, ref opt_label, _) => {
+        ExprKind::Loop(ref block, ref opt_label, _) => {
             walk_list!(visitor, visit_label, opt_label);
             visitor.visit_block(block);
         }
-        ExprMatch(ref subexpression, ref arms, _) => {
+        ExprKind::Match(ref subexpression, ref arms, _) => {
             visitor.visit_expr(subexpression);
             walk_list!(visitor, visit_arm, arms);
         }
-        ExprClosure(_, ref function_declaration, body, _fn_decl_span, _gen) => {
+        ExprKind::Closure(_, ref function_declaration, body, _fn_decl_span, _gen) => {
             visitor.visit_fn(FnKind::Closure(&expression.attrs),
                              function_declaration,
                              body,
                              expression.span,
                              expression.id)
         }
-        ExprBlock(ref block, ref opt_label) => {
+        ExprKind::Block(ref block, ref opt_label) => {
             walk_list!(visitor, visit_label, opt_label);
             visitor.visit_block(block);
         }
-        ExprAssign(ref left_hand_expression, ref right_hand_expression) => {
+        ExprKind::Assign(ref left_hand_expression, ref right_hand_expression) => {
             visitor.visit_expr(right_hand_expression);
             visitor.visit_expr(left_hand_expression)
         }
-        ExprAssignOp(_, ref left_expression, ref right_expression) => {
+        ExprKind::AssignOp(_, ref left_expression, ref right_expression) => {
             visitor.visit_expr(right_expression);
             visitor.visit_expr(left_expression)
         }
-        ExprField(ref subexpression, ident) => {
+        ExprKind::Field(ref subexpression, ident) => {
             visitor.visit_expr(subexpression);
             visitor.visit_ident(ident);
         }
-        ExprIndex(ref main_expression, ref index_expression) => {
+        ExprKind::Index(ref main_expression, ref index_expression) => {
             visitor.visit_expr(main_expression);
             visitor.visit_expr(index_expression)
         }
-        ExprPath(ref qpath) => {
+        ExprKind::Path(ref qpath) => {
             visitor.visit_qpath(qpath, expression.id, expression.span);
         }
-        ExprBreak(ref destination, ref opt_expr) => {
+        ExprKind::Break(ref destination, ref opt_expr) => {
             if let Some(ref label) = destination.label {
                 visitor.visit_label(label);
                 match destination.target_id {
@@ -1063,7 +1070,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
             }
             walk_list!(visitor, visit_expr, opt_expr);
         }
-        ExprContinue(ref destination) => {
+        ExprKind::Continue(ref destination) => {
             if let Some(ref label) = destination.label {
                 visitor.visit_label(label);
                 match destination.target_id {
@@ -1072,10 +1079,10 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
                 };
             }
         }
-        ExprRet(ref optional_expression) => {
+        ExprKind::Ret(ref optional_expression) => {
             walk_list!(visitor, visit_expr, optional_expression);
         }
-        ExprInlineAsm(_, ref outputs, ref inputs) => {
+        ExprKind::InlineAsm(_, ref outputs, ref inputs) => {
             for output in outputs {
                 visitor.visit_expr(output)
             }
@@ -1083,7 +1090,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
                 visitor.visit_expr(input)
             }
         }
-        ExprYield(ref subexpression) => {
+        ExprKind::Yield(ref subexpression) => {
             visitor.visit_expr(subexpression);
         }
     }
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index cb53f963d41..722934ac39a 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -384,8 +384,8 @@ impl<'a> LoweringContext<'a> {
 
                 if item_lowered {
                     let item_generics = match self.lctx.items.get(&item.id).unwrap().node {
-                        hir::Item_::ItemImpl(_, _, _, ref generics, ..)
-                        | hir::Item_::ItemTrait(_, _, ref generics, ..) => {
+                        hir::ItemKind::Impl(_, _, _, ref generics, ..)
+                        | hir::ItemKind::Trait(_, _, ref generics, ..) => {
                             generics.params.clone()
                         }
                         _ => HirVec::new(),
@@ -853,7 +853,7 @@ impl<'a> LoweringContext<'a> {
         closure_node_id: NodeId,
         ret_ty: Option<&Ty>,
         body: impl FnOnce(&mut LoweringContext) -> hir::Expr,
-    ) -> hir::Expr_ {
+    ) -> hir::ExprKind {
         let prev_is_generator = mem::replace(&mut self.is_generator, true);
         let body_expr = body(self);
         let span = body_expr.span;
@@ -875,7 +875,7 @@ impl<'a> LoweringContext<'a> {
         let generator = hir::Expr {
             id: closure_node_id,
             hir_id: closure_hir_id,
-            node: hir::ExprClosure(capture_clause, decl, body_id, span,
+            node: hir::ExprKind::Closure(capture_clause, decl, body_id, span,
                 Some(hir::GeneratorMovability::Static)),
             span,
             attrs: ThinVec::new(),
@@ -884,7 +884,7 @@ impl<'a> LoweringContext<'a> {
         let unstable_span = self.allow_internal_unstable(CompilerDesugaringKind::Async, span);
         let gen_future = self.expr_std_path(
             unstable_span, &["future", "from_generator"], None, ThinVec::new());
-        hir::ExprCall(P(gen_future), hir_vec![generator])
+        hir::ExprKind::Call(P(gen_future), hir_vec![generator])
     }
 
     fn lower_body<F>(&mut self, decl: Option<&FnDecl>, f: F) -> hir::BodyId
@@ -1080,17 +1080,17 @@ impl<'a> LoweringContext<'a> {
 
     fn lower_ty_direct(&mut self, t: &Ty, mut itctx: ImplTraitContext) -> hir::Ty {
         let kind = match t.node {
-            TyKind::Infer => hir::TyInfer,
-            TyKind::Err => hir::TyErr,
-            TyKind::Slice(ref ty) => hir::TySlice(self.lower_ty(ty, itctx)),
-            TyKind::Ptr(ref mt) => hir::TyPtr(self.lower_mt(mt, itctx)),
+            TyKind::Infer => hir::TyKind::Infer,
+            TyKind::Err => hir::TyKind::Err,
+            TyKind::Slice(ref ty) => hir::TyKind::Slice(self.lower_ty(ty, itctx)),
+            TyKind::Ptr(ref mt) => hir::TyKind::Ptr(self.lower_mt(mt, itctx)),
             TyKind::Rptr(ref region, ref mt) => {
                 let span = t.span.shrink_to_lo();
                 let lifetime = match *region {
                     Some(ref lt) => self.lower_lifetime(lt),
                     None => self.elided_ref_lifetime(span),
                 };
-                hir::TyRptr(lifetime, self.lower_mt(mt, itctx))
+                hir::TyKind::Rptr(lifetime, self.lower_mt(mt, itctx))
             }
             TyKind::BareFn(ref f) => self.with_in_scope_lifetime_defs(
                 &f.generic_params,
@@ -1098,7 +1098,7 @@ impl<'a> LoweringContext<'a> {
                     this.with_anonymous_lifetime_mode(
                         AnonymousLifetimeMode::PassThrough,
                         |this| {
-                            hir::TyBareFn(P(hir::BareFnTy {
+                            hir::TyKind::BareFn(P(hir::BareFnTy {
                                 generic_params: this.lower_generic_params(
                                     &f.generic_params,
                                     &NodeMap(),
@@ -1113,9 +1113,9 @@ impl<'a> LoweringContext<'a> {
                     )
                 },
             ),
-            TyKind::Never => hir::TyNever,
+            TyKind::Never => hir::TyKind::Never,
             TyKind::Tup(ref tys) => {
-                hir::TyTup(tys.iter().map(|ty| {
+                hir::TyKind::Tup(tys.iter().map(|ty| {
                     self.lower_ty_direct(ty, itctx.reborrow())
                 }).collect())
             }
@@ -1126,12 +1126,12 @@ impl<'a> LoweringContext<'a> {
                 let id = self.lower_node_id(t.id);
                 let qpath = self.lower_qpath(t.id, qself, path, ParamMode::Explicit, itctx);
                 let ty = self.ty_path(id, t.span, qpath);
-                if let hir::TyTraitObject(..) = ty.node {
+                if let hir::TyKind::TraitObject(..) = ty.node {
                     self.maybe_lint_bare_trait(t.span, t.id, qself.is_none() && path.is_global());
                 }
                 return ty;
             }
-            TyKind::ImplicitSelf => hir::TyPath(hir::QPath::Resolved(
+            TyKind::ImplicitSelf => hir::TyKind::Path(hir::QPath::Resolved(
                 None,
                 P(hir::Path {
                     def: self.expect_full_def(t.id),
@@ -1140,10 +1140,10 @@ impl<'a> LoweringContext<'a> {
                 }),
             )),
             TyKind::Array(ref ty, ref length) => {
-                hir::TyArray(self.lower_ty(ty, itctx), self.lower_anon_const(length))
+                hir::TyKind::Array(self.lower_ty(ty, itctx), self.lower_anon_const(length))
             }
             TyKind::Typeof(ref expr) => {
-                hir::TyTypeof(self.lower_anon_const(expr))
+                hir::TyKind::Typeof(self.lower_anon_const(expr))
             }
             TyKind::TraitObject(ref bounds, kind) => {
                 let mut lifetime_bound = None;
@@ -1167,7 +1167,7 @@ impl<'a> LoweringContext<'a> {
                 if kind != TraitObjectSyntax::Dyn {
                     self.maybe_lint_bare_trait(t.span, t.id, false);
                 }
-                hir::TyTraitObject(bounds, lifetime_bound)
+                hir::TyKind::TraitObject(bounds, lifetime_bound)
             }
             TyKind::ImplTrait(def_node_id, ref bounds) => {
                 let span = t.span;
@@ -1206,7 +1206,7 @@ impl<'a> LoweringContext<'a> {
                             }
                         });
 
-                        hir::TyPath(hir::QPath::Resolved(
+                        hir::TyKind::Path(hir::QPath::Resolved(
                             None,
                             P(hir::Path {
                                 span,
@@ -1223,7 +1223,7 @@ impl<'a> LoweringContext<'a> {
                             "`impl Trait` not allowed outside of function \
                              and inherent method return types"
                         );
-                        hir::TyErr
+                        hir::TyKind::Err
                     }
                 }
             }
@@ -1245,7 +1245,7 @@ impl<'a> LoweringContext<'a> {
         fn_def_id: DefId,
         exist_ty_node_id: NodeId,
         lower_bounds: impl FnOnce(&mut LoweringContext) -> hir::GenericBounds,
-    ) -> hir::Ty_ {
+    ) -> hir::TyKind {
         // Make sure we know that some funky desugaring has been going on here.
         // This is a first: there is code in other places like for loop
         // desugaring that explicitly states that we don't want to track that.
@@ -1274,7 +1274,7 @@ impl<'a> LoweringContext<'a> {
         );
 
         self.with_hir_id_owner(exist_ty_node_id, |lctx| {
-            let exist_ty_item_kind = hir::ItemExistential(hir::ExistTy {
+            let exist_ty_item_kind = hir::ItemKind::Existential(hir::ExistTy {
                 generics: hir::Generics {
                     params: lifetime_defs,
                     where_clause: hir::WhereClause {
@@ -1320,7 +1320,7 @@ impl<'a> LoweringContext<'a> {
                     }))
                 }],
             });
-            hir::TyPath(hir::QPath::Resolved(None, path))
+            hir::TyKind::Path(hir::QPath::Resolved(None, path))
         })
     }
 
@@ -1365,7 +1365,7 @@ impl<'a> LoweringContext<'a> {
 
             fn visit_ty(&mut self, t: &'v hir::Ty) {
                 // Don't collect elided lifetimes used inside of `fn()` syntax
-                if let hir::Ty_::TyBareFn(_) = t.node {
+                if let hir::TyKind::BareFn(_) = t.node {
                     let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
                     self.collect_elided_lifetimes = false;
 
@@ -1507,7 +1507,7 @@ impl<'a> LoweringContext<'a> {
 
     fn lower_variant(&mut self, v: &Variant) -> hir::Variant {
         Spanned {
-            node: hir::Variant_ {
+            node: hir::VariantKind {
                 name: v.node.ident.name,
                 attrs: self.lower_attrs(&v.node.attrs),
                 data: self.lower_variant_data(&v.node.data),
@@ -1805,7 +1805,7 @@ impl<'a> LoweringContext<'a> {
                 let inputs = inputs.iter().map(|ty| this.lower_ty_direct(ty, DISALLOWED)).collect();
                 let mk_tup = |this: &mut Self, tys, span| {
                     let LoweredNodeId { node_id, hir_id } = this.next_id();
-                    hir::Ty { node: hir::TyTup(tys), id: node_id, hir_id, span }
+                    hir::Ty { node: hir::TyKind::Tup(tys), id: node_id, hir_id, span }
                 };
 
                 (
@@ -1985,7 +1985,7 @@ impl<'a> LoweringContext<'a> {
 
             fn visit_ty(&mut self, t: &'v hir::Ty) {
                 // Don't collect elided lifetimes used inside of `fn()` syntax
-                if let &hir::Ty_::TyBareFn(_) = &t.node {
+                if let &hir::TyKind::BareFn(_) = &t.node {
                     let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
                     self.collect_elided_lifetimes = false;
 
@@ -2105,7 +2105,7 @@ impl<'a> LoweringContext<'a> {
                     P(hir::Ty {
                         id: node_id,
                         hir_id: hir_id,
-                        node: hir::TyTup(hir_vec![]),
+                        node: hir::TyKind::Tup(hir_vec![]),
                         span: *span,
                     })
                 }
@@ -2575,9 +2575,9 @@ impl<'a> LoweringContext<'a> {
         attrs: &hir::HirVec<Attribute>,
         vis: &mut hir::Visibility,
         i: &ItemKind,
-    ) -> hir::Item_ {
+    ) -> hir::ItemKind {
         match *i {
-            ItemKind::ExternCrate(orig_name) => hir::ItemExternCrate(orig_name),
+            ItemKind::ExternCrate(orig_name) => hir::ItemKind::ExternCrate(orig_name),
             ItemKind::Use(ref use_tree) => {
                 // Start with an empty prefix
                 let prefix = Path {
@@ -2589,7 +2589,7 @@ impl<'a> LoweringContext<'a> {
             }
             ItemKind::Static(ref t, m, ref e) => {
                 let value = self.lower_body(None, |this| this.lower_expr(e));
-                hir::ItemStatic(
+                hir::ItemKind::Static(
                     self.lower_ty(t, ImplTraitContext::Disallowed),
                     self.lower_mutability(m),
                     value,
@@ -2597,7 +2597,7 @@ impl<'a> LoweringContext<'a> {
             }
             ItemKind::Const(ref t, ref e) => {
                 let value = self.lower_body(None, |this| this.lower_expr(e));
-                hir::ItemConst(self.lower_ty(t, ImplTraitContext::Disallowed), value)
+                hir::ItemKind::Const(self.lower_ty(t, ImplTraitContext::Disallowed), value)
             }
             ItemKind::Fn(ref decl, header, ref generics, ref body) => {
                 let fn_def_id = self.resolver.definitions().local_def_id(id);
@@ -2617,7 +2617,7 @@ impl<'a> LoweringContext<'a> {
                             decl, Some((fn_def_id, idty)), true, header.asyncness.opt_return_id()),
                     );
 
-                    hir::ItemFn(
+                    hir::ItemKind::Fn(
                         fn_decl,
                         this.lower_fn_header(header),
                         generics,
@@ -2625,14 +2625,14 @@ impl<'a> LoweringContext<'a> {
                     )
                 })
             }
-            ItemKind::Mod(ref m) => hir::ItemMod(self.lower_mod(m)),
-            ItemKind::ForeignMod(ref nm) => hir::ItemForeignMod(self.lower_foreign_mod(nm)),
-            ItemKind::GlobalAsm(ref ga) => hir::ItemGlobalAsm(self.lower_global_asm(ga)),
-            ItemKind::Ty(ref t, ref generics) => hir::ItemTy(
+            ItemKind::Mod(ref m) => hir::ItemKind::Mod(self.lower_mod(m)),
+            ItemKind::ForeignMod(ref nm) => hir::ItemKind::ForeignMod(self.lower_foreign_mod(nm)),
+            ItemKind::GlobalAsm(ref ga) => hir::ItemKind::GlobalAsm(self.lower_global_asm(ga)),
+            ItemKind::Ty(ref t, ref generics) => hir::ItemKind::Ty(
                 self.lower_ty(t, ImplTraitContext::Disallowed),
                 self.lower_generics(generics, ImplTraitContext::Disallowed),
             ),
-            ItemKind::Enum(ref enum_definition, ref generics) => hir::ItemEnum(
+            ItemKind::Enum(ref enum_definition, ref generics) => hir::ItemKind::Enum(
                 hir::EnumDef {
                     variants: enum_definition
                         .variants
@@ -2644,14 +2644,14 @@ impl<'a> LoweringContext<'a> {
             ),
             ItemKind::Struct(ref struct_def, ref generics) => {
                 let struct_def = self.lower_variant_data(struct_def);
-                hir::ItemStruct(
+                hir::ItemKind::Struct(
                     struct_def,
                     self.lower_generics(generics, ImplTraitContext::Disallowed),
                 )
             }
             ItemKind::Union(ref vdata, ref generics) => {
                 let vdata = self.lower_variant_data(vdata);
-                hir::ItemUnion(
+                hir::ItemKind::Union(
                     vdata,
                     self.lower_generics(generics, ImplTraitContext::Disallowed),
                 )
@@ -2711,7 +2711,7 @@ impl<'a> LoweringContext<'a> {
                     },
                 );
 
-                hir::ItemImpl(
+                hir::ItemKind::Impl(
                     self.lower_unsafety(unsafety),
                     self.lower_impl_polarity(polarity),
                     self.lower_defaultness(defaultness, true /* [1] */),
@@ -2727,7 +2727,7 @@ impl<'a> LoweringContext<'a> {
                     .iter()
                     .map(|item| self.lower_trait_item_ref(item))
                     .collect();
-                hir::ItemTrait(
+                hir::ItemKind::Trait(
                     self.lower_is_auto(is_auto),
                     self.lower_unsafety(unsafety),
                     self.lower_generics(generics, ImplTraitContext::Disallowed),
@@ -2735,7 +2735,7 @@ impl<'a> LoweringContext<'a> {
                     items,
                 )
             }
-            ItemKind::TraitAlias(ref generics, ref bounds) => hir::ItemTraitAlias(
+            ItemKind::TraitAlias(ref generics, ref bounds) => hir::ItemKind::TraitAlias(
                 self.lower_generics(generics, ImplTraitContext::Disallowed),
                 self.lower_param_bounds(bounds, ImplTraitContext::Disallowed),
             ),
@@ -2754,7 +2754,7 @@ impl<'a> LoweringContext<'a> {
         vis: &mut hir::Visibility,
         name: &mut Name,
         attrs: &hir::HirVec<Attribute>,
-    ) -> hir::Item_ {
+    ) -> hir::ItemKind {
         let path = &tree.prefix;
 
         match tree.kind {
@@ -2804,7 +2804,7 @@ impl<'a> LoweringContext<'a> {
                     self.with_hir_id_owner(new_node_id, |this| {
                         let new_id = this.lower_node_id(new_node_id);
                         let path = this.lower_path_extra(def, &path, None, ParamMode::Explicit);
-                        let item = hir::ItemUse(P(path), hir::UseKind::Single);
+                        let item = hir::ItemKind::Use(P(path), hir::UseKind::Single);
                         let vis_kind = match vis.node {
                             hir::VisibilityKind::Public => hir::VisibilityKind::Public,
                             hir::VisibilityKind::Crate(sugar) => hir::VisibilityKind::Crate(sugar),
@@ -2835,7 +2835,7 @@ impl<'a> LoweringContext<'a> {
                 }
 
                 let path = P(self.lower_path_extra(ret_def, &path, None, ParamMode::Explicit));
-                hir::ItemUse(path, hir::UseKind::Single)
+                hir::ItemKind::Use(path, hir::UseKind::Single)
             }
             UseTreeKind::Glob => {
                 let path = P(self.lower_path(
@@ -2851,7 +2851,7 @@ impl<'a> LoweringContext<'a> {
                     },
                     ParamMode::Explicit,
                 ));
-                hir::ItemUse(path, hir::UseKind::Glob)
+                hir::ItemKind::Use(path, hir::UseKind::Glob)
             }
             UseTreeKind::Nested(ref trees) => {
                 let prefix = Path {
@@ -2912,7 +2912,7 @@ impl<'a> LoweringContext<'a> {
                 // a re-export by accident when `pub`, e.g. in documentation.
                 let path = P(self.lower_path(id, &prefix, ParamMode::Explicit));
                 *vis = respan(prefix.span.shrink_to_lo(), hir::VisibilityKind::Inherited);
-                hir::ItemUse(path, hir::UseKind::ListStem)
+                hir::ItemKind::Use(path, hir::UseKind::ListStem)
             }
         }
     }
@@ -3230,12 +3230,12 @@ impl<'a> LoweringContext<'a> {
                         },
                     );
 
-                    hir::ForeignItemFn(fn_dec, fn_args, generics)
+                    hir::ForeignItemKind::Fn(fn_dec, fn_args, generics)
                 }
                 ForeignItemKind::Static(ref t, m) => {
-                    hir::ForeignItemStatic(self.lower_ty(t, ImplTraitContext::Disallowed), m)
+                    hir::ForeignItemKind::Static(self.lower_ty(t, ImplTraitContext::Disallowed), m)
                 }
-                ForeignItemKind::Ty => hir::ForeignItemType,
+                ForeignItemKind::Ty => hir::ForeignItemKind::Type,
                 ForeignItemKind::Macro(_) => panic!("shouldn't exist here"),
             },
             vis: self.lower_visibility(&i.vis, None),
@@ -3314,24 +3314,24 @@ impl<'a> LoweringContext<'a> {
     fn lower_binop(&mut self, b: BinOp) -> hir::BinOp {
         Spanned {
             node: match b.node {
-                BinOpKind::Add => hir::BiAdd,
-                BinOpKind::Sub => hir::BiSub,
-                BinOpKind::Mul => hir::BiMul,
-                BinOpKind::Div => hir::BiDiv,
-                BinOpKind::Rem => hir::BiRem,
-                BinOpKind::And => hir::BiAnd,
-                BinOpKind::Or => hir::BiOr,
-                BinOpKind::BitXor => hir::BiBitXor,
-                BinOpKind::BitAnd => hir::BiBitAnd,
-                BinOpKind::BitOr => hir::BiBitOr,
-                BinOpKind::Shl => hir::BiShl,
-                BinOpKind::Shr => hir::BiShr,
-                BinOpKind::Eq => hir::BiEq,
-                BinOpKind::Lt => hir::BiLt,
-                BinOpKind::Le => hir::BiLe,
-                BinOpKind::Ne => hir::BiNe,
-                BinOpKind::Ge => hir::BiGe,
-                BinOpKind::Gt => hir::BiGt,
+                BinOpKind::Add => hir::BinOpKind::Add,
+                BinOpKind::Sub => hir::BinOpKind::Sub,
+                BinOpKind::Mul => hir::BinOpKind::Mul,
+                BinOpKind::Div => hir::BinOpKind::Div,
+                BinOpKind::Rem => hir::BinOpKind::Rem,
+                BinOpKind::And => hir::BinOpKind::And,
+                BinOpKind::Or => hir::BinOpKind::Or,
+                BinOpKind::BitXor => hir::BinOpKind::BitXor,
+                BinOpKind::BitAnd => hir::BinOpKind::BitAnd,
+                BinOpKind::BitOr => hir::BinOpKind::BitOr,
+                BinOpKind::Shl => hir::BinOpKind::Shl,
+                BinOpKind::Shr => hir::BinOpKind::Shr,
+                BinOpKind::Eq => hir::BinOpKind::Eq,
+                BinOpKind::Lt => hir::BinOpKind::Lt,
+                BinOpKind::Le => hir::BinOpKind::Le,
+                BinOpKind::Ne => hir::BinOpKind::Ne,
+                BinOpKind::Ge => hir::BinOpKind::Ge,
+                BinOpKind::Gt => hir::BinOpKind::Gt,
             },
             span: b.span,
         }
@@ -3468,25 +3468,25 @@ impl<'a> LoweringContext<'a> {
 
     fn lower_expr(&mut self, e: &Expr) -> hir::Expr {
         let kind = match e.node {
-            ExprKind::Box(ref inner) => hir::ExprBox(P(self.lower_expr(inner))),
+            ExprKind::Box(ref inner) => hir::ExprKind::Box(P(self.lower_expr(inner))),
             ExprKind::ObsoleteInPlace(..) => {
                 self.sess.abort_if_errors();
                 span_bug!(e.span, "encountered ObsoleteInPlace expr during lowering");
             }
             ExprKind::Array(ref exprs) => {
-                hir::ExprArray(exprs.iter().map(|x| self.lower_expr(x)).collect())
+                hir::ExprKind::Array(exprs.iter().map(|x| self.lower_expr(x)).collect())
             }
             ExprKind::Repeat(ref expr, ref count) => {
                 let expr = P(self.lower_expr(expr));
                 let count = self.lower_anon_const(count);
-                hir::ExprRepeat(expr, count)
+                hir::ExprKind::Repeat(expr, count)
             }
             ExprKind::Tup(ref elts) => {
-                hir::ExprTup(elts.iter().map(|x| self.lower_expr(x)).collect())
+                hir::ExprKind::Tup(elts.iter().map(|x| self.lower_expr(x)).collect())
             }
             ExprKind::Call(ref f, ref args) => {
                 let f = P(self.lower_expr(f));
-                hir::ExprCall(f, args.iter().map(|x| self.lower_expr(x)).collect())
+                hir::ExprKind::Call(f, args.iter().map(|x| self.lower_expr(x)).collect())
             }
             ExprKind::MethodCall(ref seg, ref args) => {
                 let hir_seg = self.lower_path_segment(
@@ -3498,32 +3498,32 @@ impl<'a> LoweringContext<'a> {
                     ImplTraitContext::Disallowed,
                 );
                 let args = args.iter().map(|x| self.lower_expr(x)).collect();
-                hir::ExprMethodCall(hir_seg, seg.ident.span, args)
+                hir::ExprKind::MethodCall(hir_seg, seg.ident.span, args)
             }
             ExprKind::Binary(binop, ref lhs, ref rhs) => {
                 let binop = self.lower_binop(binop);
                 let lhs = P(self.lower_expr(lhs));
                 let rhs = P(self.lower_expr(rhs));
-                hir::ExprBinary(binop, lhs, rhs)
+                hir::ExprKind::Binary(binop, lhs, rhs)
             }
             ExprKind::Unary(op, ref ohs) => {
                 let op = self.lower_unop(op);
                 let ohs = P(self.lower_expr(ohs));
-                hir::ExprUnary(op, ohs)
+                hir::ExprKind::Unary(op, ohs)
             }
-            ExprKind::Lit(ref l) => hir::ExprLit(P((**l).clone())),
+            ExprKind::Lit(ref l) => hir::ExprKind::Lit(P((**l).clone())),
             ExprKind::Cast(ref expr, ref ty) => {
                 let expr = P(self.lower_expr(expr));
-                hir::ExprCast(expr, self.lower_ty(ty, ImplTraitContext::Disallowed))
+                hir::ExprKind::Cast(expr, self.lower_ty(ty, ImplTraitContext::Disallowed))
             }
             ExprKind::Type(ref expr, ref ty) => {
                 let expr = P(self.lower_expr(expr));
-                hir::ExprType(expr, self.lower_ty(ty, ImplTraitContext::Disallowed))
+                hir::ExprKind::Type(expr, self.lower_ty(ty, ImplTraitContext::Disallowed))
             }
             ExprKind::AddrOf(m, ref ohs) => {
                 let m = self.lower_mutability(m);
                 let ohs = P(self.lower_expr(ohs));
-                hir::ExprAddrOf(m, ohs)
+                hir::ExprKind::AddrOf(m, ohs)
             }
             // More complicated than you might expect because the else branch
             // might be `if let`.
@@ -3554,17 +3554,17 @@ impl<'a> LoweringContext<'a> {
                 let then_blk = self.lower_block(blk, false);
                 let then_expr = self.expr_block(then_blk, ThinVec::new());
 
-                hir::ExprIf(P(self.lower_expr(cond)), P(then_expr), else_opt)
+                hir::ExprKind::If(P(self.lower_expr(cond)), P(then_expr), else_opt)
             }
             ExprKind::While(ref cond, ref body, opt_label) => self.with_loop_scope(e.id, |this| {
-                hir::ExprWhile(
+                hir::ExprKind::While(
                     this.with_loop_condition_scope(|this| P(this.lower_expr(cond))),
                     this.lower_block(body, false),
                     this.lower_label(opt_label),
                 )
             }),
             ExprKind::Loop(ref body, opt_label) => self.with_loop_scope(e.id, |this| {
-                hir::ExprLoop(
+                hir::ExprKind::Loop(
                     this.lower_block(body, false),
                     this.lower_label(opt_label),
                     hir::LoopSource::Loop,
@@ -3582,7 +3582,7 @@ impl<'a> LoweringContext<'a> {
                             hir::Expr {
                                 id: node_id,
                                 span,
-                                node: hir::ExprTup(hir_vec![]),
+                                node: hir::ExprKind::Tup(hir_vec![]),
                                 attrs: ThinVec::new(),
                                 hir_id,
                             }
@@ -3591,10 +3591,10 @@ impl<'a> LoweringContext<'a> {
                     );
                     block.expr = Some(this.wrap_in_try_constructor(
                         "from_ok", tail, unstable_span));
-                    hir::ExprBlock(P(block), None)
+                    hir::ExprKind::Block(P(block), None)
                 })
             }
-            ExprKind::Match(ref expr, ref arms) => hir::ExprMatch(
+            ExprKind::Match(ref expr, ref arms) => hir::ExprKind::Match(
                 P(self.lower_expr(expr)),
                 arms.iter().map(|x| self.lower_arm(x)).collect(),
                 hir::MatchSource::Normal,
@@ -3652,7 +3652,7 @@ impl<'a> LoweringContext<'a> {
                                 });
                             this.expr(fn_decl_span, async_body, ThinVec::new())
                         });
-                        hir::ExprClosure(
+                        hir::ExprKind::Closure(
                             this.lower_capture_clause(capture_clause),
                             fn_decl,
                             body_id,
@@ -3696,7 +3696,7 @@ impl<'a> LoweringContext<'a> {
                             }
                             None
                         };
-                        hir::ExprClosure(
+                        hir::ExprKind::Closure(
                             this.lower_capture_clause(capture_clause),
                             fn_decl,
                             body_id,
@@ -3707,21 +3707,21 @@ impl<'a> LoweringContext<'a> {
                 }
             }
             ExprKind::Block(ref blk, opt_label) => {
-                hir::ExprBlock(self.lower_block(blk,
+                hir::ExprKind::Block(self.lower_block(blk,
                                                 opt_label.is_some()),
                                                 self.lower_label(opt_label))
             }
             ExprKind::Assign(ref el, ref er) => {
-                hir::ExprAssign(P(self.lower_expr(el)), P(self.lower_expr(er)))
+                hir::ExprKind::Assign(P(self.lower_expr(el)), P(self.lower_expr(er)))
             }
-            ExprKind::AssignOp(op, ref el, ref er) => hir::ExprAssignOp(
+            ExprKind::AssignOp(op, ref el, ref er) => hir::ExprKind::AssignOp(
                 self.lower_binop(op),
                 P(self.lower_expr(el)),
                 P(self.lower_expr(er)),
             ),
-            ExprKind::Field(ref el, ident) => hir::ExprField(P(self.lower_expr(el)), ident),
+            ExprKind::Field(ref el, ident) => hir::ExprKind::Field(P(self.lower_expr(el)), ident),
             ExprKind::Index(ref el, ref er) => {
-                hir::ExprIndex(P(self.lower_expr(el)), P(self.lower_expr(er)))
+                hir::ExprKind::Index(P(self.lower_expr(el)), P(self.lower_expr(er)))
             }
             // Desugar `<start>..=<end>` to `std::ops::RangeInclusive::new(<start>, <end>)`
             ExprKind::Range(Some(ref e1), Some(ref e2), RangeLimits::Closed) => {
@@ -3734,8 +3734,8 @@ impl<'a> LoweringContext<'a> {
                 let ty = P(self.ty_path(id, span, hir::QPath::Resolved(None, ty_path)));
                 let new_seg = P(hir::PathSegment::from_ident(Ident::from_str("new")));
                 let new_path = hir::QPath::TypeRelative(ty, new_seg);
-                let new = P(self.expr(span, hir::ExprPath(new_path), ThinVec::new()));
-                hir::ExprCall(new, hir_vec![e1, e2])
+                let new = P(self.expr(span, hir::ExprKind::Path(new_path), ThinVec::new()));
+                hir::ExprKind::Call(new, hir_vec![e1, e2])
             }
             ExprKind::Range(ref e1, ref e2, lims) => {
                 use syntax::ast::RangeLimits::*;
@@ -3779,15 +3779,15 @@ impl<'a> LoweringContext<'a> {
                     id: node_id,
                     hir_id,
                     node: if is_unit {
-                        hir::ExprPath(struct_path)
+                        hir::ExprKind::Path(struct_path)
                     } else {
-                        hir::ExprStruct(struct_path, fields, None)
+                        hir::ExprKind::Struct(struct_path, fields, None)
                     },
                     span: unstable_span,
                     attrs: e.attrs.clone(),
                 };
             }
-            ExprKind::Path(ref qself, ref path) => hir::ExprPath(self.lower_qpath(
+            ExprKind::Path(ref qself, ref path) => hir::ExprKind::Path(self.lower_qpath(
                 e.id,
                 qself,
                 path,
@@ -3803,13 +3803,13 @@ impl<'a> LoweringContext<'a> {
                 } else {
                     self.lower_loop_destination(opt_label.map(|label| (e.id, label)))
                 };
-                hir::ExprBreak(
+                hir::ExprKind::Break(
                     destination,
                     opt_expr.as_ref().map(|x| P(self.lower_expr(x))),
                 )
             }
             ExprKind::Continue(opt_label) => {
-                hir::ExprContinue(if self.is_in_loop_condition && opt_label.is_none() {
+                hir::ExprKind::Continue(if self.is_in_loop_condition && opt_label.is_none() {
                     hir::Destination {
                         label: None,
                         target_id: Err(hir::LoopIdError::UnlabeledCfInWhileCondition).into(),
@@ -3818,7 +3818,7 @@ impl<'a> LoweringContext<'a> {
                     self.lower_loop_destination(opt_label.map(|label| (e.id, label)))
                 })
             }
-            ExprKind::Ret(ref e) => hir::ExprRet(e.as_ref().map(|x| P(self.lower_expr(x)))),
+            ExprKind::Ret(ref e) => hir::ExprKind::Ret(e.as_ref().map(|x| P(self.lower_expr(x)))),
             ExprKind::InlineAsm(ref asm) => {
                 let hir_asm = hir::InlineAsm {
                     inputs: asm.inputs.iter().map(|&(ref c, _)| c.clone()).collect(),
@@ -3846,9 +3846,9 @@ impl<'a> LoweringContext<'a> {
                     .iter()
                     .map(|&(_, ref input)| self.lower_expr(input))
                     .collect();
-                hir::ExprInlineAsm(P(hir_asm), outputs, inputs)
+                hir::ExprKind::InlineAsm(P(hir_asm), outputs, inputs)
             }
-            ExprKind::Struct(ref path, ref fields, ref maybe_expr) => hir::ExprStruct(
+            ExprKind::Struct(ref path, ref fields, ref maybe_expr) => hir::ExprKind::Struct(
                 self.lower_qpath(
                     e.id,
                     &None,
@@ -3877,8 +3877,10 @@ impl<'a> LoweringContext<'a> {
                 let expr = opt_expr
                     .as_ref()
                     .map(|x| self.lower_expr(x))
-                    .unwrap_or_else(|| self.expr(e.span, hir::ExprTup(hir_vec![]), ThinVec::new()));
-                hir::ExprYield(P(expr))
+                    .unwrap_or_else(||
+                    self.expr(e.span, hir::ExprKind::Tup(hir_vec![]), ThinVec::new())
+                );
+                hir::ExprKind::Yield(P(expr))
             }
 
             // Desugar ExprIfLet
@@ -3917,7 +3919,7 @@ impl<'a> LoweringContext<'a> {
 
                 let sub_expr = P(self.lower_expr(sub_expr));
 
-                hir::ExprMatch(
+                hir::ExprKind::Match(
                     sub_expr,
                     arms.into(),
                     hir::MatchSource::IfLetDesugar {
@@ -3965,13 +3967,13 @@ impl<'a> LoweringContext<'a> {
                 let arms = hir_vec![pat_arm, break_arm];
                 let match_expr = self.expr(
                     sub_expr.span,
-                    hir::ExprMatch(sub_expr, arms, hir::MatchSource::WhileLetDesugar),
+                    hir::ExprKind::Match(sub_expr, arms, hir::MatchSource::WhileLetDesugar),
                     ThinVec::new(),
                 );
 
                 // `[opt_ident]: loop { ... }`
                 let loop_block = P(self.block_expr(P(match_expr)));
-                let loop_expr = hir::ExprLoop(
+                let loop_expr = hir::ExprKind::Loop(
                     loop_block,
                     self.lower_label(opt_label),
                     hir::LoopSource::WhileLet,
@@ -3995,7 +3997,7 @@ impl<'a> LoweringContext<'a> {
                 //             ::std::option::Option::None => break
                 //           };
                 //           let <pat> = __next;
-                //           StmtExpr(<body>);
+                //           StmtKind::Expr(<body>);
                 //         }
                 //       }
                 //     };
@@ -4023,7 +4025,7 @@ impl<'a> LoweringContext<'a> {
                     let next_expr = P(self.expr_ident(pat.span, next_ident, next_pat.id));
                     let assign = P(self.expr(
                         pat.span,
-                        hir::ExprAssign(next_expr, val_expr),
+                        hir::ExprKind::Assign(next_expr, val_expr),
                         ThinVec::new(),
                     ));
                     let some_pat = self.pat_some(pat.span, val_pat);
@@ -4053,11 +4055,18 @@ impl<'a> LoweringContext<'a> {
 
                     P(self.expr(
                         head_sp,
-                        hir::ExprMatch(next_expr, arms, hir::MatchSource::ForLoopDesugar),
+                        hir::ExprKind::Match(
+                            next_expr,
+                            arms,
+                            hir::MatchSource::ForLoopDesugar
+                        ),
                         ThinVec::new(),
                     ))
                 };
-                let match_stmt = respan(head_sp, hir::StmtExpr(match_expr, self.next_id().node_id));
+                let match_stmt = respan(
+                    head_sp,
+                    hir::StmtKind::Expr(match_expr, self.next_id().node_id)
+                );
 
                 let next_expr = P(self.expr_ident(head_sp, next_ident, next_pat.id));
 
@@ -4076,7 +4085,10 @@ impl<'a> LoweringContext<'a> {
 
                 let body_block = self.with_loop_scope(e.id, |this| this.lower_block(body, false));
                 let body_expr = P(self.expr_block(body_block, ThinVec::new()));
-                let body_stmt = respan(body.span, hir::StmtExpr(body_expr, self.next_id().node_id));
+                let body_stmt = respan(
+                    body.span,
+                    hir::StmtKind::Expr(body_expr, self.next_id().node_id)
+                );
 
                 let loop_block = P(self.block_all(
                     e.span,
@@ -4085,7 +4097,7 @@ impl<'a> LoweringContext<'a> {
                 ));
 
                 // `[opt_ident]: loop { ... }`
-                let loop_expr = hir::ExprLoop(
+                let loop_expr = hir::ExprKind::Loop(
                     loop_block,
                     self.lower_label(opt_label),
                     hir::LoopSource::ForLoop,
@@ -4205,7 +4217,7 @@ impl<'a> LoweringContext<'a> {
                     let ret_expr = if let Some(catch_node) = catch_scope {
                         P(self.expr(
                             e.span,
-                            hir::ExprBreak(
+                            hir::ExprKind::Break(
                                 hir::Destination {
                                     label: None,
                                     target_id: Ok(catch_node),
@@ -4215,14 +4227,14 @@ impl<'a> LoweringContext<'a> {
                             thin_attrs,
                         ))
                     } else {
-                        P(self.expr(e.span, hir::Expr_::ExprRet(Some(from_err_expr)), thin_attrs))
+                        P(self.expr(e.span, hir::ExprKind::Ret(Some(from_err_expr)), thin_attrs))
                     };
 
                     let err_pat = self.pat_err(e.span, err_local);
                     self.arm(hir_vec![err_pat], ret_expr)
                 };
 
-                hir::ExprMatch(
+                hir::ExprKind::Match(
                     discr,
                     hir_vec![err_arm, ok_arm],
                     hir::MatchSource::TryDesugar,
@@ -4246,9 +4258,9 @@ impl<'a> LoweringContext<'a> {
     fn lower_stmt(&mut self, s: &Stmt) -> SmallVector<hir::Stmt> {
         SmallVector::one(match s.node {
             StmtKind::Local(ref l) => Spanned {
-                node: hir::StmtDecl(
+                node: hir::StmtKind::Decl(
                     P(Spanned {
-                        node: hir::DeclLocal(self.lower_local(l)),
+                        node: hir::DeclKind::Local(self.lower_local(l)),
                         span: s.span,
                     }),
                     self.lower_node_id(s.id).node_id,
@@ -4261,9 +4273,9 @@ impl<'a> LoweringContext<'a> {
                 return self.lower_item_id(it)
                     .into_iter()
                     .map(|item_id| Spanned {
-                        node: hir::StmtDecl(
+                        node: hir::StmtKind::Decl(
                             P(Spanned {
-                                node: hir::DeclItem(item_id),
+                                node: hir::DeclKind::Item(item_id),
                                 span: s.span,
                             }),
                             id.take()
@@ -4275,11 +4287,11 @@ impl<'a> LoweringContext<'a> {
                     .collect();
             }
             StmtKind::Expr(ref e) => Spanned {
-                node: hir::StmtExpr(P(self.lower_expr(e)), self.lower_node_id(s.id).node_id),
+                node: hir::StmtKind::Expr(P(self.lower_expr(e)), self.lower_node_id(s.id).node_id),
                 span: s.span,
             },
             StmtKind::Semi(ref e) => Spanned {
-                node: hir::StmtSemi(P(self.lower_expr(e)), self.lower_node_id(s.id).node_id),
+                node: hir::StmtKind::Semi(P(self.lower_expr(e)), self.lower_node_id(s.id).node_id),
                 span: s.span,
             },
             StmtKind::Mac(..) => panic!("Shouldn't exist here"),
@@ -4390,7 +4402,7 @@ impl<'a> LoweringContext<'a> {
     }
 
     fn expr_break(&mut self, span: Span, attrs: ThinVec<Attribute>) -> P<hir::Expr> {
-        let expr_break = hir::ExprBreak(self.lower_loop_destination(None), None);
+        let expr_break = hir::ExprKind::Break(self.lower_loop_destination(None), None);
         P(self.expr(span, expr_break, attrs))
     }
 
@@ -4400,7 +4412,7 @@ impl<'a> LoweringContext<'a> {
         e: P<hir::Expr>,
         args: hir::HirVec<hir::Expr>,
     ) -> hir::Expr {
-        self.expr(span, hir::ExprCall(e, args), ThinVec::new())
+        self.expr(span, hir::ExprKind::Call(e, args), ThinVec::new())
     }
 
     fn expr_ident(&mut self, span: Span, ident: Ident, binding: NodeId) -> hir::Expr {
@@ -4414,7 +4426,7 @@ impl<'a> LoweringContext<'a> {
         binding: NodeId,
         attrs: ThinVec<Attribute>,
     ) -> hir::Expr {
-        let expr_path = hir::ExprPath(hir::QPath::Resolved(
+        let expr_path = hir::ExprKind::Path(hir::QPath::Resolved(
             None,
             P(hir::Path {
                 span,
@@ -4427,7 +4439,7 @@ impl<'a> LoweringContext<'a> {
     }
 
     fn expr_mut_addr_of(&mut self, span: Span, e: P<hir::Expr>) -> hir::Expr {
-        self.expr(span, hir::ExprAddrOf(hir::MutMutable, e), ThinVec::new())
+        self.expr(span, hir::ExprKind::AddrOf(hir::MutMutable, e), ThinVec::new())
     }
 
     fn expr_std_path(
@@ -4440,7 +4452,7 @@ impl<'a> LoweringContext<'a> {
         let path = self.std_path(span, components, params, true);
         self.expr(
             span,
-            hir::ExprPath(hir::QPath::Resolved(None, P(path))),
+            hir::ExprKind::Path(hir::QPath::Resolved(None, P(path))),
             attrs,
         )
     }
@@ -4452,18 +4464,18 @@ impl<'a> LoweringContext<'a> {
         arms: hir::HirVec<hir::Arm>,
         source: hir::MatchSource,
     ) -> hir::Expr {
-        self.expr(span, hir::ExprMatch(arg, arms, source), ThinVec::new())
+        self.expr(span, hir::ExprKind::Match(arg, arms, source), ThinVec::new())
     }
 
     fn expr_block(&mut self, b: P<hir::Block>, attrs: ThinVec<Attribute>) -> hir::Expr {
-        self.expr(b.span, hir::ExprBlock(b, None), attrs)
+        self.expr(b.span, hir::ExprKind::Block(b, None), attrs)
     }
 
     fn expr_tuple(&mut self, sp: Span, exprs: hir::HirVec<hir::Expr>) -> P<hir::Expr> {
-        P(self.expr(sp, hir::ExprTup(exprs), ThinVec::new()))
+        P(self.expr(sp, hir::ExprKind::Tup(exprs), ThinVec::new()))
     }
 
-    fn expr(&mut self, span: Span, node: hir::Expr_, attrs: ThinVec<Attribute>) -> hir::Expr {
+    fn expr(&mut self, span: Span, node: hir::ExprKind, attrs: ThinVec<Attribute>) -> hir::Expr {
         let LoweredNodeId { node_id, hir_id } = self.next_id();
         hir::Expr {
             id: node_id,
@@ -4493,8 +4505,8 @@ impl<'a> LoweringContext<'a> {
             attrs: ThinVec::new(),
             source,
         });
-        let decl = respan(sp, hir::DeclLocal(local));
-        respan(sp, hir::StmtDecl(P(decl), self.next_id().node_id))
+        let decl = respan(sp, hir::DeclKind::Local(local));
+        respan(sp, hir::StmtKind::Decl(P(decl), self.next_id().node_id))
     }
 
     fn stmt_let(
@@ -4624,7 +4636,7 @@ impl<'a> LoweringContext<'a> {
         let mut id = id;
         let node = match qpath {
             hir::QPath::Resolved(None, path) => {
-                // Turn trait object paths into `TyTraitObject` instead.
+                // Turn trait object paths into `TyKind::TraitObject` instead.
                 if let Def::Trait(_) = path.def {
                     let principal = hir::PolyTraitRef {
                         bound_generic_params: hir::HirVec::new(),
@@ -4638,12 +4650,12 @@ impl<'a> LoweringContext<'a> {
                     // The original ID is taken by the `PolyTraitRef`,
                     // so the `Ty` itself needs a different one.
                     id = self.next_id();
-                    hir::TyTraitObject(hir_vec![principal], self.elided_dyn_bound(span))
+                    hir::TyKind::TraitObject(hir_vec![principal], self.elided_dyn_bound(span))
                 } else {
-                    hir::TyPath(hir::QPath::Resolved(None, path))
+                    hir::TyKind::Path(hir::QPath::Resolved(None, path))
                 }
             }
-            _ => hir::TyPath(qpath),
+            _ => hir::TyKind::Path(qpath),
         };
         hir::Ty {
             id: id.node_id,
diff --git a/src/librustc/hir/map/blocks.rs b/src/librustc/hir/map/blocks.rs
index 930db8b0ccc..5a595d14db7 100644
--- a/src/librustc/hir/map/blocks.rs
+++ b/src/librustc/hir/map/blocks.rs
@@ -34,7 +34,7 @@ use syntax_pos::Span;
 /// More specifically, it is one of either:
 ///
 ///   - A function item,
-///   - A closure expr (i.e. an ExprClosure), or
+///   - A closure expr (i.e. an ExprKind::Closure), or
 ///   - The default implementation for a trait method.
 ///
 /// To construct one, use the `Code::from_node` function.
@@ -47,7 +47,7 @@ pub trait MaybeFnLike { fn is_fn_like(&self) -> bool; }
 
 impl MaybeFnLike for ast::Item {
     fn is_fn_like(&self) -> bool {
-        match self.node { ast::ItemFn(..) => true, _ => false, }
+        match self.node { ast::ItemKind::Fn(..) => true, _ => false, }
     }
 }
 
@@ -63,7 +63,7 @@ impl MaybeFnLike for ast::TraitItem {
 impl MaybeFnLike for ast::Expr {
     fn is_fn_like(&self) -> bool {
         match self.node {
-            ast::ExprClosure(..) => true,
+            ast::ExprKind::Closure(..) => true,
             _ => false,
         }
     }
@@ -229,7 +229,7 @@ impl<'a> FnLikeNode<'a> {
     {
         match self.node {
             map::NodeItem(i) => match i.node {
-                ast::ItemFn(ref decl, header, ref generics, block) =>
+                ast::ItemKind::Fn(ref decl, header, ref generics, block) =>
                     item_fn(ItemFnParts {
                         id: i.id,
                         name: i.name,
@@ -260,7 +260,7 @@ impl<'a> FnLikeNode<'a> {
                 }
             },
             map::NodeExpr(e) => match e.node {
-                ast::ExprClosure(_, ref decl, block, _fn_decl_span, _gen) =>
+                ast::ExprKind::Closure(_, ref decl, block, _fn_decl_span, _gen) =>
                     closure(ClosureParts::new(&decl, block, e.id, e.span, &e.attrs)),
                 _ => bug!("expr FnLikeNode that is not fn-like"),
             },
diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs
index 3cc25bfd2d4..0150ba659c9 100644
--- a/src/librustc/hir/map/collector.rs
+++ b/src/librustc/hir/map/collector.rs
@@ -329,7 +329,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
             this.insert(i.id, NodeItem(i));
             this.with_parent(i.id, |this| {
                 match i.node {
-                    ItemStruct(ref struct_def, _) => {
+                    ItemKind::Struct(ref struct_def, _) => {
                         // If this is a tuple-like struct, register the constructor.
                         if !struct_def.is_struct() {
                             this.insert(struct_def.id(), NodeStructCtor(struct_def));
diff --git a/src/librustc/hir/map/hir_id_validator.rs b/src/librustc/hir/map/hir_id_validator.rs
index b90bca84ed6..656f325b4dd 100644
--- a/src/librustc/hir/map/hir_id_validator.rs
+++ b/src/librustc/hir/map/hir_id_validator.rs
@@ -179,7 +179,7 @@ impl<'a, 'hir: 'a> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
 
     fn visit_impl_item_ref(&mut self, _: &'hir hir::ImplItemRef) {
         // Explicitly do nothing here. ImplItemRefs contain hir::Visibility
-        // values that actually belong to an ImplItem instead of the ItemImpl
+        // values that actually belong to an ImplItem instead of the ItemKind::Impl
         // we are currently in. So for those it's correct that they have a
         // different owner.
     }
diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs
index 08a130f049b..d413a544c4e 100644
--- a/src/librustc/hir/map/mod.rs
+++ b/src/librustc/hir/map/mod.rs
@@ -33,6 +33,7 @@ use hir::svh::Svh;
 use util::nodemap::FxHashMap;
 
 use std::io;
+use std::result::Result::Err;
 use ty::TyCtxt;
 
 pub mod blocks;
@@ -174,7 +175,7 @@ impl<'hir> MapEntry<'hir> {
         match self {
             EntryItem(_, _, ref item) => {
                 match item.node {
-                    ItemFn(ref fn_decl, _, _, _) => Some(&fn_decl),
+                    ItemKind::Fn(ref fn_decl, _, _, _) => Some(&fn_decl),
                     _ => None,
                 }
             }
@@ -195,7 +196,7 @@ impl<'hir> MapEntry<'hir> {
 
             EntryExpr(_, _, ref expr) => {
                 match expr.node {
-                    ExprClosure(_, ref fn_decl, ..) => Some(&fn_decl),
+                    ExprKind::Closure(_, ref fn_decl, ..) => Some(&fn_decl),
                     _ => None,
                 }
             }
@@ -208,9 +209,9 @@ impl<'hir> MapEntry<'hir> {
         match self {
             EntryItem(_, _, item) => {
                 match item.node {
-                    ItemConst(_, body) |
-                    ItemStatic(.., body) |
-                    ItemFn(_, _, _, body) => Some(body),
+                    ItemKind::Const(_, body) |
+                    ItemKind::Static(.., body) |
+                    ItemKind::Fn(_, _, _, body) => Some(body),
                     _ => None,
                 }
             }
@@ -235,7 +236,7 @@ impl<'hir> MapEntry<'hir> {
 
             EntryExpr(_, _, expr) => {
                 match expr.node {
-                    ExprClosure(.., body, _, _) => Some(body),
+                    ExprKind::Closure(.., body, _, _) => Some(body),
                     _ => None,
                 }
             }
@@ -426,33 +427,33 @@ impl<'hir> Map<'hir> {
                 };
 
                 match item.node {
-                    ItemStatic(_, m, _) => Some(Def::Static(def_id(),
+                    ItemKind::Static(_, m, _) => Some(Def::Static(def_id(),
                                                             m == MutMutable)),
-                    ItemConst(..) => Some(Def::Const(def_id())),
-                    ItemFn(..) => Some(Def::Fn(def_id())),
-                    ItemMod(..) => Some(Def::Mod(def_id())),
-                    ItemGlobalAsm(..) => Some(Def::GlobalAsm(def_id())),
-                    ItemExistential(..) => Some(Def::Existential(def_id())),
-                    ItemTy(..) => Some(Def::TyAlias(def_id())),
-                    ItemEnum(..) => Some(Def::Enum(def_id())),
-                    ItemStruct(..) => Some(Def::Struct(def_id())),
-                    ItemUnion(..) => Some(Def::Union(def_id())),
-                    ItemTrait(..) => Some(Def::Trait(def_id())),
-                    ItemTraitAlias(..) => {
+                    ItemKind::Const(..) => Some(Def::Const(def_id())),
+                    ItemKind::Fn(..) => Some(Def::Fn(def_id())),
+                    ItemKind::Mod(..) => Some(Def::Mod(def_id())),
+                    ItemKind::GlobalAsm(..) => Some(Def::GlobalAsm(def_id())),
+                    ItemKind::Existential(..) => Some(Def::Existential(def_id())),
+                    ItemKind::Ty(..) => Some(Def::TyAlias(def_id())),
+                    ItemKind::Enum(..) => Some(Def::Enum(def_id())),
+                    ItemKind::Struct(..) => Some(Def::Struct(def_id())),
+                    ItemKind::Union(..) => Some(Def::Union(def_id())),
+                    ItemKind::Trait(..) => Some(Def::Trait(def_id())),
+                    ItemKind::TraitAlias(..) => {
                         bug!("trait aliases are not yet implemented (see issue #41517)")
                     },
-                    ItemExternCrate(_) |
-                    ItemUse(..) |
-                    ItemForeignMod(..) |
-                    ItemImpl(..) => None,
+                    ItemKind::ExternCrate(_) |
+                    ItemKind::Use(..) |
+                    ItemKind::ForeignMod(..) |
+                    ItemKind::Impl(..) => None,
                 }
             }
             NodeForeignItem(item) => {
                 let def_id = self.local_def_id(item.id);
                 match item.node {
-                    ForeignItemFn(..) => Some(Def::Fn(def_id)),
-                    ForeignItemStatic(_, m) => Some(Def::Static(def_id, m)),
-                    ForeignItemType => Some(Def::TyForeign(def_id)),
+                    ForeignItemKind::Fn(..) => Some(Def::Fn(def_id)),
+                    ForeignItemKind::Static(_, m) => Some(Def::Static(def_id, m)),
+                    ForeignItemKind::Type => Some(Def::TyForeign(def_id)),
                 }
             }
             NodeTraitItem(item) => {
@@ -586,13 +587,13 @@ impl<'hir> Map<'hir> {
 
     pub fn body_owner_kind(&self, id: NodeId) -> BodyOwnerKind {
         match self.get(id) {
-            NodeItem(&Item { node: ItemConst(..), .. }) |
+            NodeItem(&Item { node: ItemKind::Const(..), .. }) |
             NodeTraitItem(&TraitItem { node: TraitItemKind::Const(..), .. }) |
             NodeImplItem(&ImplItem { node: ImplItemKind::Const(..), .. }) |
             NodeAnonConst(_) => {
                 BodyOwnerKind::Const
             }
-            NodeItem(&Item { node: ItemStatic(_, m, _), .. }) => {
+            NodeItem(&Item { node: ItemKind::Static(_, m, _), .. }) => {
                 BodyOwnerKind::Static(m)
             }
             // Default to function if it's not a constant or static.
@@ -602,7 +603,7 @@ impl<'hir> Map<'hir> {
 
     pub fn ty_param_owner(&self, id: NodeId) -> NodeId {
         match self.get(id) {
-            NodeItem(&Item { node: ItemTrait(..), .. }) => id,
+            NodeItem(&Item { node: ItemKind::Trait(..), .. }) => id,
             NodeGenericParam(_) => self.get_parent_node(id),
             _ => {
                 bug!("ty_param_owner: {} not a type parameter",
@@ -613,7 +614,7 @@ impl<'hir> Map<'hir> {
 
     pub fn ty_param_name(&self, id: NodeId) -> Name {
         match self.get(id) {
-            NodeItem(&Item { node: ItemTrait(..), .. }) => {
+            NodeItem(&Item { node: ItemKind::Trait(..), .. }) => {
                 keywords::SelfType.name()
             }
             NodeGenericParam(param) => param.name.ident().name,
@@ -671,14 +672,14 @@ impl<'hir> Map<'hir> {
                 NodeTraitItem(ref trait_item) => Some(&trait_item.generics),
                 NodeItem(ref item) => {
                     match item.node {
-                        ItemFn(_, _, ref generics, _) |
-                        ItemTy(_, ref generics) |
-                        ItemEnum(_, ref generics) |
-                        ItemStruct(_, ref generics) |
-                        ItemUnion(_, ref generics) |
-                        ItemTrait(_, _, ref generics, ..) |
-                        ItemTraitAlias(ref generics, _) |
-                        ItemImpl(_, _, _, ref generics, ..) => Some(generics),
+                        ItemKind::Fn(_, _, ref generics, _) |
+                        ItemKind::Ty(_, ref generics) |
+                        ItemKind::Enum(_, ref generics) |
+                        ItemKind::Struct(_, ref generics) |
+                        ItemKind::Union(_, ref generics) |
+                        ItemKind::Trait(_, _, ref generics, ..) |
+                        ItemKind::TraitAlias(ref generics, _) |
+                        ItemKind::Impl(_, _, _, ref generics, ..) => Some(generics),
                         _ => None,
                     }
                 }
@@ -734,7 +735,7 @@ impl<'hir> Map<'hir> {
             Some(NodeImplItem(_)) => true,
             Some(NodeExpr(e)) => {
                 match e.node {
-                    ExprClosure(..) => true,
+                    ExprKind::Closure(..) => true,
                     _ => false,
                 }
             }
@@ -821,7 +822,7 @@ impl<'hir> Map<'hir> {
             match *node {
                 NodeExpr(ref expr) => {
                     match expr.node {
-                        ExprWhile(..) | ExprLoop(..) => true,
+                        ExprKind::While(..) | ExprKind::Loop(..) => true,
                         _ => false,
                     }
                 }
@@ -856,7 +857,7 @@ impl<'hir> Map<'hir> {
     /// module parent is in this map.
     pub fn get_module_parent(&self, id: NodeId) -> DefId {
         let id = match self.walk_parent_nodes(id, |node| match *node {
-            NodeItem(&Item { node: Item_::ItemMod(_), .. }) => true,
+            NodeItem(&Item { node: ItemKind::Mod(_), .. }) => true,
             _ => false,
         }, |_| false) {
             Ok(id) => id,
@@ -892,7 +893,7 @@ impl<'hir> Map<'hir> {
         let abi = match self.find_entry(parent) {
             Some(EntryItem(_, _, i)) => {
                 match i.node {
-                    ItemForeignMod(ref nm) => Some(nm.abi),
+                    ItemKind::ForeignMod(ref nm) => Some(nm.abi),
                     _ => None
                 }
             }
@@ -933,8 +934,8 @@ impl<'hir> Map<'hir> {
         match self.find(id) {
             Some(NodeItem(i)) => {
                 match i.node {
-                    ItemStruct(ref struct_def, _) |
-                    ItemUnion(ref struct_def, _) => struct_def,
+                    ItemKind::Struct(ref struct_def, _) |
+                    ItemKind::Union(ref struct_def, _) => struct_def,
                     _ => {
                         bug!("struct ID bound to non-struct {}",
                              self.node_to_string(id));
@@ -1128,7 +1129,7 @@ impl<'a, 'hir> NodesMatchingSuffix<'a, 'hir> {
 
             fn item_is_mod(item: &Item) -> bool {
                 match item.node {
-                    ItemMod(_) => true,
+                    ItemKind::Mod(_) => true,
                     _ => false,
                 }
             }
@@ -1176,7 +1177,7 @@ impl<T:Named> Named for Spanned<T> { fn name(&self) -> Name { self.node.name() }
 
 impl Named for Item { fn name(&self) -> Name { self.name } }
 impl Named for ForeignItem { fn name(&self) -> Name { self.name } }
-impl Named for Variant_ { fn name(&self) -> Name { self.name } }
+impl Named for VariantKind { fn name(&self) -> Name { self.name } }
 impl Named for StructField { fn name(&self) -> Name { self.ident.name } }
 impl Named for TraitItem { fn name(&self) -> Name { self.ident.name } }
 impl Named for ImplItem { fn name(&self) -> Name { self.ident.name } }
@@ -1313,22 +1314,22 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
     match map.find(id) {
         Some(NodeItem(item)) => {
             let item_str = match item.node {
-                ItemExternCrate(..) => "extern crate",
-                ItemUse(..) => "use",
-                ItemStatic(..) => "static",
-                ItemConst(..) => "const",
-                ItemFn(..) => "fn",
-                ItemMod(..) => "mod",
-                ItemForeignMod(..) => "foreign mod",
-                ItemGlobalAsm(..) => "global asm",
-                ItemTy(..) => "ty",
-                ItemExistential(..) => "existential",
-                ItemEnum(..) => "enum",
-                ItemStruct(..) => "struct",
-                ItemUnion(..) => "union",
-                ItemTrait(..) => "trait",
-                ItemTraitAlias(..) => "trait alias",
-                ItemImpl(..) => "impl",
+                ItemKind::ExternCrate(..) => "extern crate",
+                ItemKind::Use(..) => "use",
+                ItemKind::Static(..) => "static",
+                ItemKind::Const(..) => "const",
+                ItemKind::Fn(..) => "fn",
+                ItemKind::Mod(..) => "mod",
+                ItemKind::ForeignMod(..) => "foreign mod",
+                ItemKind::GlobalAsm(..) => "global asm",
+                ItemKind::Ty(..) => "ty",
+                ItemKind::Existential(..) => "existential",
+                ItemKind::Enum(..) => "enum",
+                ItemKind::Struct(..) => "struct",
+                ItemKind::Union(..) => "union",
+                ItemKind::Trait(..) => "trait",
+                ItemKind::TraitAlias(..) => "trait alias",
+                ItemKind::Impl(..) => "impl",
             };
             format!("{} {}{}", item_str, path_str(), id_str)
         }
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs
index bf83fa15727..c1a885d80bf 100644
--- a/src/librustc/hir/mod.rs
+++ b/src/librustc/hir/mod.rs
@@ -10,18 +10,11 @@
 
 // The Rust HIR.
 
-pub use self::BinOp_::*;
 pub use self::BlockCheckMode::*;
 pub use self::CaptureClause::*;
-pub use self::Decl_::*;
-pub use self::Expr_::*;
 pub use self::FunctionRetTy::*;
-pub use self::ForeignItem_::*;
-pub use self::Item_::*;
 pub use self::Mutability::*;
 pub use self::PrimTy::*;
-pub use self::Stmt_::*;
-pub use self::Ty_::*;
 pub use self::UnOp::*;
 pub use self::UnsafeSource::*;
 
@@ -443,7 +436,7 @@ impl GenericArgs {
                 match arg {
                     GenericArg::Lifetime(_) => {}
                     GenericArg::Type(ref ty) => {
-                        if let TyTup(ref tys) = ty.node {
+                        if let TyKind::Tup(ref tys) = ty.node {
                             return tys;
                         }
                         break;
@@ -941,98 +934,103 @@ impl Mutability {
 }
 
 #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy, Hash)]
-pub enum BinOp_ {
+pub enum BinOpKind {
     /// The `+` operator (addition)
-    BiAdd,
+    Add,
     /// The `-` operator (subtraction)
-    BiSub,
+    Sub,
     /// The `*` operator (multiplication)
-    BiMul,
+    Mul,
     /// The `/` operator (division)
-    BiDiv,
+    Div,
     /// The `%` operator (modulus)
-    BiRem,
+    Rem,
     /// The `&&` operator (logical and)
-    BiAnd,
+    And,
     /// The `||` operator (logical or)
-    BiOr,
+    Or,
     /// The `^` operator (bitwise xor)
-    BiBitXor,
+    BitXor,
     /// The `&` operator (bitwise and)
-    BiBitAnd,
+    BitAnd,
     /// The `|` operator (bitwise or)
-    BiBitOr,
+    BitOr,
     /// The `<<` operator (shift left)
-    BiShl,
+    Shl,
     /// The `>>` operator (shift right)
-    BiShr,
+    Shr,
     /// The `==` operator (equality)
-    BiEq,
+    Eq,
     /// The `<` operator (less than)
-    BiLt,
+    Lt,
     /// The `<=` operator (less than or equal to)
-    BiLe,
+    Le,
     /// The `!=` operator (not equal to)
-    BiNe,
+    Ne,
     /// The `>=` operator (greater than or equal to)
-    BiGe,
+    Ge,
     /// The `>` operator (greater than)
-    BiGt,
+    Gt,
 }
 
-impl BinOp_ {
+impl BinOpKind {
     pub fn as_str(self) -> &'static str {
         match self {
-            BiAdd => "+",
-            BiSub => "-",
-            BiMul => "*",
-            BiDiv => "/",
-            BiRem => "%",
-            BiAnd => "&&",
-            BiOr => "||",
-            BiBitXor => "^",
-            BiBitAnd => "&",
-            BiBitOr => "|",
-            BiShl => "<<",
-            BiShr => ">>",
-            BiEq => "==",
-            BiLt => "<",
-            BiLe => "<=",
-            BiNe => "!=",
-            BiGe => ">=",
-            BiGt => ">",
+            BinOpKind::Add => "+",
+            BinOpKind::Sub => "-",
+            BinOpKind::Mul => "*",
+            BinOpKind::Div => "/",
+            BinOpKind::Rem => "%",
+            BinOpKind::And => "&&",
+            BinOpKind::Or => "||",
+            BinOpKind::BitXor => "^",
+            BinOpKind::BitAnd => "&",
+            BinOpKind::BitOr => "|",
+            BinOpKind::Shl => "<<",
+            BinOpKind::Shr => ">>",
+            BinOpKind::Eq => "==",
+            BinOpKind::Lt => "<",
+            BinOpKind::Le => "<=",
+            BinOpKind::Ne => "!=",
+            BinOpKind::Ge => ">=",
+            BinOpKind::Gt => ">",
         }
     }
 
     pub fn is_lazy(self) -> bool {
         match self {
-            BiAnd | BiOr => true,
+            BinOpKind::And | BinOpKind::Or => true,
             _ => false,
         }
     }
 
     pub fn is_shift(self) -> bool {
         match self {
-            BiShl | BiShr => true,
+            BinOpKind::Shl | BinOpKind::Shr => true,
             _ => false,
         }
     }
 
     pub fn is_comparison(self) -> bool {
         match self {
-            BiEq | BiLt | BiLe | BiNe | BiGt | BiGe => true,
-            BiAnd |
-            BiOr |
-            BiAdd |
-            BiSub |
-            BiMul |
-            BiDiv |
-            BiRem |
-            BiBitXor |
-            BiBitAnd |
-            BiBitOr |
-            BiShl |
-            BiShr => false,
+            BinOpKind::Eq |
+            BinOpKind::Lt |
+            BinOpKind::Le |
+            BinOpKind::Ne |
+            BinOpKind::Gt |
+            BinOpKind::Ge => true,
+            BinOpKind::And |
+            BinOpKind::Or |
+            BinOpKind::Add |
+            BinOpKind::Sub |
+            BinOpKind::Mul |
+            BinOpKind::Div |
+            BinOpKind::Rem |
+            BinOpKind::BitXor |
+            BinOpKind::BitAnd |
+            BinOpKind::BitOr |
+            BinOpKind::Shl |
+            BinOpKind::Shr => false,
         }
     }
 
@@ -1042,32 +1040,32 @@ impl BinOp_ {
     }
 }
 
-impl Into<ast::BinOpKind> for BinOp_ {
+impl Into<ast::BinOpKind> for BinOpKind {
     fn into(self) -> ast::BinOpKind {
         match self {
-            BiAdd => ast::BinOpKind::Add,
-            BiSub => ast::BinOpKind::Sub,
-            BiMul => ast::BinOpKind::Mul,
-            BiDiv => ast::BinOpKind::Div,
-            BiRem => ast::BinOpKind::Rem,
-            BiAnd => ast::BinOpKind::And,
-            BiOr => ast::BinOpKind::Or,
-            BiBitXor => ast::BinOpKind::BitXor,
-            BiBitAnd => ast::BinOpKind::BitAnd,
-            BiBitOr => ast::BinOpKind::BitOr,
-            BiShl => ast::BinOpKind::Shl,
-            BiShr => ast::BinOpKind::Shr,
-            BiEq => ast::BinOpKind::Eq,
-            BiLt => ast::BinOpKind::Lt,
-            BiLe => ast::BinOpKind::Le,
-            BiNe => ast::BinOpKind::Ne,
-            BiGe => ast::BinOpKind::Ge,
-            BiGt => ast::BinOpKind::Gt,
+            BinOpKind::Add => ast::BinOpKind::Add,
+            BinOpKind::Sub => ast::BinOpKind::Sub,
+            BinOpKind::Mul => ast::BinOpKind::Mul,
+            BinOpKind::Div => ast::BinOpKind::Div,
+            BinOpKind::Rem => ast::BinOpKind::Rem,
+            BinOpKind::And => ast::BinOpKind::And,
+            BinOpKind::Or => ast::BinOpKind::Or,
+            BinOpKind::BitXor => ast::BinOpKind::BitXor,
+            BinOpKind::BitAnd => ast::BinOpKind::BitAnd,
+            BinOpKind::BitOr => ast::BinOpKind::BitOr,
+            BinOpKind::Shl => ast::BinOpKind::Shl,
+            BinOpKind::Shr => ast::BinOpKind::Shr,
+            BinOpKind::Eq => ast::BinOpKind::Eq,
+            BinOpKind::Lt => ast::BinOpKind::Lt,
+            BinOpKind::Le => ast::BinOpKind::Le,
+            BinOpKind::Ne => ast::BinOpKind::Ne,
+            BinOpKind::Ge => ast::BinOpKind::Ge,
+            BinOpKind::Gt => ast::BinOpKind::Gt,
         }
     }
 }
 
-pub type BinOp = Spanned<BinOp_>;
+pub type BinOp = Spanned<BinOpKind>;
 
 #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy, Hash)]
 pub enum UnOp {
@@ -1098,9 +1096,9 @@ impl UnOp {
 }
 
 /// A statement
-pub type Stmt = Spanned<Stmt_>;
+pub type Stmt = Spanned<StmtKind>;
 
-impl fmt::Debug for Stmt_ {
+impl fmt::Debug for StmtKind {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         // Sadness.
         let spanned = codemap::dummy_spanned(self.clone());
@@ -1112,31 +1110,31 @@ impl fmt::Debug for Stmt_ {
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable)]
-pub enum Stmt_ {
+pub enum StmtKind {
     /// Could be an item or a local (let) binding:
-    StmtDecl(P<Decl>, NodeId),
+    Decl(P<Decl>, NodeId),
 
     /// Expr without trailing semi-colon (must have unit type):
-    StmtExpr(P<Expr>, NodeId),
+    Expr(P<Expr>, NodeId),
 
     /// Expr with trailing semi-colon (may have any type):
-    StmtSemi(P<Expr>, NodeId),
+    Semi(P<Expr>, NodeId),
 }
 
-impl Stmt_ {
+impl StmtKind {
     pub fn attrs(&self) -> &[Attribute] {
         match *self {
-            StmtDecl(ref d, _) => d.node.attrs(),
-            StmtExpr(ref e, _) |
-            StmtSemi(ref e, _) => &e.attrs,
+            StmtKind::Decl(ref d, _) => d.node.attrs(),
+            StmtKind::Expr(ref e, _) |
+            StmtKind::Semi(ref e, _) => &e.attrs,
         }
     }
 
     pub fn id(&self) -> NodeId {
         match *self {
-            StmtDecl(_, id) => id,
-            StmtExpr(_, id) => id,
-            StmtSemi(_, id) => id,
+            StmtKind::Decl(_, id) => id,
+            StmtKind::Expr(_, id) => id,
+            StmtKind::Semi(_, id) => id,
         }
     }
 }
@@ -1155,27 +1153,27 @@ pub struct Local {
     pub source: LocalSource,
 }
 
-pub type Decl = Spanned<Decl_>;
+pub type Decl = Spanned<DeclKind>;
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub enum Decl_ {
+pub enum DeclKind {
     /// A local (let) binding:
-    DeclLocal(P<Local>),
+    Local(P<Local>),
     /// An item binding:
-    DeclItem(ItemId),
+    Item(ItemId),
 }
 
-impl Decl_ {
+impl DeclKind {
     pub fn attrs(&self) -> &[Attribute] {
         match *self {
-            DeclLocal(ref l) => &l.attrs,
-            DeclItem(_) => &[]
+            DeclKind::Local(ref l) => &l.attrs,
+            DeclKind::Item(_) => &[]
         }
     }
 
     pub fn is_local(&self) -> bool {
         match *self {
-            Decl_::DeclLocal(_) => true,
+            DeclKind::Local(_) => true,
             _ => false,
         }
     }
@@ -1283,7 +1281,7 @@ pub struct AnonConst {
 pub struct Expr {
     pub id: NodeId,
     pub span: Span,
-    pub node: Expr_,
+    pub node: ExprKind,
     pub attrs: ThinVec<Attribute>,
     pub hir_id: HirId,
 }
@@ -1291,34 +1289,34 @@ pub struct Expr {
 impl Expr {
     pub fn precedence(&self) -> ExprPrecedence {
         match self.node {
-            ExprBox(_) => ExprPrecedence::Box,
-            ExprArray(_) => ExprPrecedence::Array,
-            ExprCall(..) => ExprPrecedence::Call,
-            ExprMethodCall(..) => ExprPrecedence::MethodCall,
-            ExprTup(_) => ExprPrecedence::Tup,
-            ExprBinary(op, ..) => ExprPrecedence::Binary(op.node.into()),
-            ExprUnary(..) => ExprPrecedence::Unary,
-            ExprLit(_) => ExprPrecedence::Lit,
-            ExprType(..) | ExprCast(..) => ExprPrecedence::Cast,
-            ExprIf(..) => ExprPrecedence::If,
-            ExprWhile(..) => ExprPrecedence::While,
-            ExprLoop(..) => ExprPrecedence::Loop,
-            ExprMatch(..) => ExprPrecedence::Match,
-            ExprClosure(..) => ExprPrecedence::Closure,
-            ExprBlock(..) => ExprPrecedence::Block,
-            ExprAssign(..) => ExprPrecedence::Assign,
-            ExprAssignOp(..) => ExprPrecedence::AssignOp,
-            ExprField(..) => ExprPrecedence::Field,
-            ExprIndex(..) => ExprPrecedence::Index,
-            ExprPath(..) => ExprPrecedence::Path,
-            ExprAddrOf(..) => ExprPrecedence::AddrOf,
-            ExprBreak(..) => ExprPrecedence::Break,
-            ExprContinue(..) => ExprPrecedence::Continue,
-            ExprRet(..) => ExprPrecedence::Ret,
-            ExprInlineAsm(..) => ExprPrecedence::InlineAsm,
-            ExprStruct(..) => ExprPrecedence::Struct,
-            ExprRepeat(..) => ExprPrecedence::Repeat,
-            ExprYield(..) => ExprPrecedence::Yield,
+            ExprKind::Box(_) => ExprPrecedence::Box,
+            ExprKind::Array(_) => ExprPrecedence::Array,
+            ExprKind::Call(..) => ExprPrecedence::Call,
+            ExprKind::MethodCall(..) => ExprPrecedence::MethodCall,
+            ExprKind::Tup(_) => ExprPrecedence::Tup,
+            ExprKind::Binary(op, ..) => ExprPrecedence::Binary(op.node.into()),
+            ExprKind::Unary(..) => ExprPrecedence::Unary,
+            ExprKind::Lit(_) => ExprPrecedence::Lit,
+            ExprKind::Type(..) | ExprKind::Cast(..) => ExprPrecedence::Cast,
+            ExprKind::If(..) => ExprPrecedence::If,
+            ExprKind::While(..) => ExprPrecedence::While,
+            ExprKind::Loop(..) => ExprPrecedence::Loop,
+            ExprKind::Match(..) => ExprPrecedence::Match,
+            ExprKind::Closure(..) => ExprPrecedence::Closure,
+            ExprKind::Block(..) => ExprPrecedence::Block,
+            ExprKind::Assign(..) => ExprPrecedence::Assign,
+            ExprKind::AssignOp(..) => ExprPrecedence::AssignOp,
+            ExprKind::Field(..) => ExprPrecedence::Field,
+            ExprKind::Index(..) => ExprPrecedence::Index,
+            ExprKind::Path(..) => ExprPrecedence::Path,
+            ExprKind::AddrOf(..) => ExprPrecedence::AddrOf,
+            ExprKind::Break(..) => ExprPrecedence::Break,
+            ExprKind::Continue(..) => ExprPrecedence::Continue,
+            ExprKind::Ret(..) => ExprPrecedence::Ret,
+            ExprKind::InlineAsm(..) => ExprPrecedence::InlineAsm,
+            ExprKind::Struct(..) => ExprPrecedence::Struct,
+            ExprKind::Repeat(..) => ExprPrecedence::Repeat,
+            ExprKind::Yield(..) => ExprPrecedence::Yield,
         }
     }
 }
@@ -1331,18 +1329,18 @@ impl fmt::Debug for Expr {
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub enum Expr_ {
+pub enum ExprKind {
     /// A `box x` expression.
-    ExprBox(P<Expr>),
+    Box(P<Expr>),
     /// An array (`[a, b, c, d]`)
-    ExprArray(HirVec<Expr>),
+    Array(HirVec<Expr>),
     /// A function call
     ///
-    /// The first field resolves to the function itself (usually an `ExprPath`),
+    /// The first field resolves to the function itself (usually an `ExprKind::Path`),
     /// and the second field is the list of arguments.
     /// This also represents calling the constructor of
     /// tuple-like ADTs such as tuple structs and enum variants.
-    ExprCall(P<Expr>, HirVec<Expr>),
+    Call(P<Expr>, HirVec<Expr>),
     /// A method call (`x.foo::<'static, Bar, Baz>(a, b, c, d)`)
     ///
     /// The `PathSegment`/`Span` represent the method name and its generic arguments
@@ -1352,83 +1350,83 @@ pub enum Expr_ {
     /// and the remaining elements are the rest of the arguments.
     /// Thus, `x.foo::<Bar, Baz>(a, b, c, d)` is represented as
     /// `ExprKind::MethodCall(PathSegment { foo, [Bar, Baz] }, [x, a, b, c, d])`.
-    ExprMethodCall(PathSegment, Span, HirVec<Expr>),
+    MethodCall(PathSegment, Span, HirVec<Expr>),
     /// A tuple (`(a, b, c ,d)`)
-    ExprTup(HirVec<Expr>),
+    Tup(HirVec<Expr>),
     /// A binary operation (For example: `a + b`, `a * b`)
-    ExprBinary(BinOp, P<Expr>, P<Expr>),
+    Binary(BinOp, P<Expr>, P<Expr>),
     /// A unary operation (For example: `!x`, `*x`)
-    ExprUnary(UnOp, P<Expr>),
+    Unary(UnOp, P<Expr>),
     /// A literal (For example: `1`, `"foo"`)
-    ExprLit(P<Lit>),
+    Lit(P<Lit>),
     /// A cast (`foo as f64`)
-    ExprCast(P<Expr>, P<Ty>),
-    ExprType(P<Expr>, P<Ty>),
+    Cast(P<Expr>, P<Ty>),
+    Type(P<Expr>, P<Ty>),
     /// An `if` block, with an optional else block
     ///
     /// `if expr { expr } else { expr }`
-    ExprIf(P<Expr>, P<Expr>, Option<P<Expr>>),
+    If(P<Expr>, P<Expr>, Option<P<Expr>>),
     /// A while loop, with an optional label
     ///
     /// `'label: while expr { block }`
-    ExprWhile(P<Expr>, P<Block>, Option<Label>),
+    While(P<Expr>, P<Block>, Option<Label>),
     /// Conditionless loop (can be exited with break, continue, or return)
     ///
     /// `'label: loop { block }`
-    ExprLoop(P<Block>, Option<Label>, LoopSource),
+    Loop(P<Block>, Option<Label>, LoopSource),
     /// A `match` block, with a source that indicates whether or not it is
     /// the result of a desugaring, and if so, which kind.
-    ExprMatch(P<Expr>, HirVec<Arm>, MatchSource),
+    Match(P<Expr>, HirVec<Arm>, MatchSource),
     /// A closure (for example, `move |a, b, c| {a + b + c}`).
     ///
     /// The final span is the span of the argument block `|...|`
     ///
     /// This may also be a generator literal, indicated by the final boolean,
     /// in that case there is an GeneratorClause.
-    ExprClosure(CaptureClause, P<FnDecl>, BodyId, Span, Option<GeneratorMovability>),
+    Closure(CaptureClause, P<FnDecl>, BodyId, Span, Option<GeneratorMovability>),
     /// A block (`'label: { ... }`)
-    ExprBlock(P<Block>, Option<Label>),
+    Block(P<Block>, Option<Label>),
 
     /// An assignment (`a = foo()`)
-    ExprAssign(P<Expr>, P<Expr>),
+    Assign(P<Expr>, P<Expr>),
     /// An assignment with an operator
     ///
     /// For example, `a += 1`.
-    ExprAssignOp(BinOp, P<Expr>, P<Expr>),
+    AssignOp(BinOp, P<Expr>, P<Expr>),
     /// Access of a named (`obj.foo`) or unnamed (`obj.0`) struct or tuple field
-    ExprField(P<Expr>, Ident),
+    Field(P<Expr>, Ident),
     /// An indexing operation (`foo[2]`)
-    ExprIndex(P<Expr>, P<Expr>),
+    Index(P<Expr>, P<Expr>),
 
     /// Path to a definition, possibly containing lifetime or type parameters.
-    ExprPath(QPath),
+    Path(QPath),
 
     /// A referencing operation (`&a` or `&mut a`)
-    ExprAddrOf(Mutability, P<Expr>),
+    AddrOf(Mutability, P<Expr>),
     /// A `break`, with an optional label to break
-    ExprBreak(Destination, Option<P<Expr>>),
+    Break(Destination, Option<P<Expr>>),
     /// A `continue`, with an optional label
-    ExprContinue(Destination),
+    Continue(Destination),
     /// A `return`, with an optional value to be returned
-    ExprRet(Option<P<Expr>>),
+    Ret(Option<P<Expr>>),
 
     /// Inline assembly (from `asm!`), with its outputs and inputs.
-    ExprInlineAsm(P<InlineAsm>, HirVec<Expr>, HirVec<Expr>),
+    InlineAsm(P<InlineAsm>, HirVec<Expr>, HirVec<Expr>),
 
     /// A struct or struct-like variant literal expression.
     ///
     /// For example, `Foo {x: 1, y: 2}`, or
     /// `Foo {x: 1, .. base}`, where `base` is the `Option<Expr>`.
-    ExprStruct(QPath, HirVec<Field>, Option<P<Expr>>),
+    Struct(QPath, HirVec<Field>, Option<P<Expr>>),
 
     /// An array literal constructed from one repeated element.
     ///
     /// For example, `[1; 5]`. The first expression is the element
     /// to be repeated; the second is the number of times to repeat it.
-    ExprRepeat(P<Expr>, AnonConst),
+    Repeat(P<Expr>, AnonConst),
 
     /// A suspension point for generators. This is `yield <expr>` in Rust.
-    ExprYield(P<Expr>),
+    Yield(P<Expr>),
 }
 
 /// Optionally `Self`-qualified value/type path or associated extension.
@@ -1447,7 +1445,7 @@ pub enum QPath {
     ///
     /// UFCS source paths can desugar into this, with `Vec::new` turning into
     /// `<Vec>::new`, and `T::X::Y::method` into `<<<T>::X>::Y>::method`,
-    /// the `X` and `Y` nodes each being a `TyPath(QPath::TypeRelative(..))`.
+    /// the `X` and `Y` nodes each being a `TyKind::Path(QPath::TypeRelative(..))`.
     TypeRelative(P<Ty>, P<PathSegment>)
 }
 
@@ -1478,7 +1476,7 @@ pub enum MatchSource {
     TryDesugar,
 }
 
-/// The loop type that yielded an ExprLoop
+/// The loop type that yielded an ExprKind::Loop
 #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy)]
 pub enum LoopSource {
     /// A `loop { .. }` loop
@@ -1637,7 +1635,7 @@ pub struct TypeBinding {
 #[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Ty {
     pub id: NodeId,
-    pub node: Ty_,
+    pub node: TyKind,
     pub span: Span,
     pub hir_id: HirId,
 }
@@ -1678,36 +1676,36 @@ pub struct ExistTy {
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
 /// The different kinds of types recognized by the compiler
-pub enum Ty_ {
+pub enum TyKind {
     /// A variable length slice (`[T]`)
-    TySlice(P<Ty>),
+    Slice(P<Ty>),
     /// A fixed length array (`[T; n]`)
-    TyArray(P<Ty>, AnonConst),
+    Array(P<Ty>, AnonConst),
     /// A raw pointer (`*const T` or `*mut T`)
-    TyPtr(MutTy),
+    Ptr(MutTy),
     /// A reference (`&'a T` or `&'a mut T`)
-    TyRptr(Lifetime, MutTy),
+    Rptr(Lifetime, MutTy),
     /// A bare function (e.g. `fn(usize) -> bool`)
-    TyBareFn(P<BareFnTy>),
+    BareFn(P<BareFnTy>),
     /// The never type (`!`)
-    TyNever,
+    Never,
     /// A tuple (`(A, B, C, D,...)`)
-    TyTup(HirVec<Ty>),
+    Tup(HirVec<Ty>),
     /// A path to a type definition (`module::module::...::Type`), or an
     /// associated type, e.g. `<Vec<T> as Trait>::Type` or `<T>::Target`.
     ///
     /// Type parameters may be stored in each `PathSegment`.
-    TyPath(QPath),
+    Path(QPath),
     /// A trait object type `Bound1 + Bound2 + Bound3`
     /// where `Bound` is a trait or a lifetime.
-    TyTraitObject(HirVec<PolyTraitRef>, Lifetime),
+    TraitObject(HirVec<PolyTraitRef>, Lifetime),
     /// Unused for now
-    TyTypeof(AnonConst),
-    /// TyInfer means the type should be inferred instead of it having been
+    Typeof(AnonConst),
+    /// TyKind::Infer means the type should be inferred instead of it having been
     /// specified. This can appear anywhere in a type.
-    TyInfer,
+    Infer,
     /// Placeholder for a type that has failed to be defined.
-    TyErr,
+    Err,
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
@@ -1876,7 +1874,7 @@ pub struct EnumDef {
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub struct Variant_ {
+pub struct VariantKind {
     pub name: Name,
     pub attrs: HirVec<Attribute>,
     pub data: VariantData,
@@ -1884,7 +1882,7 @@ pub struct Variant_ {
     pub disr_expr: Option<AnonConst>,
 }
 
-pub type Variant = Spanned<Variant_>;
+pub type Variant = Spanned<VariantKind>;
 
 #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable, Debug)]
 pub enum UseKind {
@@ -2041,7 +2039,7 @@ pub struct Item {
     pub id: NodeId,
     pub hir_id: HirId,
     pub attrs: HirVec<Attribute>,
-    pub node: Item_,
+    pub node: ItemKind,
     pub vis: Visibility,
     pub span: Span,
 }
@@ -2055,96 +2053,96 @@ pub struct FnHeader {
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub enum Item_ {
+pub enum ItemKind {
     /// An `extern crate` item, with optional *original* crate name if the crate was renamed.
     ///
     /// E.g. `extern crate foo` or `extern crate foo_bar as foo`
-    ItemExternCrate(Option<Name>),
+    ExternCrate(Option<Name>),
 
     /// `use foo::bar::*;` or `use foo::bar::baz as quux;`
     ///
     /// or just
     ///
     /// `use foo::bar::baz;` (with `as baz` implicitly on the right)
-    ItemUse(P<Path>, UseKind),
+    Use(P<Path>, UseKind),
 
     /// A `static` item
-    ItemStatic(P<Ty>, Mutability, BodyId),
+    Static(P<Ty>, Mutability, BodyId),
     /// A `const` item
-    ItemConst(P<Ty>, BodyId),
+    Const(P<Ty>, BodyId),
     /// A function declaration
-    ItemFn(P<FnDecl>, FnHeader, Generics, BodyId),
+    Fn(P<FnDecl>, FnHeader, Generics, BodyId),
     /// A module
-    ItemMod(Mod),
+    Mod(Mod),
     /// An external module
-    ItemForeignMod(ForeignMod),
+    ForeignMod(ForeignMod),
     /// Module-level inline assembly (from global_asm!)
-    ItemGlobalAsm(P<GlobalAsm>),
+    GlobalAsm(P<GlobalAsm>),
     /// A type alias, e.g. `type Foo = Bar<u8>`
-    ItemTy(P<Ty>, Generics),
+    Ty(P<Ty>, Generics),
     /// A type alias, e.g. `type Foo = Bar<u8>`
-    ItemExistential(ExistTy),
+    Existential(ExistTy),
     /// An enum definition, e.g. `enum Foo<A, B> {C<A>, D<B>}`
-    ItemEnum(EnumDef, Generics),
+    Enum(EnumDef, Generics),
     /// A struct definition, e.g. `struct Foo<A> {x: A}`
-    ItemStruct(VariantData, Generics),
+    Struct(VariantData, Generics),
     /// A union definition, e.g. `union Foo<A, B> {x: A, y: B}`
-    ItemUnion(VariantData, Generics),
+    Union(VariantData, Generics),
     /// Represents a Trait Declaration
-    ItemTrait(IsAuto, Unsafety, Generics, GenericBounds, HirVec<TraitItemRef>),
+    Trait(IsAuto, Unsafety, Generics, GenericBounds, HirVec<TraitItemRef>),
     /// Represents a Trait Alias Declaration
-    ItemTraitAlias(Generics, GenericBounds),
+    TraitAlias(Generics, GenericBounds),
 
     /// An implementation, eg `impl<A> Trait for Foo { .. }`
-    ItemImpl(Unsafety,
-             ImplPolarity,
-             Defaultness,
-             Generics,
-             Option<TraitRef>, // (optional) trait this impl implements
-             P<Ty>, // self
-             HirVec<ImplItemRef>),
+    Impl(Unsafety,
+         ImplPolarity,
+         Defaultness,
+         Generics,
+         Option<TraitRef>, // (optional) trait this impl implements
+         P<Ty>, // self
+         HirVec<ImplItemRef>),
 }
 
-impl Item_ {
+impl ItemKind {
     pub fn descriptive_variant(&self) -> &str {
         match *self {
-            ItemExternCrate(..) => "extern crate",
-            ItemUse(..) => "use",
-            ItemStatic(..) => "static item",
-            ItemConst(..) => "constant item",
-            ItemFn(..) => "function",
-            ItemMod(..) => "module",
-            ItemForeignMod(..) => "foreign module",
-            ItemGlobalAsm(..) => "global asm",
-            ItemTy(..) => "type alias",
-            ItemExistential(..) => "existential type",
-            ItemEnum(..) => "enum",
-            ItemStruct(..) => "struct",
-            ItemUnion(..) => "union",
-            ItemTrait(..) => "trait",
-            ItemTraitAlias(..) => "trait alias",
-            ItemImpl(..) => "item",
+            ItemKind::ExternCrate(..) => "extern crate",
+            ItemKind::Use(..) => "use",
+            ItemKind::Static(..) => "static item",
+            ItemKind::Const(..) => "constant item",
+            ItemKind::Fn(..) => "function",
+            ItemKind::Mod(..) => "module",
+            ItemKind::ForeignMod(..) => "foreign module",
+            ItemKind::GlobalAsm(..) => "global asm",
+            ItemKind::Ty(..) => "type alias",
+            ItemKind::Existential(..) => "existential type",
+            ItemKind::Enum(..) => "enum",
+            ItemKind::Struct(..) => "struct",
+            ItemKind::Union(..) => "union",
+            ItemKind::Trait(..) => "trait",
+            ItemKind::TraitAlias(..) => "trait alias",
+            ItemKind::Impl(..) => "item",
         }
     }
 
     pub fn adt_kind(&self) -> Option<AdtKind> {
         match *self {
-            ItemStruct(..) => Some(AdtKind::Struct),
-            ItemUnion(..) => Some(AdtKind::Union),
-            ItemEnum(..) => Some(AdtKind::Enum),
+            ItemKind::Struct(..) => Some(AdtKind::Struct),
+            ItemKind::Union(..) => Some(AdtKind::Union),
+            ItemKind::Enum(..) => Some(AdtKind::Enum),
             _ => None,
         }
     }
 
     pub fn generics(&self) -> Option<&Generics> {
         Some(match *self {
-            ItemFn(_, _, ref generics, _) |
-            ItemTy(_, ref generics) |
-            ItemEnum(_, ref generics) |
-            ItemStruct(_, ref generics) |
-            ItemUnion(_, ref generics) |
-            ItemTrait(_, _, ref generics, _, _) |
-            ItemImpl(_, _, _, ref generics, _, _, _)=> generics,
+            ItemKind::Fn(_, _, ref generics, _) |
+            ItemKind::Ty(_, ref generics) |
+            ItemKind::Enum(_, ref generics) |
+            ItemKind::Struct(_, ref generics) |
+            ItemKind::Union(_, ref generics) |
+            ItemKind::Trait(_, _, ref generics, _, _) |
+            ItemKind::Impl(_, _, _, ref generics, _, _, _)=> generics,
             _ => return None
         })
     }
@@ -2192,7 +2190,7 @@ pub enum AssociatedItemKind {
 pub struct ForeignItem {
     pub name: Name,
     pub attrs: HirVec<Attribute>,
-    pub node: ForeignItem_,
+    pub node: ForeignItemKind,
     pub id: NodeId,
     pub span: Span,
     pub vis: Visibility,
@@ -2200,22 +2198,22 @@ pub struct ForeignItem {
 
 /// An item within an `extern` block
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub enum ForeignItem_ {
+pub enum ForeignItemKind {
     /// A foreign function
-    ForeignItemFn(P<FnDecl>, HirVec<Ident>, Generics),
+    Fn(P<FnDecl>, HirVec<Ident>, Generics),
     /// A foreign static item (`static ext: u8`), with optional mutability
     /// (the boolean is true when mutable)
-    ForeignItemStatic(P<Ty>, bool),
+    Static(P<Ty>, bool),
     /// A foreign type
-    ForeignItemType,
+    Type,
 }
 
-impl ForeignItem_ {
+impl ForeignItemKind {
     pub fn descriptive_variant(&self) -> &str {
         match *self {
-            ForeignItemFn(..) => "foreign function",
-            ForeignItemStatic(..) => "foreign static item",
-            ForeignItemType => "foreign type",
+            ForeignItemKind::Fn(..) => "foreign function",
+            ForeignItemKind::Static(..) => "foreign static item",
+            ForeignItemKind::Type => "foreign type",
         }
     }
 }
diff --git a/src/librustc/hir/print.rs b/src/librustc/hir/print.rs
index 377990ef561..e637a18d1cd 100644
--- a/src/librustc/hir/print.rs
+++ b/src/librustc/hir/print.rs
@@ -367,12 +367,12 @@ impl<'a> State<'a> {
         self.maybe_print_comment(ty.span.lo())?;
         self.ibox(0)?;
         match ty.node {
-            hir::TySlice(ref ty) => {
+            hir::TyKind::Slice(ref ty) => {
                 self.s.word("[")?;
                 self.print_type(&ty)?;
                 self.s.word("]")?;
             }
-            hir::TyPtr(ref mt) => {
+            hir::TyKind::Ptr(ref mt) => {
                 self.s.word("*")?;
                 match mt.mutbl {
                     hir::MutMutable => self.word_nbsp("mut")?,
@@ -380,15 +380,15 @@ impl<'a> State<'a> {
                 }
                 self.print_type(&mt.ty)?;
             }
-            hir::TyRptr(ref lifetime, ref mt) => {
+            hir::TyKind::Rptr(ref lifetime, ref mt) => {
                 self.s.word("&")?;
                 self.print_opt_lifetime(lifetime)?;
                 self.print_mt(mt)?;
             }
-            hir::TyNever => {
+            hir::TyKind::Never => {
                 self.s.word("!")?;
             },
-            hir::TyTup(ref elts) => {
+            hir::TyKind::Tup(ref elts) => {
                 self.popen()?;
                 self.commasep(Inconsistent, &elts[..], |s, ty| s.print_type(&ty))?;
                 if elts.len() == 1 {
@@ -396,14 +396,14 @@ impl<'a> State<'a> {
                 }
                 self.pclose()?;
             }
-            hir::TyBareFn(ref f) => {
+            hir::TyKind::BareFn(ref f) => {
                 self.print_ty_fn(f.abi, f.unsafety, &f.decl, None, &f.generic_params,
                                  &f.arg_names[..])?;
             }
-            hir::TyPath(ref qpath) => {
+            hir::TyKind::Path(ref qpath) => {
                 self.print_qpath(qpath, false)?
             }
-            hir::TyTraitObject(ref bounds, ref lifetime) => {
+            hir::TyKind::TraitObject(ref bounds, ref lifetime) => {
                 let mut first = true;
                 for bound in bounds {
                     if first {
@@ -420,22 +420,22 @@ impl<'a> State<'a> {
                     self.print_lifetime(lifetime)?;
                 }
             }
-            hir::TyArray(ref ty, ref length) => {
+            hir::TyKind::Array(ref ty, ref length) => {
                 self.s.word("[")?;
                 self.print_type(&ty)?;
                 self.s.word("; ")?;
                 self.print_anon_const(length)?;
                 self.s.word("]")?;
             }
-            hir::TyTypeof(ref e) => {
+            hir::TyKind::Typeof(ref e) => {
                 self.s.word("typeof(")?;
                 self.print_anon_const(e)?;
                 self.s.word(")")?;
             }
-            hir::TyInfer => {
+            hir::TyKind::Infer => {
                 self.s.word("_")?;
             }
-            hir::TyErr => {
+            hir::TyKind::Err => {
                 self.s.word("?")?;
             }
         }
@@ -447,7 +447,7 @@ impl<'a> State<'a> {
         self.maybe_print_comment(item.span.lo())?;
         self.print_outer_attributes(&item.attrs)?;
         match item.node {
-            hir::ForeignItemFn(ref decl, ref arg_names, ref generics) => {
+            hir::ForeignItemKind::Fn(ref decl, ref arg_names, ref generics) => {
                 self.head("")?;
                 self.print_fn(decl,
                               hir::FnHeader {
@@ -465,7 +465,7 @@ impl<'a> State<'a> {
                 self.s.word(";")?;
                 self.end() // end the outer fn box
             }
-            hir::ForeignItemStatic(ref t, m) => {
+            hir::ForeignItemKind::Static(ref t, m) => {
                 self.head(&visibility_qualified(&item.vis, "static"))?;
                 if m {
                     self.word_space("mut")?;
@@ -477,7 +477,7 @@ impl<'a> State<'a> {
                 self.end()?; // end the head-ibox
                 self.end() // end the outer cbox
             }
-            hir::ForeignItemType => {
+            hir::ForeignItemKind::Type => {
                 self.head(&visibility_qualified(&item.vis, "type"))?;
                 self.print_name(item.name)?;
                 self.s.word(";")?;
@@ -531,7 +531,7 @@ impl<'a> State<'a> {
         self.print_outer_attributes(&item.attrs)?;
         self.ann.pre(self, NodeItem(item))?;
         match item.node {
-            hir::ItemExternCrate(orig_name) => {
+            hir::ItemKind::ExternCrate(orig_name) => {
                 self.head(&visibility_qualified(&item.vis, "extern crate"))?;
                 if let Some(orig_name) = orig_name {
                     self.print_name(orig_name)?;
@@ -544,7 +544,7 @@ impl<'a> State<'a> {
                 self.end()?; // end inner head-block
                 self.end()?; // end outer head-block
             }
-            hir::ItemUse(ref path, kind) => {
+            hir::ItemKind::Use(ref path, kind) => {
                 self.head(&visibility_qualified(&item.vis, "use"))?;
                 self.print_path(path, false)?;
 
@@ -563,7 +563,7 @@ impl<'a> State<'a> {
                 self.end()?; // end inner head-block
                 self.end()?; // end outer head-block
             }
-            hir::ItemStatic(ref ty, m, expr) => {
+            hir::ItemKind::Static(ref ty, m, expr) => {
                 self.head(&visibility_qualified(&item.vis, "static"))?;
                 if m == hir::MutMutable {
                     self.word_space("mut")?;
@@ -579,7 +579,7 @@ impl<'a> State<'a> {
                 self.s.word(";")?;
                 self.end()?; // end the outer cbox
             }
-            hir::ItemConst(ref ty, expr) => {
+            hir::ItemKind::Const(ref ty, expr) => {
                 self.head(&visibility_qualified(&item.vis, "const"))?;
                 self.print_name(item.name)?;
                 self.word_space(":")?;
@@ -592,7 +592,7 @@ impl<'a> State<'a> {
                 self.s.word(";")?;
                 self.end()?; // end the outer cbox
             }
-            hir::ItemFn(ref decl, header, ref typarams, body) => {
+            hir::ItemKind::Fn(ref decl, header, ref typarams, body) => {
                 self.head("")?;
                 self.print_fn(decl,
                               header,
@@ -606,7 +606,7 @@ impl<'a> State<'a> {
                 self.end()?; // need to close a box
                 self.ann.nested(self, Nested::Body(body))?;
             }
-            hir::ItemMod(ref _mod) => {
+            hir::ItemKind::Mod(ref _mod) => {
                 self.head(&visibility_qualified(&item.vis, "mod"))?;
                 self.print_name(item.name)?;
                 self.nbsp()?;
@@ -614,19 +614,19 @@ impl<'a> State<'a> {
                 self.print_mod(_mod, &item.attrs)?;
                 self.bclose(item.span)?;
             }
-            hir::ItemForeignMod(ref nmod) => {
+            hir::ItemKind::ForeignMod(ref nmod) => {
                 self.head("extern")?;
                 self.word_nbsp(&nmod.abi.to_string())?;
                 self.bopen()?;
                 self.print_foreign_mod(nmod, &item.attrs)?;
                 self.bclose(item.span)?;
             }
-            hir::ItemGlobalAsm(ref ga) => {
+            hir::ItemKind::GlobalAsm(ref ga) => {
                 self.head(&visibility_qualified(&item.vis, "global asm"))?;
                 self.s.word(&ga.asm.as_str())?;
                 self.end()?
             }
-            hir::ItemTy(ref ty, ref generics) => {
+            hir::ItemKind::Ty(ref ty, ref generics) => {
                 self.ibox(indent_unit)?;
                 self.ibox(0)?;
                 self.word_nbsp(&visibility_qualified(&item.vis, "type"))?;
@@ -641,7 +641,7 @@ impl<'a> State<'a> {
                 self.s.word(";")?;
                 self.end()?; // end the outer ibox
             }
-            hir::ItemExistential(ref exist) => {
+            hir::ItemKind::Existential(ref exist) => {
                 self.ibox(indent_unit)?;
                 self.ibox(0)?;
                 self.word_nbsp(&visibility_qualified(&item.vis, "existential type"))?;
@@ -666,18 +666,18 @@ impl<'a> State<'a> {
                 self.s.word(";")?;
                 self.end()?; // end the outer ibox
             }
-            hir::ItemEnum(ref enum_definition, ref params) => {
+            hir::ItemKind::Enum(ref enum_definition, ref params) => {
                 self.print_enum_def(enum_definition, params, item.name, item.span, &item.vis)?;
             }
-            hir::ItemStruct(ref struct_def, ref generics) => {
+            hir::ItemKind::Struct(ref struct_def, ref generics) => {
                 self.head(&visibility_qualified(&item.vis, "struct"))?;
                 self.print_struct(struct_def, generics, item.name, item.span, true)?;
             }
-            hir::ItemUnion(ref struct_def, ref generics) => {
+            hir::ItemKind::Union(ref struct_def, ref generics) => {
                 self.head(&visibility_qualified(&item.vis, "union"))?;
                 self.print_struct(struct_def, generics, item.name, item.span, true)?;
             }
-            hir::ItemImpl(unsafety,
+            hir::ItemKind::Impl(unsafety,
                           polarity,
                           defaultness,
                           ref generics,
@@ -722,7 +722,7 @@ impl<'a> State<'a> {
                 }
                 self.bclose(item.span)?;
             }
-            hir::ItemTrait(is_auto, unsafety, ref generics, ref bounds, ref trait_items) => {
+            hir::ItemKind::Trait(is_auto, unsafety, ref generics, ref bounds, ref trait_items) => {
                 self.head("")?;
                 self.print_visibility(&item.vis)?;
                 self.print_is_auto(is_auto)?;
@@ -749,7 +749,7 @@ impl<'a> State<'a> {
                 }
                 self.bclose(item.span)?;
             }
-            hir::ItemTraitAlias(ref generics, ref bounds) => {
+            hir::ItemKind::TraitAlias(ref generics, ref bounds) => {
                 self.head("")?;
                 self.print_visibility(&item.vis)?;
                 self.word_nbsp("trait")?;
@@ -1001,14 +1001,14 @@ impl<'a> State<'a> {
     pub fn print_stmt(&mut self, st: &hir::Stmt) -> io::Result<()> {
         self.maybe_print_comment(st.span.lo())?;
         match st.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 self.print_decl(&decl)?;
             }
-            hir::StmtExpr(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) => {
                 self.space_if_not_bol()?;
                 self.print_expr(&expr)?;
             }
-            hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Semi(ref expr, _) => {
                 self.space_if_not_bol()?;
                 self.print_expr(&expr)?;
                 self.s.word(";")?;
@@ -1080,7 +1080,7 @@ impl<'a> State<'a> {
             Some(_else) => {
                 match _else.node {
                     // "another else-if"
-                    hir::ExprIf(ref i, ref then, ref e) => {
+                    hir::ExprKind::If(ref i, ref then, ref e) => {
                         self.cbox(indent_unit - 1)?;
                         self.ibox(0)?;
                         self.s.word(" else if ")?;
@@ -1090,7 +1090,7 @@ impl<'a> State<'a> {
                         self.print_else(e.as_ref().map(|e| &**e))
                     }
                     // "final else"
-                    hir::ExprBlock(ref b, _) => {
+                    hir::ExprKind::Block(ref b, _) => {
                         self.cbox(indent_unit - 1)?;
                         self.ibox(0)?;
                         self.s.word(" else ")?;
@@ -1162,9 +1162,9 @@ impl<'a> State<'a> {
         let needs_par = match expr.node {
             // These cases need parens due to the parse error observed in #26461: `if return {}`
             // parses as the erroneous construct `if (return {})`, not `if (return) {}`.
-            hir::ExprClosure(..) |
-            hir::ExprRet(..) |
-            hir::ExprBreak(..) => true,
+            hir::ExprKind::Closure(..) |
+            hir::ExprKind::Ret(..) |
+            hir::ExprKind::Break(..) => true,
 
             _ => contains_exterior_struct_lit(expr),
         };
@@ -1247,7 +1247,7 @@ impl<'a> State<'a> {
     fn print_expr_call(&mut self, func: &hir::Expr, args: &[hir::Expr]) -> io::Result<()> {
         let prec =
             match func.node {
-                hir::ExprField(..) => parser::PREC_FORCE_PAREN,
+                hir::ExprKind::Field(..) => parser::PREC_FORCE_PAREN,
                 _ => parser::PREC_POSTFIX,
             };
 
@@ -1292,8 +1292,8 @@ impl<'a> State<'a> {
             // These cases need parens: `x as i32 < y` has the parser thinking that `i32 < y` is
             // the beginning of a path type. It starts trying to parse `x as (i32 < y ...` instead
             // of `(x as i32) < ...`. We need to convince it _not_ to do that.
-            (&hir::ExprCast { .. }, hir::BinOp_::BiLt) |
-            (&hir::ExprCast { .. }, hir::BinOp_::BiShl) => parser::PREC_FORCE_PAREN,
+            (&hir::ExprKind::Cast { .. }, hir::BinOpKind::Lt) |
+            (&hir::ExprKind::Cast { .. }, hir::BinOpKind::Shl) => parser::PREC_FORCE_PAREN,
             _ => left_prec,
         };
 
@@ -1323,57 +1323,57 @@ impl<'a> State<'a> {
         self.ibox(indent_unit)?;
         self.ann.pre(self, NodeExpr(expr))?;
         match expr.node {
-            hir::ExprBox(ref expr) => {
+            hir::ExprKind::Box(ref expr) => {
                 self.word_space("box")?;
                 self.print_expr_maybe_paren(expr, parser::PREC_PREFIX)?;
             }
-            hir::ExprArray(ref exprs) => {
+            hir::ExprKind::Array(ref exprs) => {
                 self.print_expr_vec(exprs)?;
             }
-            hir::ExprRepeat(ref element, ref count) => {
+            hir::ExprKind::Repeat(ref element, ref count) => {
                 self.print_expr_repeat(&element, count)?;
             }
-            hir::ExprStruct(ref qpath, ref fields, ref wth) => {
+            hir::ExprKind::Struct(ref qpath, ref fields, ref wth) => {
                 self.print_expr_struct(qpath, &fields[..], wth)?;
             }
-            hir::ExprTup(ref exprs) => {
+            hir::ExprKind::Tup(ref exprs) => {
                 self.print_expr_tup(exprs)?;
             }
-            hir::ExprCall(ref func, ref args) => {
+            hir::ExprKind::Call(ref func, ref args) => {
                 self.print_expr_call(&func, args)?;
             }
-            hir::ExprMethodCall(ref segment, _, ref args) => {
+            hir::ExprKind::MethodCall(ref segment, _, ref args) => {
                 self.print_expr_method_call(segment, args)?;
             }
-            hir::ExprBinary(op, ref lhs, ref rhs) => {
+            hir::ExprKind::Binary(op, ref lhs, ref rhs) => {
                 self.print_expr_binary(op, &lhs, &rhs)?;
             }
-            hir::ExprUnary(op, ref expr) => {
+            hir::ExprKind::Unary(op, ref expr) => {
                 self.print_expr_unary(op, &expr)?;
             }
-            hir::ExprAddrOf(m, ref expr) => {
+            hir::ExprKind::AddrOf(m, ref expr) => {
                 self.print_expr_addr_of(m, &expr)?;
             }
-            hir::ExprLit(ref lit) => {
+            hir::ExprKind::Lit(ref lit) => {
                 self.print_literal(&lit)?;
             }
-            hir::ExprCast(ref expr, ref ty) => {
+            hir::ExprKind::Cast(ref expr, ref ty) => {
                 let prec = AssocOp::As.precedence() as i8;
                 self.print_expr_maybe_paren(&expr, prec)?;
                 self.s.space()?;
                 self.word_space("as")?;
                 self.print_type(&ty)?;
             }
-            hir::ExprType(ref expr, ref ty) => {
+            hir::ExprKind::Type(ref expr, ref ty) => {
                 let prec = AssocOp::Colon.precedence() as i8;
                 self.print_expr_maybe_paren(&expr, prec)?;
                 self.word_space(":")?;
                 self.print_type(&ty)?;
             }
-            hir::ExprIf(ref test, ref blk, ref elseopt) => {
+            hir::ExprKind::If(ref test, ref blk, ref elseopt) => {
                 self.print_if(&test, &blk, elseopt.as_ref().map(|e| &**e))?;
             }
-            hir::ExprWhile(ref test, ref blk, opt_label) => {
+            hir::ExprKind::While(ref test, ref blk, opt_label) => {
                 if let Some(label) = opt_label {
                     self.print_ident(label.ident)?;
                     self.word_space(":")?;
@@ -1383,7 +1383,7 @@ impl<'a> State<'a> {
                 self.s.space()?;
                 self.print_block(&blk)?;
             }
-            hir::ExprLoop(ref blk, opt_label, _) => {
+            hir::ExprKind::Loop(ref blk, opt_label, _) => {
                 if let Some(label) = opt_label {
                     self.print_ident(label.ident)?;
                     self.word_space(":")?;
@@ -1392,7 +1392,7 @@ impl<'a> State<'a> {
                 self.s.space()?;
                 self.print_block(&blk)?;
             }
-            hir::ExprMatch(ref expr, ref arms, _) => {
+            hir::ExprKind::Match(ref expr, ref arms, _) => {
                 self.cbox(indent_unit)?;
                 self.ibox(4)?;
                 self.word_nbsp("match")?;
@@ -1404,7 +1404,7 @@ impl<'a> State<'a> {
                 }
                 self.bclose_(expr.span, indent_unit)?;
             }
-            hir::ExprClosure(capture_clause, ref decl, body, _fn_decl_span, _gen) => {
+            hir::ExprKind::Closure(capture_clause, ref decl, body, _fn_decl_span, _gen) => {
                 self.print_capture_clause(capture_clause)?;
 
                 self.print_closure_args(&decl, body)?;
@@ -1419,7 +1419,7 @@ impl<'a> State<'a> {
                 // empty box to satisfy the close.
                 self.ibox(0)?;
             }
-            hir::ExprBlock(ref blk, opt_label) => {
+            hir::ExprKind::Block(ref blk, opt_label) => {
                 if let Some(label) = opt_label {
                     self.print_ident(label.ident)?;
                     self.word_space(":")?;
@@ -1430,14 +1430,14 @@ impl<'a> State<'a> {
                 self.ibox(0)?;
                 self.print_block(&blk)?;
             }
-            hir::ExprAssign(ref lhs, ref rhs) => {
+            hir::ExprKind::Assign(ref lhs, ref rhs) => {
                 let prec = AssocOp::Assign.precedence() as i8;
                 self.print_expr_maybe_paren(&lhs, prec + 1)?;
                 self.s.space()?;
                 self.word_space("=")?;
                 self.print_expr_maybe_paren(&rhs, prec)?;
             }
-            hir::ExprAssignOp(op, ref lhs, ref rhs) => {
+            hir::ExprKind::AssignOp(op, ref lhs, ref rhs) => {
                 let prec = AssocOp::Assign.precedence() as i8;
                 self.print_expr_maybe_paren(&lhs, prec + 1)?;
                 self.s.space()?;
@@ -1445,21 +1445,21 @@ impl<'a> State<'a> {
                 self.word_space("=")?;
                 self.print_expr_maybe_paren(&rhs, prec)?;
             }
-            hir::ExprField(ref expr, ident) => {
+            hir::ExprKind::Field(ref expr, ident) => {
                 self.print_expr_maybe_paren(expr, parser::PREC_POSTFIX)?;
                 self.s.word(".")?;
                 self.print_ident(ident)?;
             }
-            hir::ExprIndex(ref expr, ref index) => {
+            hir::ExprKind::Index(ref expr, ref index) => {
                 self.print_expr_maybe_paren(&expr, parser::PREC_POSTFIX)?;
                 self.s.word("[")?;
                 self.print_expr(&index)?;
                 self.s.word("]")?;
             }
-            hir::ExprPath(ref qpath) => {
+            hir::ExprKind::Path(ref qpath) => {
                 self.print_qpath(qpath, true)?
             }
-            hir::ExprBreak(destination, ref opt_expr) => {
+            hir::ExprKind::Break(destination, ref opt_expr) => {
                 self.s.word("break")?;
                 self.s.space()?;
                 if let Some(label) = destination.label {
@@ -1471,7 +1471,7 @@ impl<'a> State<'a> {
                     self.s.space()?;
                 }
             }
-            hir::ExprContinue(destination) => {
+            hir::ExprKind::Continue(destination) => {
                 self.s.word("continue")?;
                 self.s.space()?;
                 if let Some(label) = destination.label {
@@ -1479,7 +1479,7 @@ impl<'a> State<'a> {
                     self.s.space()?
                 }
             }
-            hir::ExprRet(ref result) => {
+            hir::ExprKind::Ret(ref result) => {
                 self.s.word("return")?;
                 match *result {
                     Some(ref expr) => {
@@ -1489,7 +1489,7 @@ impl<'a> State<'a> {
                     _ => (),
                 }
             }
-            hir::ExprInlineAsm(ref a, ref outputs, ref inputs) => {
+            hir::ExprKind::InlineAsm(ref a, ref outputs, ref inputs) => {
                 self.s.word("asm!")?;
                 self.popen()?;
                 self.print_string(&a.asm.as_str(), a.asm_str_style)?;
@@ -1554,7 +1554,7 @@ impl<'a> State<'a> {
 
                 self.pclose()?;
             }
-            hir::ExprYield(ref expr) => {
+            hir::ExprKind::Yield(ref expr) => {
                 self.word_space("yield")?;
                 self.print_expr_maybe_paren(&expr, parser::PREC_JUMP)?;
             }
@@ -1575,7 +1575,7 @@ impl<'a> State<'a> {
     pub fn print_decl(&mut self, decl: &hir::Decl) -> io::Result<()> {
         self.maybe_print_comment(decl.span.lo())?;
         match decl.node {
-            hir::DeclLocal(ref loc) => {
+            hir::DeclKind::Local(ref loc) => {
                 self.space_if_not_bol()?;
                 self.ibox(indent_unit)?;
                 self.word_nbsp("let")?;
@@ -1590,7 +1590,7 @@ impl<'a> State<'a> {
                 }
                 self.end()
             }
-            hir::DeclItem(item) => {
+            hir::DeclKind::Item(item) => {
                 self.ann.nested(self, Nested::Item(item))
             }
         }
@@ -1959,7 +1959,7 @@ impl<'a> State<'a> {
         self.word_space("=>")?;
 
         match arm.body.node {
-            hir::ExprBlock(ref blk, opt_label) => {
+            hir::ExprKind::Block(ref blk, opt_label) => {
                 if let Some(label) = opt_label {
                     self.print_ident(label.ident)?;
                     self.word_space(":")?;
@@ -2035,7 +2035,7 @@ impl<'a> State<'a> {
             s.ann.nested(s, Nested::BodyArgPat(body_id, i))?;
             i += 1;
 
-            if let hir::TyInfer = ty.node {
+            if let hir::TyKind::Infer = ty.node {
                 // Print nothing
             } else {
                 s.s.word(":")?;
@@ -2384,11 +2384,11 @@ impl<'a> State<'a> {
 /// isn't parsed as (if true {...} else {...} | x) | 5
 fn expr_requires_semi_to_be_stmt(e: &hir::Expr) -> bool {
     match e.node {
-        hir::ExprIf(..) |
-        hir::ExprMatch(..) |
-        hir::ExprBlock(..) |
-        hir::ExprWhile(..) |
-        hir::ExprLoop(..) => false,
+        hir::ExprKind::If(..) |
+        hir::ExprKind::Match(..) |
+        hir::ExprKind::Block(..) |
+        hir::ExprKind::While(..) |
+        hir::ExprKind::Loop(..) => false,
         _ => true,
     }
 }
@@ -2396,47 +2396,47 @@ fn expr_requires_semi_to_be_stmt(e: &hir::Expr) -> bool {
 /// this statement requires a semicolon after it.
 /// note that in one case (stmt_semi), we've already
 /// seen the semicolon, and thus don't need another.
-fn stmt_ends_with_semi(stmt: &hir::Stmt_) -> bool {
+fn stmt_ends_with_semi(stmt: &hir::StmtKind) -> bool {
     match *stmt {
-        hir::StmtDecl(ref d, _) => {
+        hir::StmtKind::Decl(ref d, _) => {
             match d.node {
-                hir::DeclLocal(_) => true,
-                hir::DeclItem(_) => false,
+                hir::DeclKind::Local(_) => true,
+                hir::DeclKind::Item(_) => false,
             }
         }
-        hir::StmtExpr(ref e, _) => {
+        hir::StmtKind::Expr(ref e, _) => {
             expr_requires_semi_to_be_stmt(&e)
         }
-        hir::StmtSemi(..) => {
+        hir::StmtKind::Semi(..) => {
             false
         }
     }
 }
 
-fn bin_op_to_assoc_op(op: hir::BinOp_) -> AssocOp {
-    use hir::BinOp_::*;
+fn bin_op_to_assoc_op(op: hir::BinOpKind) -> AssocOp {
+    use hir::BinOpKind::*;
     match op {
-        BiAdd => AssocOp::Add,
-        BiSub => AssocOp::Subtract,
-        BiMul => AssocOp::Multiply,
-        BiDiv => AssocOp::Divide,
-        BiRem => AssocOp::Modulus,
-
-        BiAnd => AssocOp::LAnd,
-        BiOr => AssocOp::LOr,
-
-        BiBitXor => AssocOp::BitXor,
-        BiBitAnd => AssocOp::BitAnd,
-        BiBitOr => AssocOp::BitOr,
-        BiShl => AssocOp::ShiftLeft,
-        BiShr => AssocOp::ShiftRight,
-
-        BiEq => AssocOp::Equal,
-        BiLt => AssocOp::Less,
-        BiLe => AssocOp::LessEqual,
-        BiNe => AssocOp::NotEqual,
-        BiGe => AssocOp::GreaterEqual,
-        BiGt => AssocOp::Greater,
+        Add => AssocOp::Add,
+        Sub => AssocOp::Subtract,
+        Mul => AssocOp::Multiply,
+        Div => AssocOp::Divide,
+        Rem => AssocOp::Modulus,
+
+        And => AssocOp::LAnd,
+        Or => AssocOp::LOr,
+
+        BitXor => AssocOp::BitXor,
+        BitAnd => AssocOp::BitAnd,
+        BitOr => AssocOp::BitOr,
+        Shl => AssocOp::ShiftLeft,
+        Shr => AssocOp::ShiftRight,
+
+        Eq => AssocOp::Equal,
+        Lt => AssocOp::Less,
+        Le => AssocOp::LessEqual,
+        Ne => AssocOp::NotEqual,
+        Ge => AssocOp::GreaterEqual,
+        Gt => AssocOp::Greater,
     }
 }
 
@@ -2445,24 +2445,24 @@ fn bin_op_to_assoc_op(op: hir::BinOp_) -> AssocOp {
 /// `X { y: 1 } == foo` all do, but `(X { y: 1 }) == foo` does not.
 fn contains_exterior_struct_lit(value: &hir::Expr) -> bool {
     match value.node {
-        hir::ExprStruct(..) => true,
+        hir::ExprKind::Struct(..) => true,
 
-        hir::ExprAssign(ref lhs, ref rhs) |
-        hir::ExprAssignOp(_, ref lhs, ref rhs) |
-        hir::ExprBinary(_, ref lhs, ref rhs) => {
+        hir::ExprKind::Assign(ref lhs, ref rhs) |
+        hir::ExprKind::AssignOp(_, ref lhs, ref rhs) |
+        hir::ExprKind::Binary(_, ref lhs, ref rhs) => {
             // X { y: 1 } + X { y: 2 }
             contains_exterior_struct_lit(&lhs) || contains_exterior_struct_lit(&rhs)
         }
-        hir::ExprUnary(_, ref x) |
-        hir::ExprCast(ref x, _) |
-        hir::ExprType(ref x, _) |
-        hir::ExprField(ref x, _) |
-        hir::ExprIndex(ref x, _) => {
+        hir::ExprKind::Unary(_, ref x) |
+        hir::ExprKind::Cast(ref x, _) |
+        hir::ExprKind::Type(ref x, _) |
+        hir::ExprKind::Field(ref x, _) |
+        hir::ExprKind::Index(ref x, _) => {
             // &X { y: 1 }, X { y: 1 }.y
             contains_exterior_struct_lit(&x)
         }
 
-        hir::ExprMethodCall(.., ref exprs) => {
+        hir::ExprKind::MethodCall(.., ref exprs) => {
             // X { y: 1 }.bar(...)
             contains_exterior_struct_lit(&exprs[0])
         }
diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs
index b6add3e6f12..d1fb05ceafb 100644
--- a/src/librustc/ich/impls_hir.rs
+++ b/src/librustc/ich/impls_hir.rs
@@ -330,19 +330,19 @@ impl_stable_hash_for!(struct hir::ExistTy {
     bounds
 });
 
-impl_stable_hash_for!(enum hir::Ty_ {
-    TySlice(t),
-    TyArray(t, body_id),
-    TyPtr(t),
-    TyRptr(lifetime, t),
-    TyBareFn(t),
-    TyNever,
-    TyTup(ts),
-    TyPath(qpath),
-    TyTraitObject(trait_refs, lifetime),
-    TyTypeof(body_id),
-    TyErr,
-    TyInfer
+impl_stable_hash_for!(enum hir::TyKind {
+    Slice(t),
+    Array(t, body_id),
+    Ptr(t),
+    Rptr(lifetime, t),
+    BareFn(t),
+    Never,
+    Tup(ts),
+    Path(qpath),
+    TraitObject(trait_refs, lifetime),
+    Typeof(body_id),
+    Err,
+    Infer
 });
 
 impl_stable_hash_for!(struct hir::FnDecl {
@@ -437,28 +437,28 @@ impl_stable_hash_for!(enum hir::PatKind {
     Slice(one, two, three)
 });
 
-impl_stable_hash_for!(enum hir::BinOp_ {
-    BiAdd,
-    BiSub,
-    BiMul,
-    BiDiv,
-    BiRem,
-    BiAnd,
-    BiOr,
-    BiBitXor,
-    BiBitAnd,
-    BiBitOr,
-    BiShl,
-    BiShr,
-    BiEq,
-    BiLt,
-    BiLe,
-    BiNe,
-    BiGe,
-    BiGt
-});
-
-impl_stable_hash_for_spanned!(hir::BinOp_);
+impl_stable_hash_for!(enum hir::BinOpKind {
+    Add,
+    Sub,
+    Mul,
+    Div,
+    Rem,
+    And,
+    Or,
+    BitXor,
+    BitAnd,
+    BitOr,
+    Shl,
+    Shr,
+    Eq,
+    Lt,
+    Le,
+    Ne,
+    Ge,
+    Gt
+});
+
+impl_stable_hash_for_spanned!(hir::BinOpKind);
 
 impl_stable_hash_for!(enum hir::UnOp {
     UnDeref,
@@ -466,7 +466,7 @@ impl_stable_hash_for!(enum hir::UnOp {
     UnNeg
 });
 
-impl_stable_hash_for_spanned!(hir::Stmt_);
+impl_stable_hash_for_spanned!(hir::StmtKind);
 
 impl_stable_hash_for!(struct hir::Local {
     pat,
@@ -479,10 +479,10 @@ impl_stable_hash_for!(struct hir::Local {
     source
 });
 
-impl_stable_hash_for_spanned!(hir::Decl_);
-impl_stable_hash_for!(enum hir::Decl_ {
-    DeclLocal(local),
-    DeclItem(item_id)
+impl_stable_hash_for_spanned!(hir::DeclKind);
+impl_stable_hash_for!(enum hir::DeclKind {
+    Local(local),
+    Item(item_id)
 });
 
 impl_stable_hash_for!(struct hir::Arm {
@@ -541,36 +541,36 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Expr {
     }
 }
 
-impl_stable_hash_for!(enum hir::Expr_ {
-    ExprBox(sub),
-    ExprArray(subs),
-    ExprCall(callee, args),
-    ExprMethodCall(segment, span, args),
-    ExprTup(fields),
-    ExprBinary(op, lhs, rhs),
-    ExprUnary(op, operand),
-    ExprLit(value),
-    ExprCast(expr, t),
-    ExprType(expr, t),
-    ExprIf(cond, then, els),
-    ExprWhile(cond, body, label),
-    ExprLoop(body, label, loop_src),
-    ExprMatch(matchee, arms, match_src),
-    ExprClosure(capture_clause, decl, body_id, span, gen),
-    ExprBlock(blk, label),
-    ExprAssign(lhs, rhs),
-    ExprAssignOp(op, lhs, rhs),
-    ExprField(owner, ident),
-    ExprIndex(lhs, rhs),
-    ExprPath(path),
-    ExprAddrOf(mutability, sub),
-    ExprBreak(destination, sub),
-    ExprContinue(destination),
-    ExprRet(val),
-    ExprInlineAsm(asm, inputs, outputs),
-    ExprStruct(path, fields, base),
-    ExprRepeat(val, times),
-    ExprYield(val)
+impl_stable_hash_for!(enum hir::ExprKind {
+    Box(sub),
+    Array(subs),
+    Call(callee, args),
+    MethodCall(segment, span, args),
+    Tup(fields),
+    Binary(op, lhs, rhs),
+    Unary(op, operand),
+    Lit(value),
+    Cast(expr, t),
+    Type(expr, t),
+    If(cond, then, els),
+    While(cond, body, label),
+    Loop(body, label, loop_src),
+    Match(matchee, arms, match_src),
+    Closure(capture_clause, decl, body_id, span, gen),
+    Block(blk, label),
+    Assign(lhs, rhs),
+    AssignOp(op, lhs, rhs),
+    Field(owner, ident),
+    Index(lhs, rhs),
+    Path(path),
+    AddrOf(mutability, sub),
+    Break(destination, sub),
+    Continue(destination),
+    Ret(val),
+    InlineAsm(asm, inputs, outputs),
+    Struct(path, fields, base),
+    Repeat(val, times),
+    Yield(val)
 });
 
 impl_stable_hash_for!(enum hir::LocalSource {
@@ -793,14 +793,14 @@ impl_stable_hash_for!(struct hir::EnumDef {
     variants
 });
 
-impl_stable_hash_for!(struct hir::Variant_ {
+impl_stable_hash_for!(struct hir::VariantKind {
     name,
     attrs,
     data,
     disr_expr
 });
 
-impl_stable_hash_for_spanned!(hir::Variant_);
+impl_stable_hash_for_spanned!(hir::VariantKind);
 
 impl_stable_hash_for!(enum hir::UseKind {
     Single,
@@ -847,23 +847,23 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Item {
     }
 }
 
-impl_stable_hash_for!(enum hir::Item_ {
-    ItemExternCrate(orig_name),
-    ItemUse(path, use_kind),
-    ItemStatic(ty, mutability, body_id),
-    ItemConst(ty, body_id),
-    ItemFn(fn_decl, header, generics, body_id),
-    ItemMod(module),
-    ItemForeignMod(foreign_mod),
-    ItemGlobalAsm(global_asm),
-    ItemTy(ty, generics),
-    ItemExistential(exist),
-    ItemEnum(enum_def, generics),
-    ItemStruct(variant_data, generics),
-    ItemUnion(variant_data, generics),
-    ItemTrait(is_auto, unsafety, generics, bounds, item_refs),
-    ItemTraitAlias(generics, bounds),
-    ItemImpl(unsafety, impl_polarity, impl_defaultness, generics, trait_ref, ty, impl_item_refs)
+impl_stable_hash_for!(enum hir::ItemKind {
+    ExternCrate(orig_name),
+    Use(path, use_kind),
+    Static(ty, mutability, body_id),
+    Const(ty, body_id),
+    Fn(fn_decl, header, generics, body_id),
+    Mod(module),
+    ForeignMod(foreign_mod),
+    GlobalAsm(global_asm),
+    Ty(ty, generics),
+    Existential(exist),
+    Enum(enum_def, generics),
+    Struct(variant_data, generics),
+    Union(variant_data, generics),
+    Trait(is_auto, unsafety, generics, bounds, item_refs),
+    TraitAlias(generics, bounds),
+    Impl(unsafety, impl_polarity, impl_defaultness, generics, trait_ref, ty, impl_item_refs)
 });
 
 impl_stable_hash_for!(struct hir::TraitItemRef {
@@ -909,16 +909,16 @@ impl_stable_hash_for!(struct hir::ForeignItem {
     vis
 });
 
-impl_stable_hash_for!(enum hir::ForeignItem_ {
-    ForeignItemFn(fn_decl, arg_names, generics),
-    ForeignItemStatic(ty, is_mutbl),
-    ForeignItemType
+impl_stable_hash_for!(enum hir::ForeignItemKind {
+    Fn(fn_decl, arg_names, generics),
+    Static(ty, is_mutbl),
+    Type
 });
 
-impl_stable_hash_for!(enum hir::Stmt_ {
-    StmtDecl(decl, id),
-    StmtExpr(expr, id),
-    StmtSemi(expr, id)
+impl_stable_hash_for!(enum hir::StmtKind {
+    Decl(decl, id),
+    Expr(expr, id),
+    Semi(expr, id)
 });
 
 impl_stable_hash_for!(struct hir::Arg {
diff --git a/src/librustc/infer/anon_types/mod.rs b/src/librustc/infer/anon_types/mod.rs
index 5487da97d5b..2924016670b 100644
--- a/src/librustc/infer/anon_types/mod.rs
+++ b/src/librustc/infer/anon_types/mod.rs
@@ -691,7 +691,7 @@ impl<'a, 'gcx, 'tcx> Instantiator<'a, 'gcx, 'tcx> {
                     // ```
                     if let Some(anon_node_id) = tcx.hir.as_local_node_id(def_id) {
                         let anon_parent_def_id = match tcx.hir.expect_item(anon_node_id).node {
-                            hir::ItemExistential(hir::ExistTy {
+                            hir::ItemKind::Existential(hir::ExistTy {
                                 impl_trait_fn: Some(parent),
                                 ..
                             }) => parent,
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index 432826238db..8da0dc365b0 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -102,12 +102,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
                 let tag = match self.hir.find(scope.node_id(self, region_scope_tree)) {
                     Some(hir_map::NodeBlock(_)) => "block",
                     Some(hir_map::NodeExpr(expr)) => match expr.node {
-                        hir::ExprCall(..) => "call",
-                        hir::ExprMethodCall(..) => "method call",
-                        hir::ExprMatch(.., hir::MatchSource::IfLetDesugar { .. }) => "if let",
-                        hir::ExprMatch(.., hir::MatchSource::WhileLetDesugar) => "while let",
-                        hir::ExprMatch(.., hir::MatchSource::ForLoopDesugar) => "for",
-                        hir::ExprMatch(..) => "match",
+                        hir::ExprKind::Call(..) => "call",
+                        hir::ExprKind::MethodCall(..) => "method call",
+                        hir::ExprKind::Match(.., hir::MatchSource::IfLetDesugar { .. }) => "if let",
+                        hir::ExprKind::Match(.., hir::MatchSource::WhileLetDesugar) => "while let",
+                        hir::ExprKind::Match(.., hir::MatchSource::ForLoopDesugar) => "for",
+                        hir::ExprKind::Match(..) => "match",
                         _ => "expression",
                     },
                     Some(hir_map::NodeStmt(_)) => "statement",
@@ -259,12 +259,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
 
     fn item_scope_tag(item: &hir::Item) -> &'static str {
         match item.node {
-            hir::ItemImpl(..) => "impl",
-            hir::ItemStruct(..) => "struct",
-            hir::ItemUnion(..) => "union",
-            hir::ItemEnum(..) => "enum",
-            hir::ItemTrait(..) => "trait",
-            hir::ItemFn(..) => "function body",
+            hir::ItemKind::Impl(..) => "impl",
+            hir::ItemKind::Struct(..) => "struct",
+            hir::ItemKind::Union(..) => "union",
+            hir::ItemKind::Enum(..) => "enum",
+            hir::ItemKind::Trait(..) => "trait",
+            hir::ItemKind::Fn(..) => "function body",
             _ => "item",
         }
     }
diff --git a/src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs b/src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs
index b148a7401f8..21be09b0ba1 100644
--- a/src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs
+++ b/src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs
@@ -41,7 +41,7 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
             if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) {
                 let fndecl = match self.tcx.hir.get(node_id) {
                     hir_map::NodeItem(&hir::Item {
-                        node: hir::ItemFn(ref fndecl, ..),
+                        node: hir::ItemKind::Fn(ref fndecl, ..),
                         ..
                     }) => &fndecl,
                     hir_map::NodeTraitItem(&hir::TraitItem {
@@ -109,20 +109,20 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for FindNestedTypeVisitor<'a, 'gcx, 'tcx> {
 
     fn visit_ty(&mut self, arg: &'gcx hir::Ty) {
         match arg.node {
-            hir::TyBareFn(_) => {
+            hir::TyKind::BareFn(_) => {
                 self.current_index.shift_in(1);
                 intravisit::walk_ty(self, arg);
                 self.current_index.shift_out(1);
                 return;
             }
 
-            hir::TyTraitObject(ref bounds, _) => for bound in bounds {
+            hir::TyKind::TraitObject(ref bounds, _) => for bound in bounds {
                 self.current_index.shift_in(1);
                 self.visit_poly_trait_ref(bound, hir::TraitBoundModifier::None);
                 self.current_index.shift_out(1);
             },
 
-            hir::TyRptr(ref lifetime, _) => {
+            hir::TyKind::Rptr(ref lifetime, _) => {
                 // the lifetime of the TyRptr
                 let hir_id = self.tcx.hir.node_to_hir_id(lifetime.id);
                 match (self.tcx.named_region(hir_id), self.bound_region) {
@@ -190,8 +190,8 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for FindNestedTypeVisitor<'a, 'gcx, 'tcx> {
                     }
                 }
             }
-            // Checks if it is of type `hir::TyPath` which corresponds to a struct.
-            hir::TyPath(_) => {
+            // Checks if it is of type `hir::TyKind::Path` which corresponds to a struct.
+            hir::TyKind::Path(_) => {
                 let subvisitor = &mut TyPathVisitor {
                     tcx: self.tcx,
                     found_it: false,
@@ -213,7 +213,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for FindNestedTypeVisitor<'a, 'gcx, 'tcx> {
 }
 
 // The visitor captures the corresponding `hir::Ty` of the anonymous region
-// in the case of structs ie. `hir::TyPath`.
+// in the case of structs ie. `hir::TyKind::Path`.
 // This visitor would be invoked for each lifetime corresponding to a struct,
 // and would walk the types like Vec<Ref> in the above example and Ref looking for the HIR
 // where that lifetime appears. This allows us to highlight the
diff --git a/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs b/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs
index 18b8c70c3ef..f4ef197e5b4 100644
--- a/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs
+++ b/src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs
@@ -14,7 +14,7 @@
 use infer::error_reporting::nice_region_error::NiceRegionError;
 use infer::SubregionOrigin;
 use ty::RegionKind;
-use hir::{Expr, ExprClosure};
+use hir::{Expr, ExprKind::Closure};
 use hir::map::NodeExpr;
 use util::common::ErrorReported;
 use infer::lexical_region_resolve::RegionResolutionError::SubSupConflict;
@@ -60,7 +60,7 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
                 if let Some(node_id) = hir.as_local_node_id(free_region.scope) {
                     match hir.get(node_id) {
                         NodeExpr(Expr {
-                            node: ExprClosure(_, _, _, closure_span, None),
+                            node: Closure(_, _, _, closure_span, None),
                             ..
                         }) => {
                             let sup_sp = sup_origin.span();
diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs
index 180469a5d84..da59bced760 100644
--- a/src/librustc/middle/dead.rs
+++ b/src/librustc/middle/dead.rs
@@ -153,21 +153,21 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
         match *node {
             hir_map::NodeItem(item) => {
                 match item.node {
-                    hir::ItemStruct(..) | hir::ItemUnion(..) => {
+                    hir::ItemKind::Struct(..) | hir::ItemKind::Union(..) => {
                         let def_id = self.tcx.hir.local_def_id(item.id);
                         let def = self.tcx.adt_def(def_id);
                         self.repr_has_repr_c = def.repr.c();
 
                         intravisit::walk_item(self, &item);
                     }
-                    hir::ItemEnum(..) => {
+                    hir::ItemKind::Enum(..) => {
                         self.inherited_pub_visibility = item.vis.node.is_pub();
                         intravisit::walk_item(self, &item);
                     }
-                    hir::ItemFn(..)
-                    | hir::ItemTy(..)
-                    | hir::ItemStatic(..)
-                    | hir::ItemConst(..) => {
+                    hir::ItemKind::Fn(..)
+                    | hir::ItemKind::Ty(..)
+                    | hir::ItemKind::Static(..)
+                    | hir::ItemKind::Const(..) => {
                         intravisit::walk_item(self, &item);
                     }
                     _ => ()
@@ -225,17 +225,17 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
 
     fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
         match expr.node {
-            hir::ExprPath(ref qpath @ hir::QPath::TypeRelative(..)) => {
+            hir::ExprKind::Path(ref qpath @ hir::QPath::TypeRelative(..)) => {
                 let def = self.tables.qpath_def(qpath, expr.hir_id);
                 self.handle_definition(def);
             }
-            hir::ExprMethodCall(..) => {
+            hir::ExprKind::MethodCall(..) => {
                 self.lookup_and_handle_method(expr.hir_id);
             }
-            hir::ExprField(ref lhs, ..) => {
+            hir::ExprKind::Field(ref lhs, ..) => {
                 self.handle_field_access(&lhs, expr.id);
             }
-            hir::ExprStruct(_, ref fields, _) => {
+            hir::ExprKind::Struct(_, ref fields, _) => {
                 if let ty::TypeVariants::TyAdt(ref adt, _) = self.tables.expr_ty(expr).sty {
                     self.mark_as_used_if_union(adt, fields);
                 }
@@ -349,11 +349,11 @@ impl<'v, 'k, 'tcx> ItemLikeVisitor<'v> for LifeSeeder<'k, 'tcx> {
             self.worklist.push(item.id);
         }
         match item.node {
-            hir::ItemEnum(ref enum_def, _) if allow_dead_code => {
+            hir::ItemKind::Enum(ref enum_def, _) if allow_dead_code => {
                 self.worklist.extend(enum_def.variants.iter()
                                                       .map(|variant| variant.node.data.id()));
             }
-            hir::ItemTrait(.., ref trait_item_refs) => {
+            hir::ItemKind::Trait(.., ref trait_item_refs) => {
                 for trait_item_ref in trait_item_refs {
                     let trait_item = self.krate.trait_item(trait_item_ref.id);
                     match trait_item.node {
@@ -369,7 +369,7 @@ impl<'v, 'k, 'tcx> ItemLikeVisitor<'v> for LifeSeeder<'k, 'tcx> {
                     }
                 }
             }
-            hir::ItemImpl(.., ref opt_trait, _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., ref opt_trait, _, ref impl_item_refs) => {
                 for impl_item_ref in impl_item_refs {
                     let impl_item = self.krate.impl_item(impl_item_ref.id);
                     if opt_trait.is_some() ||
@@ -439,7 +439,7 @@ fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
 fn get_struct_ctor_id(item: &hir::Item) -> Option<ast::NodeId> {
     match item.node {
-        hir::ItemStruct(ref struct_def, _) if !struct_def.is_struct() => {
+        hir::ItemKind::Struct(ref struct_def, _) if !struct_def.is_struct() => {
             Some(struct_def.id())
         }
         _ => None
@@ -454,13 +454,13 @@ struct DeadVisitor<'a, 'tcx: 'a> {
 impl<'a, 'tcx> DeadVisitor<'a, 'tcx> {
     fn should_warn_about_item(&mut self, item: &hir::Item) -> bool {
         let should_warn = match item.node {
-            hir::ItemStatic(..)
-            | hir::ItemConst(..)
-            | hir::ItemFn(..)
-            | hir::ItemTy(..)
-            | hir::ItemEnum(..)
-            | hir::ItemStruct(..)
-            | hir::ItemUnion(..) => true,
+            hir::ItemKind::Static(..)
+            | hir::ItemKind::Const(..)
+            | hir::ItemKind::Fn(..)
+            | hir::ItemKind::Ty(..)
+            | hir::ItemKind::Enum(..)
+            | hir::ItemKind::Struct(..)
+            | hir::ItemKind::Union(..) => true,
             _ => false
         };
         let ctor_id = get_struct_ctor_id(item);
@@ -475,7 +475,7 @@ impl<'a, 'tcx> DeadVisitor<'a, 'tcx> {
             && !has_allow_dead_code_or_lang_attr(self.tcx, field.id, &field.attrs)
     }
 
-    fn should_warn_about_variant(&mut self, variant: &hir::Variant_) -> bool {
+    fn should_warn_about_variant(&mut self, variant: &hir::VariantKind) -> bool {
         !self.symbol_is_live(variant.data.id(), None)
             && !has_allow_dead_code_or_lang_attr(self.tcx,
                                                  variant.data.id(),
@@ -492,7 +492,7 @@ impl<'a, 'tcx> DeadVisitor<'a, 'tcx> {
     //            `None` otherwise.
     // If the item is a struct_ctor, then either its `id` or
     // `ctor_id` (unwrapped) is in the live_symbols set. More specifically,
-    // DefMap maps the ExprPath of a struct_ctor to the node referred by
+    // DefMap maps the ExprKind::Path of a struct_ctor to the node referred by
     // `ctor_id`. On the other hand, in a statement like
     // `type <ident> <generics> = <ty>;` where <ty> refers to a struct_ctor,
     // DefMap maps <ty> to `id` instead.
@@ -554,13 +554,13 @@ impl<'a, 'tcx> Visitor<'tcx> for DeadVisitor<'a, 'tcx> {
             // For items that have a definition with a signature followed by a
             // block, point only at the signature.
             let span = match item.node {
-                hir::ItemFn(..) |
-                hir::ItemMod(..) |
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemTrait(..) |
-                hir::ItemImpl(..) => self.tcx.sess.codemap().def_span(item.span),
+                hir::ItemKind::Fn(..) |
+                hir::ItemKind::Mod(..) |
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Trait(..) |
+                hir::ItemKind::Impl(..) => self.tcx.sess.codemap().def_span(item.span),
                 _ => item.span,
             };
             self.warn_dead_code(
diff --git a/src/librustc/middle/entry.rs b/src/librustc/middle/entry.rs
index ebc79646662..feeb508d676 100644
--- a/src/librustc/middle/entry.rs
+++ b/src/librustc/middle/entry.rs
@@ -16,7 +16,7 @@ use syntax::ast::NodeId;
 use syntax::attr;
 use syntax::entry::EntryPointType;
 use syntax_pos::Span;
-use hir::{Item, ItemFn, ImplItem, TraitItem};
+use hir::{Item, ItemKind, ImplItem, TraitItem};
 use hir::itemlikevisit::ItemLikeVisitor;
 
 struct EntryContext<'a, 'tcx: 'a> {
@@ -91,7 +91,7 @@ pub fn find_entry_point(session: &Session,
 // them in sync.
 fn entry_point_type(item: &Item, at_root: bool) -> EntryPointType {
     match item.node {
-        ItemFn(..) => {
+        ItemKind::Fn(..) => {
             if attr::contains_name(&item.attrs, "start") {
                 EntryPointType::Start
             } else if attr::contains_name(&item.attrs, "main") {
diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs
index a83aa47fd4f..5beafe2b601 100644
--- a/src/librustc/middle/expr_use_visitor.rs
+++ b/src/librustc/middle/expr_use_visitor.rs
@@ -392,43 +392,43 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
         self.walk_adjustment(expr);
 
         match expr.node {
-            hir::ExprPath(_) => { }
+            hir::ExprKind::Path(_) => { }
 
-            hir::ExprType(ref subexpr, _) => {
+            hir::ExprKind::Type(ref subexpr, _) => {
                 self.walk_expr(&subexpr)
             }
 
-            hir::ExprUnary(hir::UnDeref, ref base) => {      // *base
+            hir::ExprKind::Unary(hir::UnDeref, ref base) => {      // *base
                 self.select_from_expr(&base);
             }
 
-            hir::ExprField(ref base, _) => {         // base.f
+            hir::ExprKind::Field(ref base, _) => {         // base.f
                 self.select_from_expr(&base);
             }
 
-            hir::ExprIndex(ref lhs, ref rhs) => {       // lhs[rhs]
+            hir::ExprKind::Index(ref lhs, ref rhs) => {       // lhs[rhs]
                 self.select_from_expr(&lhs);
                 self.consume_expr(&rhs);
             }
 
-            hir::ExprCall(ref callee, ref args) => {    // callee(args)
+            hir::ExprKind::Call(ref callee, ref args) => {    // callee(args)
                 self.walk_callee(expr, &callee);
                 self.consume_exprs(args);
             }
 
-            hir::ExprMethodCall(.., ref args) => { // callee.m(args)
+            hir::ExprKind::MethodCall(.., ref args) => { // callee.m(args)
                 self.consume_exprs(args);
             }
 
-            hir::ExprStruct(_, ref fields, ref opt_with) => {
+            hir::ExprKind::Struct(_, ref fields, ref opt_with) => {
                 self.walk_struct_expr(fields, opt_with);
             }
 
-            hir::ExprTup(ref exprs) => {
+            hir::ExprKind::Tup(ref exprs) => {
                 self.consume_exprs(exprs);
             }
 
-            hir::ExprIf(ref cond_expr, ref then_expr, ref opt_else_expr) => {
+            hir::ExprKind::If(ref cond_expr, ref then_expr, ref opt_else_expr) => {
                 self.consume_expr(&cond_expr);
                 self.walk_expr(&then_expr);
                 if let Some(ref else_expr) = *opt_else_expr {
@@ -436,7 +436,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
                 }
             }
 
-            hir::ExprMatch(ref discr, ref arms, _) => {
+            hir::ExprKind::Match(ref discr, ref arms, _) => {
                 let discr_cmt = Rc::new(return_if_err!(self.mc.cat_expr(&discr)));
                 let r = self.tcx().types.re_empty;
                 self.borrow_expr(&discr, r, ty::ImmBorrow, MatchDiscriminant);
@@ -449,11 +449,11 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
                 }
             }
 
-            hir::ExprArray(ref exprs) => {
+            hir::ExprKind::Array(ref exprs) => {
                 self.consume_exprs(exprs);
             }
 
-            hir::ExprAddrOf(m, ref base) => {   // &base
+            hir::ExprKind::AddrOf(m, ref base) => {   // &base
                 // make sure that the thing we are pointing out stays valid
                 // for the lifetime `scope_r` of the resulting ptr:
                 let expr_ty = return_if_err!(self.mc.expr_ty(expr));
@@ -463,7 +463,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
                 }
             }
 
-            hir::ExprInlineAsm(ref ia, ref outputs, ref inputs) => {
+            hir::ExprKind::InlineAsm(ref ia, ref outputs, ref inputs) => {
                 for (o, output) in ia.outputs.iter().zip(outputs) {
                     if o.is_indirect {
                         self.consume_expr(output);
@@ -479,47 +479,47 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
                 self.consume_exprs(inputs);
             }
 
-            hir::ExprContinue(..) |
-            hir::ExprLit(..) => {}
+            hir::ExprKind::Continue(..) |
+            hir::ExprKind::Lit(..) => {}
 
-            hir::ExprLoop(ref blk, _, _) => {
+            hir::ExprKind::Loop(ref blk, _, _) => {
                 self.walk_block(&blk);
             }
 
-            hir::ExprWhile(ref cond_expr, ref blk, _) => {
+            hir::ExprKind::While(ref cond_expr, ref blk, _) => {
                 self.consume_expr(&cond_expr);
                 self.walk_block(&blk);
             }
 
-            hir::ExprUnary(_, ref lhs) => {
+            hir::ExprKind::Unary(_, ref lhs) => {
                 self.consume_expr(&lhs);
             }
 
-            hir::ExprBinary(_, ref lhs, ref rhs) => {
+            hir::ExprKind::Binary(_, ref lhs, ref rhs) => {
                 self.consume_expr(&lhs);
                 self.consume_expr(&rhs);
             }
 
-            hir::ExprBlock(ref blk, _) => {
+            hir::ExprKind::Block(ref blk, _) => {
                 self.walk_block(&blk);
             }
 
-            hir::ExprBreak(_, ref opt_expr) | hir::ExprRet(ref opt_expr) => {
+            hir::ExprKind::Break(_, ref opt_expr) | hir::ExprKind::Ret(ref opt_expr) => {
                 if let Some(ref expr) = *opt_expr {
                     self.consume_expr(&expr);
                 }
             }
 
-            hir::ExprAssign(ref lhs, ref rhs) => {
+            hir::ExprKind::Assign(ref lhs, ref rhs) => {
                 self.mutate_expr(expr, &lhs, MutateMode::JustWrite);
                 self.consume_expr(&rhs);
             }
 
-            hir::ExprCast(ref base, _) => {
+            hir::ExprKind::Cast(ref base, _) => {
                 self.consume_expr(&base);
             }
 
-            hir::ExprAssignOp(_, ref lhs, ref rhs) => {
+            hir::ExprKind::AssignOp(_, ref lhs, ref rhs) => {
                 if self.mc.tables.is_method_call(expr) {
                     self.consume_expr(lhs);
                 } else {
@@ -528,19 +528,19 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
                 self.consume_expr(&rhs);
             }
 
-            hir::ExprRepeat(ref base, _) => {
+            hir::ExprKind::Repeat(ref base, _) => {
                 self.consume_expr(&base);
             }
 
-            hir::ExprClosure(.., fn_decl_span, _) => {
+            hir::ExprKind::Closure(.., fn_decl_span, _) => {
                 self.walk_captures(expr, fn_decl_span)
             }
 
-            hir::ExprBox(ref base) => {
+            hir::ExprKind::Box(ref base) => {
                 self.consume_expr(&base);
             }
 
-            hir::ExprYield(ref value) => {
+            hir::ExprKind::Yield(ref value) => {
                 self.consume_expr(&value);
             }
         }
@@ -586,21 +586,21 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
 
     fn walk_stmt(&mut self, stmt: &hir::Stmt) {
         match stmt.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 match decl.node {
-                    hir::DeclLocal(ref local) => {
+                    hir::DeclKind::Local(ref local) => {
                         self.walk_local(&local);
                     }
 
-                    hir::DeclItem(_) => {
+                    hir::DeclKind::Item(_) => {
                         // we don't visit nested items in this visitor,
                         // only the fn body we were given.
                     }
                 }
             }
 
-            hir::StmtExpr(ref expr, _) |
-            hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) |
+            hir::StmtKind::Semi(ref expr, _) => {
                 self.consume_expr(&expr);
             }
         }
diff --git a/src/librustc/middle/intrinsicck.rs b/src/librustc/middle/intrinsicck.rs
index 27f7dbf508d..668bac1e479 100644
--- a/src/librustc/middle/intrinsicck.rs
+++ b/src/librustc/middle/intrinsicck.rs
@@ -145,7 +145,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ExprVisitor<'a, 'tcx> {
     }
 
     fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
-        let def = if let hir::ExprPath(ref qpath) = expr.node {
+        let def = if let hir::ExprKind::Path(ref qpath) = expr.node {
             self.tables.qpath_def(qpath, expr.hir_id)
         } else {
             Def::Err
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index 07a9dd75d4c..b828b1bd30a 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -454,14 +454,14 @@ fn visit_arm<'a, 'tcx>(ir: &mut IrMaps<'a, 'tcx>, arm: &'tcx hir::Arm) {
 fn visit_expr<'a, 'tcx>(ir: &mut IrMaps<'a, 'tcx>, expr: &'tcx Expr) {
     match expr.node {
       // live nodes required for uses or definitions of variables:
-      hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
+      hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) => {
         debug!("expr {}: path that leads to {:?}", expr.id, path.def);
         if let Def::Local(..) = path.def {
             ir.add_live_node_for_node(expr.hir_id, ExprNode(expr.span));
         }
         intravisit::walk_expr(ir, expr);
       }
-      hir::ExprClosure(..) => {
+      hir::ExprKind::Closure(..) => {
         // Interesting control flow (for loops can contain labeled
         // breaks or continues)
         ir.add_live_node_for_node(expr.hir_id, ExprNode(expr.span));
@@ -486,25 +486,43 @@ fn visit_expr<'a, 'tcx>(ir: &mut IrMaps<'a, 'tcx>, expr: &'tcx Expr) {
       }
 
       // live nodes required for interesting control flow:
-      hir::ExprIf(..) | hir::ExprMatch(..) | hir::ExprWhile(..) | hir::ExprLoop(..) => {
+      hir::ExprKind::If(..) |
+      hir::ExprKind::Match(..) |
+      hir::ExprKind::While(..) |
+      hir::ExprKind::Loop(..) => {
         ir.add_live_node_for_node(expr.hir_id, ExprNode(expr.span));
         intravisit::walk_expr(ir, expr);
       }
-      hir::ExprBinary(op, ..) if op.node.is_lazy() => {
+      hir::ExprKind::Binary(op, ..) if op.node.is_lazy() => {
         ir.add_live_node_for_node(expr.hir_id, ExprNode(expr.span));
         intravisit::walk_expr(ir, expr);
       }
 
       // otherwise, live nodes are not required:
-      hir::ExprIndex(..) | hir::ExprField(..) |
-      hir::ExprArray(..) | hir::ExprCall(..) | hir::ExprMethodCall(..) |
-      hir::ExprTup(..) | hir::ExprBinary(..) | hir::ExprAddrOf(..) |
-      hir::ExprCast(..) | hir::ExprUnary(..) | hir::ExprBreak(..) |
-      hir::ExprContinue(_) | hir::ExprLit(_) | hir::ExprRet(..) |
-      hir::ExprBlock(..) | hir::ExprAssign(..) | hir::ExprAssignOp(..) |
-      hir::ExprStruct(..) | hir::ExprRepeat(..) |
-      hir::ExprInlineAsm(..) | hir::ExprBox(..) | hir::ExprYield(..) |
-      hir::ExprType(..) | hir::ExprPath(hir::QPath::TypeRelative(..)) => {
+      hir::ExprKind::Index(..) |
+      hir::ExprKind::Field(..) |
+      hir::ExprKind::Array(..) |
+      hir::ExprKind::Call(..) |
+      hir::ExprKind::MethodCall(..) |
+      hir::ExprKind::Tup(..) |
+      hir::ExprKind::Binary(..) |
+      hir::ExprKind::AddrOf(..) |
+      hir::ExprKind::Cast(..) |
+      hir::ExprKind::Unary(..) |
+      hir::ExprKind::Break(..) |
+      hir::ExprKind::Continue(_) |
+      hir::ExprKind::Lit(_) |
+      hir::ExprKind::Ret(..) |
+      hir::ExprKind::Block(..) |
+      hir::ExprKind::Assign(..) |
+      hir::ExprKind::AssignOp(..) |
+      hir::ExprKind::Struct(..) |
+      hir::ExprKind::Repeat(..) |
+      hir::ExprKind::InlineAsm(..) |
+      hir::ExprKind::Box(..) |
+      hir::ExprKind::Yield(..) |
+      hir::ExprKind::Type(..) |
+      hir::ExprKind::Path(hir::QPath::TypeRelative(..)) => {
           intravisit::walk_expr(ir, expr);
       }
     }
@@ -860,11 +878,11 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
     fn propagate_through_stmt(&mut self, stmt: &hir::Stmt, succ: LiveNode)
                               -> LiveNode {
         match stmt.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 self.propagate_through_decl(&decl, succ)
             }
 
-            hir::StmtExpr(ref expr, _) | hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) | hir::StmtKind::Semi(ref expr, _) => {
                 self.propagate_through_expr(&expr, succ)
             }
         }
@@ -873,10 +891,10 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
     fn propagate_through_decl(&mut self, decl: &hir::Decl, succ: LiveNode)
                               -> LiveNode {
         match decl.node {
-            hir::DeclLocal(ref local) => {
+            hir::DeclKind::Local(ref local) => {
                 self.propagate_through_local(&local, succ)
             }
-            hir::DeclItem(_) => succ,
+            hir::DeclKind::Item(_) => succ,
         }
     }
 
@@ -920,16 +938,16 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
 
         match expr.node {
           // Interesting cases with control flow or which gen/kill
-          hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
+          hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) => {
               self.access_path(expr.hir_id, path, succ, ACC_READ | ACC_USE)
           }
 
-          hir::ExprField(ref e, _) => {
+          hir::ExprKind::Field(ref e, _) => {
               self.propagate_through_expr(&e, succ)
           }
 
-          hir::ExprClosure(.., blk_id, _, _) => {
-              debug!("{} is an ExprClosure", self.ir.tcx.hir.node_to_pretty_string(expr.id));
+          hir::ExprKind::Closure(.., blk_id, _, _) => {
+              debug!("{} is an ExprKind::Closure", self.ir.tcx.hir.node_to_pretty_string(expr.id));
 
               // The next-node for a break is the successor of the entire
               // loop. The next-node for a continue is the top of this loop.
@@ -956,7 +974,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
               })
           }
 
-          hir::ExprIf(ref cond, ref then, ref els) => {
+          hir::ExprKind::If(ref cond, ref then, ref els) => {
             //
             //     (cond)
             //       |
@@ -978,17 +996,17 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_expr(&cond, ln)
           }
 
-          hir::ExprWhile(ref cond, ref blk, _) => {
+          hir::ExprKind::While(ref cond, ref blk, _) => {
             self.propagate_through_loop(expr, WhileLoop(&cond), &blk, succ)
           }
 
           // Note that labels have been resolved, so we don't need to look
           // at the label ident
-          hir::ExprLoop(ref blk, _, _) => {
+          hir::ExprKind::Loop(ref blk, _, _) => {
             self.propagate_through_loop(expr, LoopLoop, &blk, succ)
           }
 
-          hir::ExprMatch(ref e, ref arms, _) => {
+          hir::ExprKind::Match(ref e, ref arms, _) => {
             //
             //      (e)
             //       |
@@ -1023,13 +1041,13 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_expr(&e, ln)
           }
 
-          hir::ExprRet(ref o_e) => {
+          hir::ExprKind::Ret(ref o_e) => {
             // ignore succ and subst exit_ln:
             let exit_ln = self.s.exit_ln;
             self.propagate_through_opt_expr(o_e.as_ref().map(|e| &**e), exit_ln)
           }
 
-          hir::ExprBreak(label, ref opt_expr) => {
+          hir::ExprKind::Break(label, ref opt_expr) => {
               // Find which label this break jumps to
               let target = match label.target_id {
                     Ok(node_id) => self.break_ln.get(&node_id),
@@ -1045,7 +1063,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
               }
           }
 
-          hir::ExprContinue(label) => {
+          hir::ExprKind::Continue(label) => {
               // Find which label this expr continues to
               let sc = match label.target_id {
                     Ok(node_id) => node_id,
@@ -1061,7 +1079,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
               }
           }
 
-          hir::ExprAssign(ref l, ref r) => {
+          hir::ExprKind::Assign(ref l, ref r) => {
             // see comment on places in
             // propagate_through_place_components()
             let succ = self.write_place(&l, succ, ACC_WRITE);
@@ -1069,7 +1087,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_expr(&r, succ)
           }
 
-          hir::ExprAssignOp(_, ref l, ref r) => {
+          hir::ExprKind::AssignOp(_, ref l, ref r) => {
             // an overloaded assign op is like a method call
             if self.tables.is_method_call(expr) {
                 let succ = self.propagate_through_expr(&l, succ);
@@ -1085,18 +1103,18 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
 
           // Uninteresting cases: just propagate in rev exec order
 
-          hir::ExprArray(ref exprs) => {
+          hir::ExprKind::Array(ref exprs) => {
             self.propagate_through_exprs(exprs, succ)
           }
 
-          hir::ExprStruct(_, ref fields, ref with_expr) => {
+          hir::ExprKind::Struct(_, ref fields, ref with_expr) => {
             let succ = self.propagate_through_opt_expr(with_expr.as_ref().map(|e| &**e), succ);
             fields.iter().rev().fold(succ, |succ, field| {
                 self.propagate_through_expr(&field.expr, succ)
             })
           }
 
-          hir::ExprCall(ref f, ref args) => {
+          hir::ExprKind::Call(ref f, ref args) => {
             // FIXME(canndrew): This is_never should really be an is_uninhabited
             let succ = if self.tables.expr_ty(expr).is_never() {
                 self.s.exit_ln
@@ -1107,7 +1125,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_expr(&f, succ)
           }
 
-          hir::ExprMethodCall(.., ref args) => {
+          hir::ExprKind::MethodCall(.., ref args) => {
             // FIXME(canndrew): This is_never should really be an is_uninhabited
             let succ = if self.tables.expr_ty(expr).is_never() {
                 self.s.exit_ln
@@ -1117,11 +1135,11 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_exprs(args, succ)
           }
 
-          hir::ExprTup(ref exprs) => {
+          hir::ExprKind::Tup(ref exprs) => {
             self.propagate_through_exprs(exprs, succ)
           }
 
-          hir::ExprBinary(op, ref l, ref r) if op.node.is_lazy() => {
+          hir::ExprKind::Binary(op, ref l, ref r) if op.node.is_lazy() => {
             let r_succ = self.propagate_through_expr(&r, succ);
 
             let ln = self.live_node(expr.hir_id, expr.span);
@@ -1131,23 +1149,23 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_expr(&l, ln)
           }
 
-          hir::ExprIndex(ref l, ref r) |
-          hir::ExprBinary(_, ref l, ref r) => {
+          hir::ExprKind::Index(ref l, ref r) |
+          hir::ExprKind::Binary(_, ref l, ref r) => {
             let r_succ = self.propagate_through_expr(&r, succ);
             self.propagate_through_expr(&l, r_succ)
           }
 
-          hir::ExprBox(ref e) |
-          hir::ExprAddrOf(_, ref e) |
-          hir::ExprCast(ref e, _) |
-          hir::ExprType(ref e, _) |
-          hir::ExprUnary(_, ref e) |
-          hir::ExprYield(ref e) |
-          hir::ExprRepeat(ref e, _) => {
+          hir::ExprKind::Box(ref e) |
+          hir::ExprKind::AddrOf(_, ref e) |
+          hir::ExprKind::Cast(ref e, _) |
+          hir::ExprKind::Type(ref e, _) |
+          hir::ExprKind::Unary(_, ref e) |
+          hir::ExprKind::Yield(ref e) |
+          hir::ExprKind::Repeat(ref e, _) => {
             self.propagate_through_expr(&e, succ)
           }
 
-          hir::ExprInlineAsm(ref ia, ref outputs, ref inputs) => {
+          hir::ExprKind::InlineAsm(ref ia, ref outputs, ref inputs) => {
             let succ = ia.outputs.iter().zip(outputs).rev().fold(succ, |succ, (o, output)| {
                 // see comment on places
                 // in propagate_through_place_components()
@@ -1164,13 +1182,13 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             self.propagate_through_exprs(inputs, succ)
           }
 
-          hir::ExprLit(..) | hir::ExprPath(hir::QPath::TypeRelative(..)) => {
+          hir::ExprKind::Lit(..) | hir::ExprKind::Path(hir::QPath::TypeRelative(..)) => {
             succ
           }
 
           // Note that labels have been resolved, so we don't need to look
           // at the label ident
-          hir::ExprBlock(ref blk, _) => {
+          hir::ExprKind::Block(ref blk, _) => {
             self.propagate_through_block(&blk, succ)
           }
         }
@@ -1230,8 +1248,8 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
         // just ignore such cases and treat them as reads.
 
         match expr.node {
-            hir::ExprPath(_) => succ,
-            hir::ExprField(ref e, _) => self.propagate_through_expr(&e, succ),
+            hir::ExprKind::Path(_) => succ,
+            hir::ExprKind::Field(ref e, _) => self.propagate_through_expr(&e, succ),
             _ => self.propagate_through_expr(expr, succ)
         }
     }
@@ -1240,7 +1258,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
     fn write_place(&mut self, expr: &Expr, succ: LiveNode, acc: u32)
                     -> LiveNode {
         match expr.node {
-          hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
+          hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) => {
               self.access_path(expr.hir_id, path, succ, acc)
           }
 
@@ -1393,13 +1411,13 @@ fn check_arm<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, arm: &'tcx hir::Arm) {
 
 fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
     match expr.node {
-      hir::ExprAssign(ref l, _) => {
+      hir::ExprKind::Assign(ref l, _) => {
         this.check_place(&l);
 
         intravisit::walk_expr(this, expr);
       }
 
-      hir::ExprAssignOp(_, ref l, _) => {
+      hir::ExprKind::AssignOp(_, ref l, _) => {
         if !this.tables.is_method_call(expr) {
             this.check_place(&l);
         }
@@ -1407,7 +1425,7 @@ fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
         intravisit::walk_expr(this, expr);
       }
 
-      hir::ExprInlineAsm(ref ia, ref outputs, ref inputs) => {
+      hir::ExprKind::InlineAsm(ref ia, ref outputs, ref inputs) => {
         for input in inputs {
           this.visit_expr(input);
         }
@@ -1424,16 +1442,16 @@ fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
       }
 
       // no correctness conditions related to liveness
-      hir::ExprCall(..) | hir::ExprMethodCall(..) | hir::ExprIf(..) |
-      hir::ExprMatch(..) | hir::ExprWhile(..) | hir::ExprLoop(..) |
-      hir::ExprIndex(..) | hir::ExprField(..) |
-      hir::ExprArray(..) | hir::ExprTup(..) | hir::ExprBinary(..) |
-      hir::ExprCast(..) | hir::ExprUnary(..) | hir::ExprRet(..) |
-      hir::ExprBreak(..) | hir::ExprContinue(..) | hir::ExprLit(_) |
-      hir::ExprBlock(..) | hir::ExprAddrOf(..) |
-      hir::ExprStruct(..) | hir::ExprRepeat(..) |
-      hir::ExprClosure(..) | hir::ExprPath(_) | hir::ExprYield(..) |
-      hir::ExprBox(..) | hir::ExprType(..) => {
+      hir::ExprKind::Call(..) | hir::ExprKind::MethodCall(..) | hir::ExprKind::If(..) |
+      hir::ExprKind::Match(..) | hir::ExprKind::While(..) | hir::ExprKind::Loop(..) |
+      hir::ExprKind::Index(..) | hir::ExprKind::Field(..) |
+      hir::ExprKind::Array(..) | hir::ExprKind::Tup(..) | hir::ExprKind::Binary(..) |
+      hir::ExprKind::Cast(..) | hir::ExprKind::Unary(..) | hir::ExprKind::Ret(..) |
+      hir::ExprKind::Break(..) | hir::ExprKind::Continue(..) | hir::ExprKind::Lit(_) |
+      hir::ExprKind::Block(..) | hir::ExprKind::AddrOf(..) |
+      hir::ExprKind::Struct(..) | hir::ExprKind::Repeat(..) |
+      hir::ExprKind::Closure(..) | hir::ExprKind::Path(_) | hir::ExprKind::Yield(..) |
+      hir::ExprKind::Box(..) | hir::ExprKind::Type(..) => {
         intravisit::walk_expr(this, expr);
       }
     }
@@ -1442,7 +1460,7 @@ fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
 impl<'a, 'tcx> Liveness<'a, 'tcx> {
     fn check_place(&mut self, expr: &'tcx Expr) {
         match expr.node {
-            hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
+            hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) => {
                 if let Def::Local(nid) = path.def {
                     // Assignment to an immutable variable or argument: only legal
                     // if there is no later assignment. If this local is actually
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index 3b89a9d2de5..0602dc55c43 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -639,7 +639,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
 
         let expr_ty = self.expr_ty(expr)?;
         match expr.node {
-          hir::ExprUnary(hir::UnDeref, ref e_base) => {
+          hir::ExprKind::Unary(hir::UnDeref, ref e_base) => {
             if self.tables.is_method_call(expr) {
                 self.cat_overloaded_place(expr, e_base, NoteNone)
             } else {
@@ -648,7 +648,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
             }
           }
 
-          hir::ExprField(ref base, f_ident) => {
+          hir::ExprKind::Field(ref base, f_ident) => {
             let base_cmt = Rc::new(self.cat_expr(&base)?);
             debug!("cat_expr(cat_field): id={} expr={:?} base={:?}",
                    expr.id,
@@ -658,7 +658,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
             Ok(self.cat_field(expr, base_cmt, f_index, f_ident, expr_ty))
           }
 
-          hir::ExprIndex(ref base, _) => {
+          hir::ExprKind::Index(ref base, _) => {
             if self.tables.is_method_call(expr) {
                 // If this is an index implemented by a method call, then it
                 // will include an implicit deref of the result.
@@ -672,26 +672,26 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
             }
           }
 
-          hir::ExprPath(ref qpath) => {
+          hir::ExprKind::Path(ref qpath) => {
               let def = self.tables.qpath_def(qpath, expr.hir_id);
               self.cat_def(expr.hir_id, expr.span, expr_ty, def)
           }
 
-          hir::ExprType(ref e, _) => {
+          hir::ExprKind::Type(ref e, _) => {
             self.cat_expr(&e)
           }
 
-          hir::ExprAddrOf(..) | hir::ExprCall(..) |
-          hir::ExprAssign(..) | hir::ExprAssignOp(..) |
-          hir::ExprClosure(..) | hir::ExprRet(..) |
-          hir::ExprUnary(..) | hir::ExprYield(..) |
-          hir::ExprMethodCall(..) | hir::ExprCast(..) |
-          hir::ExprArray(..) | hir::ExprTup(..) | hir::ExprIf(..) |
-          hir::ExprBinary(..) | hir::ExprWhile(..) |
-          hir::ExprBlock(..) | hir::ExprLoop(..) | hir::ExprMatch(..) |
-          hir::ExprLit(..) | hir::ExprBreak(..) |
-          hir::ExprContinue(..) | hir::ExprStruct(..) | hir::ExprRepeat(..) |
-          hir::ExprInlineAsm(..) | hir::ExprBox(..) => {
+          hir::ExprKind::AddrOf(..) | hir::ExprKind::Call(..) |
+          hir::ExprKind::Assign(..) | hir::ExprKind::AssignOp(..) |
+          hir::ExprKind::Closure(..) | hir::ExprKind::Ret(..) |
+          hir::ExprKind::Unary(..) | hir::ExprKind::Yield(..) |
+          hir::ExprKind::MethodCall(..) | hir::ExprKind::Cast(..) |
+          hir::ExprKind::Array(..) | hir::ExprKind::Tup(..) | hir::ExprKind::If(..) |
+          hir::ExprKind::Binary(..) | hir::ExprKind::While(..) |
+          hir::ExprKind::Block(..) | hir::ExprKind::Loop(..) | hir::ExprKind::Match(..) |
+          hir::ExprKind::Lit(..) | hir::ExprKind::Break(..) |
+          hir::ExprKind::Continue(..) | hir::ExprKind::Struct(..) | hir::ExprKind::Repeat(..) |
+          hir::ExprKind::InlineAsm(..) | hir::ExprKind::Box(..) => {
             Ok(self.cat_rvalue_node(expr.hir_id, expr.span, expr_ty))
           }
         }
diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs
index 476f3f5799d..a504697008e 100644
--- a/src/librustc/middle/reachable.rs
+++ b/src/librustc/middle/reachable.rs
@@ -58,8 +58,8 @@ fn item_might_be_inlined(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     }
 
     match item.node {
-        hir::ItemImpl(..) |
-        hir::ItemFn(..) => {
+        hir::ItemKind::Impl(..) |
+        hir::ItemKind::Fn(..) => {
             let generics = tcx.generics_of(tcx.hir.local_def_id(item.id));
             generics_require_inlining(generics)
         }
@@ -116,10 +116,10 @@ impl<'a, 'tcx> Visitor<'tcx> for ReachableContext<'a, 'tcx> {
 
     fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
         let def = match expr.node {
-            hir::ExprPath(ref qpath) => {
+            hir::ExprKind::Path(ref qpath) => {
                 Some(self.tables.qpath_def(qpath, expr.hir_id))
             }
-            hir::ExprMethodCall(..) => {
+            hir::ExprKind::MethodCall(..) => {
                 self.tables.type_dependent_defs().get(expr.hir_id).cloned()
             }
             _ => None
@@ -171,7 +171,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
         match self.tcx.hir.find(node_id) {
             Some(hir_map::NodeItem(item)) => {
                 match item.node {
-                    hir::ItemFn(..) =>
+                    hir::ItemKind::Fn(..) =>
                         item_might_be_inlined(self.tcx, &item, self.tcx.codegen_fn_attrs(def_id)),
                     _ => false,
                 }
@@ -202,7 +202,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
                             // does too.
                             let impl_node_id = self.tcx.hir.as_local_node_id(impl_did).unwrap();
                             match self.tcx.hir.expect_item(impl_node_id).node {
-                                hir::ItemImpl(..) => {
+                                hir::ItemKind::Impl(..) => {
                                     let generics = self.tcx.generics_of(impl_did);
                                     generics_require_inlining(&generics)
                                 }
@@ -238,7 +238,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
             // If we are building an executable, only explicitly extern
             // types need to be exported.
             if let hir_map::NodeItem(item) = *node {
-                let reachable = if let hir::ItemFn(_, header, ..) = item.node {
+                let reachable = if let hir::ItemKind::Fn(_, header, ..) = item.node {
                     header.abi != Abi::Rust
                 } else {
                     false
@@ -260,7 +260,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
         match *node {
             hir_map::NodeItem(item) => {
                 match item.node {
-                    hir::ItemFn(.., body) => {
+                    hir::ItemKind::Fn(.., body) => {
                         let def_id = self.tcx.hir.local_def_id(item.id);
                         if item_might_be_inlined(self.tcx,
                                                  &item,
@@ -272,20 +272,27 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
                     // Reachable constants will be inlined into other crates
                     // unconditionally, so we need to make sure that their
                     // contents are also reachable.
-                    hir::ItemConst(_, init) => {
+                    hir::ItemKind::Const(_, init) => {
                         self.visit_nested_body(init);
                     }
 
                     // These are normal, nothing reachable about these
                     // inherently and their children are already in the
                     // worklist, as determined by the privacy pass
-                    hir::ItemExternCrate(_) | hir::ItemUse(..) |
-                    hir::ItemExistential(..) |
-                    hir::ItemTy(..) | hir::ItemStatic(..) |
-                    hir::ItemMod(..) | hir::ItemForeignMod(..) |
-                    hir::ItemImpl(..) | hir::ItemTrait(..) | hir::ItemTraitAlias(..) |
-                    hir::ItemStruct(..) | hir::ItemEnum(..) |
-                    hir::ItemUnion(..) |  hir::ItemGlobalAsm(..) => {}
+                    hir::ItemKind::ExternCrate(_) |
+                    hir::ItemKind::Use(..) |
+                    hir::ItemKind::Existential(..) |
+                    hir::ItemKind::Ty(..) |
+                    hir::ItemKind::Static(..) |
+                    hir::ItemKind::Mod(..) |
+                    hir::ItemKind::ForeignMod(..) |
+                    hir::ItemKind::Impl(..) |
+                    hir::ItemKind::Trait(..) |
+                    hir::ItemKind::TraitAlias(..) |
+                    hir::ItemKind::Struct(..) |
+                    hir::ItemKind::Enum(..) |
+                    hir::ItemKind::Union(..) |
+                    hir::ItemKind::GlobalAsm(..) => {}
                 }
             }
             hir_map::NodeTraitItem(trait_method) => {
@@ -315,7 +322,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
                     hir::ImplItemKind::Type(_) => {}
                 }
             }
-            hir_map::NodeExpr(&hir::Expr { node: hir::ExprClosure(.., body, _, _), .. }) => {
+            hir_map::NodeExpr(&hir::Expr { node: hir::ExprKind::Closure(.., body, _, _), .. }) => {
                 self.visit_nested_body(body);
             }
             // Nothing to recurse on for these
@@ -356,7 +363,7 @@ impl<'a, 'tcx: 'a> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a,
         }
 
         // We need only trait impls here, not inherent impls, and only non-exported ones
-        if let hir::ItemImpl(.., Some(ref trait_ref), _, ref impl_item_refs) = item.node {
+        if let hir::ItemKind::Impl(.., Some(ref trait_ref), _, ref impl_item_refs) = item.node {
             if !self.access_levels.is_reachable(item.id) {
                 for impl_item_ref in impl_item_refs {
                     self.worklist.push(impl_item_ref.id.node_id);
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs
index a11c8f5dc04..ebdc9c922b1 100644
--- a/src/librustc/middle/region.rs
+++ b/src/librustc/middle/region.rs
@@ -858,8 +858,8 @@ fn resolve_block<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, blk:
         // index information.)
 
         for (i, statement) in blk.stmts.iter().enumerate() {
-            if let hir::StmtDecl(..) = statement.node {
-                // Each StmtDecl introduces a subscope for bindings
+            if let hir::StmtKind::Decl(..) = statement.node {
+                // Each StmtKind::Decl introduces a subscope for bindings
                 // introduced by the declaration; this subscope covers
                 // a suffix of the block . Each subscope in a block
                 // has the previous subscope in the block as a parent,
@@ -943,39 +943,39 @@ fn resolve_expr<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, expr:
             // scopes, meaning that temporaries cannot outlive them.
             // This ensures fixed size stacks.
 
-            hir::ExprBinary(codemap::Spanned { node: hir::BiAnd, .. }, _, ref r) |
-            hir::ExprBinary(codemap::Spanned { node: hir::BiOr, .. }, _, ref r) => {
+            hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::And, .. }, _, ref r) |
+            hir::ExprKind::Binary(codemap::Spanned { node: hir::BinOpKind::Or, .. }, _, ref r) => {
                 // For shortcircuiting operators, mark the RHS as a terminating
                 // scope since it only executes conditionally.
                 terminating(r.hir_id.local_id);
             }
 
-            hir::ExprIf(ref expr, ref then, Some(ref otherwise)) => {
+            hir::ExprKind::If(ref expr, ref then, Some(ref otherwise)) => {
                 terminating(expr.hir_id.local_id);
                 terminating(then.hir_id.local_id);
                 terminating(otherwise.hir_id.local_id);
             }
 
-            hir::ExprIf(ref expr, ref then, None) => {
+            hir::ExprKind::If(ref expr, ref then, None) => {
                 terminating(expr.hir_id.local_id);
                 terminating(then.hir_id.local_id);
             }
 
-            hir::ExprLoop(ref body, _, _) => {
+            hir::ExprKind::Loop(ref body, _, _) => {
                 terminating(body.hir_id.local_id);
             }
 
-            hir::ExprWhile(ref expr, ref body, _) => {
+            hir::ExprKind::While(ref expr, ref body, _) => {
                 terminating(expr.hir_id.local_id);
                 terminating(body.hir_id.local_id);
             }
 
-            hir::ExprMatch(..) => {
+            hir::ExprKind::Match(..) => {
                 visitor.cx.var_parent = visitor.cx.parent;
             }
 
-            hir::ExprAssignOp(..) | hir::ExprIndex(..) |
-            hir::ExprUnary(..) | hir::ExprCall(..) | hir::ExprMethodCall(..) => {
+            hir::ExprKind::AssignOp(..) | hir::ExprKind::Index(..) |
+            hir::ExprKind::Unary(..) | hir::ExprKind::Call(..) | hir::ExprKind::MethodCall(..) => {
                 // FIXME(https://github.com/rust-lang/rfcs/issues/811) Nested method calls
                 //
                 // The lifetimes for a call or method call look as follows:
@@ -1003,7 +1003,7 @@ fn resolve_expr<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, expr:
     match expr.node {
         // Manually recurse over closures, because they are the only
         // case of nested bodies that share the parent environment.
-        hir::ExprClosure(.., body, _, _) => {
+        hir::ExprKind::Closure(.., body, _, _) => {
             let body = visitor.tcx.hir.body(body);
             visitor.visit_body(body);
         }
@@ -1015,7 +1015,7 @@ fn resolve_expr<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, expr:
 
     debug!("resolve_expr post-increment {}, expr = {:?}", visitor.expr_and_pat_count, expr);
 
-    if let hir::ExprYield(..) = expr.node {
+    if let hir::ExprKind::Yield(..) = expr.node {
         // Mark this expr's scope and all parent scopes as containing `yield`.
         let mut scope = Scope::Node(expr.hir_id.local_id);
         loop {
@@ -1193,27 +1193,27 @@ fn resolve_local<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>,
         blk_id: Option<Scope>)
     {
         match expr.node {
-            hir::ExprAddrOf(_, ref subexpr) => {
+            hir::ExprKind::AddrOf(_, ref subexpr) => {
                 record_rvalue_scope_if_borrow_expr(visitor, &subexpr, blk_id);
                 record_rvalue_scope(visitor, &subexpr, blk_id);
             }
-            hir::ExprStruct(_, ref fields, _) => {
+            hir::ExprKind::Struct(_, ref fields, _) => {
                 for field in fields {
                     record_rvalue_scope_if_borrow_expr(
                         visitor, &field.expr, blk_id);
                 }
             }
-            hir::ExprArray(ref subexprs) |
-            hir::ExprTup(ref subexprs) => {
+            hir::ExprKind::Array(ref subexprs) |
+            hir::ExprKind::Tup(ref subexprs) => {
                 for subexpr in subexprs {
                     record_rvalue_scope_if_borrow_expr(
                         visitor, &subexpr, blk_id);
                 }
             }
-            hir::ExprCast(ref subexpr, _) => {
+            hir::ExprKind::Cast(ref subexpr, _) => {
                 record_rvalue_scope_if_borrow_expr(visitor, &subexpr, blk_id)
             }
-            hir::ExprBlock(ref block, _) => {
+            hir::ExprKind::Block(ref block, _) => {
                 if let Some(ref subexpr) = block.expr {
                     record_rvalue_scope_if_borrow_expr(
                         visitor, &subexpr, blk_id);
@@ -1251,10 +1251,10 @@ fn resolve_local<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>,
             visitor.scope_tree.record_rvalue_scope(expr.hir_id.local_id, blk_scope);
 
             match expr.node {
-                hir::ExprAddrOf(_, ref subexpr) |
-                hir::ExprUnary(hir::UnDeref, ref subexpr) |
-                hir::ExprField(ref subexpr, _) |
-                hir::ExprIndex(ref subexpr, _) => {
+                hir::ExprKind::AddrOf(_, ref subexpr) |
+                hir::ExprKind::Unary(hir::UnDeref, ref subexpr) |
+                hir::ExprKind::Field(ref subexpr, _) |
+                hir::ExprKind::Index(ref subexpr, _) => {
                     expr = &subexpr;
                 }
                 _ => {
diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs
index 369f65c214a..05a6cd9c243 100644
--- a/src/librustc/middle/resolve_lifetime.rs
+++ b/src/librustc/middle/resolve_lifetime.rs
@@ -476,21 +476,21 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
 
     fn visit_item(&mut self, item: &'tcx hir::Item) {
         match item.node {
-            hir::ItemFn(ref decl, _, ref generics, _) => {
+            hir::ItemKind::Fn(ref decl, _, ref generics, _) => {
                 self.visit_early_late(None, decl, generics, |this| {
                     intravisit::walk_item(this, item);
                 });
             }
 
-            hir::ItemExternCrate(_)
-            | hir::ItemUse(..)
-            | hir::ItemMod(..)
-            | hir::ItemForeignMod(..)
-            | hir::ItemGlobalAsm(..) => {
+            hir::ItemKind::ExternCrate(_)
+            | hir::ItemKind::Use(..)
+            | hir::ItemKind::Mod(..)
+            | hir::ItemKind::ForeignMod(..)
+            | hir::ItemKind::GlobalAsm(..) => {
                 // These sorts of items have no lifetime parameters at all.
                 intravisit::walk_item(self, item);
             }
-            hir::ItemStatic(..) | hir::ItemConst(..) => {
+            hir::ItemKind::Static(..) | hir::ItemKind::Const(..) => {
                 // No lifetime parameters, but implied 'static.
                 let scope = Scope::Elision {
                     elide: Elide::Exact(Region::Static),
@@ -498,27 +498,27 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                 };
                 self.with(scope, |_, this| intravisit::walk_item(this, item));
             }
-            hir::ItemExistential(hir::ExistTy { impl_trait_fn: Some(_), .. }) => {
+            hir::ItemKind::Existential(hir::ExistTy { impl_trait_fn: Some(_), .. }) => {
                 // currently existential type declarations are just generated from impl Trait
                 // items. doing anything on this node is irrelevant, as we currently don't need
                 // it.
             }
-            hir::ItemTy(_, ref generics)
-            | hir::ItemExistential(hir::ExistTy { impl_trait_fn: None, ref generics, .. })
-            | hir::ItemEnum(_, ref generics)
-            | hir::ItemStruct(_, ref generics)
-            | hir::ItemUnion(_, ref generics)
-            | hir::ItemTrait(_, _, ref generics, ..)
-            | hir::ItemTraitAlias(ref generics, ..)
-            | hir::ItemImpl(_, _, _, ref generics, ..) => {
+            hir::ItemKind::Ty(_, ref generics)
+            | hir::ItemKind::Existential(hir::ExistTy { impl_trait_fn: None, ref generics, .. })
+            | hir::ItemKind::Enum(_, ref generics)
+            | hir::ItemKind::Struct(_, ref generics)
+            | hir::ItemKind::Union(_, ref generics)
+            | hir::ItemKind::Trait(_, _, ref generics, ..)
+            | hir::ItemKind::TraitAlias(ref generics, ..)
+            | hir::ItemKind::Impl(_, _, _, ref generics, ..) => {
                 // Impls permit `'_` to be used and it is equivalent to "some fresh lifetime name".
                 // This is not true for other kinds of items.x
                 let track_lifetime_uses = match item.node {
-                    hir::ItemImpl(..) => true,
+                    hir::ItemKind::Impl(..) => true,
                     _ => false,
                 };
                 // These kinds of items have only early bound lifetime parameters.
-                let mut index = if let hir::ItemTrait(..) = item.node {
+                let mut index = if let hir::ItemKind::Trait(..) = item.node {
                     1 // Self comes before lifetimes
                 } else {
                     0
@@ -550,15 +550,15 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
 
     fn visit_foreign_item(&mut self, item: &'tcx hir::ForeignItem) {
         match item.node {
-            hir::ForeignItemFn(ref decl, _, ref generics) => {
+            hir::ForeignItemKind::Fn(ref decl, _, ref generics) => {
                 self.visit_early_late(None, decl, generics, |this| {
                     intravisit::walk_foreign_item(this, item);
                 })
             }
-            hir::ForeignItemStatic(..) => {
+            hir::ForeignItemKind::Static(..) => {
                 intravisit::walk_foreign_item(self, item);
             }
-            hir::ForeignItemType => {
+            hir::ForeignItemKind::Type => {
                 intravisit::walk_foreign_item(self, item);
             }
         }
@@ -567,7 +567,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
     fn visit_ty(&mut self, ty: &'tcx hir::Ty) {
         debug!("visit_ty: id={:?} ty={:?}", ty.id, ty);
         match ty.node {
-            hir::TyBareFn(ref c) => {
+            hir::TyKind::BareFn(ref c) => {
                 let next_early_index = self.next_early_index();
                 let was_in_fn_syntax = self.is_in_fn_syntax;
                 self.is_in_fn_syntax = true;
@@ -591,7 +591,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                 });
                 self.is_in_fn_syntax = was_in_fn_syntax;
             }
-            hir::TyTraitObject(ref bounds, ref lifetime) => {
+            hir::TyKind::TraitObject(ref bounds, ref lifetime) => {
                 for bound in bounds {
                     self.visit_poly_trait_ref(bound, hir::TraitBoundModifier::None);
                 }
@@ -617,7 +617,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                     }
                 }
             }
-            hir::TyRptr(ref lifetime_ref, ref mt) => {
+            hir::TyKind::Rptr(ref lifetime_ref, ref mt) => {
                 self.visit_lifetime(lifetime_ref);
                 let scope = Scope::ObjectLifetimeDefault {
                     lifetime: self.map.defs.get(&lifetime_ref.id).cloned(),
@@ -625,7 +625,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                 };
                 self.with(scope, |_, this| this.visit_ty(&mt.ty));
             }
-            hir::TyPath(hir::QPath::Resolved(None, ref path)) => {
+            hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) => {
                 if let Def::Existential(exist_ty_did) = path.def {
                     assert!(exist_ty_did.is_local());
                     // Resolve the lifetimes that are applied to the existential type.
@@ -675,7 +675,9 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                     //                          ^            ^ this gets resolved in the scope of
                     //                                         the exist_ty generics
                     let (generics, bounds) = match self.tcx.hir.expect_item(id).node {
-                        hir::ItemExistential(hir::ExistTy{ ref generics, ref bounds, .. }) => (
+                        hir::ItemKind::Existential(
+                            hir::ExistTy { ref generics, ref bounds, .. }
+                        ) => (
                             generics,
                             bounds,
                         ),
@@ -1157,8 +1159,8 @@ fn extract_labels(ctxt: &mut LifetimeContext<'_, '_>, body: &hir::Body) {
 
     fn expression_label(ex: &hir::Expr) -> Option<ast::Ident> {
         match ex.node {
-            hir::ExprWhile(.., Some(label)) |
-            hir::ExprLoop(_, Some(label), _) => Some(label.ident),
+            hir::ExprKind::While(.., Some(label)) |
+            hir::ExprKind::Loop(_, Some(label), _) => Some(label.ident),
             _ => None,
         }
     }
@@ -1208,11 +1210,11 @@ fn compute_object_lifetime_defaults(
     let mut map = NodeMap();
     for item in tcx.hir.krate().items.values() {
         match item.node {
-            hir::ItemStruct(_, ref generics)
-            | hir::ItemUnion(_, ref generics)
-            | hir::ItemEnum(_, ref generics)
-            | hir::ItemTy(_, ref generics)
-            | hir::ItemTrait(_, _, ref generics, ..) => {
+            hir::ItemKind::Struct(_, ref generics)
+            | hir::ItemKind::Union(_, ref generics)
+            | hir::ItemKind::Enum(_, ref generics)
+            | hir::ItemKind::Ty(_, ref generics)
+            | hir::ItemKind::Trait(_, _, ref generics, ..) => {
                 let result = object_lifetime_defaults_for_item(tcx, generics);
 
                 // Debugging aid.
@@ -1287,7 +1289,7 @@ fn object_lifetime_defaults_for_item(
                 }
 
                 let def = match data.bounded_ty.node {
-                    hir::TyPath(hir::QPath::Resolved(None, ref path)) => path.def,
+                    hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) => path.def,
                     _ => continue,
                 };
 
@@ -1485,12 +1487,12 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
         let mut index = 0;
         if let Some(parent_id) = parent_id {
             let parent = self.tcx.hir.expect_item(parent_id);
-            if let hir::ItemTrait(..) = parent.node {
+            if let hir::ItemKind::Trait(..) = parent.node {
                 index += 1; // Self comes first.
             }
             match parent.node {
-                hir::ItemTrait(_, _, ref generics, ..)
-                | hir::ItemImpl(_, _, _, ref generics, ..) => {
+                hir::ItemKind::Trait(_, _, ref generics, ..)
+                | hir::ItemKind::Impl(_, _, _, ref generics, ..) => {
                     index += generics.params.len() as u32;
                 }
                 _ => {}
@@ -1609,7 +1611,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                 let fn_id = self.tcx.hir.body_owner(body_id);
                 match self.tcx.hir.get(fn_id) {
                     hir::map::NodeItem(&hir::Item {
-                        node: hir::ItemFn(..),
+                        node: hir::ItemKind::Fn(..),
                         ..
                     })
                     | hir::map::NodeTraitItem(&hir::TraitItem {
@@ -1834,7 +1836,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
         let body = match self.tcx.hir.get(parent) {
             // `fn` definitions and methods.
             hir::map::NodeItem(&hir::Item {
-                node: hir::ItemFn(.., body),
+                node: hir::ItemKind::Fn(.., body),
                 ..
             }) => Some(body),
 
@@ -1847,7 +1849,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                     .expect_item(self.tcx.hir.get_parent(parent))
                     .node
                 {
-                    hir::ItemTrait(.., ref trait_items) => {
+                    hir::ItemKind::Trait(.., ref trait_items) => {
                         assoc_item_kind = trait_items
                             .iter()
                             .find(|ti| ti.id.node_id == parent)
@@ -1870,7 +1872,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                     .expect_item(self.tcx.hir.get_parent(parent))
                     .node
                 {
-                    hir::ItemImpl(.., ref self_ty, ref impl_items) => {
+                    hir::ItemKind::Impl(.., ref self_ty, ref impl_items) => {
                         impl_self = Some(self_ty);
                         assoc_item_kind = impl_items
                             .iter()
@@ -1912,7 +1914,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                 // Can't always rely on literal (or implied) `Self` due
                 // to the way elision rules were originally specified.
                 let impl_self = impl_self.map(|ty| &ty.node);
-                if let Some(&hir::TyPath(hir::QPath::Resolved(None, ref path))) = impl_self {
+                if let Some(&hir::TyKind::Path(hir::QPath::Resolved(None, ref path))) = impl_self {
                     match path.def {
                         // Whitelist the types that unambiguously always
                         // result in the same type constructor being used
@@ -1927,8 +1929,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                 false
             };
 
-            if let hir::TyRptr(lifetime_ref, ref mt) = inputs[0].node {
-                if let hir::TyPath(hir::QPath::Resolved(None, ref path)) = mt.ty.node {
+            if let hir::TyKind::Rptr(lifetime_ref, ref mt) = inputs[0].node {
+                if let hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) = mt.ty.node {
                     if is_self_ty(path.def) {
                         if let Some(&lifetime) = self.map.defs.get(&lifetime_ref.id) {
                             let scope = Scope::Elision {
@@ -2007,10 +2009,10 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
             }
 
             fn visit_ty(&mut self, ty: &hir::Ty) {
-                if let hir::TyBareFn(_) = ty.node {
+                if let hir::TyKind::BareFn(_) = ty.node {
                     self.outer_index.shift_in(1);
                 }
-                if let hir::TyTraitObject(ref bounds, ref lifetime) = ty.node {
+                if let hir::TyKind::TraitObject(ref bounds, ref lifetime) = ty.node {
                     for bound in bounds {
                         self.visit_poly_trait_ref(bound, hir::TraitBoundModifier::None);
                     }
@@ -2023,7 +2025,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                 } else {
                     intravisit::walk_ty(self, ty);
                 }
-                if let hir::TyBareFn(_) = ty.node {
+                if let hir::TyKind::BareFn(_) = ty.node {
                     self.outer_index.shift_out(1);
                 }
             }
@@ -2578,14 +2580,14 @@ fn insert_late_bound_lifetimes(
 
         fn visit_ty(&mut self, ty: &'v hir::Ty) {
             match ty.node {
-                hir::TyPath(hir::QPath::Resolved(Some(_), _))
-                | hir::TyPath(hir::QPath::TypeRelative(..)) => {
+                hir::TyKind::Path(hir::QPath::Resolved(Some(_), _))
+                | hir::TyKind::Path(hir::QPath::TypeRelative(..)) => {
                     // ignore lifetimes appearing in associated type
                     // projections, as they are not *constrained*
                     // (defined above)
                 }
 
-                hir::TyPath(hir::QPath::Resolved(None, ref path)) => {
+                hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) => {
                     // consider only the lifetimes on the final
                     // segment; I am not sure it's even currently
                     // valid to have them elsewhere, but even if it
diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs
index 9bf5c4d72b7..fdcae38fc6a 100644
--- a/src/librustc/middle/stability.rs
+++ b/src/librustc/middle/stability.rs
@@ -263,14 +263,14 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
             // they don't have their own stability. They still can be annotated as unstable
             // and propagate this unstability to children, but this annotation is completely
             // optional. They inherit stability from their parents when unannotated.
-            hir::ItemImpl(.., None, _, _) | hir::ItemForeignMod(..) => {
+            hir::ItemKind::Impl(.., None, _, _) | hir::ItemKind::ForeignMod(..) => {
                 self.in_trait_impl = false;
                 kind = AnnotationKind::Container;
             }
-            hir::ItemImpl(.., Some(_), _, _) => {
+            hir::ItemKind::Impl(.., Some(_), _, _) => {
                 self.in_trait_impl = true;
             }
-            hir::ItemStruct(ref sd, _) => {
+            hir::ItemKind::Struct(ref sd, _) => {
                 if !sd.is_struct() {
                     self.annotate(sd.id(), &i.attrs, i.span, AnnotationKind::Required, |_| {})
                 }
@@ -353,7 +353,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'a, 'tcx> {
             // they don't have their own stability. They still can be annotated as unstable
             // and propagate this unstability to children, but this annotation is completely
             // optional. They inherit stability from their parents when unannotated.
-            hir::ItemImpl(.., None, _, _) | hir::ItemForeignMod(..) => {}
+            hir::ItemKind::Impl(.., None, _, _) | hir::ItemKind::ForeignMod(..) => {}
 
             _ => self.check_missing_stability(i.id, i.span)
         }
@@ -723,7 +723,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
 
     fn visit_item(&mut self, item: &'tcx hir::Item) {
         match item.node {
-            hir::ItemExternCrate(_) => {
+            hir::ItemKind::ExternCrate(_) => {
                 // compiler-generated `extern crate` items have a dummy span.
                 if item.span.is_dummy() { return }
 
@@ -739,7 +739,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
             // For implementations of traits, check the stability of each item
             // individually as it's possible to have a stable trait with unstable
             // items.
-            hir::ItemImpl(.., Some(ref t), _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., Some(ref t), _, ref impl_item_refs) => {
                 if let Def::Trait(trait_did) = t.path.def {
                     for impl_item_ref in impl_item_refs {
                         let impl_item = self.tcx.hir.impl_item(impl_item_ref.id);
@@ -756,7 +756,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
 
             // There's no good place to insert stability check for non-Copy unions,
             // so semi-randomly perform it here in stability.rs
-            hir::ItemUnion(..) if !self.tcx.features().untagged_unions => {
+            hir::ItemKind::Union(..) if !self.tcx.features().untagged_unions => {
                 let def_id = self.tcx.hir.local_def_id(item.id);
                 let adt_def = self.tcx.adt_def(def_id);
                 let ty = self.tcx.type_of(def_id);
diff --git a/src/librustc/mir/tcx.rs b/src/librustc/mir/tcx.rs
index 67dfad50f44..6876b1490f3 100644
--- a/src/librustc/mir/tcx.rs
+++ b/src/librustc/mir/tcx.rs
@@ -256,24 +256,24 @@ impl BorrowKind {
 }
 
 impl BinOp {
-    pub fn to_hir_binop(self) -> hir::BinOp_ {
+    pub fn to_hir_binop(self) -> hir::BinOpKind {
         match self {
-            BinOp::Add => hir::BinOp_::BiAdd,
-            BinOp::Sub => hir::BinOp_::BiSub,
-            BinOp::Mul => hir::BinOp_::BiMul,
-            BinOp::Div => hir::BinOp_::BiDiv,
-            BinOp::Rem => hir::BinOp_::BiRem,
-            BinOp::BitXor => hir::BinOp_::BiBitXor,
-            BinOp::BitAnd => hir::BinOp_::BiBitAnd,
-            BinOp::BitOr => hir::BinOp_::BiBitOr,
-            BinOp::Shl => hir::BinOp_::BiShl,
-            BinOp::Shr => hir::BinOp_::BiShr,
-            BinOp::Eq => hir::BinOp_::BiEq,
-            BinOp::Ne => hir::BinOp_::BiNe,
-            BinOp::Lt => hir::BinOp_::BiLt,
-            BinOp::Gt => hir::BinOp_::BiGt,
-            BinOp::Le => hir::BinOp_::BiLe,
-            BinOp::Ge => hir::BinOp_::BiGe,
+            BinOp::Add => hir::BinOpKind::Add,
+            BinOp::Sub => hir::BinOpKind::Sub,
+            BinOp::Mul => hir::BinOpKind::Mul,
+            BinOp::Div => hir::BinOpKind::Div,
+            BinOp::Rem => hir::BinOpKind::Rem,
+            BinOp::BitXor => hir::BinOpKind::BitXor,
+            BinOp::BitAnd => hir::BinOpKind::BitAnd,
+            BinOp::BitOr => hir::BinOpKind::BitOr,
+            BinOp::Shl => hir::BinOpKind::Shl,
+            BinOp::Shr => hir::BinOpKind::Shr,
+            BinOp::Eq => hir::BinOpKind::Eq,
+            BinOp::Ne => hir::BinOpKind::Ne,
+            BinOp::Lt => hir::BinOpKind::Lt,
+            BinOp::Gt => hir::BinOpKind::Gt,
+            BinOp::Le => hir::BinOpKind::Le,
+            BinOp::Ge => hir::BinOpKind::Ge,
             BinOp::Offset => unreachable!()
         }
     }
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index a5caacea986..df26ac67060 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -858,7 +858,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             let parent_node = self.tcx.hir.get_parent_node(node_id);
             if let Some(hir::map::NodeLocal(ref local)) = self.tcx.hir.find(parent_node) {
                 if let Some(ref expr) = local.init {
-                    if let hir::ExprIndex(_, _) = expr.node {
+                    if let hir::ExprKind::Index(_, _) = expr.node {
                         if let Ok(snippet) = self.tcx.sess.codemap().span_to_snippet(expr.span) {
                             err.span_suggestion_with_applicability(
                                 expr.span,
@@ -927,7 +927,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
     pub fn get_fn_like_arguments(&self, node: hir::map::Node) -> (Span, Vec<ArgKind>) {
         match node {
             hir::map::NodeExpr(&hir::Expr {
-                node: hir::ExprClosure(_, ref _decl, id, span, _),
+                node: hir::ExprKind::Closure(_, ref _decl, id, span, _),
                 ..
             }) => {
                 (self.tcx.sess.codemap().def_span(span), self.tcx.hir.body(id).arguments.iter()
@@ -955,7 +955,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             }
             hir::map::NodeItem(&hir::Item {
                 span,
-                node: hir::ItemFn(ref decl, ..),
+                node: hir::ItemKind::Fn(ref decl, ..),
                 ..
             }) |
             hir::map::NodeImplItem(&hir::ImplItem {
@@ -970,7 +970,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             }) => {
                 (self.tcx.sess.codemap().def_span(span), decl.inputs.iter()
                         .map(|arg| match arg.clone().node {
-                    hir::TyTup(ref tys) => ArgKind::Tuple(
+                    hir::TyKind::Tup(ref tys) => ArgKind::Tuple(
                         Some(arg.span),
                         tys.iter()
                             .map(|_| ("_".to_owned(), "_".to_owned()))
@@ -981,7 +981,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             }
             hir::map::NodeVariant(&hir::Variant {
                 span,
-                node: hir::Variant_ {
+                node: hir::VariantKind {
                     data: hir::VariantData::Tuple(ref fields, _),
                     ..
                 },
diff --git a/src/librustc/traits/util.rs b/src/librustc/traits/util.rs
index 684022f8e8a..875c7199f6d 100644
--- a/src/librustc/traits/util.rs
+++ b/src/librustc/traits/util.rs
@@ -534,7 +534,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
         match self.hir.as_local_node_id(node_item_def_id) {
             Some(node_id) => {
                 let item = self.hir.expect_item(node_id);
-                if let hir::ItemImpl(_, _, defaultness, ..) = item.node {
+                if let hir::ItemKind::Impl(_, _, defaultness, ..) = item.node {
                     defaultness.is_default()
                 } else {
                     false
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs
index 8f7f9d09423..c7bb90bfcb0 100644
--- a/src/librustc/ty/context.rs
+++ b/src/librustc/ty/context.rs
@@ -627,7 +627,7 @@ impl<'tcx> TypeckTables<'tcx> {
     pub fn is_method_call(&self, expr: &hir::Expr) -> bool {
         // Only paths and method calls/overloaded operators have
         // entries in type_dependent_defs, ignore the former here.
-        if let hir::ExprPath(_) = expr.node {
+        if let hir::ExprKind::Path(_) = expr.node {
             return false;
         }
 
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index bbfcfb79890..5aa6542a027 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -2757,7 +2757,7 @@ fn associated_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId)
     let parent_def_id = tcx.hir.local_def_id(parent_id);
     let parent_item = tcx.hir.expect_item(parent_id);
     match parent_item.node {
-        hir::ItemImpl(.., ref impl_item_refs) => {
+        hir::ItemKind::Impl(.., ref impl_item_refs) => {
             if let Some(impl_item_ref) = impl_item_refs.iter().find(|i| i.id.node_id == id) {
                 let assoc_item = tcx.associated_item_from_impl_item_ref(parent_def_id,
                                                                         impl_item_ref);
@@ -2766,7 +2766,7 @@ fn associated_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId)
             }
         }
 
-        hir::ItemTrait(.., ref trait_item_refs) => {
+        hir::ItemKind::Trait(.., ref trait_item_refs) => {
             if let Some(trait_item_ref) = trait_item_refs.iter().find(|i| i.id.node_id == id) {
                 let assoc_item = tcx.associated_item_from_trait_item_ref(parent_def_id,
                                                                          &parent_item.vis,
@@ -2815,19 +2815,19 @@ fn associated_item_def_ids<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     let id = tcx.hir.as_local_node_id(def_id).unwrap();
     let item = tcx.hir.expect_item(id);
     let vec: Vec<_> = match item.node {
-        hir::ItemTrait(.., ref trait_item_refs) => {
+        hir::ItemKind::Trait(.., ref trait_item_refs) => {
             trait_item_refs.iter()
                            .map(|trait_item_ref| trait_item_ref.id)
                            .map(|id| tcx.hir.local_def_id(id.node_id))
                            .collect()
         }
-        hir::ItemImpl(.., ref impl_item_refs) => {
+        hir::ItemKind::Impl(.., ref impl_item_refs) => {
             impl_item_refs.iter()
                           .map(|impl_item_ref| impl_item_ref.id)
                           .map(|id| tcx.hir.local_def_id(id.node_id))
                           .collect()
         }
-        hir::ItemTraitAlias(..) => vec![],
+        hir::ItemKind::TraitAlias(..) => vec![],
         _ => span_bug!(item.span, "associated_item_def_ids: not impl or trait")
     };
     Lrc::new(vec)
diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs
index f118d22c54d..d5425aff6ba 100644
--- a/src/librustc/ty/util.rs
+++ b/src/librustc/ty/util.rs
@@ -605,10 +605,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
         if let Some(node) = self.hir.get_if_local(def_id) {
             match node {
                 Node::NodeItem(&hir::Item {
-                    node: hir::ItemStatic(_, mutbl, _), ..
+                    node: hir::ItemKind::Static(_, mutbl, _), ..
                 }) => Some(mutbl),
                 Node::NodeForeignItem(&hir::ForeignItem {
-                    node: hir::ForeignItemStatic(_, is_mutbl), ..
+                    node: hir::ForeignItemKind::Static(_, is_mutbl), ..
                 }) =>
                     Some(if is_mutbl {
                         hir::Mutability::MutMutable
diff --git a/src/librustc_borrowck/borrowck/check_loans.rs b/src/librustc_borrowck/borrowck/check_loans.rs
index 046318b3619..002e8697588 100644
--- a/src/librustc_borrowck/borrowck/check_loans.rs
+++ b/src/librustc_borrowck/borrowck/check_loans.rs
@@ -203,7 +203,7 @@ pub fn check_loans<'a, 'b, 'c, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
     let node_id = bccx.tcx.hir.as_local_node_id(def_id).unwrap();
     let movable_generator = !match bccx.tcx.hir.get(node_id) {
         hir::map::Node::NodeExpr(&hir::Expr {
-            node: hir::ExprClosure(.., Some(hir::GeneratorMovability::Static)),
+            node: hir::ExprKind::Closure(.., Some(hir::GeneratorMovability::Static)),
             ..
         }) => true,
         _ => false,
diff --git a/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs b/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs
index 241950fb6bf..7ce6863a7c9 100644
--- a/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs
+++ b/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs
@@ -63,7 +63,7 @@ fn get_pattern_source<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, pat: &Pat) -> Patte
         NodeExpr(ref e) => {
             // the enclosing expression must be a `match` or something else
             assert!(match e.node {
-                        ExprMatch(..) => true,
+                        ExprKind::Match(..) => true,
                         _ => return PatternSource::Other,
                     });
             PatternSource::MatchExpr(e)
diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs
index 79b43823692..3ae1e5aac50 100644
--- a/src/librustc_borrowck/borrowck/mod.rs
+++ b/src/librustc_borrowck/borrowck/mod.rs
@@ -409,7 +409,7 @@ fn closure_to_block(closure_id: LocalDefId,
     let closure_id = tcx.hir.local_def_id_to_node_id(closure_id);
     match tcx.hir.get(closure_id) {
         hir_map::NodeExpr(expr) => match expr.node {
-            hir::ExprClosure(.., body_id, _, _) => {
+            hir::ExprKind::Closure(.., body_id, _, _) => {
                 body_id.node_id
             }
             _ => {
@@ -722,7 +722,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
 
             move_data::Captured =>
                 (match self.tcx.hir.expect_expr(node_id).node {
-                    hir::ExprClosure(.., fn_decl_span, _) => fn_decl_span,
+                    hir::ExprKind::Closure(.., fn_decl_span, _) => fn_decl_span,
                     ref r => bug!("Captured({:?}) maps to non-closure: {:?}",
                                   the_move.id, r),
                 }, " (into closure)"),
@@ -1131,7 +1131,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
     fn suggest_mut_for_immutable(&self, pty: &hir::Ty, is_implicit_self: bool) -> Option<String> {
         // Check whether the argument is an immutable reference
         debug!("suggest_mut_for_immutable({:?}, {:?})", pty, is_implicit_self);
-        if let hir::TyRptr(lifetime, hir::MutTy {
+        if let hir::TyKind::Rptr(lifetime, hir::MutTy {
             mutbl: hir::Mutability::MutImmutable,
             ref ty
         }) = pty.node {
@@ -1259,7 +1259,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
                     // avoid suggesting `mut &self`.
                     return
                 }
-                if let Some(&hir::TyRptr(
+                if let Some(&hir::TyKind::Rptr(
                     _,
                     hir::MutTy {
                         mutbl: hir::MutMutable,
diff --git a/src/librustc_codegen_llvm/back/symbol_export.rs b/src/librustc_codegen_llvm/back/symbol_export.rs
index 28e76a80513..94357f34849 100644
--- a/src/librustc_codegen_llvm/back/symbol_export.rs
+++ b/src/librustc_codegen_llvm/back/symbol_export.rs
@@ -105,11 +105,11 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
                 // Only consider nodes that actually have exported symbols.
                 hir::map::NodeItem(&hir::Item {
-                    node: hir::ItemStatic(..),
+                    node: hir::ItemKind::Static(..),
                     ..
                 }) |
                 hir::map::NodeItem(&hir::Item {
-                    node: hir::ItemFn(..), ..
+                    node: hir::ItemKind::Fn(..), ..
                 }) |
                 hir::map::NodeImplItem(&hir::ImplItem {
                     node: hir::ImplItemKind::Method(..),
diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs
index ea26e271c9b..d4d0b67523e 100644
--- a/src/librustc_codegen_llvm/base.rs
+++ b/src/librustc_codegen_llvm/base.rs
@@ -124,16 +124,16 @@ impl<'a, 'tcx> Drop for StatRecorder<'a, 'tcx> {
     }
 }
 
-pub fn bin_op_to_icmp_predicate(op: hir::BinOp_,
+pub fn bin_op_to_icmp_predicate(op: hir::BinOpKind,
                                 signed: bool)
                                 -> llvm::IntPredicate {
     match op {
-        hir::BiEq => llvm::IntEQ,
-        hir::BiNe => llvm::IntNE,
-        hir::BiLt => if signed { llvm::IntSLT } else { llvm::IntULT },
-        hir::BiLe => if signed { llvm::IntSLE } else { llvm::IntULE },
-        hir::BiGt => if signed { llvm::IntSGT } else { llvm::IntUGT },
-        hir::BiGe => if signed { llvm::IntSGE } else { llvm::IntUGE },
+        hir::BinOpKind::Eq => llvm::IntEQ,
+        hir::BinOpKind::Ne => llvm::IntNE,
+        hir::BinOpKind::Lt => if signed { llvm::IntSLT } else { llvm::IntULT },
+        hir::BinOpKind::Le => if signed { llvm::IntSLE } else { llvm::IntULE },
+        hir::BinOpKind::Gt => if signed { llvm::IntSGT } else { llvm::IntUGT },
+        hir::BinOpKind::Ge => if signed { llvm::IntSGE } else { llvm::IntUGE },
         op => {
             bug!("comparison_op_to_icmp_predicate: expected comparison operator, \
                   found {:?}",
@@ -142,14 +142,14 @@ pub fn bin_op_to_icmp_predicate(op: hir::BinOp_,
     }
 }
 
-pub fn bin_op_to_fcmp_predicate(op: hir::BinOp_) -> llvm::RealPredicate {
+pub fn bin_op_to_fcmp_predicate(op: hir::BinOpKind) -> llvm::RealPredicate {
     match op {
-        hir::BiEq => llvm::RealOEQ,
-        hir::BiNe => llvm::RealUNE,
-        hir::BiLt => llvm::RealOLT,
-        hir::BiLe => llvm::RealOLE,
-        hir::BiGt => llvm::RealOGT,
-        hir::BiGe => llvm::RealOGE,
+        hir::BinOpKind::Eq => llvm::RealOEQ,
+        hir::BinOpKind::Ne => llvm::RealUNE,
+        hir::BinOpKind::Lt => llvm::RealOLT,
+        hir::BinOpKind::Le => llvm::RealOLE,
+        hir::BinOpKind::Gt => llvm::RealOGT,
+        hir::BinOpKind::Ge => llvm::RealOGE,
         op => {
             bug!("comparison_op_to_fcmp_predicate: expected comparison operator, \
                   found {:?}",
@@ -164,7 +164,7 @@ pub fn compare_simd_types<'a, 'tcx>(
     rhs: ValueRef,
     t: Ty<'tcx>,
     ret_ty: Type,
-    op: hir::BinOp_
+    op: hir::BinOpKind
 ) -> ValueRef {
     let signed = match t.sty {
         ty::TyFloat(_) => {
@@ -332,12 +332,12 @@ pub fn coerce_unsized_into<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
 }
 
 pub fn cast_shift_expr_rhs(
-    cx: &Builder, op: hir::BinOp_, lhs: ValueRef, rhs: ValueRef
+    cx: &Builder, op: hir::BinOpKind, lhs: ValueRef, rhs: ValueRef
 ) -> ValueRef {
     cast_shift_rhs(op, lhs, rhs, |a, b| cx.trunc(a, b), |a, b| cx.zext(a, b))
 }
 
-fn cast_shift_rhs<F, G>(op: hir::BinOp_,
+fn cast_shift_rhs<F, G>(op: hir::BinOpKind,
                         lhs: ValueRef,
                         rhs: ValueRef,
                         trunc: F,
diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs
index 7e55642814b..60bba635a78 100644
--- a/src/librustc_codegen_llvm/common.rs
+++ b/src/librustc_codegen_llvm/common.rs
@@ -350,7 +350,7 @@ pub fn build_unchecked_lshift<'a, 'tcx>(
     lhs: ValueRef,
     rhs: ValueRef
 ) -> ValueRef {
-    let rhs = base::cast_shift_expr_rhs(bx, hir::BinOp_::BiShl, lhs, rhs);
+    let rhs = base::cast_shift_expr_rhs(bx, hir::BinOpKind::Shl, lhs, rhs);
     // #1877, #10183: Ensure that input is always valid
     let rhs = shift_mask_rhs(bx, rhs);
     bx.shl(lhs, rhs)
@@ -359,7 +359,7 @@ pub fn build_unchecked_lshift<'a, 'tcx>(
 pub fn build_unchecked_rshift<'a, 'tcx>(
     bx: &Builder<'a, 'tcx>, lhs_t: Ty<'tcx>, lhs: ValueRef, rhs: ValueRef
 ) -> ValueRef {
-    let rhs = base::cast_shift_expr_rhs(bx, hir::BinOp_::BiShr, lhs, rhs);
+    let rhs = base::cast_shift_expr_rhs(bx, hir::BinOpKind::Shr, lhs, rhs);
     // #1877, #10183: Ensure that input is always valid
     let rhs = shift_mask_rhs(bx, rhs);
     let is_signed = lhs_t.is_signed();
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs
index 199c40bb704..6e3096d4cd5 100644
--- a/src/librustc_codegen_llvm/consts.rs
+++ b/src/librustc_codegen_llvm/consts.rs
@@ -125,7 +125,7 @@ pub fn get_static(cx: &CodegenCx, def_id: DefId) -> ValueRef {
         let llty = cx.layout_of(ty).llvm_type(cx);
         let (g, attrs) = match cx.tcx.hir.get(id) {
             hir_map::NodeItem(&hir::Item {
-                ref attrs, span, node: hir::ItemStatic(..), ..
+                ref attrs, span, node: hir::ItemKind::Static(..), ..
             }) => {
                 if declare::get_declared_value(cx, &sym[..]).is_some() {
                     span_bug!(span, "Conflicting symbol names for static?");
@@ -143,7 +143,7 @@ pub fn get_static(cx: &CodegenCx, def_id: DefId) -> ValueRef {
             }
 
             hir_map::NodeForeignItem(&hir::ForeignItem {
-                ref attrs, span, node: hir::ForeignItemStatic(..), ..
+                ref attrs, span, node: hir::ForeignItemKind::Static(..), ..
             }) => {
                 let g = if let Some(linkage) = cx.tcx.codegen_fn_attrs(def_id).linkage {
                     // If this is a static with a linkage specified, then we need to handle
diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs
index 7625e4c7e0f..58a32ad9774 100644
--- a/src/librustc_codegen_llvm/intrinsic.rs
+++ b/src/librustc_codegen_llvm/intrinsic.rs
@@ -1022,12 +1022,12 @@ fn generic_simd_intrinsic<'a, 'tcx>(
     let in_len = arg_tys[0].simd_size(tcx);
 
     let comparison = match name {
-        "simd_eq" => Some(hir::BiEq),
-        "simd_ne" => Some(hir::BiNe),
-        "simd_lt" => Some(hir::BiLt),
-        "simd_le" => Some(hir::BiLe),
-        "simd_gt" => Some(hir::BiGt),
-        "simd_ge" => Some(hir::BiGe),
+        "simd_eq" => Some(hir::BinOpKind::Eq),
+        "simd_ne" => Some(hir::BinOpKind::Ne),
+        "simd_lt" => Some(hir::BinOpKind::Lt),
+        "simd_le" => Some(hir::BinOpKind::Le),
+        "simd_gt" => Some(hir::BinOpKind::Gt),
+        "simd_ge" => Some(hir::BinOpKind::Ge),
         _ => None
     };
 
diff --git a/src/librustc_codegen_llvm/mono_item.rs b/src/librustc_codegen_llvm/mono_item.rs
index e142a7d9c1c..b512a6f1bb4 100644
--- a/src/librustc_codegen_llvm/mono_item.rs
+++ b/src/librustc_codegen_llvm/mono_item.rs
@@ -60,7 +60,7 @@ pub trait MonoItemExt<'a, 'tcx>: fmt::Debug + BaseMonoItemExt<'a, 'tcx> {
             }
             MonoItem::GlobalAsm(node_id) => {
                 let item = cx.tcx.hir.expect_item(node_id);
-                if let hir::ItemGlobalAsm(ref ga) = item.node {
+                if let hir::ItemKind::GlobalAsm(ref ga) = item.node {
                     asm::codegen_global_asm(cx, ga);
                 } else {
                     span_bug!(item.span, "Mismatch between hir::Item type and MonoItem type")
diff --git a/src/librustc_driver/test.rs b/src/librustc_driver/test.rs
index 2b30f680092..5b2092ea9eb 100644
--- a/src/librustc_driver/test.rs
+++ b/src/librustc_driver/test.rs
@@ -249,24 +249,24 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
             }
 
             return match it.node {
-                hir::ItemUse(..) |
-                hir::ItemExternCrate(..) |
-                hir::ItemConst(..) |
-                hir::ItemStatic(..) |
-                hir::ItemFn(..) |
-                hir::ItemForeignMod(..) |
-                hir::ItemGlobalAsm(..) |
-                hir::ItemExistential(..) |
-                hir::ItemTy(..) => None,
-
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemTrait(..) |
-                hir::ItemTraitAlias(..) |
-                hir::ItemImpl(..) => None,
-
-                hir::ItemMod(ref m) => search_mod(this, m, idx, names),
+                hir::ItemKind::Use(..) |
+                hir::ItemKind::ExternCrate(..) |
+                hir::ItemKind::Const(..) |
+                hir::ItemKind::Static(..) |
+                hir::ItemKind::Fn(..) |
+                hir::ItemKind::ForeignMod(..) |
+                hir::ItemKind::GlobalAsm(..) |
+                hir::ItemKind::Existential(..) |
+                hir::ItemKind::Ty(..) => None,
+
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Trait(..) |
+                hir::ItemKind::TraitAlias(..) |
+                hir::ItemKind::Impl(..) => None,
+
+                hir::ItemKind::Mod(ref m) => search_mod(this, m, idx, names),
             };
         }
     }
diff --git a/src/librustc_incremental/persist/dirty_clean.rs b/src/librustc_incremental/persist/dirty_clean.rs
index eeb87e41757..39e674a6095 100644
--- a/src/librustc_incremental/persist/dirty_clean.rs
+++ b/src/librustc_incremental/persist/dirty_clean.rs
@@ -29,7 +29,7 @@ use std::iter::FromIterator;
 use std::vec::Vec;
 use rustc::dep_graph::{DepNode, label_strs};
 use rustc::hir;
-use rustc::hir::{Item_ as HirItem, ImplItemKind, TraitItemKind};
+use rustc::hir::{ItemKind as HirItem, ImplItemKind, TraitItemKind};
 use rustc::hir::map::Node as HirNode;
 use rustc::hir::def_id::DefId;
 use rustc::hir::itemlikevisit::ItemLikeVisitor;
@@ -342,40 +342,40 @@ impl<'a, 'tcx> DirtyCleanVisitor<'a, 'tcx> {
                     // FIXME(michaelwoerister): do commented out ones
 
                     // // An `extern crate` item, with optional original crate name,
-                    // HirItem::ItemExternCrate(..),  // intentionally no assertions
+                    // HirItem::ExternCrate(..),  // intentionally no assertions
 
                     // // `use foo::bar::*;` or `use foo::bar::baz as quux;`
-                    // HirItem::ItemUse(..),  // intentionally no assertions
+                    // HirItem::Use(..),  // intentionally no assertions
 
                     // A `static` item
-                    HirItem::ItemStatic(..) => ("ItemStatic", LABELS_CONST),
+                    HirItem::Static(..) => ("ItemStatic", LABELS_CONST),
 
                     // A `const` item
-                    HirItem::ItemConst(..) => ("ItemConst", LABELS_CONST),
+                    HirItem::Const(..) => ("ItemConst", LABELS_CONST),
 
                     // A function declaration
-                    HirItem::ItemFn(..) => ("ItemFn", LABELS_FN),
+                    HirItem::Fn(..) => ("ItemFn", LABELS_FN),
 
                     // // A module
-                    HirItem::ItemMod(..) =>("ItemMod", LABELS_HIR_ONLY),
+                    HirItem::Mod(..) =>("ItemMod", LABELS_HIR_ONLY),
 
                     // // An external module
-                    HirItem::ItemForeignMod(..) => ("ItemForeignMod", LABELS_HIR_ONLY),
+                    HirItem::ForeignMod(..) => ("ItemForeignMod", LABELS_HIR_ONLY),
 
                     // Module-level inline assembly (from global_asm!)
-                    HirItem::ItemGlobalAsm(..) => ("ItemGlobalAsm", LABELS_HIR_ONLY),
+                    HirItem::GlobalAsm(..) => ("ItemGlobalAsm", LABELS_HIR_ONLY),
 
                     // A type alias, e.g. `type Foo = Bar<u8>`
-                    HirItem::ItemTy(..) => ("ItemTy", LABELS_HIR_ONLY),
+                    HirItem::Ty(..) => ("ItemTy", LABELS_HIR_ONLY),
 
                     // An enum definition, e.g. `enum Foo<A, B> {C<A>, D<B>}`
-                    HirItem::ItemEnum(..) => ("ItemEnum", LABELS_ADT),
+                    HirItem::Enum(..) => ("ItemEnum", LABELS_ADT),
 
                     // A struct definition, e.g. `struct Foo<A> {x: A}`
-                    HirItem::ItemStruct(..) => ("ItemStruct", LABELS_ADT),
+                    HirItem::Struct(..) => ("ItemStruct", LABELS_ADT),
 
                     // A union definition, e.g. `union Foo<A, B> {x: A, y: B}`
-                    HirItem::ItemUnion(..) => ("ItemUnion", LABELS_ADT),
+                    HirItem::Union(..) => ("ItemUnion", LABELS_ADT),
 
                     // Represents a Trait Declaration
                     // FIXME(michaelwoerister): trait declaration is buggy because sometimes some of
@@ -391,10 +391,10 @@ impl<'a, 'tcx> DirtyCleanVisitor<'a, 'tcx> {
                     // However, this did not seem to work effectively and more bugs were hit.
                     // Nebie @vitiral gave up :)
                     //
-                    //HirItem::ItemTrait(..) => ("ItemTrait", LABELS_TRAIT),
+                    //HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
 
                     // An implementation, eg `impl<A> Trait for Foo { .. }`
-                    HirItem::ItemImpl(..) => ("ItemImpl", LABELS_IMPL),
+                    HirItem::Impl(..) => ("ItemKind::Impl", LABELS_IMPL),
 
                     _ => self.tcx.sess.span_fatal(
                         attr.span,
diff --git a/src/librustc_lint/bad_style.rs b/src/librustc_lint/bad_style.rs
index 6bc364b7261..fd5a152311d 100644
--- a/src/librustc_lint/bad_style.rs
+++ b/src/librustc_lint/bad_style.rs
@@ -133,11 +133,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonCamelCaseTypes {
         }
 
         match it.node {
-            hir::ItemTy(..) |
-            hir::ItemEnum(..) |
-            hir::ItemStruct(..) |
-            hir::ItemUnion(..) => self.check_case(cx, "type", it.name, it.span),
-            hir::ItemTrait(..) => self.check_case(cx, "trait", it.name, it.span),
+            hir::ItemKind::Ty(..) |
+            hir::ItemKind::Enum(..) |
+            hir::ItemKind::Struct(..) |
+            hir::ItemKind::Union(..) => self.check_case(cx, "type", it.name, it.span),
+            hir::ItemKind::Trait(..) => self.check_case(cx, "trait", it.name, it.span),
             _ => (),
         }
     }
@@ -296,7 +296,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSnakeCase {
     }
 
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
-        if let hir::ItemMod(_) = it.node {
+        if let hir::ItemKind::Mod(_) = it.node {
             self.check_snake_case(cx, "module", &it.name.as_str(), Some(it.span));
         }
     }
@@ -369,13 +369,13 @@ impl LintPass for NonUpperCaseGlobals {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         match it.node {
-            hir::ItemStatic(..) => {
+            hir::ItemKind::Static(..) => {
                 if attr::find_by_name(&it.attrs, "no_mangle").is_some() {
                     return;
                 }
                 NonUpperCaseGlobals::check_upper_case(cx, "static variable", it.name, it.span);
             }
-            hir::ItemConst(..) => {
+            hir::ItemKind::Const(..) => {
                 NonUpperCaseGlobals::check_upper_case(cx, "constant", it.name, it.span);
             }
             _ => {}
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs
index 0b33e397d18..8a674449880 100644
--- a/src/librustc_lint/builtin.rs
+++ b/src/librustc_lint/builtin.rs
@@ -75,8 +75,8 @@ impl LintPass for WhileTrue {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for WhileTrue {
     fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
-        if let hir::ExprWhile(ref cond, ..) = e.node {
-            if let hir::ExprLit(ref lit) = cond.node {
+        if let hir::ExprKind::While(ref cond, ..) = e.node {
+            if let hir::ExprKind::Lit(ref lit) = cond.node {
                 if let ast::LitKind::Bool(true) = lit.node {
                     if lit.span.ctxt() == SyntaxContext::empty() {
                         let msg = "denote infinite loops with `loop { ... }`";
@@ -120,11 +120,11 @@ impl LintPass for BoxPointers {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxPointers {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         match it.node {
-            hir::ItemFn(..) |
-            hir::ItemTy(..) |
-            hir::ItemEnum(..) |
-            hir::ItemStruct(..) |
-            hir::ItemUnion(..) => {
+            hir::ItemKind::Fn(..) |
+            hir::ItemKind::Ty(..) |
+            hir::ItemKind::Enum(..) |
+            hir::ItemKind::Struct(..) |
+            hir::ItemKind::Union(..) => {
                 let def_id = cx.tcx.hir.local_def_id(it.id);
                 self.check_heap_type(cx, it.span, cx.tcx.type_of(def_id))
             }
@@ -133,8 +133,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxPointers {
 
         // If it's a struct, we also have to check the fields' types
         match it.node {
-            hir::ItemStruct(ref struct_def, _) |
-            hir::ItemUnion(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) |
+            hir::ItemKind::Union(ref struct_def, _) => {
                 for struct_field in struct_def.fields() {
                     let def_id = cx.tcx.hir.local_def_id(struct_field.id);
                     self.check_heap_type(cx, struct_field.span,
@@ -226,7 +226,7 @@ impl UnsafeCode {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnsafeCode {
     fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
-        if let hir::ExprBlock(ref blk, _) = e.node {
+        if let hir::ExprKind::Block(ref blk, _) = e.node {
             // Don't warn about generated blocks, that'll just pollute the output.
             if blk.rules == hir::UnsafeBlock(hir::UserProvided) {
                 self.report_unsafe(cx, blk.span, "usage of an `unsafe` block");
@@ -236,11 +236,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnsafeCode {
 
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         match it.node {
-            hir::ItemTrait(_, hir::Unsafety::Unsafe, ..) => {
+            hir::ItemKind::Trait(_, hir::Unsafety::Unsafe, ..) => {
                 self.report_unsafe(cx, it.span, "declaration of an `unsafe` trait")
             }
 
-            hir::ItemImpl(hir::Unsafety::Unsafe, ..) => {
+            hir::ItemKind::Impl(hir::Unsafety::Unsafe, ..) => {
                 self.report_unsafe(cx, it.span, "implementation of an `unsafe` trait")
             }
 
@@ -390,12 +390,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
 
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         let desc = match it.node {
-            hir::ItemFn(..) => "a function",
-            hir::ItemMod(..) => "a module",
-            hir::ItemEnum(..) => "an enum",
-            hir::ItemStruct(..) => "a struct",
-            hir::ItemUnion(..) => "a union",
-            hir::ItemTrait(.., ref trait_item_refs) => {
+            hir::ItemKind::Fn(..) => "a function",
+            hir::ItemKind::Mod(..) => "a module",
+            hir::ItemKind::Enum(..) => "an enum",
+            hir::ItemKind::Struct(..) => "a struct",
+            hir::ItemKind::Union(..) => "a union",
+            hir::ItemKind::Trait(.., ref trait_item_refs) => {
                 // Issue #11592, traits are always considered exported, even when private.
                 if let hir::VisibilityKind::Inherited = it.vis.node {
                     self.private_traits.insert(it.id);
@@ -406,8 +406,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
                 }
                 "a trait"
             }
-            hir::ItemTy(..) => "a type alias",
-            hir::ItemImpl(.., Some(ref trait_ref), _, ref impl_item_refs) => {
+            hir::ItemKind::Ty(..) => "a type alias",
+            hir::ItemKind::Impl(.., Some(ref trait_ref), _, ref impl_item_refs) => {
                 // If the trait is private, add the impl items to private_traits so they don't get
                 // reported for missing docs.
                 let real_trait = trait_ref.path.def.def_id();
@@ -425,8 +425,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
                 }
                 return;
             }
-            hir::ItemConst(..) => "a constant",
-            hir::ItemStatic(..) => "a static",
+            hir::ItemKind::Const(..) => "a constant",
+            hir::ItemKind::Static(..) => "a static",
             _ => return,
         };
 
@@ -509,21 +509,21 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingCopyImplementations {
             return;
         }
         let (def, ty) = match item.node {
-            hir::ItemStruct(_, ref ast_generics) => {
+            hir::ItemKind::Struct(_, ref ast_generics) => {
                 if !ast_generics.params.is_empty() {
                     return;
                 }
                 let def = cx.tcx.adt_def(cx.tcx.hir.local_def_id(item.id));
                 (def, cx.tcx.mk_adt(def, cx.tcx.intern_substs(&[])))
             }
-            hir::ItemUnion(_, ref ast_generics) => {
+            hir::ItemKind::Union(_, ref ast_generics) => {
                 if !ast_generics.params.is_empty() {
                     return;
                 }
                 let def = cx.tcx.adt_def(cx.tcx.hir.local_def_id(item.id));
                 (def, cx.tcx.mk_adt(def, cx.tcx.intern_substs(&[])))
             }
-            hir::ItemEnum(_, ref ast_generics) => {
+            hir::ItemKind::Enum(_, ref ast_generics) => {
                 if !ast_generics.params.is_empty() {
                     return;
                 }
@@ -577,9 +577,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDebugImplementations {
         }
 
         match item.node {
-            hir::ItemStruct(..) |
-            hir::ItemUnion(..) |
-            hir::ItemEnum(..) => {}
+            hir::ItemKind::Struct(..) |
+            hir::ItemKind::Union(..) |
+            hir::ItemKind::Enum(..) => {}
             _ => return,
         }
 
@@ -960,8 +960,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnconditionalRecursion {
 
         fn expr_refers_to_this_fn(cx: &LateContext, fn_id: ast::NodeId, id: ast::NodeId) -> bool {
             match cx.tcx.hir.get(id) {
-                hir_map::NodeExpr(&hir::Expr { node: hir::ExprCall(ref callee, _), .. }) => {
-                    let def = if let hir::ExprPath(ref qpath) = callee.node {
+                hir_map::NodeExpr(&hir::Expr { node: hir::ExprKind::Call(ref callee, _), .. }) => {
+                    let def = if let hir::ExprKind::Path(ref qpath) = callee.node {
                         cx.tables.qpath_def(qpath, callee.hir_id)
                     } else {
                         return false;
@@ -1018,8 +1018,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnconditionalRecursion {
 
             // Check for calls to methods via explicit paths (e.g. `T::method()`).
             match expr.node {
-                hir::ExprCall(ref callee, _) => {
-                    let def = if let hir::ExprPath(ref qpath) = callee.node {
+                hir::ExprKind::Call(ref callee, _) => {
+                    let def = if let hir::ExprKind::Path(ref qpath) = callee.node {
                         cx.tables.qpath_def(qpath, callee.hir_id)
                     } else {
                         return false;
@@ -1121,7 +1121,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PluginAsLibrary {
         }
 
         match it.node {
-            hir::ItemExternCrate(..) => (),
+            hir::ItemKind::ExternCrate(..) => (),
             _ => return,
         };
 
@@ -1203,7 +1203,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidNoMangleItems {
         };
 
         match it.node {
-            hir::ItemFn(.., ref generics, _) => {
+            hir::ItemKind::Fn(.., ref generics, _) => {
                 if let Some(no_mangle_attr) = attr::find_by_name(&it.attrs, "no_mangle") {
                     if attr::contains_name(&it.attrs, "linkage") {
                         return;
@@ -1232,7 +1232,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidNoMangleItems {
                     }
                 }
             }
-            hir::ItemStatic(..) => {
+            hir::ItemKind::Static(..) => {
                 if attr::contains_name(&it.attrs, "no_mangle") &&
                     !cx.access_levels.is_reachable(it.id) {
                         let msg = "static is marked #[no_mangle], but not exported";
@@ -1241,7 +1241,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidNoMangleItems {
                         err.emit();
                     }
             }
-            hir::ItemConst(..) => {
+            hir::ItemKind::Const(..) => {
                 if attr::contains_name(&it.attrs, "no_mangle") {
                     // Const items do not refer to a particular location in memory, and therefore
                     // don't have anything to attach a symbol to
@@ -1300,7 +1300,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutableTransmutes {
             (cx: &LateContext<'a, 'tcx>,
              expr: &hir::Expr)
              -> Option<(&'tcx ty::TypeVariants<'tcx>, &'tcx ty::TypeVariants<'tcx>)> {
-            let def = if let hir::ExprPath(ref qpath) = expr.node {
+            let def = if let hir::ExprKind::Path(ref qpath) = expr.node {
                 cx.tables.qpath_def(qpath, expr.hir_id)
             } else {
                 return None;
@@ -1369,7 +1369,7 @@ impl LintPass for UnionsWithDropFields {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnionsWithDropFields {
     fn check_item(&mut self, ctx: &LateContext, item: &hir::Item) {
-        if let hir::ItemUnion(ref vdata, _) = item.node {
+        if let hir::ItemKind::Union(ref vdata, _) = item.node {
             for field in vdata.fields() {
                 let field_ty = ctx.tcx.type_of(ctx.tcx.hir.local_def_id(field.id));
                 if field_ty.needs_drop(ctx.tcx, ctx.param_env) {
@@ -1475,7 +1475,7 @@ impl TypeAliasBounds {
             hir::QPath::TypeRelative(ref ty, _) => {
                 // If this is a type variable, we found a `T::Assoc`.
                 match ty.node {
-                    hir::TyPath(hir::QPath::Resolved(None, ref path)) => {
+                    hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) => {
                         match path.def {
                             Def::TyParam(_) => true,
                             _ => false
@@ -1523,7 +1523,7 @@ impl TypeAliasBounds {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeAliasBounds {
     fn check_item(&mut self, cx: &LateContext, item: &hir::Item) {
         let (ty, type_alias_generics) = match item.node {
-            hir::ItemTy(ref ty, ref generics) => (&*ty, generics),
+            hir::ItemKind::Ty(ref ty, ref generics) => (&*ty, generics),
             _ => return,
         };
         let mut suggested_changing_assoc_types = false;
@@ -1605,10 +1605,10 @@ impl<'a, 'tcx, 'v> hir::intravisit::Visitor<'v> for UnusedBrokenConstVisitor<'a,
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedBrokenConst {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         match it.node {
-            hir::ItemConst(_, body_id) => {
+            hir::ItemKind::Const(_, body_id) => {
                 check_const(cx, body_id, "constant");
             },
-            hir::ItemTy(ref ty, _) => hir::intravisit::walk_ty(
+            hir::ItemKind::Ty(ref ty, _) => hir::intravisit::walk_ty(
                 &mut UnusedBrokenConstVisitor(cx),
                 ty
             ),
@@ -1761,12 +1761,12 @@ impl LintPass for UnnameableTestFunctions {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnnameableTestFunctions {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         match it.node {
-            hir::ItemFn(..) => {
+            hir::ItemKind::Fn(..) => {
                 for attr in &it.attrs {
                     if attr.name() == "test" {
                         let parent = cx.tcx.hir.get_parent(it.id);
                         match cx.tcx.hir.find(parent) {
-                            Some(hir_map::NodeItem(hir::Item {node: hir::ItemMod(_), ..})) |
+                            Some(hir_map::NodeItem(hir::Item {node: hir::ItemKind::Mod(_), ..})) |
                             None => {}
                             _ => {
                                 cx.struct_span_lint(
diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs
index e5bd6a7f610..ad4a4fbff64 100644
--- a/src/librustc_lint/types.rs
+++ b/src/librustc_lint/types.rs
@@ -68,20 +68,20 @@ impl LintPass for TypeLimits {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr) {
         match e.node {
-            hir::ExprUnary(hir::UnNeg, ref expr) => {
+            hir::ExprKind::Unary(hir::UnNeg, ref expr) => {
                 // propagate negation, if the negation itself isn't negated
                 if self.negated_expr_id != e.id {
                     self.negated_expr_id = expr.id;
                 }
             }
-            hir::ExprBinary(binop, ref l, ref r) => {
+            hir::ExprKind::Binary(binop, ref l, ref r) => {
                 if is_comparison(binop) && !check_limits(cx, binop, &l, &r) {
                     cx.span_lint(UNUSED_COMPARISONS,
                                  e.span,
                                  "comparison is useless due to type limits");
                 }
             }
-            hir::ExprLit(ref lit) => {
+            hir::ExprKind::Lit(ref lit) => {
                 match cx.tables.node_id_to_type(e.hir_id).sty {
                     ty::TyInt(t) => {
                         match lit.node {
@@ -137,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
                         if lit_val < min || lit_val > max {
                             let parent_id = cx.tcx.hir.get_parent_node(e.id);
                             if let hir_map::NodeExpr(parent_expr) = cx.tcx.hir.get(parent_id) {
-                                if let hir::ExprCast(..) = parent_expr.node {
+                                if let hir::ExprKind::Cast(..) = parent_expr.node {
                                     if let ty::TyChar = cx.tables.expr_ty(parent_expr).sty {
                                         let mut err = cx.struct_span_lint(
                                                              OVERFLOWING_LITERALS,
@@ -194,11 +194,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
 
         fn is_valid<T: cmp::PartialOrd>(binop: hir::BinOp, v: T, min: T, max: T) -> bool {
             match binop.node {
-                hir::BiLt => v > min && v <= max,
-                hir::BiLe => v >= min && v < max,
-                hir::BiGt => v >= min && v < max,
-                hir::BiGe => v > min && v <= max,
-                hir::BiEq | hir::BiNe => v >= min && v <= max,
+                hir::BinOpKind::Lt => v > min && v <= max,
+                hir::BinOpKind::Le => v >= min && v < max,
+                hir::BinOpKind::Gt => v >= min && v < max,
+                hir::BinOpKind::Ge => v > min && v <= max,
+                hir::BinOpKind::Eq | hir::BinOpKind::Ne => v >= min && v <= max,
                 _ => bug!(),
             }
         }
@@ -206,10 +206,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
         fn rev_binop(binop: hir::BinOp) -> hir::BinOp {
             codemap::respan(binop.span,
                             match binop.node {
-                                hir::BiLt => hir::BiGt,
-                                hir::BiLe => hir::BiGe,
-                                hir::BiGt => hir::BiLt,
-                                hir::BiGe => hir::BiLe,
+                                hir::BinOpKind::Lt => hir::BinOpKind::Gt,
+                                hir::BinOpKind::Le => hir::BinOpKind::Ge,
+                                hir::BinOpKind::Gt => hir::BinOpKind::Lt,
+                                hir::BinOpKind::Ge => hir::BinOpKind::Le,
                                 _ => return binop,
                             })
         }
@@ -244,8 +244,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
                         r: &hir::Expr)
                         -> bool {
             let (lit, expr, swap) = match (&l.node, &r.node) {
-                (&hir::ExprLit(_), _) => (l, r, true),
-                (_, &hir::ExprLit(_)) => (r, l, false),
+                (&hir::ExprKind::Lit(_), _) => (l, r, true),
+                (_, &hir::ExprKind::Lit(_)) => (r, l, false),
                 _ => return true,
             };
             // Normalize the binop so that the literal is always on the RHS in
@@ -255,7 +255,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
                 ty::TyInt(int_ty) => {
                     let (min, max) = int_ty_range(int_ty);
                     let lit_val: i128 = match lit.node {
-                        hir::ExprLit(ref li) => {
+                        hir::ExprKind::Lit(ref li) => {
                             match li.node {
                                 ast::LitKind::Int(v, ast::LitIntType::Signed(_)) |
                                 ast::LitKind::Int(v, ast::LitIntType::Unsuffixed) => v as i128,
@@ -269,7 +269,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
                 ty::TyUint(uint_ty) => {
                     let (min, max) :(u128, u128) = uint_ty_range(uint_ty);
                     let lit_val: u128 = match lit.node {
-                        hir::ExprLit(ref li) => {
+                        hir::ExprKind::Lit(ref li) => {
                             match li.node {
                                 ast::LitKind::Int(v, _) => v,
                                 _ => return true
@@ -285,7 +285,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
 
         fn is_comparison(binop: hir::BinOp) -> bool {
             match binop.node {
-                hir::BiEq | hir::BiLt | hir::BiLe | hir::BiNe | hir::BiGe | hir::BiGt => true,
+                hir::BinOpKind::Eq |
+                hir::BinOpKind::Lt |
+                hir::BinOpKind::Le |
+                hir::BinOpKind::Ne |
+                hir::BinOpKind::Ge |
+                hir::BinOpKind::Gt => true,
                 _ => false,
             }
         }
@@ -782,17 +787,17 @@ impl LintPass for ImproperCTypes {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImproperCTypes {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         let mut vis = ImproperCTypesVisitor { cx: cx };
-        if let hir::ItemForeignMod(ref nmod) = it.node {
+        if let hir::ItemKind::ForeignMod(ref nmod) = it.node {
             if nmod.abi != Abi::RustIntrinsic && nmod.abi != Abi::PlatformIntrinsic {
                 for ni in &nmod.items {
                     match ni.node {
-                        hir::ForeignItemFn(ref decl, _, _) => {
+                        hir::ForeignItemKind::Fn(ref decl, _, _) => {
                             vis.check_foreign_fn(ni.id, decl);
                         }
-                        hir::ForeignItemStatic(ref ty, _) => {
+                        hir::ForeignItemKind::Static(ref ty, _) => {
                             vis.check_foreign_static(ni.id, ty.span);
                         }
-                        hir::ForeignItemType => ()
+                        hir::ForeignItemKind::Type => ()
                     }
                 }
             }
@@ -810,7 +815,7 @@ impl LintPass for VariantSizeDifferences {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for VariantSizeDifferences {
     fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
-        if let hir::ItemEnum(ref enum_definition, _) = it.node {
+        if let hir::ItemKind::Enum(ref enum_definition, _) = it.node {
             let item_def_id = cx.tcx.hir.local_def_id(it.id);
             let generics = cx.tcx.generics_of(item_def_id);
             for param in &generics.params {
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
index 81b4ae3f6e8..3d64fa572d1 100644
--- a/src/librustc_lint/unused.rs
+++ b/src/librustc_lint/unused.rs
@@ -49,11 +49,11 @@ impl LintPass for UnusedResults {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
     fn check_stmt(&mut self, cx: &LateContext, s: &hir::Stmt) {
         let expr = match s.node {
-            hir::StmtSemi(ref expr, _) => &**expr,
+            hir::StmtKind::Semi(ref expr, _) => &**expr,
             _ => return,
         };
 
-        if let hir::ExprRet(..) = expr.node {
+        if let hir::ExprKind::Ret(..) = expr.node {
             return;
         }
 
@@ -74,9 +74,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
         let mut fn_warned = false;
         let mut op_warned = false;
         let maybe_def = match expr.node {
-            hir::ExprCall(ref callee, _) => {
+            hir::ExprKind::Call(ref callee, _) => {
                 match callee.node {
-                    hir::ExprPath(ref qpath) => {
+                    hir::ExprKind::Path(ref qpath) => {
                         let def = cx.tables.qpath_def(qpath, callee.hir_id);
                         if let Def::Fn(_) = def {
                             Some(def)
@@ -87,7 +87,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
                     _ => None
                 }
             },
-            hir::ExprMethodCall(..) => {
+            hir::ExprKind::MethodCall(..) => {
                 cx.tables.type_dependent_defs().get(expr.hir_id).cloned()
             },
             _ => None
@@ -100,23 +100,36 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
             // Hardcoding operators here seemed more expedient than the
             // refactoring that would be needed to look up the `#[must_use]`
             // attribute which does exist on the comparison trait methods
-            hir::ExprBinary(bin_op, ..)  => {
+            hir::ExprKind::Binary(bin_op, ..)  => {
                 match bin_op.node {
-                    hir::BiEq | hir::BiLt | hir::BiLe | hir::BiNe | hir::BiGe | hir::BiGt => {
+                    hir::BinOpKind::Eq |
+                    hir::BinOpKind::Lt |
+                    hir::BinOpKind::Le |
+                    hir::BinOpKind::Ne |
+                    hir::BinOpKind::Ge |
+                    hir::BinOpKind::Gt => {
                         Some("comparison")
                     },
-                    hir::BiAdd | hir::BiSub | hir::BiDiv | hir::BiMul | hir::BiRem => {
+                    hir::BinOpKind::Add |
+                    hir::BinOpKind::Sub |
+                    hir::BinOpKind::Div |
+                    hir::BinOpKind::Mul |
+                    hir::BinOpKind::Rem => {
                         Some("arithmetic operation")
                     },
-                    hir::BiAnd | hir::BiOr => {
+                    hir::BinOpKind::And | hir::BinOpKind::Or => {
                         Some("logical operation")
                     },
-                    hir::BiBitXor | hir::BiBitAnd | hir::BiBitOr | hir::BiShl | hir::BiShr => {
+                    hir::BinOpKind::BitXor |
+                    hir::BinOpKind::BitAnd |
+                    hir::BinOpKind::BitOr |
+                    hir::BinOpKind::Shl |
+                    hir::BinOpKind::Shr => {
                         Some("bitwise operation")
                     },
                 }
             },
-            hir::ExprUnary(..) => Some("unary operation"),
+            hir::ExprKind::Unary(..) => Some("unary operation"),
             _ => None
         };
 
@@ -166,8 +179,8 @@ impl LintPass for PathStatements {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PathStatements {
     fn check_stmt(&mut self, cx: &LateContext, s: &hir::Stmt) {
-        if let hir::StmtSemi(ref expr, _) = s.node {
-            if let hir::ExprPath(_) = expr.node {
+        if let hir::StmtKind::Semi(ref expr, _) = s.node {
+            if let hir::ExprKind::Path(_) = expr.node {
                 cx.span_lint(PATH_STATEMENTS, s.span, "path statement with no effect");
             }
         }
@@ -447,7 +460,7 @@ impl LintPass for UnusedAllocation {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAllocation {
     fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
         match e.node {
-            hir::ExprBox(_) => {}
+            hir::ExprKind::Box(_) => {}
             _ => return,
         }
 
diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs
index 72f91dcea60..b9cb97ed7d0 100644
--- a/src/librustc_metadata/encoder.rs
+++ b/src/librustc_metadata/encoder.rs
@@ -1039,16 +1039,16 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
         debug!("IsolatedEncoder::encode_info_for_item({:?})", def_id);
 
         let kind = match item.node {
-            hir::ItemStatic(_, hir::MutMutable, _) => EntryKind::MutStatic,
-            hir::ItemStatic(_, hir::MutImmutable, _) => EntryKind::ImmStatic,
-            hir::ItemConst(_, body_id) => {
+            hir::ItemKind::Static(_, hir::MutMutable, _) => EntryKind::MutStatic,
+            hir::ItemKind::Static(_, hir::MutImmutable, _) => EntryKind::ImmStatic,
+            hir::ItemKind::Const(_, body_id) => {
                 let mir = tcx.at(item.span).mir_const_qualif(def_id).0;
                 EntryKind::Const(
                     self.const_qualif(mir, body_id),
                     self.encode_rendered_const_for_body(body_id)
                 )
             }
-            hir::ItemFn(_, header, .., body) => {
+            hir::ItemKind::Fn(_, header, .., body) => {
                 let data = FnData {
                     constness: header.constness,
                     arg_names: self.encode_fn_arg_names_for_body(body),
@@ -1057,15 +1057,15 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
 
                 EntryKind::Fn(self.lazy(&data))
             }
-            hir::ItemMod(ref m) => {
+            hir::ItemKind::Mod(ref m) => {
                 return self.encode_info_for_mod(FromId(item.id, (m, &item.attrs, &item.vis)));
             }
-            hir::ItemForeignMod(_) => EntryKind::ForeignMod,
-            hir::ItemGlobalAsm(..) => EntryKind::GlobalAsm,
-            hir::ItemTy(..) => EntryKind::Type,
-            hir::ItemExistential(..) => EntryKind::Existential,
-            hir::ItemEnum(..) => EntryKind::Enum(get_repr_options(&tcx, def_id)),
-            hir::ItemStruct(ref struct_def, _) => {
+            hir::ItemKind::ForeignMod(_) => EntryKind::ForeignMod,
+            hir::ItemKind::GlobalAsm(..) => EntryKind::GlobalAsm,
+            hir::ItemKind::Ty(..) => EntryKind::Type,
+            hir::ItemKind::Existential(..) => EntryKind::Existential,
+            hir::ItemKind::Enum(..) => EntryKind::Enum(get_repr_options(&tcx, def_id)),
+            hir::ItemKind::Struct(ref struct_def, _) => {
                 let variant = tcx.adt_def(def_id).non_enum_variant();
 
                 // Encode def_ids for each field and method
@@ -1086,7 +1086,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
                     ctor_sig: None,
                 }), repr_options)
             }
-            hir::ItemUnion(..) => {
+            hir::ItemKind::Union(..) => {
                 let variant = tcx.adt_def(def_id).non_enum_variant();
                 let repr_options = get_repr_options(&tcx, def_id);
 
@@ -1097,7 +1097,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
                     ctor_sig: None,
                 }), repr_options)
             }
-            hir::ItemImpl(_, polarity, defaultness, ..) => {
+            hir::ItemKind::Impl(_, polarity, defaultness, ..) => {
                 let trait_ref = tcx.impl_trait_ref(def_id);
                 let parent = if let Some(trait_ref) = trait_ref {
                     let trait_def = tcx.trait_def(trait_ref.def_id);
@@ -1132,7 +1132,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
 
                 EntryKind::Impl(self.lazy(&data))
             }
-            hir::ItemTrait(..) => {
+            hir::ItemKind::Trait(..) => {
                 let trait_def = tcx.trait_def(def_id);
                 let data = TraitData {
                     unsafety: trait_def.unsafety,
@@ -1143,9 +1143,9 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
 
                 EntryKind::Trait(self.lazy(&data))
             }
-            hir::ItemExternCrate(_) |
-            hir::ItemTraitAlias(..) |
-            hir::ItemUse(..) => bug!("cannot encode info for item {:?}", item),
+            hir::ItemKind::ExternCrate(_) |
+            hir::ItemKind::TraitAlias(..) |
+            hir::ItemKind::Use(..) => bug!("cannot encode info for item {:?}", item),
         };
 
         Entry {
@@ -1154,28 +1154,28 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
             span: self.lazy(&item.span),
             attributes: self.encode_attributes(&item.attrs),
             children: match item.node {
-                hir::ItemForeignMod(ref fm) => {
+                hir::ItemKind::ForeignMod(ref fm) => {
                     self.lazy_seq(fm.items
                         .iter()
                         .map(|foreign_item| tcx.hir.local_def_id(foreign_item.id).index))
                 }
-                hir::ItemEnum(..) => {
+                hir::ItemKind::Enum(..) => {
                     let def = self.tcx.adt_def(def_id);
                     self.lazy_seq(def.variants.iter().map(|v| {
                         assert!(v.did.is_local());
                         v.did.index
                     }))
                 }
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) => {
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) => {
                     let def = self.tcx.adt_def(def_id);
                     self.lazy_seq(def.non_enum_variant().fields.iter().map(|f| {
                         assert!(f.did.is_local());
                         f.did.index
                     }))
                 }
-                hir::ItemImpl(..) |
-                hir::ItemTrait(..) => {
+                hir::ItemKind::Impl(..) |
+                hir::ItemKind::Trait(..) => {
                     self.lazy_seq(tcx.associated_item_def_ids(def_id).iter().map(|&def_id| {
                         assert!(def_id.is_local());
                         def_id.index
@@ -1187,49 +1187,49 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
             deprecation: self.encode_deprecation(def_id),
 
             ty: match item.node {
-                hir::ItemStatic(..) |
-                hir::ItemConst(..) |
-                hir::ItemFn(..) |
-                hir::ItemTy(..) |
-                hir::ItemExistential(..) |
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemImpl(..) => Some(self.encode_item_type(def_id)),
+                hir::ItemKind::Static(..) |
+                hir::ItemKind::Const(..) |
+                hir::ItemKind::Fn(..) |
+                hir::ItemKind::Ty(..) |
+                hir::ItemKind::Existential(..) |
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Impl(..) => Some(self.encode_item_type(def_id)),
                 _ => None,
             },
             inherent_impls: self.encode_inherent_implementations(def_id),
             variances: match item.node {
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemFn(..) => self.encode_variances_of(def_id),
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Fn(..) => self.encode_variances_of(def_id),
                 _ => LazySeq::empty(),
             },
             generics: match item.node {
-                hir::ItemStatic(..) |
-                hir::ItemConst(..) |
-                hir::ItemFn(..) |
-                hir::ItemTy(..) |
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemImpl(..) |
-                hir::ItemExistential(..) |
-                hir::ItemTrait(..) => Some(self.encode_generics(def_id)),
+                hir::ItemKind::Static(..) |
+                hir::ItemKind::Const(..) |
+                hir::ItemKind::Fn(..) |
+                hir::ItemKind::Ty(..) |
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Impl(..) |
+                hir::ItemKind::Existential(..) |
+                hir::ItemKind::Trait(..) => Some(self.encode_generics(def_id)),
                 _ => None,
             },
             predicates: match item.node {
-                hir::ItemStatic(..) |
-                hir::ItemConst(..) |
-                hir::ItemFn(..) |
-                hir::ItemTy(..) |
-                hir::ItemEnum(..) |
-                hir::ItemStruct(..) |
-                hir::ItemUnion(..) |
-                hir::ItemImpl(..) |
-                hir::ItemExistential(..) |
-                hir::ItemTrait(..) => Some(self.encode_predicates(def_id)),
+                hir::ItemKind::Static(..) |
+                hir::ItemKind::Const(..) |
+                hir::ItemKind::Fn(..) |
+                hir::ItemKind::Ty(..) |
+                hir::ItemKind::Enum(..) |
+                hir::ItemKind::Struct(..) |
+                hir::ItemKind::Union(..) |
+                hir::ItemKind::Impl(..) |
+                hir::ItemKind::Existential(..) |
+                hir::ItemKind::Trait(..) => Some(self.encode_predicates(def_id)),
                 _ => None,
             },
 
@@ -1239,16 +1239,16 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
             // hack. (No reason not to expand it in the future if
             // necessary.)
             predicates_defined_on: match item.node {
-                hir::ItemTrait(..) => Some(self.encode_predicates_defined_on(def_id)),
+                hir::ItemKind::Trait(..) => Some(self.encode_predicates_defined_on(def_id)),
                 _ => None, // not *wrong* for other kinds of items, but not needed
             },
 
             mir: match item.node {
-                hir::ItemStatic(..) => {
+                hir::ItemKind::Static(..) => {
                     self.encode_optimized_mir(def_id)
                 }
-                hir::ItemConst(..) => self.encode_optimized_mir(def_id),
-                hir::ItemFn(_, header, ..) => {
+                hir::ItemKind::Const(..) => self.encode_optimized_mir(def_id),
+                hir::ItemKind::Fn(_, header, ..) => {
                     let generics = tcx.generics_of(def_id);
                     let has_types = generics.params.iter().any(|param| match param.kind {
                         ty::GenericParamDefKind::Type { .. } => true,
@@ -1561,7 +1561,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
         debug!("IsolatedEncoder::encode_info_for_foreign_item({:?})", def_id);
 
         let kind = match nitem.node {
-            hir::ForeignItemFn(_, ref names, _) => {
+            hir::ForeignItemKind::Fn(_, ref names, _) => {
                 let data = FnData {
                     constness: hir::Constness::NotConst,
                     arg_names: self.encode_fn_arg_names(names),
@@ -1569,9 +1569,9 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
                 };
                 EntryKind::ForeignFn(self.lazy(&data))
             }
-            hir::ForeignItemStatic(_, true) => EntryKind::ForeignMutStatic,
-            hir::ForeignItemStatic(_, false) => EntryKind::ForeignImmStatic,
-            hir::ForeignItemType => EntryKind::ForeignType,
+            hir::ForeignItemKind::Static(_, true) => EntryKind::ForeignMutStatic,
+            hir::ForeignItemKind::Static(_, false) => EntryKind::ForeignImmStatic,
+            hir::ForeignItemKind::Type => EntryKind::ForeignType,
         };
 
         Entry {
@@ -1586,7 +1586,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
             ty: Some(self.encode_item_type(def_id)),
             inherent_impls: LazySeq::empty(),
             variances: match nitem.node {
-                hir::ForeignItemFn(..) => self.encode_variances_of(def_id),
+                hir::ForeignItemKind::Fn(..) => self.encode_variances_of(def_id),
                 _ => LazySeq::empty(),
             },
             generics: Some(self.encode_generics(def_id)),
@@ -1614,8 +1614,8 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for EncodeVisitor<'a, 'b, 'tcx> {
         intravisit::walk_item(self, item);
         let def_id = self.index.tcx.hir.local_def_id(item.id);
         match item.node {
-            hir::ItemExternCrate(_) |
-            hir::ItemUse(..) => (), // ignore these
+            hir::ItemKind::ExternCrate(_) |
+            hir::ItemKind::Use(..) => (), // ignore these
             _ => self.index.record(def_id, IsolatedEncoder::encode_info_for_item, (def_id, item)),
         }
         self.index.encode_addl_info_for_item(item);
@@ -1678,7 +1678,7 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
 
     fn encode_info_for_ty(&mut self, ty: &hir::Ty) {
         match ty.node {
-            hir::TyArray(_, ref length) => {
+            hir::TyKind::Array(_, ref length) => {
                 let def_id = self.tcx.hir.local_def_id(length.id);
                 self.record(def_id, IsolatedEncoder::encode_info_for_anon_const, def_id);
             }
@@ -1688,7 +1688,7 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
 
     fn encode_info_for_expr(&mut self, expr: &hir::Expr) {
         match expr.node {
-            hir::ExprClosure(..) => {
+            hir::ExprKind::Closure(..) => {
                 let def_id = self.tcx.hir.local_def_id(expr.id);
                 self.record(def_id, IsolatedEncoder::encode_info_for_closure, def_id);
             }
@@ -1703,20 +1703,20 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
     fn encode_addl_info_for_item(&mut self, item: &hir::Item) {
         let def_id = self.tcx.hir.local_def_id(item.id);
         match item.node {
-            hir::ItemStatic(..) |
-            hir::ItemConst(..) |
-            hir::ItemFn(..) |
-            hir::ItemMod(..) |
-            hir::ItemForeignMod(..) |
-            hir::ItemGlobalAsm(..) |
-            hir::ItemExternCrate(..) |
-            hir::ItemUse(..) |
-            hir::ItemTy(..) |
-            hir::ItemExistential(..) |
-            hir::ItemTraitAlias(..) => {
+            hir::ItemKind::Static(..) |
+            hir::ItemKind::Const(..) |
+            hir::ItemKind::Fn(..) |
+            hir::ItemKind::Mod(..) |
+            hir::ItemKind::ForeignMod(..) |
+            hir::ItemKind::GlobalAsm(..) |
+            hir::ItemKind::ExternCrate(..) |
+            hir::ItemKind::Use(..) |
+            hir::ItemKind::Ty(..) |
+            hir::ItemKind::Existential(..) |
+            hir::ItemKind::TraitAlias(..) => {
                 // no sub-item recording needed in these cases
             }
-            hir::ItemEnum(..) => {
+            hir::ItemKind::Enum(..) => {
                 self.encode_fields(def_id);
 
                 let def = self.tcx.adt_def(def_id);
@@ -1726,7 +1726,7 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
                                 (def_id, Untracked(i)));
                 }
             }
-            hir::ItemStruct(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) => {
                 self.encode_fields(def_id);
 
                 // If the struct has a constructor, encode it.
@@ -1737,17 +1737,17 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
                                 (def_id, ctor_def_id));
                 }
             }
-            hir::ItemUnion(..) => {
+            hir::ItemKind::Union(..) => {
                 self.encode_fields(def_id);
             }
-            hir::ItemImpl(..) => {
+            hir::ItemKind::Impl(..) => {
                 for &trait_item_def_id in self.tcx.associated_item_def_ids(def_id).iter() {
                     self.record(trait_item_def_id,
                                 IsolatedEncoder::encode_info_for_impl_item,
                                 trait_item_def_id);
                 }
             }
-            hir::ItemTrait(..) => {
+            hir::ItemKind::Trait(..) => {
                 for &item_def_id in self.tcx.associated_item_def_ids(def_id).iter() {
                     self.record(item_def_id,
                                 IsolatedEncoder::encode_info_for_trait_item,
@@ -1765,7 +1765,7 @@ struct ImplVisitor<'a, 'tcx: 'a> {
 
 impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for ImplVisitor<'a, 'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
-        if let hir::ItemImpl(..) = item.node {
+        if let hir::ItemKind::Impl(..) = item.node {
             let impl_id = self.tcx.hir.local_def_id(item.id);
             if let Some(trait_ref) = self.tcx.impl_trait_ref(impl_id) {
                 self.impls
diff --git a/src/librustc_metadata/foreign_modules.rs b/src/librustc_metadata/foreign_modules.rs
index c44d891b7f3..e96d56fb388 100644
--- a/src/librustc_metadata/foreign_modules.rs
+++ b/src/librustc_metadata/foreign_modules.rs
@@ -30,7 +30,7 @@ struct Collector<'a, 'tcx: 'a> {
 impl<'a, 'tcx> ItemLikeVisitor<'tcx> for Collector<'a, 'tcx> {
     fn visit_item(&mut self, it: &'tcx hir::Item) {
         let fm = match it.node {
-            hir::ItemForeignMod(ref fm) => fm,
+            hir::ItemKind::ForeignMod(ref fm) => fm,
             _ => return,
         };
 
diff --git a/src/librustc_metadata/link_args.rs b/src/librustc_metadata/link_args.rs
index b699885b0eb..008e1e363ff 100644
--- a/src/librustc_metadata/link_args.rs
+++ b/src/librustc_metadata/link_args.rs
@@ -37,7 +37,7 @@ struct Collector {
 impl<'tcx> ItemLikeVisitor<'tcx> for Collector {
     fn visit_item(&mut self, it: &'tcx hir::Item) {
         let fm = match it.node {
-            hir::ItemForeignMod(ref fm) => fm,
+            hir::ItemKind::ForeignMod(ref fm) => fm,
             _ => return,
         };
         if fm.abi == Abi::Rust ||
diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs
index 70b8c7b11fd..327b2abc4d3 100644
--- a/src/librustc_metadata/native_libs.rs
+++ b/src/librustc_metadata/native_libs.rs
@@ -45,7 +45,7 @@ struct Collector<'a, 'tcx: 'a> {
 impl<'a, 'tcx> ItemLikeVisitor<'tcx> for Collector<'a, 'tcx> {
     fn visit_item(&mut self, it: &'tcx hir::Item) {
         let fm = match it.node {
-            hir::ItemForeignMod(ref fm) => fm,
+            hir::ItemKind::ForeignMod(ref fm) => fm,
             _ => return,
         };
 
diff --git a/src/librustc_mir/borrow_check/error_reporting.rs b/src/librustc_mir/borrow_check/error_reporting.rs
index f903dbd97a8..c481d1d325b 100644
--- a/src/librustc_mir/borrow_check/error_reporting.rs
+++ b/src/librustc_mir/borrow_check/error_reporting.rs
@@ -207,7 +207,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
         maybe_closure_span: Span,
         location: Location,
     ) -> Option<(Span, Span)> {
-        use rustc::hir::ExprClosure;
+        use rustc::hir::ExprKind::Closure;
         use rustc::mir::AggregateKind;
 
         let local = match self.mir[location.block]
@@ -231,7 +231,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
                     debug!("find_closure_span: found closure {:?}", places);
 
                     return if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) {
-                        let args_span = if let ExprClosure(_, _, _, span, _) =
+                        let args_span = if let Closure(_, _, _, span, _) =
                             self.tcx.hir.expect_expr(node_id).node
                         {
                             span
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 03eaee362c7..e7f00b577b3 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -232,7 +232,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
 
     let movable_generator = match tcx.hir.get(id) {
         hir::map::Node::NodeExpr(&hir::Expr {
-            node: hir::ExprClosure(.., Some(hir::GeneratorMovability::Static)),
+            node: hir::ExprKind::Closure(.., Some(hir::GeneratorMovability::Static)),
             ..
         }) => false,
         _ => true,
diff --git a/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs b/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs
index 16dec2725ff..fc0e64d0a8a 100644
--- a/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs
+++ b/src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs
@@ -201,7 +201,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
             // This indicates a variable with no type annotation, like
             // `|x|`... in that case, we can't highlight the type but
             // must highlight the variable.
-            hir::TyInfer => None,
+            hir::TyKind::Infer => None,
 
             _ => self.give_name_if_we_can_match_hir_ty(
                 tcx,
@@ -263,7 +263,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
                 //
                 //     &
                 //     - let's call the lifetime of this reference `'1`
-                (ty::TyRef(region, referent_ty, _), hir::TyRptr(_lifetime, referent_hir_ty)) => {
+                (
+                    ty::TyRef(region, referent_ty, _),
+                    hir::TyKind::Rptr(_lifetime, referent_hir_ty),
+                ) => {
                     if region.to_region_vid() == needle_fr {
                         let region_name = self.synthesize_region_name(counter);
 
@@ -287,7 +290,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
                 }
 
                 // Match up something like `Foo<'1>`
-                (ty::TyAdt(_adt_def, substs), hir::TyPath(hir::QPath::Resolved(None, path))) => {
+                (
+                    ty::TyAdt(_adt_def, substs),
+                    hir::TyKind::Path(hir::QPath::Resolved(None, path)),
+                ) => {
                     if let Some(last_segment) = path.segments.last() {
                         if let Some(name) = self.match_adt_and_segment(
                             substs,
@@ -305,16 +311,16 @@ impl<'tcx> RegionInferenceContext<'tcx> {
                 // The following cases don't have lifetimes, so we
                 // just worry about trying to match up the rustc type
                 // with the HIR types:
-                (ty::TyTuple(elem_tys), hir::TyTup(elem_hir_tys)) => {
+                (ty::TyTuple(elem_tys), hir::TyKind::Tup(elem_hir_tys)) => {
                     search_stack.extend(elem_tys.iter().cloned().zip(elem_hir_tys));
                 }
 
-                (ty::TySlice(elem_ty), hir::TySlice(elem_hir_ty))
-                | (ty::TyArray(elem_ty, _), hir::TyArray(elem_hir_ty, _)) => {
+                (ty::TySlice(elem_ty), hir::TyKind::Slice(elem_hir_ty))
+                | (ty::TyArray(elem_ty, _), hir::TyKind::Array(elem_hir_ty, _)) => {
                     search_stack.push((elem_ty, elem_hir_ty));
                 }
 
-                (ty::TyRawPtr(mut_ty), hir::TyPtr(mut_hir_ty)) => {
+                (ty::TyRawPtr(mut_ty), hir::TyKind::Ptr(mut_hir_ty)) => {
                     search_stack.push((mut_ty.ty, &mut_hir_ty.ty));
                 }
 
diff --git a/src/librustc_mir/hair/cx/block.rs b/src/librustc_mir/hair/cx/block.rs
index 5ef1eef133d..6c8b5d97b6f 100644
--- a/src/librustc_mir/hair/cx/block.rs
+++ b/src/librustc_mir/hair/cx/block.rs
@@ -55,8 +55,8 @@ fn mirror_stmts<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
         let hir_id = cx.tcx.hir.node_to_hir_id(stmt.node.id());
         let opt_dxn_ext = cx.region_scope_tree.opt_destruction_scope(hir_id.local_id);
         match stmt.node {
-            hir::StmtExpr(ref expr, _) |
-            hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) |
+            hir::StmtKind::Semi(ref expr, _) => {
                 result.push(StmtRef::Mirror(Box::new(Stmt {
                     kind: StmtKind::Expr {
                         scope: region::Scope::Node(hir_id.local_id),
@@ -65,12 +65,12 @@ fn mirror_stmts<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                     opt_destruction_scope: opt_dxn_ext,
                 })))
             }
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 match decl.node {
-                    hir::DeclItem(..) => {
+                    hir::DeclKind::Item(..) => {
                         // ignore for purposes of the MIR
                     }
-                    hir::DeclLocal(ref local) => {
+                    hir::DeclKind::Local(ref local) => {
                         let remainder_scope = region::Scope::Remainder(BlockRemainder {
                             block: block_id,
                             first_statement_index: region::FirstStatementIndex::new(index),
diff --git a/src/librustc_mir/hair/cx/expr.rs b/src/librustc_mir/hair/cx/expr.rs
index 8c73771e57b..13b2a0ab874 100644
--- a/src/librustc_mir/hair/cx/expr.rs
+++ b/src/librustc_mir/hair/cx/expr.rs
@@ -200,7 +200,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
 
     let kind = match expr.node {
         // Here comes the interesting stuff:
-        hir::ExprMethodCall(.., ref args) => {
+        hir::ExprKind::MethodCall(.., ref args) => {
             // Rewrite a.b(c) into UFCS form like Trait::b(a, c)
             let expr = method_callee(cx, expr, None);
             let args = args.iter()
@@ -213,7 +213,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprCall(ref fun, ref args) => {
+        hir::ExprKind::Call(ref fun, ref args) => {
             if cx.tables().is_method_call(expr) {
                 // The callee is something implementing Fn, FnMut, or FnOnce.
                 // Find the actual method implementation being called and
@@ -238,8 +238,10 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                     args: vec![fun.to_ref(), tupled_args.to_ref()],
                 }
             } else {
-                let adt_data = if let hir::ExprPath(hir::QPath::Resolved(_, ref path)) = fun.node {
-                    // Tuple-like ADTs are represented as ExprCall. We convert them here.
+                let adt_data = if let hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) =
+                    fun.node
+                {
+                    // Tuple-like ADTs are represented as ExprKind::Call. We convert them here.
                     expr_ty.ty_adt_def().and_then(|adt_def| {
                         match path.def {
                             Def::VariantCtor(variant_id, CtorKind::Fn) => {
@@ -280,7 +282,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprAddrOf(mutbl, ref expr) => {
+        hir::ExprKind::AddrOf(mutbl, ref expr) => {
             let region = match expr_ty.sty {
                 ty::TyRef(r, _, _) => r,
                 _ => span_bug!(expr.span, "type of & not region"),
@@ -292,16 +294,16 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprBlock(ref blk, _) => ExprKind::Block { body: &blk },
+        hir::ExprKind::Block(ref blk, _) => ExprKind::Block { body: &blk },
 
-        hir::ExprAssign(ref lhs, ref rhs) => {
+        hir::ExprKind::Assign(ref lhs, ref rhs) => {
             ExprKind::Assign {
                 lhs: lhs.to_ref(),
                 rhs: rhs.to_ref(),
             }
         }
 
-        hir::ExprAssignOp(op, ref lhs, ref rhs) => {
+        hir::ExprKind::AssignOp(op, ref lhs, ref rhs) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_operator(cx, expr, vec![lhs.to_ref(), rhs.to_ref()])
             } else {
@@ -313,11 +315,11 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprLit(ref lit) => ExprKind::Literal {
+        hir::ExprKind::Lit(ref lit) => ExprKind::Literal {
             literal: cx.const_eval_literal(&lit.node, expr_ty, lit.span, false),
         },
 
-        hir::ExprBinary(op, ref lhs, ref rhs) => {
+        hir::ExprKind::Binary(op, ref lhs, ref rhs) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_operator(cx, expr, vec![lhs.to_ref(), rhs.to_ref()])
             } else {
@@ -325,14 +327,14 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 match (op.node, cx.constness) {
                     // FIXME(eddyb) use logical ops in constants when
                     // they can handle that kind of control-flow.
-                    (hir::BinOp_::BiAnd, hir::Constness::Const) => {
+                    (hir::BinOpKind::And, hir::Constness::Const) => {
                         ExprKind::Binary {
                             op: BinOp::BitAnd,
                             lhs: lhs.to_ref(),
                             rhs: rhs.to_ref(),
                         }
                     }
-                    (hir::BinOp_::BiOr, hir::Constness::Const) => {
+                    (hir::BinOpKind::Or, hir::Constness::Const) => {
                         ExprKind::Binary {
                             op: BinOp::BitOr,
                             lhs: lhs.to_ref(),
@@ -340,14 +342,14 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                         }
                     }
 
-                    (hir::BinOp_::BiAnd, hir::Constness::NotConst) => {
+                    (hir::BinOpKind::And, hir::Constness::NotConst) => {
                         ExprKind::LogicalOp {
                             op: LogicalOp::And,
                             lhs: lhs.to_ref(),
                             rhs: rhs.to_ref(),
                         }
                     }
-                    (hir::BinOp_::BiOr, hir::Constness::NotConst) => {
+                    (hir::BinOpKind::Or, hir::Constness::NotConst) => {
                         ExprKind::LogicalOp {
                             op: LogicalOp::Or,
                             lhs: lhs.to_ref(),
@@ -367,7 +369,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprIndex(ref lhs, ref index) => {
+        hir::ExprKind::Index(ref lhs, ref index) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_place(cx, expr, expr_ty, None, vec![lhs.to_ref(), index.to_ref()])
             } else {
@@ -378,7 +380,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprUnary(hir::UnOp::UnDeref, ref arg) => {
+        hir::ExprKind::Unary(hir::UnOp::UnDeref, ref arg) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_place(cx, expr, expr_ty, None, vec![arg.to_ref()])
             } else {
@@ -386,7 +388,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprUnary(hir::UnOp::UnNot, ref arg) => {
+        hir::ExprKind::Unary(hir::UnOp::UnNot, ref arg) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_operator(cx, expr, vec![arg.to_ref()])
             } else {
@@ -397,11 +399,11 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprUnary(hir::UnOp::UnNeg, ref arg) => {
+        hir::ExprKind::Unary(hir::UnOp::UnNeg, ref arg) => {
             if cx.tables().is_method_call(expr) {
                 overloaded_operator(cx, expr, vec![arg.to_ref()])
             } else {
-                if let hir::ExprLit(ref lit) = arg.node {
+                if let hir::ExprKind::Lit(ref lit) = arg.node {
                     ExprKind::Literal {
                         literal: cx.const_eval_literal(&lit.node, expr_ty, lit.span, true),
                     }
@@ -414,7 +416,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprStruct(ref qpath, ref fields, ref base) => {
+        hir::ExprKind::Struct(ref qpath, ref fields, ref base) => {
             match expr_ty.sty {
                 ty::TyAdt(adt, substs) => {
                     match adt.adt_kind() {
@@ -467,7 +469,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprClosure(..) => {
+        hir::ExprKind::Closure(..) => {
             let closure_ty = cx.tables().expr_ty(expr);
             let (def_id, substs, movability) = match closure_ty.sty {
                 ty::TyClosure(def_id, substs) => (def_id, UpvarSubsts::Closure(substs), None),
@@ -492,12 +494,12 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
             }
         }
 
-        hir::ExprPath(ref qpath) => {
+        hir::ExprKind::Path(ref qpath) => {
             let def = cx.tables().qpath_def(qpath, expr.hir_id);
             convert_path_expr(cx, expr, def)
         }
 
-        hir::ExprInlineAsm(ref asm, ref outputs, ref inputs) => {
+        hir::ExprKind::InlineAsm(ref asm, ref outputs, ref inputs) => {
             ExprKind::InlineAsm {
                 asm,
                 outputs: outputs.to_ref(),
@@ -506,7 +508,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
         }
 
         // Now comes the rote stuff:
-        hir::ExprRepeat(ref v, ref count) => {
+        hir::ExprKind::Repeat(ref v, ref count) => {
             let def_id = cx.tcx.hir.local_def_id(count.id);
             let substs = Substs::identity_for_item(cx.tcx.global_tcx(), def_id);
             let instance = ty::Instance::resolve(
@@ -533,8 +535,8 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 count,
             }
         }
-        hir::ExprRet(ref v) => ExprKind::Return { value: v.to_ref() },
-        hir::ExprBreak(dest, ref value) => {
+        hir::ExprKind::Ret(ref v) => ExprKind::Return { value: v.to_ref() },
+        hir::ExprKind::Break(dest, ref value) => {
             match dest.target_id {
                 Ok(target_id) => ExprKind::Break {
                     label: region::Scope::Node(cx.tcx.hir.node_to_hir_id(target_id).local_id),
@@ -543,7 +545,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 Err(err) => bug!("invalid loop id for break: {}", err)
             }
         }
-        hir::ExprContinue(dest) => {
+        hir::ExprKind::Continue(dest) => {
             match dest.target_id {
                 Ok(loop_id) => ExprKind::Continue {
                     label: region::Scope::Node(cx.tcx.hir.node_to_hir_id(loop_id).local_id),
@@ -551,38 +553,38 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 Err(err) => bug!("invalid loop id for continue: {}", err)
             }
         }
-        hir::ExprMatch(ref discr, ref arms, _) => {
+        hir::ExprKind::Match(ref discr, ref arms, _) => {
             ExprKind::Match {
                 discriminant: discr.to_ref(),
                 arms: arms.iter().map(|a| convert_arm(cx, a)).collect(),
             }
         }
-        hir::ExprIf(ref cond, ref then, ref otherwise) => {
+        hir::ExprKind::If(ref cond, ref then, ref otherwise) => {
             ExprKind::If {
                 condition: cond.to_ref(),
                 then: then.to_ref(),
                 otherwise: otherwise.to_ref(),
             }
         }
-        hir::ExprWhile(ref cond, ref body, _) => {
+        hir::ExprKind::While(ref cond, ref body, _) => {
             ExprKind::Loop {
                 condition: Some(cond.to_ref()),
                 body: block::to_expr_ref(cx, body),
             }
         }
-        hir::ExprLoop(ref body, _, _) => {
+        hir::ExprKind::Loop(ref body, _, _) => {
             ExprKind::Loop {
                 condition: None,
                 body: block::to_expr_ref(cx, body),
             }
         }
-        hir::ExprField(ref source, ..) => {
+        hir::ExprKind::Field(ref source, ..) => {
             ExprKind::Field {
                 lhs: source.to_ref(),
                 name: Field::new(cx.tcx.field_index(expr.id, cx.tables)),
             }
         }
-        hir::ExprCast(ref source, _) => {
+        hir::ExprKind::Cast(ref source, _) => {
             // Check to see if this cast is a "coercion cast", where the cast is actually done
             // using a coercion (or is a no-op).
             if let Some(&TyCastKind::CoercionCast) = cx.tables()
@@ -602,7 +604,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 // }
                 // The correct solution would be to add symbolic computations to miri,
                 // so we wouldn't have to compute and store the actual value
-                let var = if let hir::ExprPath(ref qpath) = source.node {
+                let var = if let hir::ExprKind::Path(ref qpath) = source.node {
                     let def = cx.tables().qpath_def(qpath, source.hir_id);
                     cx
                         .tables()
@@ -666,16 +668,16 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
                 ExprKind::Cast { source }
             }
         }
-        hir::ExprType(ref source, _) => return source.make_mirror(cx),
-        hir::ExprBox(ref value) => {
+        hir::ExprKind::Type(ref source, _) => return source.make_mirror(cx),
+        hir::ExprKind::Box(ref value) => {
             ExprKind::Box {
                 value: value.to_ref(),
             }
         }
-        hir::ExprArray(ref fields) => ExprKind::Array { fields: fields.to_ref() },
-        hir::ExprTup(ref fields) => ExprKind::Tuple { fields: fields.to_ref() },
+        hir::ExprKind::Array(ref fields) => ExprKind::Array { fields: fields.to_ref() },
+        hir::ExprKind::Tup(ref fields) => ExprKind::Tuple { fields: fields.to_ref() },
 
-        hir::ExprYield(ref v) => ExprKind::Yield { value: v.to_ref() },
+        hir::ExprKind::Yield(ref v) => ExprKind::Yield { value: v.to_ref() },
     };
 
     Expr {
@@ -930,24 +932,24 @@ fn convert_var<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
 }
 
 
-fn bin_op(op: hir::BinOp_) -> BinOp {
+fn bin_op(op: hir::BinOpKind) -> BinOp {
     match op {
-        hir::BinOp_::BiAdd => BinOp::Add,
-        hir::BinOp_::BiSub => BinOp::Sub,
-        hir::BinOp_::BiMul => BinOp::Mul,
-        hir::BinOp_::BiDiv => BinOp::Div,
-        hir::BinOp_::BiRem => BinOp::Rem,
-        hir::BinOp_::BiBitXor => BinOp::BitXor,
-        hir::BinOp_::BiBitAnd => BinOp::BitAnd,
-        hir::BinOp_::BiBitOr => BinOp::BitOr,
-        hir::BinOp_::BiShl => BinOp::Shl,
-        hir::BinOp_::BiShr => BinOp::Shr,
-        hir::BinOp_::BiEq => BinOp::Eq,
-        hir::BinOp_::BiLt => BinOp::Lt,
-        hir::BinOp_::BiLe => BinOp::Le,
-        hir::BinOp_::BiNe => BinOp::Ne,
-        hir::BinOp_::BiGe => BinOp::Ge,
-        hir::BinOp_::BiGt => BinOp::Gt,
+        hir::BinOpKind::Add => BinOp::Add,
+        hir::BinOpKind::Sub => BinOp::Sub,
+        hir::BinOpKind::Mul => BinOp::Mul,
+        hir::BinOpKind::Div => BinOp::Div,
+        hir::BinOpKind::Rem => BinOp::Rem,
+        hir::BinOpKind::BitXor => BinOp::BitXor,
+        hir::BinOpKind::BitAnd => BinOp::BitAnd,
+        hir::BinOpKind::BitOr => BinOp::BitOr,
+        hir::BinOpKind::Shl => BinOp::Shl,
+        hir::BinOpKind::Shr => BinOp::Shr,
+        hir::BinOpKind::Eq => BinOp::Eq,
+        hir::BinOpKind::Lt => BinOp::Lt,
+        hir::BinOpKind::Le => BinOp::Le,
+        hir::BinOpKind::Ne => BinOp::Ne,
+        hir::BinOpKind::Ge => BinOp::Ge,
+        hir::BinOpKind::Gt => BinOp::Gt,
         _ => bug!("no equivalent for ast binop {:?}", op),
     }
 }
diff --git a/src/librustc_mir/hair/pattern/check_match.rs b/src/librustc_mir/hair/pattern/check_match.rs
index 18ae7c77459..35f9dcee99f 100644
--- a/src/librustc_mir/hair/pattern/check_match.rs
+++ b/src/librustc_mir/hair/pattern/check_match.rs
@@ -98,7 +98,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MatchVisitor<'a, 'tcx> {
         intravisit::walk_expr(self, ex);
 
         match ex.node {
-            hir::ExprMatch(ref scrut, ref arms, source) => {
+            hir::ExprKind::Match(ref scrut, ref arms, source) => {
                 self.check_match(scrut, arms, source);
             }
             _ => {}
diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs
index 636969e2632..53511c1c127 100644
--- a/src/librustc_mir/hair/pattern/mod.rs
+++ b/src/librustc_mir/hair/pattern/mod.rs
@@ -733,7 +733,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
     /// afterwards.
     fn lower_lit(&mut self, expr: &'tcx hir::Expr) -> PatternKind<'tcx> {
         match expr.node {
-            hir::ExprLit(ref lit) => {
+            hir::ExprKind::Lit(ref lit) => {
                 let ty = self.tables.expr_ty(expr);
                 match lit_to_const(&lit.node, self.tcx, ty, false) {
                     Ok(val) => {
@@ -751,11 +751,11 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
                     },
                 }
             },
-            hir::ExprPath(ref qpath) => *self.lower_path(qpath, expr.hir_id, expr.span).kind,
-            hir::ExprUnary(hir::UnNeg, ref expr) => {
+            hir::ExprKind::Path(ref qpath) => *self.lower_path(qpath, expr.hir_id, expr.span).kind,
+            hir::ExprKind::Unary(hir::UnNeg, ref expr) => {
                 let ty = self.tables.expr_ty(expr);
                 let lit = match expr.node {
-                    hir::ExprLit(ref lit) => lit,
+                    hir::ExprKind::Lit(ref lit) => lit,
                     _ => span_bug!(expr.span, "not a literal: {:?}", expr),
                 };
                 match lit_to_const(&lit.node, self.tcx, ty, true) {
diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs
index ce917b8ca55..a2d620db924 100644
--- a/src/librustc_mir/monomorphize/collector.rs
+++ b/src/librustc_mir/monomorphize/collector.rs
@@ -945,18 +945,18 @@ struct RootCollector<'b, 'a: 'b, 'tcx: 'a + 'b> {
 impl<'b, 'a, 'v> ItemLikeVisitor<'v> for RootCollector<'b, 'a, 'v> {
     fn visit_item(&mut self, item: &'v hir::Item) {
         match item.node {
-            hir::ItemExternCrate(..) |
-            hir::ItemUse(..)         |
-            hir::ItemForeignMod(..)  |
-            hir::ItemTy(..)          |
-            hir::ItemTrait(..)       |
-            hir::ItemTraitAlias(..)  |
-            hir::ItemExistential(..) |
-            hir::ItemMod(..)         => {
+            hir::ItemKind::ExternCrate(..) |
+            hir::ItemKind::Use(..)         |
+            hir::ItemKind::ForeignMod(..)  |
+            hir::ItemKind::Ty(..)          |
+            hir::ItemKind::Trait(..)       |
+            hir::ItemKind::TraitAlias(..)  |
+            hir::ItemKind::Existential(..) |
+            hir::ItemKind::Mod(..)         => {
                 // Nothing to do, just keep recursing...
             }
 
-            hir::ItemImpl(..) => {
+            hir::ItemKind::Impl(..) => {
                 if self.mode == MonoItemCollectionMode::Eager {
                     create_mono_items_for_default_impls(self.tcx,
                                                         item,
@@ -964,9 +964,9 @@ impl<'b, 'a, 'v> ItemLikeVisitor<'v> for RootCollector<'b, 'a, 'v> {
                 }
             }
 
-            hir::ItemEnum(_, ref generics) |
-            hir::ItemStruct(_, ref generics) |
-            hir::ItemUnion(_, ref generics) => {
+            hir::ItemKind::Enum(_, ref generics) |
+            hir::ItemKind::Struct(_, ref generics) |
+            hir::ItemKind::Union(_, ref generics) => {
                 if generics.params.is_empty() {
                     if self.mode == MonoItemCollectionMode::Eager {
                         let def_id = self.tcx.hir.local_def_id(item.id);
@@ -978,19 +978,19 @@ impl<'b, 'a, 'v> ItemLikeVisitor<'v> for RootCollector<'b, 'a, 'v> {
                     }
                 }
             }
-            hir::ItemGlobalAsm(..) => {
-                debug!("RootCollector: ItemGlobalAsm({})",
+            hir::ItemKind::GlobalAsm(..) => {
+                debug!("RootCollector: ItemKind::GlobalAsm({})",
                        def_id_to_string(self.tcx,
                                         self.tcx.hir.local_def_id(item.id)));
                 self.output.push(MonoItem::GlobalAsm(item.id));
             }
-            hir::ItemStatic(..) => {
+            hir::ItemKind::Static(..) => {
                 let def_id = self.tcx.hir.local_def_id(item.id);
-                debug!("RootCollector: ItemStatic({})",
+                debug!("RootCollector: ItemKind::Static({})",
                        def_id_to_string(self.tcx, def_id));
                 self.output.push(MonoItem::Static(def_id));
             }
-            hir::ItemConst(..) => {
+            hir::ItemKind::Const(..) => {
                 // const items only generate mono items if they are
                 // actually used somewhere. Just declaring them is insufficient.
 
@@ -1001,7 +1001,7 @@ impl<'b, 'a, 'v> ItemLikeVisitor<'v> for RootCollector<'b, 'a, 'v> {
                     self.output.push(MonoItem::CustomSection(def_id));
                 }
             }
-            hir::ItemFn(..) => {
+            hir::ItemKind::Fn(..) => {
                 let def_id = self.tcx.hir.local_def_id(item.id);
                 self.push_if_root(def_id);
             }
@@ -1102,7 +1102,7 @@ fn create_mono_items_for_default_impls<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                                  item: &'tcx hir::Item,
                                                  output: &mut Vec<MonoItem<'tcx>>) {
     match item.node {
-        hir::ItemImpl(_, _, _, ref generics, .., ref impl_item_refs) => {
+        hir::ItemKind::Impl(_, _, _, ref generics, .., ref impl_item_refs) => {
             for param in &generics.params {
                 match param.kind {
                     hir::GenericParamKind::Lifetime { .. } => {}
diff --git a/src/librustc_mir/transform/add_validation.rs b/src/librustc_mir/transform/add_validation.rs
index 44f9477c2ec..9c341b38e34 100644
--- a/src/librustc_mir/transform/add_validation.rs
+++ b/src/librustc_mir/transform/add_validation.rs
@@ -141,7 +141,7 @@ fn fn_contains_unsafe<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, src: MirSource) ->
             }
             // Check if this is an unsafe block, or an item
             match node {
-                Node::NodeExpr(&hir::Expr { node: hir::ExprBlock(ref block, _), ..}) => {
+                Node::NodeExpr(&hir::Expr { node: hir::ExprKind::Block(ref block, _), ..}) => {
                     if block_is_unsafe(&*block) {
                         // Found an unsafe block, we can bail out here.
                         return true;
diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs
index 7768e96d036..b4f0a7cd6c4 100644
--- a/src/librustc_mir/transform/check_unsafety.rs
+++ b/src/librustc_mir/transform/check_unsafety.rs
@@ -405,7 +405,7 @@ fn is_enclosed(tcx: TyCtxt,
         if used_unsafe.contains(&parent_id) {
             Some(("block".to_string(), parent_id))
         } else if let Some(hir::map::NodeItem(&hir::Item {
-            node: hir::ItemFn(_, header, _, _),
+            node: hir::ItemKind::Fn(_, header, _, _),
             ..
         })) = tcx.hir.find(parent_id) {
             match header.unsafety {
diff --git a/src/librustc_passes/loops.rs b/src/librustc_passes/loops.rs
index eff0dbe1235..8ef20126e03 100644
--- a/src/librustc_passes/loops.rs
+++ b/src/librustc_passes/loops.rs
@@ -78,23 +78,23 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
 
     fn visit_expr(&mut self, e: &'hir hir::Expr) {
         match e.node {
-            hir::ExprWhile(ref e, ref b, _) => {
+            hir::ExprKind::While(ref e, ref b, _) => {
                 self.with_context(Loop(LoopKind::WhileLoop), |v| {
                     v.visit_expr(&e);
                     v.visit_block(&b);
                 });
             }
-            hir::ExprLoop(ref b, _, source) => {
+            hir::ExprKind::Loop(ref b, _, source) => {
                 self.with_context(Loop(LoopKind::Loop(source)), |v| v.visit_block(&b));
             }
-            hir::ExprClosure(_, ref function_decl, b, _, _) => {
+            hir::ExprKind::Closure(_, ref function_decl, b, _, _) => {
                 self.visit_fn_decl(&function_decl);
                 self.with_context(Closure, |v| v.visit_nested_body(b));
             }
-            hir::ExprBlock(ref b, Some(_label)) => {
+            hir::ExprKind::Block(ref b, Some(_label)) => {
                 self.with_context(LabeledBlock, |v| v.visit_block(&b));
             }
-            hir::ExprBreak(label, ref opt_expr) => {
+            hir::ExprKind::Break(label, ref opt_expr) => {
                 opt_expr.as_ref().map(|e| self.visit_expr(e));
 
                 if self.require_label_in_labeled_block(e.span, &label, "break") {
@@ -125,8 +125,8 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
                         None
                     } else {
                         Some(match self.hir_map.expect_expr(loop_id).node {
-                            hir::ExprWhile(..) => LoopKind::WhileLoop,
-                            hir::ExprLoop(_, _, source) => LoopKind::Loop(source),
+                            hir::ExprKind::While(..) => LoopKind::WhileLoop,
+                            hir::ExprKind::Loop(_, _, source) => LoopKind::Loop(source),
                             ref r => span_bug!(e.span,
                                                "break label resolved to a non-loop: {:?}", r),
                         })
@@ -153,7 +153,7 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
 
                 self.require_break_cx("break", e.span);
             }
-            hir::ExprContinue(label) => {
+            hir::ExprKind::Continue(label) => {
                 self.require_label_in_labeled_block(e.span, &label, "continue");
 
                 match label.target_id {
diff --git a/src/librustc_passes/rvalue_promotion.rs b/src/librustc_passes/rvalue_promotion.rs
index 6fbe4e0f240..d223dc2a353 100644
--- a/src/librustc_passes/rvalue_promotion.rs
+++ b/src/librustc_passes/rvalue_promotion.rs
@@ -261,9 +261,9 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
 
     fn check_stmt(&mut self, stmt: &'tcx hir::Stmt) -> Promotability {
         match stmt.node {
-            hir::StmtDecl(ref decl, _node_id) => {
+            hir::StmtKind::Decl(ref decl, _node_id) => {
                 match &decl.node {
-                    hir::DeclLocal(local) => {
+                    hir::DeclKind::Local(local) => {
                         if self.remove_mut_rvalue_borrow(&local.pat) {
                             if let Some(init) = &local.init {
                                 self.mut_rvalue_borrows.insert(init.id);
@@ -277,11 +277,11 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
                         NotPromotable
                     }
                     // Item statements are allowed
-                    hir::DeclItem(_) => Promotable
+                    hir::DeclKind::Item(_) => Promotable
                 }
             }
-            hir::StmtExpr(ref box_expr, _node_id) |
-            hir::StmtSemi(ref box_expr, _node_id) => {
+            hir::StmtKind::Expr(ref box_expr, _node_id) |
+            hir::StmtKind::Semi(ref box_expr, _node_id) => {
                 let _ = self.check_expr(box_expr);
                 NotPromotable
             }
@@ -334,11 +334,11 @@ fn check_expr_kind<'a, 'tcx>(
     };
 
     let node_result = match e.node {
-        hir::ExprBox(ref expr) => {
+        hir::ExprKind::Box(ref expr) => {
             let _ = v.check_expr(&expr);
             NotPromotable
         }
-        hir::ExprUnary(op, ref expr) => {
+        hir::ExprKind::Unary(op, ref expr) => {
             let expr_promotability = v.check_expr(expr);
             if v.tables.is_method_call(e) {
                 return NotPromotable;
@@ -348,7 +348,7 @@ fn check_expr_kind<'a, 'tcx>(
             }
             expr_promotability
         }
-        hir::ExprBinary(op, ref lhs, ref rhs) => {
+        hir::ExprKind::Binary(op, ref lhs, ref rhs) => {
             let lefty = v.check_expr(lhs);
             let righty = v.check_expr(rhs);
             if v.tables.is_method_call(e) {
@@ -356,16 +356,16 @@ fn check_expr_kind<'a, 'tcx>(
             }
             match v.tables.node_id_to_type(lhs.hir_id).sty {
                 ty::TyRawPtr(_) => {
-                    assert!(op.node == hir::BiEq || op.node == hir::BiNe ||
-                        op.node == hir::BiLe || op.node == hir::BiLt ||
-                        op.node == hir::BiGe || op.node == hir::BiGt);
+                    assert!(op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne ||
+                        op.node == hir::BinOpKind::Le || op.node == hir::BinOpKind::Lt ||
+                        op.node == hir::BinOpKind::Ge || op.node == hir::BinOpKind::Gt);
 
                     NotPromotable
                 }
                 _ => lefty & righty
             }
         }
-        hir::ExprCast(ref from, _) => {
+        hir::ExprKind::Cast(ref from, _) => {
             let expr_promotability = v.check_expr(from);
             debug!("Checking const cast(id={})", from.id);
             match v.tables.cast_kinds().get(from.hir_id) {
@@ -379,7 +379,7 @@ fn check_expr_kind<'a, 'tcx>(
                 _ => expr_promotability
             }
         }
-        hir::ExprPath(ref qpath) => {
+        hir::ExprKind::Path(ref qpath) => {
             let def = v.tables.qpath_def(qpath, e.hir_id);
             match def {
                 Def::VariantCtor(..) | Def::StructCtor(..) |
@@ -426,7 +426,7 @@ fn check_expr_kind<'a, 'tcx>(
                 _ => NotPromotable
             }
         }
-        hir::ExprCall(ref callee, ref hirvec) => {
+        hir::ExprKind::Call(ref callee, ref hirvec) => {
             let mut call_result = v.check_expr(callee);
             for index in hirvec.iter() {
                 call_result = call_result & v.check_expr(index);
@@ -434,7 +434,7 @@ fn check_expr_kind<'a, 'tcx>(
             let mut callee = &**callee;
             loop {
                 callee = match callee.node {
-                    hir::ExprBlock(ref block, _) => match block.expr {
+                    hir::ExprKind::Block(ref block, _) => match block.expr {
                         Some(ref tail) => &tail,
                         None => break
                     },
@@ -442,7 +442,7 @@ fn check_expr_kind<'a, 'tcx>(
                 };
             }
             // The callee is an arbitrary expression, it doesn't necessarily have a definition.
-            let def = if let hir::ExprPath(ref qpath) = callee.node {
+            let def = if let hir::ExprKind::Path(ref qpath) = callee.node {
                 v.tables.qpath_def(qpath, callee.hir_id)
             } else {
                 Def::Err
@@ -465,7 +465,7 @@ fn check_expr_kind<'a, 'tcx>(
             };
             def_result & call_result
         }
-        hir::ExprMethodCall(ref _pathsegment, ref _span, ref hirvec) => {
+        hir::ExprKind::MethodCall(ref _pathsegment, ref _span, ref hirvec) => {
             let mut method_call_result = Promotable;
             for index in hirvec.iter() {
                 method_call_result = method_call_result & v.check_expr(index);
@@ -484,7 +484,7 @@ fn check_expr_kind<'a, 'tcx>(
             }
             method_call_result
         }
-        hir::ExprStruct(ref _qpath, ref hirvec, ref option_expr) => {
+        hir::ExprKind::Struct(ref _qpath, ref hirvec, ref option_expr) => {
             let mut struct_result = Promotable;
             for index in hirvec.iter() {
                 struct_result = struct_result & v.check_expr(&index.expr);
@@ -502,14 +502,14 @@ fn check_expr_kind<'a, 'tcx>(
             struct_result
         }
 
-        hir::ExprLit(_) => Promotable,
+        hir::ExprKind::Lit(_) => Promotable,
 
-        hir::ExprAddrOf(_, ref expr) |
-        hir::ExprRepeat(ref expr, _) => {
+        hir::ExprKind::AddrOf(_, ref expr) |
+        hir::ExprKind::Repeat(ref expr, _) => {
             v.check_expr(&expr)
         }
 
-        hir::ExprClosure(_capture_clause, ref _box_fn_decl,
+        hir::ExprKind::Closure(_capture_clause, ref _box_fn_decl,
                          body_id, _span, _option_generator_movability) => {
             let nested_body_promotable = v.check_nested_body(body_id);
             // Paths in constant contexts cannot refer to local variables,
@@ -521,7 +521,7 @@ fn check_expr_kind<'a, 'tcx>(
             }
         }
 
-        hir::ExprField(ref expr, _ident) => {
+        hir::ExprKind::Field(ref expr, _ident) => {
             let expr_promotability = v.check_expr(&expr);
             if let Some(def) = v.tables.expr_ty(expr).ty_adt_def() {
                 if def.is_union() {
@@ -531,11 +531,11 @@ fn check_expr_kind<'a, 'tcx>(
             expr_promotability
         }
 
-        hir::ExprBlock(ref box_block, ref _option_label) => {
+        hir::ExprKind::Block(ref box_block, ref _option_label) => {
             v.check_block(box_block)
         }
 
-        hir::ExprIndex(ref lhs, ref rhs) => {
+        hir::ExprKind::Index(ref lhs, ref rhs) => {
             let lefty = v.check_expr(lhs);
             let righty = v.check_expr(rhs);
             if v.tables.is_method_call(e) {
@@ -544,7 +544,7 @@ fn check_expr_kind<'a, 'tcx>(
             lefty & righty
         }
 
-        hir::ExprArray(ref hirvec) => {
+        hir::ExprKind::Array(ref hirvec) => {
             let mut array_result = Promotable;
             for index in hirvec.iter() {
                 array_result = array_result & v.check_expr(index);
@@ -552,11 +552,11 @@ fn check_expr_kind<'a, 'tcx>(
             array_result
         }
 
-        hir::ExprType(ref expr, ref _ty) => {
+        hir::ExprKind::Type(ref expr, ref _ty) => {
             v.check_expr(&expr)
         }
 
-        hir::ExprTup(ref hirvec) => {
+        hir::ExprKind::Tup(ref hirvec) => {
             let mut tup_result = Promotable;
             for index in hirvec.iter() {
                 tup_result = tup_result & v.check_expr(index);
@@ -566,7 +566,7 @@ fn check_expr_kind<'a, 'tcx>(
 
 
         // Conditional control flow (possible to implement).
-        hir::ExprMatch(ref expr, ref hirvec_arm, ref _match_source) => {
+        hir::ExprKind::Match(ref expr, ref hirvec_arm, ref _match_source) => {
             // Compute the most demanding borrow from all the arms'
             // patterns and set that on the discriminator.
             let mut mut_borrow = false;
@@ -590,7 +590,7 @@ fn check_expr_kind<'a, 'tcx>(
             NotPromotable
         }
 
-        hir::ExprIf(ref lhs, ref rhs, ref option_expr) => {
+        hir::ExprKind::If(ref lhs, ref rhs, ref option_expr) => {
             let _ = v.check_expr(lhs);
             let _ = v.check_expr(rhs);
             match option_expr {
@@ -601,19 +601,19 @@ fn check_expr_kind<'a, 'tcx>(
         }
 
         // Loops (not very meaningful in constants).
-        hir::ExprWhile(ref expr, ref box_block, ref _option_label) => {
+        hir::ExprKind::While(ref expr, ref box_block, ref _option_label) => {
             let _ = v.check_expr(expr);
             let _ = v.check_block(box_block);
             NotPromotable
         }
 
-        hir::ExprLoop(ref box_block, ref _option_label, ref _loop_source) => {
+        hir::ExprKind::Loop(ref box_block, ref _option_label, ref _loop_source) => {
             let _ = v.check_block(box_block);
             NotPromotable
         }
 
         // More control flow (also not very meaningful).
-        hir::ExprBreak(_, ref option_expr) | hir::ExprRet(ref option_expr) => {
+        hir::ExprKind::Break(_, ref option_expr) | hir::ExprKind::Ret(ref option_expr) => {
             match *option_expr {
                 Some(ref expr) => { let _ = v.check_expr(&expr); },
                 None => {},
@@ -621,24 +621,24 @@ fn check_expr_kind<'a, 'tcx>(
             NotPromotable
         }
 
-        hir::ExprContinue(_) => {
+        hir::ExprKind::Continue(_) => {
             NotPromotable
         }
 
         // Generator expressions
-        hir::ExprYield(ref expr) => {
+        hir::ExprKind::Yield(ref expr) => {
             let _ = v.check_expr(&expr);
             NotPromotable
         }
 
         // Expressions with side-effects.
-        hir::ExprAssignOp(_, ref lhs, ref rhs) | hir::ExprAssign(ref lhs, ref rhs) => {
+        hir::ExprKind::AssignOp(_, ref lhs, ref rhs) | hir::ExprKind::Assign(ref lhs, ref rhs) => {
             let _ = v.check_expr(lhs);
             let _ = v.check_expr(rhs);
             NotPromotable
         }
 
-        hir::ExprInlineAsm(ref _inline_asm, ref hirvec_lhs, ref hirvec_rhs) => {
+        hir::ExprKind::InlineAsm(ref _inline_asm, ref hirvec_lhs, ref hirvec_rhs) => {
             for index in hirvec_lhs.iter() {
                 let _ = v.check_expr(index);
             }
diff --git a/src/librustc_plugin/build.rs b/src/librustc_plugin/build.rs
index 88af8b49b9e..f2728593db4 100644
--- a/src/librustc_plugin/build.rs
+++ b/src/librustc_plugin/build.rs
@@ -24,7 +24,7 @@ struct RegistrarFinder {
 
 impl<'v> ItemLikeVisitor<'v> for RegistrarFinder {
     fn visit_item(&mut self, item: &hir::Item) {
-        if let hir::ItemFn(..) = item.node {
+        if let hir::ItemKind::Fn(..) = item.node {
             if attr::contains_name(&item.attrs,
                                    "plugin_registrar") {
                 self.registrars.push((item.id, item.span));
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index 16e2e4b0393..ab383287773 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -149,21 +149,21 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
     fn visit_item(&mut self, item: &'tcx hir::Item) {
         let inherited_item_level = match item.node {
             // Impls inherit level from their types and traits
-            hir::ItemImpl(..) => {
+            hir::ItemKind::Impl(..) => {
                 let def_id = self.tcx.hir.local_def_id(item.id);
                 cmp::min(self.item_ty_level(def_id), self.impl_trait_level(def_id))
             }
             // Foreign mods inherit level from parents
-            hir::ItemForeignMod(..) => {
+            hir::ItemKind::ForeignMod(..) => {
                 self.prev_level
             }
             // Other `pub` items inherit levels from parents
-            hir::ItemConst(..) | hir::ItemEnum(..) | hir::ItemExternCrate(..) |
-            hir::ItemGlobalAsm(..) | hir::ItemFn(..) | hir::ItemMod(..) |
-            hir::ItemStatic(..) | hir::ItemStruct(..) |
-            hir::ItemTrait(..) | hir::ItemTraitAlias(..) |
-            hir::ItemExistential(..) |
-            hir::ItemTy(..) | hir::ItemUnion(..) | hir::ItemUse(..) => {
+            hir::ItemKind::Const(..) | hir::ItemKind::Enum(..) | hir::ItemKind::ExternCrate(..) |
+            hir::ItemKind::GlobalAsm(..) | hir::ItemKind::Fn(..) | hir::ItemKind::Mod(..) |
+            hir::ItemKind::Static(..) | hir::ItemKind::Struct(..) |
+            hir::ItemKind::Trait(..) | hir::ItemKind::TraitAlias(..) |
+            hir::ItemKind::Existential(..) |
+            hir::ItemKind::Ty(..) | hir::ItemKind::Union(..) | hir::ItemKind::Use(..) => {
                 if item.vis.node.is_pub() { self.prev_level } else { None }
             }
         };
@@ -173,7 +173,7 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
 
         // Update levels of nested things
         match item.node {
-            hir::ItemEnum(ref def, _) => {
+            hir::ItemKind::Enum(ref def, _) => {
                 for variant in &def.variants {
                     let variant_level = self.update(variant.node.data.id(), item_level);
                     for field in variant.node.data.fields() {
@@ -181,24 +181,24 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
                     }
                 }
             }
-            hir::ItemImpl(.., None, _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., None, _, ref impl_item_refs) => {
                 for impl_item_ref in impl_item_refs {
                     if impl_item_ref.vis.node.is_pub() {
                         self.update(impl_item_ref.id.node_id, item_level);
                     }
                 }
             }
-            hir::ItemImpl(.., Some(_), _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., Some(_), _, ref impl_item_refs) => {
                 for impl_item_ref in impl_item_refs {
                     self.update(impl_item_ref.id.node_id, item_level);
                 }
             }
-            hir::ItemTrait(.., ref trait_item_refs) => {
+            hir::ItemKind::Trait(.., ref trait_item_refs) => {
                 for trait_item_ref in trait_item_refs {
                     self.update(trait_item_ref.id.node_id, item_level);
                 }
             }
-            hir::ItemStruct(ref def, _) | hir::ItemUnion(ref def, _) => {
+            hir::ItemKind::Struct(ref def, _) | hir::ItemKind::Union(ref def, _) => {
                 if !def.is_struct() {
                     self.update(def.id(), item_level);
                 }
@@ -208,43 +208,49 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
                     }
                 }
             }
-            hir::ItemForeignMod(ref foreign_mod) => {
+            hir::ItemKind::ForeignMod(ref foreign_mod) => {
                 for foreign_item in &foreign_mod.items {
                     if foreign_item.vis.node.is_pub() {
                         self.update(foreign_item.id, item_level);
                     }
                 }
             }
-            hir::ItemExistential(..) |
-            hir::ItemUse(..) | hir::ItemStatic(..) | hir::ItemConst(..) |
-            hir::ItemGlobalAsm(..) | hir::ItemTy(..) | hir::ItemMod(..) | hir::ItemTraitAlias(..) |
-            hir::ItemFn(..) | hir::ItemExternCrate(..) => {}
+            hir::ItemKind::Existential(..) |
+            hir::ItemKind::Use(..) |
+            hir::ItemKind::Static(..) |
+            hir::ItemKind::Const(..) |
+            hir::ItemKind::GlobalAsm(..) |
+            hir::ItemKind::Ty(..) |
+            hir::ItemKind::Mod(..) |
+            hir::ItemKind::TraitAlias(..) |
+            hir::ItemKind::Fn(..) |
+            hir::ItemKind::ExternCrate(..) => {}
         }
 
         // Mark all items in interfaces of reachable items as reachable
         match item.node {
             // The interface is empty
-            hir::ItemExternCrate(..) => {}
+            hir::ItemKind::ExternCrate(..) => {}
             // All nested items are checked by visit_item
-            hir::ItemMod(..) => {}
+            hir::ItemKind::Mod(..) => {}
             // Re-exports are handled in visit_mod
-            hir::ItemUse(..) => {}
+            hir::ItemKind::Use(..) => {}
             // The interface is empty
-            hir::ItemGlobalAsm(..) => {}
-            hir::ItemExistential(..) => {
+            hir::ItemKind::GlobalAsm(..) => {}
+            hir::ItemKind::Existential(..) => {
                 if item_level.is_some() {
                     // Reach the (potentially private) type and the API being exposed
                     self.reach(item.id).ty().predicates();
                 }
             }
             // Visit everything
-            hir::ItemConst(..) | hir::ItemStatic(..) |
-            hir::ItemFn(..) | hir::ItemTy(..) => {
+            hir::ItemKind::Const(..) | hir::ItemKind::Static(..) |
+            hir::ItemKind::Fn(..) | hir::ItemKind::Ty(..) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates().ty();
                 }
             }
-            hir::ItemTrait(.., ref trait_item_refs) => {
+            hir::ItemKind::Trait(.., ref trait_item_refs) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates();
 
@@ -261,13 +267,13 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
                     }
                 }
             }
-            hir::ItemTraitAlias(..) => {
+            hir::ItemKind::TraitAlias(..) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates();
                 }
             }
             // Visit everything except for private impl items
-            hir::ItemImpl(.., ref trait_ref, _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., ref trait_ref, _, ref impl_item_refs) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates().impl_trait_ref();
 
@@ -281,7 +287,7 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
             }
 
             // Visit everything, but enum variants have their own levels
-            hir::ItemEnum(ref def, _) => {
+            hir::ItemKind::Enum(ref def, _) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates();
                 }
@@ -297,7 +303,7 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
                 }
             }
             // Visit everything, but foreign items have their own levels
-            hir::ItemForeignMod(ref foreign_mod) => {
+            hir::ItemKind::ForeignMod(ref foreign_mod) => {
                 for foreign_item in &foreign_mod.items {
                     if self.get(foreign_item.id).is_some() {
                         self.reach(foreign_item.id).generics().predicates().ty();
@@ -305,8 +311,8 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
                 }
             }
             // Visit everything except for private fields
-            hir::ItemStruct(ref struct_def, _) |
-            hir::ItemUnion(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) |
+            hir::ItemKind::Union(ref struct_def, _) => {
                 if item_level.is_some() {
                     self.reach(item.id).generics().predicates();
                     for field in struct_def.fields() {
@@ -373,7 +379,8 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
         loop {
             let module = if module_id == ast::CRATE_NODE_ID {
                 &self.tcx.hir.krate().module
-            } else if let hir::ItemMod(ref module) = self.tcx.hir.expect_item(module_id).node {
+            } else if let hir::ItemKind::Mod(ref module) = self.tcx.hir.expect_item(module_id).node
+            {
                 module
             } else {
                 unreachable!()
@@ -568,7 +575,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NamePrivacyVisitor<'a, 'tcx> {
 
     fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
         match expr.node {
-            hir::ExprStruct(ref qpath, ref fields, ref base) => {
+            hir::ExprKind::Struct(ref qpath, ref fields, ref base) => {
                 let def = self.tables.qpath_def(qpath, expr.hir_id);
                 let adt = self.tables.expr_ty(expr).ty_adt_def().unwrap();
                 let variant = adt.variant_of_def(def);
@@ -778,13 +785,13 @@ impl<'a, 'tcx> Visitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> {
             return;
         }
         match expr.node {
-            hir::ExprAssign(.., ref rhs) | hir::ExprMatch(ref rhs, ..) => {
+            hir::ExprKind::Assign(.., ref rhs) | hir::ExprKind::Match(ref rhs, ..) => {
                 // Do not report duplicate errors for `x = y` and `match x { ... }`.
                 if self.check_expr_pat_type(rhs.hir_id, rhs.span) {
                     return;
                 }
             }
-            hir::ExprMethodCall(_, span, _) => {
+            hir::ExprKind::MethodCall(_, span, _) => {
                 // Method calls have to be checked specially.
                 self.span = span;
                 if let Some(def) = self.tables.type_dependent_defs().get(expr.hir_id) {
@@ -1052,7 +1059,7 @@ impl<'a, 'b, 'tcx, 'v> Visitor<'v> for ObsoleteCheckTypeForPrivatenessVisitor<'a
     }
 
     fn visit_ty(&mut self, ty: &hir::Ty) {
-        if let hir::TyPath(hir::QPath::Resolved(_, ref path)) = ty.node {
+        if let hir::TyKind::Path(hir::QPath::Resolved(_, ref path)) = ty.node {
             if self.inner.path_is_private_type(path) {
                 self.contains_private = true;
                 // found what we're looking for so let's stop
@@ -1060,7 +1067,7 @@ impl<'a, 'b, 'tcx, 'v> Visitor<'v> for ObsoleteCheckTypeForPrivatenessVisitor<'a
                 return
             }
         }
-        if let hir::TyPath(_) = ty.node {
+        if let hir::TyKind::Path(_) = ty.node {
             if self.at_outer_type {
                 self.outer_type_is_public_path = true;
             }
@@ -1084,13 +1091,13 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
         match item.node {
             // contents of a private mod can be re-exported, so we need
             // to check internals.
-            hir::ItemMod(_) => {}
+            hir::ItemKind::Mod(_) => {}
 
             // An `extern {}` doesn't introduce a new privacy
             // namespace (the contents have their own privacies).
-            hir::ItemForeignMod(_) => {}
+            hir::ItemKind::ForeignMod(_) => {}
 
-            hir::ItemTrait(.., ref bounds, _) => {
+            hir::ItemKind::Trait(.., ref bounds, _) => {
                 if !self.trait_is_public(item.id) {
                     return
                 }
@@ -1105,7 +1112,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
             // (i.e. we could just return here to not check them at
             // all, or some worse estimation of whether an impl is
             // publicly visible).
-            hir::ItemImpl(.., ref g, ref trait_ref, ref self_, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., ref g, ref trait_ref, ref self_, ref impl_item_refs) => {
                 // `impl [... for] Private` is never visible.
                 let self_contains_private;
                 // impl [... for] Public<...>, but not `impl [... for]
@@ -1245,7 +1252,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
 
             // `type ... = ...;` can contain private types, because
             // we're introducing a new name.
-            hir::ItemTy(..) => return,
+            hir::ItemKind::Ty(..) => return,
 
             // not at all public, so we don't care
             _ if !self.item_is_public(&item.id, &item.vis) => {
@@ -1293,7 +1300,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
     }
 
     fn visit_ty(&mut self, t: &'tcx hir::Ty) {
-        if let hir::TyPath(hir::QPath::Resolved(_, ref path)) = t.node {
+        if let hir::TyKind::Path(hir::QPath::Resolved(_, ref path)) = t.node {
             if self.path_is_private_type(path) {
                 self.old_error_set.insert(t.id);
             }
@@ -1552,14 +1559,14 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
 
         match item.node {
             // Crates are always public
-            hir::ItemExternCrate(..) => {}
+            hir::ItemKind::ExternCrate(..) => {}
             // All nested items are checked by visit_item
-            hir::ItemMod(..) => {}
+            hir::ItemKind::Mod(..) => {}
             // Checked in resolve
-            hir::ItemUse(..) => {}
+            hir::ItemKind::Use(..) => {}
             // No subitems
-            hir::ItemGlobalAsm(..) => {}
-            hir::ItemExistential(..) => {
+            hir::ItemKind::GlobalAsm(..) => {}
+            hir::ItemKind::Existential(..) => {
                 // Check the traits being exposed, as they're separate,
                 // e.g. `impl Iterator<Item=T>` has two predicates,
                 // `X: Iterator` and `<X as Iterator>::Item == T`,
@@ -1569,15 +1576,15 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
                 self.check(item.id, item_visibility).predicates();
             }
             // Subitems of these items have inherited publicity
-            hir::ItemConst(..) | hir::ItemStatic(..) | hir::ItemFn(..) |
-            hir::ItemTy(..) => {
+            hir::ItemKind::Const(..) | hir::ItemKind::Static(..) | hir::ItemKind::Fn(..) |
+            hir::ItemKind::Ty(..) => {
                 self.check(item.id, item_visibility).generics().predicates().ty();
 
                 // Recurse for e.g. `impl Trait` (see `visit_ty`).
                 self.inner_visibility = item_visibility;
                 intravisit::walk_item(self, item);
             }
-            hir::ItemTrait(.., ref trait_item_refs) => {
+            hir::ItemKind::Trait(.., ref trait_item_refs) => {
                 self.check(item.id, item_visibility).generics().predicates();
 
                 for trait_item_ref in trait_item_refs {
@@ -1593,10 +1600,10 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
                     }
                 }
             }
-            hir::ItemTraitAlias(..) => {
+            hir::ItemKind::TraitAlias(..) => {
                 self.check(item.id, item_visibility).generics().predicates();
             }
-            hir::ItemEnum(ref def, _) => {
+            hir::ItemKind::Enum(ref def, _) => {
                 self.check(item.id, item_visibility).generics().predicates();
 
                 for variant in &def.variants {
@@ -1606,15 +1613,15 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
                 }
             }
             // Subitems of foreign modules have their own publicity
-            hir::ItemForeignMod(ref foreign_mod) => {
+            hir::ItemKind::ForeignMod(ref foreign_mod) => {
                 for foreign_item in &foreign_mod.items {
                     let vis = ty::Visibility::from_hir(&foreign_item.vis, item.id, tcx);
                     self.check(foreign_item.id, vis).generics().predicates().ty();
                 }
             }
             // Subitems of structs and unions have their own publicity
-            hir::ItemStruct(ref struct_def, _) |
-            hir::ItemUnion(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) |
+            hir::ItemKind::Union(ref struct_def, _) => {
                 self.check(item.id, item_visibility).generics().predicates();
 
                 for field in struct_def.fields() {
@@ -1624,7 +1631,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
             }
             // An inherent impl is public when its type is public
             // Subitems of inherent impls have their own publicity
-            hir::ItemImpl(.., None, _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., None, _, ref impl_item_refs) => {
                 let ty_vis =
                     self.check(item.id, ty::Visibility::Invisible).ty().min_visibility;
                 self.check(item.id, ty_vis).generics().predicates();
@@ -1643,7 +1650,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
             }
             // A trait impl is public when both its type and its trait are public
             // Subitems of trait impls have inherited publicity
-            hir::ItemImpl(.., Some(_), _, ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., Some(_), _, ref impl_item_refs) => {
                 let vis = self.check(item.id, ty::Visibility::Invisible)
                               .ty().impl_trait_ref().min_visibility;
                 self.check(item.id, vis).generics().predicates();
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index f3086d3ab2b..f388b911feb 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -1412,9 +1412,6 @@ pub struct Resolver<'a> {
     /// Avoid duplicated errors for "name already defined".
     name_already_seen: FxHashMap<Name, Span>,
 
-    /// If `#![feature(proc_macro)]` is set
-    proc_macro_enabled: bool,
-
     /// A set of procedural macros imported by `#[macro_use]` that have already been warned about
     warned_proc_macros: FxHashSet<Name>,
 
@@ -1713,7 +1710,7 @@ impl<'a> Resolver<'a> {
 
             // The `proc_macro` and `decl_macro` features imply `use_extern_macros`
             use_extern_macros:
-                features.use_extern_macros || features.proc_macro || features.decl_macro,
+                features.use_extern_macros || features.decl_macro,
 
             crate_loader,
             macro_names: FxHashSet(),
@@ -1727,7 +1724,6 @@ impl<'a> Resolver<'a> {
             local_macro_def_scopes: FxHashMap(),
             name_already_seen: FxHashMap(),
             whitelisted_legacy_custom_derives: Vec::new(),
-            proc_macro_enabled: features.proc_macro,
             warned_proc_macros: FxHashSet(),
             potentially_unused_imports: Vec::new(),
             struct_constructors: DefIdMap(),
@@ -4509,7 +4505,7 @@ impl<'a> Resolver<'a> {
     }
 
     fn check_proc_macro_attrs(&mut self, attrs: &[ast::Attribute]) {
-        if self.proc_macro_enabled { return; }
+        if self.use_extern_macros { return; }
 
         for attr in attrs {
             if attr.path.segments.len() > 1 {
diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs
index c99172efc7c..f076d884f60 100644
--- a/src/librustc_resolve/macros.rs
+++ b/src/librustc_resolve/macros.rs
@@ -429,7 +429,7 @@ impl<'a> Resolver<'a> {
                         *item = mem::replace(item, dummy_item).map_attrs(|mut attrs| {
                             let inert_attr = attr.take().unwrap();
                             attr::mark_known(&inert_attr);
-                            if self.proc_macro_enabled {
+                            if self.use_extern_macros {
                                 *attr = expand::find_attr_invoc(&mut attrs);
                             }
                             attrs.push(inert_attr);
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 055fbb236d8..f2620c04754 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -420,7 +420,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
             match self.tcx.impl_of_method(self.tcx.hir.local_def_id(id)) {
                 Some(impl_id) => match self.tcx.hir.get_if_local(impl_id) {
                     Some(Node::NodeItem(item)) => match item.node {
-                        hir::ItemImpl(.., ref ty, _) => {
+                        hir::ItemKind::Impl(.., ref ty, _) => {
                             let mut qualname = String::from("<");
                             qualname.push_str(&self.tcx.hir.node_to_pretty_string(ty.id));
 
@@ -630,18 +630,18 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
             Node::NodeTraitRef(tr) => tr.path.def,
 
             Node::NodeItem(&hir::Item {
-                node: hir::ItemUse(ref path, _),
+                node: hir::ItemKind::Use(ref path, _),
                 ..
             }) |
             Node::NodeVisibility(&Spanned {
                 node: hir::VisibilityKind::Restricted { ref path, .. }, .. }) => path.def,
 
             Node::NodeExpr(&hir::Expr {
-                node: hir::ExprStruct(ref qpath, ..),
+                node: hir::ExprKind::Struct(ref qpath, ..),
                 ..
             }) |
             Node::NodeExpr(&hir::Expr {
-                node: hir::ExprPath(ref qpath),
+                node: hir::ExprKind::Path(ref qpath),
                 ..
             }) |
             Node::NodePat(&hir::Pat {
@@ -666,7 +666,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
             }) => HirDef::Local(canonical_id),
 
             Node::NodeTy(ty) => if let hir::Ty {
-                node: hir::TyPath(ref qpath),
+                node: hir::TyKind::Path(ref qpath),
                 ..
             } = *ty
             {
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 5e38c0bbcb4..f85e7b06858 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1117,60 +1117,60 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
         let tcx = self.tcx();
 
         let result_ty = match ast_ty.node {
-            hir::TySlice(ref ty) => {
+            hir::TyKind::Slice(ref ty) => {
                 tcx.mk_slice(self.ast_ty_to_ty(&ty))
             }
-            hir::TyPtr(ref mt) => {
+            hir::TyKind::Ptr(ref mt) => {
                 tcx.mk_ptr(ty::TypeAndMut {
                     ty: self.ast_ty_to_ty(&mt.ty),
                     mutbl: mt.mutbl
                 })
             }
-            hir::TyRptr(ref region, ref mt) => {
+            hir::TyKind::Rptr(ref region, ref mt) => {
                 let r = self.ast_region_to_region(region, None);
                 debug!("TyRef r={:?}", r);
                 let t = self.ast_ty_to_ty(&mt.ty);
                 tcx.mk_ref(r, ty::TypeAndMut {ty: t, mutbl: mt.mutbl})
             }
-            hir::TyNever => {
+            hir::TyKind::Never => {
                 tcx.types.never
             },
-            hir::TyTup(ref fields) => {
+            hir::TyKind::Tup(ref fields) => {
                 tcx.mk_tup(fields.iter().map(|t| self.ast_ty_to_ty(&t)))
             }
-            hir::TyBareFn(ref bf) => {
+            hir::TyKind::BareFn(ref bf) => {
                 require_c_abi_if_variadic(tcx, &bf.decl, bf.abi, ast_ty.span);
                 tcx.mk_fn_ptr(self.ty_of_fn(bf.unsafety, bf.abi, &bf.decl))
             }
-            hir::TyTraitObject(ref bounds, ref lifetime) => {
+            hir::TyKind::TraitObject(ref bounds, ref lifetime) => {
                 self.conv_object_ty_poly_trait_ref(ast_ty.span, bounds, lifetime)
             }
-            hir::TyPath(hir::QPath::Resolved(ref maybe_qself, ref path)) => {
+            hir::TyKind::Path(hir::QPath::Resolved(ref maybe_qself, ref path)) => {
                 debug!("ast_ty_to_ty: maybe_qself={:?} path={:?}", maybe_qself, path);
                 let opt_self_ty = maybe_qself.as_ref().map(|qself| {
                     self.ast_ty_to_ty(qself)
                 });
                 self.def_to_ty(opt_self_ty, path, false)
             }
-            hir::TyPath(hir::QPath::TypeRelative(ref qself, ref segment)) => {
+            hir::TyKind::Path(hir::QPath::TypeRelative(ref qself, ref segment)) => {
                 debug!("ast_ty_to_ty: qself={:?} segment={:?}", qself, segment);
                 let ty = self.ast_ty_to_ty(qself);
 
-                let def = if let hir::TyPath(hir::QPath::Resolved(_, ref path)) = qself.node {
+                let def = if let hir::TyKind::Path(hir::QPath::Resolved(_, ref path)) = qself.node {
                     path.def
                 } else {
                     Def::Err
                 };
                 self.associated_path_def_to_ty(ast_ty.id, ast_ty.span, ty, def, segment).0
             }
-            hir::TyArray(ref ty, ref length) => {
+            hir::TyKind::Array(ref ty, ref length) => {
                 let length_def_id = tcx.hir.local_def_id(length.id);
                 let substs = Substs::identity_for_item(tcx, length_def_id);
                 let length = ty::Const::unevaluated(tcx, length_def_id, substs, tcx.types.usize);
                 let array_ty = tcx.mk_ty(ty::TyArray(self.ast_ty_to_ty(&ty), length));
                 self.normalize_ty(ast_ty.span, array_ty)
             }
-            hir::TyTypeof(ref _e) => {
+            hir::TyKind::Typeof(ref _e) => {
                 struct_span_err!(tcx.sess, ast_ty.span, E0516,
                                  "`typeof` is a reserved keyword but unimplemented")
                     .span_label(ast_ty.span, "reserved keyword")
@@ -1178,14 +1178,14 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
 
                 tcx.types.err
             }
-            hir::TyInfer => {
+            hir::TyKind::Infer => {
                 // TyInfer also appears as the type of arguments or return
-                // values in a ExprClosure, or as
+                // values in a ExprKind::Closure, or as
                 // the type of local variables. Both of these cases are
                 // handled specially and will not descend into this routine.
                 self.ty_infer(ast_ty.span)
             }
-            hir::TyErr => {
+            hir::TyKind::Err => {
                 tcx.types.err
             }
         };
@@ -1241,7 +1241,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
                      -> Ty<'tcx>
     {
         match ty.node {
-            hir::TyInfer if expected_ty.is_some() => {
+            hir::TyKind::Infer if expected_ty.is_some() => {
                 self.record_ty(ty.hir_id, expected_ty.unwrap(), ty.span);
                 expected_ty.unwrap()
             }
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index c260655bd3e..c9b5fd525dd 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -147,7 +147,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 // Byte string patterns behave the same way as array patterns
                 // They can denote both statically and dynamically sized byte arrays
                 let mut pat_ty = ty;
-                if let hir::ExprLit(ref lt) = lt.node {
+                if let hir::ExprKind::Lit(ref lt) = lt.node {
                     if let ast::LitKind::ByteStr(_) = lt.node {
                         let expected_ty = self.structurally_resolved_type(pat.span, expected);
                         if let ty::TyRef(_, r_ty, _) = expected_ty.sty {
diff --git a/src/librustc_typeck/check/callee.rs b/src/librustc_typeck/check/callee.rs
index 383820a62bf..ec127d26ab3 100644
--- a/src/librustc_typeck/check/callee.rs
+++ b/src/librustc_typeck/check/callee.rs
@@ -214,7 +214,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 let mut unit_variant = None;
                 if let &ty::TyAdt(adt_def, ..) = t {
                     if adt_def.is_enum() {
-                        if let hir::ExprCall(ref expr, _) = call_expr.node {
+                        if let hir::ExprKind::Call(ref expr, _) = call_expr.node {
                             unit_variant = Some(self.tcx.hir.node_to_pretty_string(expr.id))
                         }
                     }
@@ -240,8 +240,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                         path.to_string());
                 }
 
-                if let hir::ExprCall(ref expr, _) = call_expr.node {
-                    let def = if let hir::ExprPath(ref qpath) = expr.node {
+                if let hir::ExprKind::Call(ref expr, _) = call_expr.node {
+                    let def = if let hir::ExprKind::Path(ref qpath) = expr.node {
                         self.tables.borrow().qpath_def(qpath, expr.hir_id)
                     } else {
                         Def::Err
diff --git a/src/librustc_typeck/check/compare_method.rs b/src/librustc_typeck/check/compare_method.rs
index 4c903b6fe58..220dd122b26 100644
--- a/src/librustc_typeck/check/compare_method.rs
+++ b/src/librustc_typeck/check/compare_method.rs
@@ -429,8 +429,8 @@ fn extract_spans_for_error_reporting<'a, 'gcx, 'tcx>(infcx: &infer::InferCtxt<'a
 
                 impl_m_iter.zip(trait_m_iter).find(|&(ref impl_arg, ref trait_arg)| {
                     match (&impl_arg.node, &trait_arg.node) {
-                        (&hir::TyRptr(_, ref impl_mt), &hir::TyRptr(_, ref trait_mt)) |
-                        (&hir::TyPtr(ref impl_mt), &hir::TyPtr(ref trait_mt)) => {
+                        (&hir::TyKind::Rptr(_, ref impl_mt), &hir::TyKind::Rptr(_, ref trait_mt)) |
+                        (&hir::TyKind::Ptr(ref impl_mt), &hir::TyKind::Ptr(ref trait_mt)) => {
                             impl_mt.mutbl != trait_mt.mutbl
                         }
                         _ => false,
@@ -822,7 +822,7 @@ fn compare_synthetic_generics<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                             fn visit_ty(&mut self, ty: &'v hir::Ty) {
                                 hir::intravisit::walk_ty(self, ty);
                                 match ty.node {
-                                    hir::TyPath(hir::QPath::Resolved(None, ref path)) => {
+                                    hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) => {
                                         if let hir::def::Def::TyParam(def_id) = path.def {
                                             if def_id == self.1 {
                                                 self.0 = Some(ty.span);
diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs
index aee64ad3b55..92b35bd50f3 100644
--- a/src/librustc_typeck/check/demand.rs
+++ b/src/librustc_typeck/check/demand.rs
@@ -18,7 +18,7 @@ use syntax_pos::Span;
 use rustc::hir;
 use rustc::hir::def::Def;
 use rustc::hir::map::{NodeItem, NodeExpr};
-use rustc::hir::{Item, ItemConst, print};
+use rustc::hir::{Item, ItemKind, print};
 use rustc::ty::{self, Ty, AssociatedItem};
 use rustc::ty::adjustment::AllowTwoPhase;
 use errors::{DiagnosticBuilder, CodeMapper};
@@ -196,17 +196,17 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
     /// opt.map(|arg| { takes_ref(arg) });
     /// ```
     fn can_use_as_ref(&self, expr: &hir::Expr) -> Option<(Span, &'static str, String)> {
-        if let hir::ExprPath(hir::QPath::Resolved(_, ref path)) = expr.node {
+        if let hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) = expr.node {
             if let hir::def::Def::Local(id) = path.def {
                 let parent = self.tcx.hir.get_parent_node(id);
                 if let Some(NodeExpr(hir::Expr {
                     id,
-                    node: hir::ExprClosure(_, decl, ..),
+                    node: hir::ExprKind::Closure(_, decl, ..),
                     ..
                 })) = self.tcx.hir.find(parent) {
                     let parent = self.tcx.hir.get_parent_node(*id);
                     if let (Some(NodeExpr(hir::Expr {
-                        node: hir::ExprMethodCall(path, span, expr),
+                        node: hir::ExprKind::MethodCall(path, span, expr),
                         ..
                     })), 1) = (self.tcx.hir.find(parent), decl.inputs.len()) {
                         let self_ty = self.tables.borrow().node_id_to_type(expr[0].hir_id);
@@ -262,7 +262,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             (&ty::TyRef(_, exp, _), &ty::TyRef(_, check, _)) => match (&exp.sty, &check.sty) {
                 (&ty::TyStr, &ty::TyArray(arr, _)) |
                 (&ty::TyStr, &ty::TySlice(arr)) if arr == self.tcx.types.u8 => {
-                    if let hir::ExprLit(_) = expr.node {
+                    if let hir::ExprKind::Lit(_) = expr.node {
                         if let Ok(src) = cm.span_to_snippet(sp) {
                             if src.starts_with("b\"") {
                                 return Some((sp,
@@ -274,7 +274,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 },
                 (&ty::TyArray(arr, _), &ty::TyStr) |
                 (&ty::TySlice(arr), &ty::TyStr) if arr == self.tcx.types.u8 => {
-                    if let hir::ExprLit(_) = expr.node {
+                    if let hir::ExprKind::Lit(_) = expr.node {
                         if let Ok(src) = cm.span_to_snippet(sp) {
                             if src.starts_with("\"") {
                                 return Some((sp,
@@ -306,7 +306,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 if self.can_coerce(ref_ty, expected) {
                     if let Ok(src) = cm.span_to_snippet(sp) {
                         let sugg_expr = match expr.node { // parenthesize if needed (Issue #46756)
-                            hir::ExprCast(_, _) | hir::ExprBinary(_, _, _) => format!("({})", src),
+                            hir::ExprKind::Cast(_, _) |
+                            hir::ExprKind::Binary(_, _, _) => format!("({})", src),
                             _ => src,
                         };
                         if let Some(sugg) = self.can_use_as_ref(expr) {
@@ -336,7 +337,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                    sp.ctxt().outer().expn_info().is_none() {
                     match expr.node {
                         // Maybe remove `&`?
-                        hir::ExprAddrOf(_, ref expr) => {
+                        hir::ExprKind::AddrOf(_, ref expr) => {
                             if !cm.span_to_filename(expr.span).is_real() {
                                 return None;
                             }
@@ -376,7 +377,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         match self.tcx.hir.find(parent_id) {
             Some(parent) => {
                 // Shouldn't suggest `.into()` on `const`s.
-                if let NodeItem(Item { node: ItemConst(_, _), .. }) = parent {
+                if let NodeItem(Item { node: ItemKind::Const(_, _), .. }) = parent {
                     // FIXME(estebank): modify once we decide to suggest `as` casts
                     return false;
                 }
diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs
index c93023edcea..e26bf1b4f77 100644
--- a/src/librustc_typeck/check/intrinsic.rs
+++ b/src/librustc_typeck/check/intrinsic.rs
@@ -35,7 +35,7 @@ fn equate_intrinsic_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     let def_id = tcx.hir.local_def_id(it.id);
 
     match it.node {
-        hir::ForeignItemFn(..) => {}
+        hir::ForeignItemKind::Fn(..) => {}
         _ => {
             struct_span_err!(tcx.sess, it.span, E0622,
                              "intrinsic must be a function")
@@ -48,7 +48,7 @@ fn equate_intrinsic_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     let i_n_tps = tcx.generics_of(def_id).own_counts().types;
     if i_n_tps != n_tps {
         let span = match it.node {
-            hir::ForeignItemFn(_, _, ref generics) => generics.span,
+            hir::ForeignItemKind::Fn(_, _, ref generics) => generics.span,
             _ => bug!()
         };
 
diff --git a/src/librustc_typeck/check/method/confirm.rs b/src/librustc_typeck/check/method/confirm.rs
index 36ce01bcd08..6c3e265619f 100644
--- a/src/librustc_typeck/check/method/confirm.rs
+++ b/src/librustc_typeck/check/method/confirm.rs
@@ -449,9 +449,9 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
         loop {
             let last = exprs[exprs.len() - 1];
             match last.node {
-                hir::ExprField(ref expr, _) |
-                hir::ExprIndex(ref expr, _) |
-                hir::ExprUnary(hir::UnDeref, ref expr) => exprs.push(&expr),
+                hir::ExprKind::Field(ref expr, _) |
+                hir::ExprKind::Index(ref expr, _) |
+                hir::ExprKind::Unary(hir::UnDeref, ref expr) => exprs.push(&expr),
                 _ => break,
             }
         }
@@ -493,12 +493,12 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
             }
 
             match expr.node {
-                hir::ExprIndex(ref base_expr, ref index_expr) => {
+                hir::ExprKind::Index(ref base_expr, ref index_expr) => {
                     let index_expr_ty = self.node_ty(index_expr.hir_id);
                     self.convert_place_op_to_mutable(
                         PlaceOp::Index, expr, base_expr, &[index_expr_ty]);
                 }
-                hir::ExprUnary(hir::UnDeref, ref base_expr) => {
+                hir::ExprKind::Unary(hir::UnDeref, ref base_expr) => {
                     self.convert_place_op_to_mutable(
                         PlaceOp::Deref, expr, base_expr, &[]);
                 }
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs
index 68c71f4ce90..026a9de5052 100644
--- a/src/librustc_typeck/check/method/suggest.rs
+++ b/src/librustc_typeck/check/method/suggest.rs
@@ -245,7 +245,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                             "f32"
                         };
                         match expr.node {
-                            hir::ExprLit(ref lit) => {  // numeric literal
+                            hir::ExprKind::Lit(ref lit) => {  // numeric literal
                                 let snippet = tcx.sess.codemap().span_to_snippet(lit.span)
                                     .unwrap_or("<numeric literal>".to_string());
 
@@ -257,7 +257,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                                             snippet,
                                                             concrete_type));
                             }
-                            hir::ExprPath(ref qpath) => {  // local binding
+                            hir::ExprKind::Path(ref qpath) => {  // local binding
                                 if let &hir::QPath::Resolved(_, ref path) = &qpath {
                                     if let hir::def::Def::Local(node_id) = path.def {
                                         let span = tcx.hir.span(node_id);
@@ -389,7 +389,9 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     if let Some(expr) = rcvr_expr {
                         if let Ok(expr_string) = tcx.sess.codemap().span_to_snippet(expr.span) {
                             report_function!(expr.span, expr_string);
-                        } else if let hir::ExprPath(hir::QPath::Resolved(_, ref path)) = expr.node {
+                        } else if let hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) =
+                            expr.node
+                        {
                             if let Some(segment) = path.segments.last() {
                                 report_function!(expr.span, segment.ident);
                             }
@@ -709,7 +711,7 @@ fn compute_all_traits<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Vec<DefId>
         impl<'v, 'a, 'tcx> itemlikevisit::ItemLikeVisitor<'v> for Visitor<'a, 'tcx> {
             fn visit_item(&mut self, i: &'v hir::Item) {
                 match i.node {
-                    hir::ItemTrait(..) => {
+                    hir::ItemKind::Trait(..) => {
                         let def_id = self.map.local_def_id(i.id);
                         self.traits.push(def_id);
                     }
@@ -810,7 +812,7 @@ impl<'a, 'tcx, 'gcx> hir::intravisit::Visitor<'tcx> for UsePlacementFinder<'a, '
         for item_id in &module.item_ids {
             let item = self.tcx.hir.expect_item(item_id.id);
             match item.node {
-                hir::ItemUse(..) => {
+                hir::ItemKind::Use(..) => {
                     // don't suggest placing a use before the prelude
                     // import or other generated ones
                     if item.span.ctxt().outer().expn_info().is_none() {
@@ -820,7 +822,7 @@ impl<'a, 'tcx, 'gcx> hir::intravisit::Visitor<'tcx> for UsePlacementFinder<'a, '
                     }
                 },
                 // don't place use before extern crate
-                hir::ItemExternCrate(_) => {}
+                hir::ItemKind::ExternCrate(_) => {}
                 // but place them before the first other item
                 _ => if self.span.map_or(true, |span| item.span < span ) {
                     if item.span.ctxt().outer().expn_info().is_none() {
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index c7ad3398873..9f83f8a00b1 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -132,7 +132,7 @@ use syntax_pos::{self, BytePos, Span, MultiSpan};
 use rustc::hir::intravisit::{self, Visitor, NestedVisitorMap};
 use rustc::hir::itemlikevisit::ItemLikeVisitor;
 use rustc::hir::map::Node;
-use rustc::hir::{self, PatKind, Item_};
+use rustc::hir::{self, PatKind, ItemKind};
 use rustc::middle::lang_items;
 
 mod autoderef;
@@ -759,10 +759,10 @@ fn primary_body_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     match tcx.hir.get(id) {
         hir::map::NodeItem(item) => {
             match item.node {
-                hir::ItemConst(_, body) |
-                hir::ItemStatic(_, _, body) =>
+                hir::ItemKind::Const(_, body) |
+                hir::ItemKind::Static(_, _, body) =>
                     Some((body, None)),
-                hir::ItemFn(ref decl, .., body) =>
+                hir::ItemKind::Fn(ref decl, .., body) =>
                     Some((body, Some(decl))),
                 _ =>
                     None,
@@ -1165,7 +1165,7 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>,
                     }
 
                     if let Node::NodeItem(item) = fcx.tcx.hir.get(fn_id) {
-                        if let Item_::ItemFn(_, _, ref generics, _) = item.node {
+                        if let ItemKind::Fn(_, _, ref generics, _) = item.node {
                             if !generics.params.is_empty() {
                                 fcx.tcx.sess.span_err(
                                     span,
@@ -1213,7 +1213,7 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>,
                     }
 
                     if let Node::NodeItem(item) = fcx.tcx.hir.get(fn_id) {
-                        if let Item_::ItemFn(_, _, ref generics, _) = item.node {
+                        if let ItemKind::Fn(_, _, ref generics, _) = item.node {
                             if !generics.params.is_empty() {
                                 fcx.tcx.sess.span_err(
                                     span,
@@ -1269,25 +1269,25 @@ pub fn check_item_type<'a,'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, it: &'tcx hir::Item
     let _indenter = indenter();
     match it.node {
       // Consts can play a role in type-checking, so they are included here.
-      hir::ItemStatic(..) => {
+      hir::ItemKind::Static(..) => {
         tcx.typeck_tables_of(tcx.hir.local_def_id(it.id));
       }
-      hir::ItemConst(..) => {
+      hir::ItemKind::Const(..) => {
         tcx.typeck_tables_of(tcx.hir.local_def_id(it.id));
         if it.attrs.iter().any(|a| a.check_name("wasm_custom_section")) {
             let def_id = tcx.hir.local_def_id(it.id);
             check_const_is_u8_array(tcx, def_id, it.span);
         }
       }
-      hir::ItemEnum(ref enum_definition, _) => {
+      hir::ItemKind::Enum(ref enum_definition, _) => {
         check_enum(tcx,
                    it.span,
                    &enum_definition.variants,
                    it.id);
       }
-      hir::ItemFn(..) => {} // entirely within check_item_body
-      hir::ItemImpl(.., ref impl_item_refs) => {
-          debug!("ItemImpl {} with id {}", it.name, it.id);
+      hir::ItemKind::Fn(..) => {} // entirely within check_item_body
+      hir::ItemKind::Impl(.., ref impl_item_refs) => {
+          debug!("ItemKind::Impl {} with id {}", it.name, it.id);
           let impl_def_id = tcx.hir.local_def_id(it.id);
           if let Some(impl_trait_ref) = tcx.impl_trait_ref(impl_def_id) {
               check_impl_items_against_trait(tcx,
@@ -1299,23 +1299,23 @@ pub fn check_item_type<'a,'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, it: &'tcx hir::Item
               check_on_unimplemented(tcx, trait_def_id, it);
           }
       }
-      hir::ItemTrait(..) => {
+      hir::ItemKind::Trait(..) => {
         let def_id = tcx.hir.local_def_id(it.id);
         check_on_unimplemented(tcx, def_id, it);
       }
-      hir::ItemStruct(..) => {
+      hir::ItemKind::Struct(..) => {
         check_struct(tcx, it.id, it.span);
       }
-      hir::ItemUnion(..) => {
+      hir::ItemKind::Union(..) => {
         check_union(tcx, it.id, it.span);
       }
-      hir::ItemTy(..) => {
+      hir::ItemKind::Ty(..) => {
         let def_id = tcx.hir.local_def_id(it.id);
         let pty_ty = tcx.type_of(def_id);
         let generics = tcx.generics_of(def_id);
         check_bounds_are_used(tcx, &generics, pty_ty);
       }
-      hir::ItemForeignMod(ref m) => {
+      hir::ItemKind::ForeignMod(ref m) => {
         check_abi(tcx, it.span, m.abi);
 
         if m.abi == Abi::RustIntrinsic {
@@ -1340,7 +1340,7 @@ pub fn check_item_type<'a,'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, it: &'tcx hir::Item
                     err.emit();
                 }
 
-                if let hir::ForeignItemFn(ref fn_decl, _, _) = item.node {
+                if let hir::ForeignItemKind::Fn(ref fn_decl, _, _) = item.node {
                     require_c_abi_if_variadic(tcx, fn_decl, m.abi, item.span);
                 }
             }
@@ -2347,52 +2347,52 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
 
     fn is_place_expr(&self, expr: &hir::Expr) -> bool {
          match expr.node {
-            hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
+            hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) => {
                 match path.def {
                     Def::Local(..) | Def::Upvar(..) | Def::Static(..) | Def::Err => true,
                     _ => false,
                 }
             }
 
-            hir::ExprType(ref e, _) => {
+            hir::ExprKind::Type(ref e, _) => {
                 self.is_place_expr(e)
             }
 
-            hir::ExprUnary(hir::UnDeref, _) |
-            hir::ExprField(..) |
-            hir::ExprIndex(..) => {
+            hir::ExprKind::Unary(hir::UnDeref, _) |
+            hir::ExprKind::Field(..) |
+            hir::ExprKind::Index(..) => {
                 true
             }
 
             // Partially qualified paths in expressions can only legally
             // refer to associated items which are always rvalues.
-            hir::ExprPath(hir::QPath::TypeRelative(..)) |
-
-            hir::ExprCall(..) |
-            hir::ExprMethodCall(..) |
-            hir::ExprStruct(..) |
-            hir::ExprTup(..) |
-            hir::ExprIf(..) |
-            hir::ExprMatch(..) |
-            hir::ExprClosure(..) |
-            hir::ExprBlock(..) |
-            hir::ExprRepeat(..) |
-            hir::ExprArray(..) |
-            hir::ExprBreak(..) |
-            hir::ExprContinue(..) |
-            hir::ExprRet(..) |
-            hir::ExprWhile(..) |
-            hir::ExprLoop(..) |
-            hir::ExprAssign(..) |
-            hir::ExprInlineAsm(..) |
-            hir::ExprAssignOp(..) |
-            hir::ExprLit(_) |
-            hir::ExprUnary(..) |
-            hir::ExprBox(..) |
-            hir::ExprAddrOf(..) |
-            hir::ExprBinary(..) |
-            hir::ExprYield(..) |
-            hir::ExprCast(..) => {
+            hir::ExprKind::Path(hir::QPath::TypeRelative(..)) |
+
+            hir::ExprKind::Call(..) |
+            hir::ExprKind::MethodCall(..) |
+            hir::ExprKind::Struct(..) |
+            hir::ExprKind::Tup(..) |
+            hir::ExprKind::If(..) |
+            hir::ExprKind::Match(..) |
+            hir::ExprKind::Closure(..) |
+            hir::ExprKind::Block(..) |
+            hir::ExprKind::Repeat(..) |
+            hir::ExprKind::Array(..) |
+            hir::ExprKind::Break(..) |
+            hir::ExprKind::Continue(..) |
+            hir::ExprKind::Ret(..) |
+            hir::ExprKind::While(..) |
+            hir::ExprKind::Loop(..) |
+            hir::ExprKind::Assign(..) |
+            hir::ExprKind::InlineAsm(..) |
+            hir::ExprKind::AssignOp(..) |
+            hir::ExprKind::Lit(_) |
+            hir::ExprKind::Unary(..) |
+            hir::ExprKind::Box(..) |
+            hir::ExprKind::AddrOf(..) |
+            hir::ExprKind::Binary(..) |
+            hir::ExprKind::Yield(..) |
+            hir::ExprKind::Cast(..) => {
                 false
             }
         }
@@ -2763,7 +2763,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
 
                 let is_closure = match arg.node {
-                    hir::ExprClosure(..) => true,
+                    hir::ExprKind::Closure(..) => true,
                     _ => false
                 };
 
@@ -2915,7 +2915,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         if let Some(mut err) = self.demand_suptype_diag(expr.span, expected_ty, ty) {
             // Add help to type error if this is an `if` condition with an assignment
             match (expected, &expr.node) {
-                (ExpectIfCondition, &hir::ExprAssign(ref lhs, ref rhs)) => {
+                (ExpectIfCondition, &hir::ExprKind::Assign(ref lhs, ref rhs)) => {
                     let msg = "try comparing for equality";
                     if let (Ok(left), Ok(right)) = (
                         self.tcx.sess.codemap().span_to_snippet(lhs.span),
@@ -3625,9 +3625,9 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
 
         // Warn for non-block expressions with diverging children.
         match expr.node {
-            hir::ExprBlock(..) |
-            hir::ExprLoop(..) | hir::ExprWhile(..) |
-            hir::ExprIf(..) | hir::ExprMatch(..) => {}
+            hir::ExprKind::Block(..) |
+            hir::ExprKind::Loop(..) | hir::ExprKind::While(..) |
+            hir::ExprKind::If(..) | hir::ExprKind::Match(..) => {}
 
             _ => self.warn_if_unreachable(expr.id, expr.span, "expression")
         }
@@ -3659,7 +3659,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         let tcx = self.tcx;
         let id = expr.id;
         match expr.node {
-            hir::ExprBox(ref subexpr) => {
+            hir::ExprKind::Box(ref subexpr) => {
                 let expected_inner = expected.to_option(self).map_or(NoExpectation, |ty| {
                     match ty.sty {
                         ty::TyAdt(def, _) if def.is_box()
@@ -3671,16 +3671,16 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 tcx.mk_box(referent_ty)
             }
 
-            hir::ExprLit(ref lit) => {
+            hir::ExprKind::Lit(ref lit) => {
                 self.check_lit(&lit, expected)
             }
-            hir::ExprBinary(op, ref lhs, ref rhs) => {
+            hir::ExprKind::Binary(op, ref lhs, ref rhs) => {
                 self.check_binop(expr, op, lhs, rhs)
             }
-            hir::ExprAssignOp(op, ref lhs, ref rhs) => {
+            hir::ExprKind::AssignOp(op, ref lhs, ref rhs) => {
                 self.check_binop_assign(expr, op, lhs, rhs)
             }
-            hir::ExprUnary(unop, ref oprnd) => {
+            hir::ExprKind::Unary(unop, ref oprnd) => {
                 let expected_inner = match unop {
                     hir::UnNot | hir::UnNeg => {
                         expected
@@ -3748,7 +3748,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
                 oprnd_t
             }
-            hir::ExprAddrOf(mutbl, ref oprnd) => {
+            hir::ExprKind::AddrOf(mutbl, ref oprnd) => {
                 let hint = expected.only_has_type(self).map_or(NoExpectation, |ty| {
                     match ty.sty {
                         ty::TyRef(_, ty, _) | ty::TyRawPtr(ty::TypeAndMut { ty, .. }) => {
@@ -3788,7 +3788,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     tcx.mk_ref(region, tm)
                 }
             }
-            hir::ExprPath(ref qpath) => {
+            hir::ExprKind::Path(ref qpath) => {
                 let (def, opt_ty, segs) = self.resolve_ty_and_def_ufcs(qpath, expr.id, expr.span);
                 let ty = if def != Def::Err {
                     self.instantiate_value_path(segs, opt_ty, def, expr.span, id)
@@ -3804,7 +3804,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
 
                 ty
             }
-            hir::ExprInlineAsm(_, ref outputs, ref inputs) => {
+            hir::ExprKind::InlineAsm(_, ref outputs, ref inputs) => {
                 for output in outputs {
                     self.check_expr(output);
                 }
@@ -3813,7 +3813,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
                 tcx.mk_nil()
             }
-            hir::ExprBreak(destination, ref expr_opt) => {
+            hir::ExprKind::Break(destination, ref expr_opt) => {
                 if let Ok(target_id) = destination.target_id {
                     let (e_ty, cause);
                     if let Some(ref e) = *expr_opt {
@@ -3886,7 +3886,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
 
                         // ... except when we try to 'break rust;'.
                         // ICE this expression in particular (see #43162).
-                        if let hir::ExprPath(hir::QPath::Resolved(_, ref path)) = e.node {
+                        if let hir::ExprKind::Path(hir::QPath::Resolved(_, ref path)) = e.node {
                             if path.segments.len() == 1 && path.segments[0].ident.name == "rust" {
                                 fatally_break_rust(self.tcx.sess);
                             }
@@ -3897,7 +3897,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
 
             }
-            hir::ExprContinue(destination) => {
+            hir::ExprKind::Continue(destination) => {
                 if let Ok(_) = destination.target_id {
                     tcx.types.never
                 } else {
@@ -3905,7 +3905,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     tcx.types.err
                 }
             }
-            hir::ExprRet(ref expr_opt) => {
+            hir::ExprKind::Ret(ref expr_opt) => {
                 if self.ret_coercion.is_none() {
                     struct_span_err!(self.tcx.sess, expr.span, E0572,
                                         "return statement outside of function body").emit();
@@ -3918,7 +3918,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
                 tcx.types.never
             }
-            hir::ExprAssign(ref lhs, ref rhs) => {
+            hir::ExprKind::Assign(ref lhs, ref rhs) => {
                 let lhs_ty = self.check_expr_with_needs(&lhs, Needs::MutPlace);
 
                 let rhs_ty = self.check_expr_coercable_to_type(&rhs, lhs_ty);
@@ -3948,11 +3948,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     tcx.mk_nil()
                 }
             }
-            hir::ExprIf(ref cond, ref then_expr, ref opt_else_expr) => {
+            hir::ExprKind::If(ref cond, ref then_expr, ref opt_else_expr) => {
                 self.check_then_else(&cond, then_expr, opt_else_expr.as_ref().map(|e| &**e),
                                     expr.span, expected)
             }
-            hir::ExprWhile(ref cond, ref body, _) => {
+            hir::ExprKind::While(ref cond, ref body, _) => {
                 let ctxt = BreakableCtxt {
                     // cannot use break with a value from a while loop
                     coerce: None,
@@ -3976,7 +3976,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
 
                 self.tcx.mk_nil()
             }
-            hir::ExprLoop(ref body, _, source) => {
+            hir::ExprKind::Loop(ref body, _, source) => {
                 let coerce = match source {
                     // you can only use break with a value from a normal `loop { }`
                     hir::LoopSource::Loop => {
@@ -4016,22 +4016,22 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 }
                 ctxt.coerce.map(|c| c.complete(self)).unwrap_or(self.tcx.mk_nil())
             }
-            hir::ExprMatch(ref discrim, ref arms, match_src) => {
+            hir::ExprKind::Match(ref discrim, ref arms, match_src) => {
                 self.check_match(expr, &discrim, arms, expected, match_src)
             }
-            hir::ExprClosure(capture, ref decl, body_id, _, gen) => {
+            hir::ExprKind::Closure(capture, ref decl, body_id, _, gen) => {
                 self.check_expr_closure(expr, capture, &decl, body_id, gen, expected)
             }
-            hir::ExprBlock(ref body, _) => {
+            hir::ExprKind::Block(ref body, _) => {
                 self.check_block_with_expected(&body, expected)
             }
-            hir::ExprCall(ref callee, ref args) => {
+            hir::ExprKind::Call(ref callee, ref args) => {
                 self.check_call(expr, &callee, args, expected)
             }
-            hir::ExprMethodCall(ref segment, span, ref args) => {
+            hir::ExprKind::MethodCall(ref segment, span, ref args) => {
                 self.check_method_call(expr, segment, span, args, expected, needs)
             }
-            hir::ExprCast(ref e, ref t) => {
+            hir::ExprKind::Cast(ref e, ref t) => {
                 // Find the type of `e`. Supply hints based on the type we are casting to,
                 // if appropriate.
                 let t_cast = self.to_ty(t);
@@ -4056,12 +4056,12 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     }
                 }
             }
-            hir::ExprType(ref e, ref t) => {
+            hir::ExprKind::Type(ref e, ref t) => {
                 let ty = self.to_ty(&t);
                 self.check_expr_eq_type(&e, ty);
                 ty
             }
-            hir::ExprArray(ref args) => {
+            hir::ExprKind::Array(ref args) => {
                 let uty = expected.to_option(self).and_then(|uty| {
                     match uty.sty {
                         ty::TyArray(ty, _) | ty::TySlice(ty) => Some(ty),
@@ -4085,7 +4085,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                 };
                 tcx.mk_array(element_ty, args.len() as u64)
             }
-            hir::ExprRepeat(ref element, ref count) => {
+            hir::ExprKind::Repeat(ref element, ref count) => {
                 let count_def_id = tcx.hir.local_def_id(count.id);
                 let param_env = ty::ParamEnv::empty();
                 let substs = Substs::identity_for_item(tcx.global_tcx(), count_def_id);
@@ -4148,7 +4148,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     tcx.types.err
                 }
             }
-            hir::ExprTup(ref elts) => {
+            hir::ExprKind::Tup(ref elts) => {
                 let flds = expected.only_has_type(self).and_then(|ty| {
                     let ty = self.resolve_type_vars_with_obligations(ty);
                     match ty.sty {
@@ -4178,13 +4178,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     tuple
                 }
             }
-            hir::ExprStruct(ref qpath, ref fields, ref base_expr) => {
+            hir::ExprKind::Struct(ref qpath, ref fields, ref base_expr) => {
                 self.check_expr_struct(expr, expected, qpath, fields, base_expr)
             }
-            hir::ExprField(ref base, field) => {
+            hir::ExprKind::Field(ref base, field) => {
                 self.check_field(expr, needs, &base, field)
             }
-            hir::ExprIndex(ref base, ref idx) => {
+            hir::ExprKind::Index(ref base, ref idx) => {
                 let base_t = self.check_expr_with_needs(&base, needs);
                 let idx_t = self.check_expr(&idx);
 
@@ -4210,7 +4210,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                 let mut needs_note = true;
                                 // If the index is an integer, we can show the actual
                                 // fixed expression:
-                                if let hir::ExprLit(ref lit) = idx.node {
+                                if let hir::ExprKind::Lit(ref lit) = idx.node {
                                     if let ast::LitKind::Int(i,
                                             ast::LitIntType::Unsuffixed) = lit.node {
                                         let snip = tcx.sess.codemap().span_to_snippet(base.span);
@@ -4233,7 +4233,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                     }
                 }
             }
-            hir::ExprYield(ref value) => {
+            hir::ExprKind::Yield(ref value) => {
                 match self.yield_ty {
                     Some(ty) => {
                         self.check_expr_coercable_to_type(&value, ty);
@@ -4265,7 +4265,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             hir::QPath::TypeRelative(ref qself, ref segment) => {
                 let ty = self.to_ty(qself);
 
-                let def = if let hir::TyPath(hir::QPath::Resolved(_, ref path)) = qself.node {
+                let def = if let hir::TyKind::Path(hir::QPath::Resolved(_, ref path)) = qself.node {
                     path.def
                 } else {
                     Def::Err
@@ -4377,15 +4377,15 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
     pub fn check_stmt(&self, stmt: &'gcx hir::Stmt) {
         // Don't do all the complex logic below for DeclItem.
         match stmt.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 match decl.node {
-                    hir::DeclLocal(_) => {}
-                    hir::DeclItem(_) => {
+                    hir::DeclKind::Local(_) => {}
+                    hir::DeclKind::Item(_) => {
                         return;
                     }
                 }
             }
-            hir::StmtExpr(..) | hir::StmtSemi(..) => {}
+            hir::StmtKind::Expr(..) | hir::StmtKind::Semi(..) => {}
         }
 
         self.warn_if_unreachable(stmt.node.id(), stmt.span, "statement");
@@ -4397,19 +4397,19 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         self.has_errors.set(false);
 
         match stmt.node {
-            hir::StmtDecl(ref decl, _) => {
+            hir::StmtKind::Decl(ref decl, _) => {
                 match decl.node {
-                    hir::DeclLocal(ref l) => {
+                    hir::DeclKind::Local(ref l) => {
                         self.check_decl_local(&l);
                     }
-                    hir::DeclItem(_) => {/* ignore for now */}
+                    hir::DeclKind::Item(_) => {/* ignore for now */}
                 }
             }
-            hir::StmtExpr(ref expr, _) => {
+            hir::StmtKind::Expr(ref expr, _) => {
                 // Check with expected type of ()
                 self.check_expr_has_type_or_error(&expr, self.tcx.mk_nil());
             }
-            hir::StmtSemi(ref expr, _) => {
+            hir::StmtKind::Semi(ref expr, _) => {
                 self.check_expr(&expr);
             }
         }
@@ -4548,7 +4548,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             let parent = self.tcx.hir.get(fn_id);
 
             if let Node::NodeItem(&hir::Item {
-                name, node: hir::ItemFn(ref decl, ..), ..
+                name, node: hir::ItemKind::Fn(ref decl, ..), ..
             }) = parent {
                 decl.clone().and_then(|decl| {
                     // This is less than ideal, it will not suggest a return type span on any
@@ -4641,13 +4641,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             // `BlockTailExpression` only relevant if the tail expr would be
             // useful on its own.
             match expression.node {
-                hir::ExprCall(..) |
-                hir::ExprMethodCall(..) |
-                hir::ExprIf(..) |
-                hir::ExprWhile(..) |
-                hir::ExprLoop(..) |
-                hir::ExprMatch(..) |
-                hir::ExprBlock(..) => {
+                hir::ExprKind::Call(..) |
+                hir::ExprKind::MethodCall(..) |
+                hir::ExprKind::If(..) |
+                hir::ExprKind::While(..) |
+                hir::ExprKind::Loop(..) |
+                hir::ExprKind::Match(..) |
+                hir::ExprKind::Block(..) => {
                     let sp = self.tcx.sess.codemap().next_point(cause_span);
                     err.span_suggestion(sp,
                                         "try adding a semicolon",
@@ -4733,7 +4733,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             None => return,
         };
         let last_expr = match last_stmt.node {
-            hir::StmtSemi(ref e, _) => e,
+            hir::StmtKind::Semi(ref e, _) => e,
             _ => return,
         };
         let last_expr_ty = self.node_ty(last_expr.hir_id);
@@ -5048,7 +5048,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         match self.tcx.hir.get(self.tcx.hir.get_parent_node(node_id)) {
             Node::NodeExpr(expr) => {
                 match expr.node {
-                    hir::ExprCall(ref callee, ..) => {
+                    hir::ExprKind::Call(ref callee, ..) => {
                         if callee.id == node_id {
                             return
                         }
diff --git a/src/librustc_typeck/check/op.rs b/src/librustc_typeck/check/op.rs
index 0a33252d4cd..46746d4bd29 100644
--- a/src/librustc_typeck/check/op.rs
+++ b/src/librustc_typeck/check/op.rs
@@ -285,20 +285,20 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                 }
                             }
                             let missing_trait = match op.node {
-                                hir::BiAdd    => Some("std::ops::AddAssign"),
-                                hir::BiSub    => Some("std::ops::SubAssign"),
-                                hir::BiMul    => Some("std::ops::MulAssign"),
-                                hir::BiDiv    => Some("std::ops::DivAssign"),
-                                hir::BiRem    => Some("std::ops::RemAssign"),
-                                hir::BiBitAnd => Some("std::ops::BitAndAssign"),
-                                hir::BiBitXor => Some("std::ops::BitXorAssign"),
-                                hir::BiBitOr  => Some("std::ops::BitOrAssign"),
-                                hir::BiShl    => Some("std::ops::ShlAssign"),
-                                hir::BiShr    => Some("std::ops::ShrAssign"),
+                                hir::BinOpKind::Add    => Some("std::ops::AddAssign"),
+                                hir::BinOpKind::Sub    => Some("std::ops::SubAssign"),
+                                hir::BinOpKind::Mul    => Some("std::ops::MulAssign"),
+                                hir::BinOpKind::Div    => Some("std::ops::DivAssign"),
+                                hir::BinOpKind::Rem    => Some("std::ops::RemAssign"),
+                                hir::BinOpKind::BitAnd => Some("std::ops::BitAndAssign"),
+                                hir::BinOpKind::BitXor => Some("std::ops::BitXorAssign"),
+                                hir::BinOpKind::BitOr  => Some("std::ops::BitOrAssign"),
+                                hir::BinOpKind::Shl    => Some("std::ops::ShlAssign"),
+                                hir::BinOpKind::Shr    => Some("std::ops::ShrAssign"),
                                 _             => None
                             };
                             if let Some(missing_trait) = missing_trait {
-                                if op.node == hir::BiAdd &&
+                                if op.node == hir::BinOpKind::Add &&
                                     self.check_str_addition(expr, lhs_expr, rhs_expr, lhs_ty,
                                                             rhs_ty, &mut err) {
                                     // This has nothing here because it means we did string
@@ -353,23 +353,26 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                 }
                             }
                             let missing_trait = match op.node {
-                                hir::BiAdd    => Some("std::ops::Add"),
-                                hir::BiSub    => Some("std::ops::Sub"),
-                                hir::BiMul    => Some("std::ops::Mul"),
-                                hir::BiDiv    => Some("std::ops::Div"),
-                                hir::BiRem    => Some("std::ops::Rem"),
-                                hir::BiBitAnd => Some("std::ops::BitAnd"),
-                                hir::BiBitXor => Some("std::ops::BitXor"),
-                                hir::BiBitOr  => Some("std::ops::BitOr"),
-                                hir::BiShl    => Some("std::ops::Shl"),
-                                hir::BiShr    => Some("std::ops::Shr"),
-                                hir::BiEq | hir::BiNe => Some("std::cmp::PartialEq"),
-                                hir::BiLt | hir::BiLe | hir::BiGt | hir::BiGe =>
-                                    Some("std::cmp::PartialOrd"),
-                                _             => None
+                                hir::BinOpKind::Add    => Some("std::ops::Add"),
+                                hir::BinOpKind::Sub    => Some("std::ops::Sub"),
+                                hir::BinOpKind::Mul    => Some("std::ops::Mul"),
+                                hir::BinOpKind::Div    => Some("std::ops::Div"),
+                                hir::BinOpKind::Rem    => Some("std::ops::Rem"),
+                                hir::BinOpKind::BitAnd => Some("std::ops::BitAnd"),
+                                hir::BinOpKind::BitXor => Some("std::ops::BitXor"),
+                                hir::BinOpKind::BitOr  => Some("std::ops::BitOr"),
+                                hir::BinOpKind::Shl    => Some("std::ops::Shl"),
+                                hir::BinOpKind::Shr    => Some("std::ops::Shr"),
+                                hir::BinOpKind::Eq |
+                                hir::BinOpKind::Ne => Some("std::cmp::PartialEq"),
+                                hir::BinOpKind::Lt |
+                                hir::BinOpKind::Le |
+                                hir::BinOpKind::Gt |
+                                hir::BinOpKind::Ge => Some("std::cmp::PartialOrd"),
+                                _ => None
                             };
                             if let Some(missing_trait) = missing_trait {
-                                if op.node == hir::BiAdd &&
+                                if op.node == hir::BinOpKind::Add &&
                                     self.check_str_addition(expr, lhs_expr, rhs_expr, lhs_ty,
                                                             rhs_ty, &mut err) {
                                     // This has nothing here because it means we did string
@@ -508,20 +511,20 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
         };
         let (opname, trait_did) = if let Op::Binary(op, IsAssign::Yes) = op {
             match op.node {
-                hir::BiAdd => ("add_assign", lang.add_assign_trait()),
-                hir::BiSub => ("sub_assign", lang.sub_assign_trait()),
-                hir::BiMul => ("mul_assign", lang.mul_assign_trait()),
-                hir::BiDiv => ("div_assign", lang.div_assign_trait()),
-                hir::BiRem => ("rem_assign", lang.rem_assign_trait()),
-                hir::BiBitXor => ("bitxor_assign", lang.bitxor_assign_trait()),
-                hir::BiBitAnd => ("bitand_assign", lang.bitand_assign_trait()),
-                hir::BiBitOr => ("bitor_assign", lang.bitor_assign_trait()),
-                hir::BiShl => ("shl_assign", lang.shl_assign_trait()),
-                hir::BiShr => ("shr_assign", lang.shr_assign_trait()),
-                hir::BiLt | hir::BiLe |
-                hir::BiGe | hir::BiGt |
-                hir::BiEq | hir::BiNe |
-                hir::BiAnd | hir::BiOr => {
+                hir::BinOpKind::Add => ("add_assign", lang.add_assign_trait()),
+                hir::BinOpKind::Sub => ("sub_assign", lang.sub_assign_trait()),
+                hir::BinOpKind::Mul => ("mul_assign", lang.mul_assign_trait()),
+                hir::BinOpKind::Div => ("div_assign", lang.div_assign_trait()),
+                hir::BinOpKind::Rem => ("rem_assign", lang.rem_assign_trait()),
+                hir::BinOpKind::BitXor => ("bitxor_assign", lang.bitxor_assign_trait()),
+                hir::BinOpKind::BitAnd => ("bitand_assign", lang.bitand_assign_trait()),
+                hir::BinOpKind::BitOr => ("bitor_assign", lang.bitor_assign_trait()),
+                hir::BinOpKind::Shl => ("shl_assign", lang.shl_assign_trait()),
+                hir::BinOpKind::Shr => ("shr_assign", lang.shr_assign_trait()),
+                hir::BinOpKind::Lt | hir::BinOpKind::Le |
+                hir::BinOpKind::Ge | hir::BinOpKind::Gt |
+                hir::BinOpKind::Eq | hir::BinOpKind::Ne |
+                hir::BinOpKind::And | hir::BinOpKind::Or => {
                     span_bug!(span,
                               "impossible assignment operation: {}=",
                               op.node.as_str())
@@ -529,23 +532,23 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
             }
         } else if let Op::Binary(op, IsAssign::No) = op {
             match op.node {
-                hir::BiAdd => ("add", lang.add_trait()),
-                hir::BiSub => ("sub", lang.sub_trait()),
-                hir::BiMul => ("mul", lang.mul_trait()),
-                hir::BiDiv => ("div", lang.div_trait()),
-                hir::BiRem => ("rem", lang.rem_trait()),
-                hir::BiBitXor => ("bitxor", lang.bitxor_trait()),
-                hir::BiBitAnd => ("bitand", lang.bitand_trait()),
-                hir::BiBitOr => ("bitor", lang.bitor_trait()),
-                hir::BiShl => ("shl", lang.shl_trait()),
-                hir::BiShr => ("shr", lang.shr_trait()),
-                hir::BiLt => ("lt", lang.partial_ord_trait()),
-                hir::BiLe => ("le", lang.partial_ord_trait()),
-                hir::BiGe => ("ge", lang.partial_ord_trait()),
-                hir::BiGt => ("gt", lang.partial_ord_trait()),
-                hir::BiEq => ("eq", lang.eq_trait()),
-                hir::BiNe => ("ne", lang.eq_trait()),
-                hir::BiAnd | hir::BiOr => {
+                hir::BinOpKind::Add => ("add", lang.add_trait()),
+                hir::BinOpKind::Sub => ("sub", lang.sub_trait()),
+                hir::BinOpKind::Mul => ("mul", lang.mul_trait()),
+                hir::BinOpKind::Div => ("div", lang.div_trait()),
+                hir::BinOpKind::Rem => ("rem", lang.rem_trait()),
+                hir::BinOpKind::BitXor => ("bitxor", lang.bitxor_trait()),
+                hir::BinOpKind::BitAnd => ("bitand", lang.bitand_trait()),
+                hir::BinOpKind::BitOr => ("bitor", lang.bitor_trait()),
+                hir::BinOpKind::Shl => ("shl", lang.shl_trait()),
+                hir::BinOpKind::Shr => ("shr", lang.shr_trait()),
+                hir::BinOpKind::Lt => ("lt", lang.partial_ord_trait()),
+                hir::BinOpKind::Le => ("le", lang.partial_ord_trait()),
+                hir::BinOpKind::Ge => ("ge", lang.partial_ord_trait()),
+                hir::BinOpKind::Gt => ("gt", lang.partial_ord_trait()),
+                hir::BinOpKind::Eq => ("eq", lang.eq_trait()),
+                hir::BinOpKind::Ne => ("ne", lang.eq_trait()),
+                hir::BinOpKind::And | hir::BinOpKind::Or => {
                     span_bug!(span, "&& and || are not overloadable")
                 }
             }
@@ -608,31 +611,31 @@ enum BinOpCategory {
 impl BinOpCategory {
     fn from(op: hir::BinOp) -> BinOpCategory {
         match op.node {
-            hir::BiShl | hir::BiShr =>
+            hir::BinOpKind::Shl | hir::BinOpKind::Shr =>
                 BinOpCategory::Shift,
 
-            hir::BiAdd |
-            hir::BiSub |
-            hir::BiMul |
-            hir::BiDiv |
-            hir::BiRem =>
+            hir::BinOpKind::Add |
+            hir::BinOpKind::Sub |
+            hir::BinOpKind::Mul |
+            hir::BinOpKind::Div |
+            hir::BinOpKind::Rem =>
                 BinOpCategory::Math,
 
-            hir::BiBitXor |
-            hir::BiBitAnd |
-            hir::BiBitOr =>
+            hir::BinOpKind::BitXor |
+            hir::BinOpKind::BitAnd |
+            hir::BinOpKind::BitOr =>
                 BinOpCategory::Bitwise,
 
-            hir::BiEq |
-            hir::BiNe |
-            hir::BiLt |
-            hir::BiLe |
-            hir::BiGe |
-            hir::BiGt =>
+            hir::BinOpKind::Eq |
+            hir::BinOpKind::Ne |
+            hir::BinOpKind::Lt |
+            hir::BinOpKind::Le |
+            hir::BinOpKind::Ge |
+            hir::BinOpKind::Gt =>
                 BinOpCategory::Comparison,
 
-            hir::BiAnd |
-            hir::BiOr =>
+            hir::BinOpKind::And |
+            hir::BinOpKind::Or =>
                 BinOpCategory::Shortcircuit,
         }
     }
diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs
index 79ee322d109..8aa5658d291 100644
--- a/src/librustc_typeck/check/regionck.rs
+++ b/src/librustc_typeck/check/regionck.rs
@@ -495,9 +495,9 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
         // provided as arguments outlive the call.
         if is_method_call {
             let origin = match expr.node {
-                hir::ExprMethodCall(..) =>
+                hir::ExprKind::MethodCall(..) =>
                     infer::ParameterOrigin::MethodCall,
-                hir::ExprUnary(op, _) if op == hir::UnDeref =>
+                hir::ExprKind::Unary(op, _) if op == hir::UnDeref =>
                     infer::ParameterOrigin::OverloadedDeref,
                 _ =>
                     infer::ParameterOrigin::OverloadedOperator
@@ -525,13 +525,13 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
         debug!("regionck::visit_expr(e={:?}, repeating_scope={}) - visiting subexprs",
                expr, self.repeating_scope);
         match expr.node {
-            hir::ExprPath(_) => {
+            hir::ExprKind::Path(_) => {
                 let substs = self.tables.borrow().node_substs(expr.hir_id);
                 let origin = infer::ParameterOrigin::Path;
                 self.substs_wf_in_scope(origin, substs, expr.span, expr_region);
             }
 
-            hir::ExprCall(ref callee, ref args) => {
+            hir::ExprKind::Call(ref callee, ref args) => {
                 if is_method_call {
                     self.constrain_call(expr, Some(&callee), args.iter().map(|e| &*e));
                 } else {
@@ -542,13 +542,13 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprMethodCall(.., ref args) => {
+            hir::ExprKind::MethodCall(.., ref args) => {
                 self.constrain_call(expr, Some(&args[0]), args[1..].iter().map(|e| &*e));
 
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprAssignOp(_, ref lhs, ref rhs) => {
+            hir::ExprKind::AssignOp(_, ref lhs, ref rhs) => {
                 if is_method_call {
                     self.constrain_call(expr, Some(&lhs), Some(&**rhs).into_iter());
                 }
@@ -556,20 +556,20 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprIndex(ref lhs, ref rhs) if is_method_call => {
+            hir::ExprKind::Index(ref lhs, ref rhs) if is_method_call => {
                 self.constrain_call(expr, Some(&lhs), Some(&**rhs).into_iter());
 
                 intravisit::walk_expr(self, expr);
             },
 
-            hir::ExprBinary(_, ref lhs, ref rhs) if is_method_call => {
-                // As `ExprMethodCall`, but the call is via an overloaded op.
+            hir::ExprKind::Binary(_, ref lhs, ref rhs) if is_method_call => {
+                // As `ExprKind::MethodCall`, but the call is via an overloaded op.
                 self.constrain_call(expr, Some(&lhs), Some(&**rhs).into_iter());
 
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprBinary(_, ref lhs, ref rhs) => {
+            hir::ExprKind::Binary(_, ref lhs, ref rhs) => {
                 // If you do `x OP y`, then the types of `x` and `y` must
                 // outlive the operation you are performing.
                 let lhs_ty = self.resolve_expr_type_adjusted(&lhs);
@@ -581,7 +581,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprUnary(hir::UnDeref, ref base) => {
+            hir::ExprKind::Unary(hir::UnDeref, ref base) => {
                 // For *a, the lifetime of a must enclose the deref
                 if is_method_call {
                     self.constrain_call(expr, Some(base), None::<hir::Expr>.iter());
@@ -596,14 +596,14 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprUnary(_, ref lhs) if is_method_call => {
+            hir::ExprKind::Unary(_, ref lhs) if is_method_call => {
                 // As above.
                 self.constrain_call(expr, Some(&lhs), None::<hir::Expr>.iter());
 
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprIndex(ref vec_expr, _) => {
+            hir::ExprKind::Index(ref vec_expr, _) => {
                 // For a[b], the lifetime of a must enclose the deref
                 let vec_type = self.resolve_expr_type_adjusted(&vec_expr);
                 self.constrain_index(expr, vec_type);
@@ -611,7 +611,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprCast(ref source, _) => {
+            hir::ExprKind::Cast(ref source, _) => {
                 // Determine if we are casting `source` to a trait
                 // instance.  If so, we have to be sure that the type of
                 // the source obeys the trait's region bound.
@@ -619,7 +619,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprAddrOf(m, ref base) => {
+            hir::ExprKind::AddrOf(m, ref base) => {
                 self.link_addr_of(expr, m, &base);
 
                 // Require that when you write a `&expr` expression, the
@@ -635,23 +635,23 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprMatch(ref discr, ref arms, _) => {
+            hir::ExprKind::Match(ref discr, ref arms, _) => {
                 self.link_match(&discr, &arms[..]);
 
                 intravisit::walk_expr(self, expr);
             }
 
-            hir::ExprClosure(.., body_id, _, _) => {
+            hir::ExprKind::Closure(.., body_id, _, _) => {
                 self.check_expr_fn_block(expr, body_id);
             }
 
-            hir::ExprLoop(ref body, _, _) => {
+            hir::ExprKind::Loop(ref body, _, _) => {
                 let repeating_scope = self.set_repeating_scope(body.id);
                 intravisit::walk_expr(self, expr);
                 self.set_repeating_scope(repeating_scope);
             }
 
-            hir::ExprWhile(ref cond, ref body, _) => {
+            hir::ExprKind::While(ref cond, ref body, _) => {
                 let repeating_scope = self.set_repeating_scope(cond.id);
                 self.visit_expr(&cond);
 
@@ -661,9 +661,9 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for RegionCtxt<'a, 'gcx, 'tcx> {
                 self.set_repeating_scope(repeating_scope);
             }
 
-            hir::ExprRet(Some(ref ret_expr)) => {
+            hir::ExprKind::Ret(Some(ref ret_expr)) => {
                 let call_site_scope = self.call_site_scope;
-                debug!("visit_expr ExprRet ret_expr.id {} call_site_scope: {:?}",
+                debug!("visit_expr ExprKind::Ret ret_expr.id {} call_site_scope: {:?}",
                        ret_expr.id, call_site_scope);
                 let call_site_region = self.tcx.mk_region(ty::ReScope(call_site_scope.unwrap()));
                 self.type_of_node_must_outlive(infer::CallReturn(ret_expr.span),
diff --git a/src/librustc_typeck/check/upvar.rs b/src/librustc_typeck/check/upvar.rs
index e24269bca57..61fe90be217 100644
--- a/src/librustc_typeck/check/upvar.rs
+++ b/src/librustc_typeck/check/upvar.rs
@@ -74,7 +74,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for InferBorrowKindVisitor<'a, 'gcx, 'tcx> {
 
     fn visit_expr(&mut self, expr: &'gcx hir::Expr) {
         match expr.node {
-            hir::ExprClosure(cc, _, body_id, _, _) => {
+            hir::ExprKind::Closure(cc, _, body_id, _, _) => {
                 let body = self.fcx.tcx.hir.body(body_id);
                 self.visit_body(body);
                 self.fcx
diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs
index 85fdcd417ff..d876f41ce13 100644
--- a/src/librustc_typeck/check/wfcheck.rs
+++ b/src/librustc_typeck/check/wfcheck.rs
@@ -97,7 +97,7 @@ pub fn check_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: Def
         //
         // won't be allowed unless there's an *explicit* implementation of `Send`
         // for `T`
-        hir::ItemImpl(_, polarity, defaultness, _, ref trait_ref, ref self_ty, _) => {
+        hir::ItemKind::Impl(_, polarity, defaultness, _, ref trait_ref, ref self_ty, _) => {
             let is_auto = tcx.impl_trait_ref(tcx.hir.local_def_id(item.id))
                                 .map_or(false, |trait_ref| tcx.trait_is_auto(trait_ref.def_id));
             if let (hir::Defaultness::Default { .. }, true) = (defaultness, is_auto) {
@@ -114,37 +114,37 @@ pub fn check_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: Def
                 }
             }
         }
-        hir::ItemFn(..) => {
+        hir::ItemKind::Fn(..) => {
             check_item_fn(tcx, item);
         }
-        hir::ItemStatic(..) => {
+        hir::ItemKind::Static(..) => {
             check_item_type(tcx, item);
         }
-        hir::ItemConst(..) => {
+        hir::ItemKind::Const(..) => {
             check_item_type(tcx, item);
         }
-        hir::ItemStruct(ref struct_def, ref ast_generics) => {
+        hir::ItemKind::Struct(ref struct_def, ref ast_generics) => {
             check_type_defn(tcx, item, false, |fcx| {
                 vec![fcx.non_enum_variant(struct_def)]
             });
 
             check_variances_for_type_defn(tcx, item, ast_generics);
         }
-        hir::ItemUnion(ref struct_def, ref ast_generics) => {
+        hir::ItemKind::Union(ref struct_def, ref ast_generics) => {
             check_type_defn(tcx, item, true, |fcx| {
                 vec![fcx.non_enum_variant(struct_def)]
             });
 
             check_variances_for_type_defn(tcx, item, ast_generics);
         }
-        hir::ItemEnum(ref enum_def, ref ast_generics) => {
+        hir::ItemKind::Enum(ref enum_def, ref ast_generics) => {
             check_type_defn(tcx, item, true, |fcx| {
                 fcx.enum_variants(enum_def)
             });
 
             check_variances_for_type_defn(tcx, item, ast_generics);
         }
-        hir::ItemTrait(..) => {
+        hir::ItemKind::Trait(..) => {
             check_trait(tcx, item);
         }
         _ => {}
diff --git a/src/librustc_typeck/check/writeback.rs b/src/librustc_typeck/check/writeback.rs
index b7233217d5f..3207ac44948 100644
--- a/src/librustc_typeck/check/writeback.rs
+++ b/src/librustc_typeck/check/writeback.rs
@@ -117,7 +117,8 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
     // operating on scalars, we clear the overload.
     fn fix_scalar_builtin_expr(&mut self, e: &hir::Expr) {
         match e.node {
-            hir::ExprUnary(hir::UnNeg, ref inner) | hir::ExprUnary(hir::UnNot, ref inner) => {
+            hir::ExprKind::Unary(hir::UnNeg, ref inner) |
+            hir::ExprKind::Unary(hir::UnNot, ref inner) => {
                 let inner_ty = self.fcx.node_ty(inner.hir_id);
                 let inner_ty = self.fcx.resolve_type_vars_if_possible(&inner_ty);
 
@@ -127,8 +128,8 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
                     tables.node_substs_mut().remove(e.hir_id);
                 }
             }
-            hir::ExprBinary(ref op, ref lhs, ref rhs)
-            | hir::ExprAssignOp(ref op, ref lhs, ref rhs) => {
+            hir::ExprKind::Binary(ref op, ref lhs, ref rhs)
+            | hir::ExprKind::AssignOp(ref op, ref lhs, ref rhs) => {
                 let lhs_ty = self.fcx.node_ty(lhs.hir_id);
                 let lhs_ty = self.fcx.resolve_type_vars_if_possible(&lhs_ty);
 
@@ -141,14 +142,14 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
                     tables.node_substs_mut().remove(e.hir_id);
 
                     match e.node {
-                        hir::ExprBinary(..) => {
+                        hir::ExprKind::Binary(..) => {
                             if !op.node.is_by_value() {
                                 let mut adjustments = tables.adjustments_mut();
                                 adjustments.get_mut(lhs.hir_id).map(|a| a.pop());
                                 adjustments.get_mut(rhs.hir_id).map(|a| a.pop());
                             }
                         }
-                        hir::ExprAssignOp(..) => {
+                        hir::ExprKind::AssignOp(..) => {
                             tables
                                 .adjustments_mut()
                                 .get_mut(lhs.hir_id)
@@ -167,7 +168,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
     // to use builtin indexing because the index type is known to be
     // usize-ish
     fn fix_index_builtin_expr(&mut self, e: &hir::Expr) {
-        if let hir::ExprIndex(ref base, ref index) = e.node {
+        if let hir::ExprKind::Index(ref base, ref index) = e.node {
             let mut tables = self.fcx.tables.borrow_mut();
 
             match tables.expr_ty_adjusted(&base).sty {
@@ -227,7 +228,7 @@ impl<'cx, 'gcx, 'tcx> Visitor<'gcx> for WritebackCx<'cx, 'gcx, 'tcx> {
         self.visit_node_id(e.span, e.hir_id);
 
         match e.node {
-            hir::ExprClosure(_, _, body, _, _) => {
+            hir::ExprKind::Closure(_, _, body, _, _) => {
                 let body = self.fcx.tcx.hir.body(body);
                 for arg in &body.arguments {
                     self.visit_node_id(e.span, arg.hir_id);
@@ -235,12 +236,12 @@ impl<'cx, 'gcx, 'tcx> Visitor<'gcx> for WritebackCx<'cx, 'gcx, 'tcx> {
 
                 self.visit_body(body);
             }
-            hir::ExprStruct(_, ref fields, _) => {
+            hir::ExprKind::Struct(_, ref fields, _) => {
                 for field in fields {
                     self.visit_field_id(field.id);
                 }
             }
-            hir::ExprField(..) => {
+            hir::ExprKind::Field(..) => {
                 self.visit_field_id(e.id);
             }
             _ => {}
diff --git a/src/librustc_typeck/check_unused.rs b/src/librustc_typeck/check_unused.rs
index 3a8ed0ea25f..1a57dfd745e 100644
--- a/src/librustc_typeck/check_unused.rs
+++ b/src/librustc_typeck/check_unused.rs
@@ -42,7 +42,7 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for CheckVisitor<'a, 'tcx> {
         if item.vis.node.is_pub() || item.span.is_dummy() {
             return;
         }
-        if let hir::ItemUse(ref path, _) = item.node {
+        if let hir::ItemKind::Use(ref path, _) = item.node {
             self.check_import(item.id, path.span);
         }
     }
@@ -196,7 +196,7 @@ struct ExternCrateToLint {
 
 impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for CollectExternCrateVisitor<'a, 'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
-        if let hir::ItemExternCrate(orig_name) = item.node {
+        if let hir::ItemKind::ExternCrate(orig_name) = item.node {
             let extern_crate_def_id = self.tcx.hir.local_def_id(item.id);
             self.crates_to_lint.push(
                 ExternCrateToLint {
diff --git a/src/librustc_typeck/coherence/builtin.rs b/src/librustc_typeck/coherence/builtin.rs
index 393904583ca..4d9a4a03a6b 100644
--- a/src/librustc_typeck/coherence/builtin.rs
+++ b/src/librustc_typeck/coherence/builtin.rs
@@ -24,7 +24,7 @@ use rustc::infer;
 
 use rustc::hir::def_id::DefId;
 use rustc::hir::map as hir_map;
-use rustc::hir::{self, ItemImpl};
+use rustc::hir::{self, ItemKind};
 
 pub fn check_trait<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, trait_def_id: DefId) {
     Checker { tcx, trait_def_id }
@@ -64,7 +64,7 @@ fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                 match tcx.hir.find(impl_node_id) {
                     Some(hir_map::NodeItem(item)) => {
                         let span = match item.node {
-                            ItemImpl(.., ref ty, _) => ty.span,
+                            ItemKind::Impl(.., ref ty, _) => ty.span,
                             _ => item.span,
                         };
                         struct_span_err!(tcx.sess,
@@ -115,7 +115,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         Ok(()) => {}
         Err(CopyImplementationError::InfrigingFields(fields)) => {
             let item = tcx.hir.expect_item(impl_node_id);
-            let span = if let ItemImpl(.., Some(ref tr), _, _) = item.node {
+            let span = if let ItemKind::Impl(.., Some(ref tr), _, _) = item.node {
                 tr.path.span
             } else {
                 span
@@ -132,7 +132,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         }
         Err(CopyImplementationError::NotAnAdt) => {
             let item = tcx.hir.expect_item(impl_node_id);
-            let span = if let ItemImpl(.., ref ty, _) = item.node {
+            let span = if let ItemKind::Impl(.., ref ty, _) = item.node {
                 ty.span
             } else {
                 span
@@ -336,7 +336,7 @@ pub fn coerce_unsized_info<'a, 'gcx>(gcx: TyCtxt<'a, 'gcx, 'gcx>,
                     return err_info;
                 } else if diff_fields.len() > 1 {
                     let item = gcx.hir.expect_item(impl_node_id);
-                    let span = if let ItemImpl(.., Some(ref t), _, _) = item.node {
+                    let span = if let ItemKind::Impl(.., Some(ref t), _, _) = item.node {
                         t.path.span
                     } else {
                         gcx.hir.span(impl_node_id)
diff --git a/src/librustc_typeck/coherence/inherent_impls.rs b/src/librustc_typeck/coherence/inherent_impls.rs
index 532f1da4f30..02a18fa47df 100644
--- a/src/librustc_typeck/coherence/inherent_impls.rs
+++ b/src/librustc_typeck/coherence/inherent_impls.rs
@@ -94,7 +94,7 @@ struct InherentCollect<'a, 'tcx: 'a> {
 impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for InherentCollect<'a, 'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
         let ty = match item.node {
-            hir::ItemImpl(.., None, ref ty, _) => ty,
+            hir::ItemKind::Impl(.., None, ref ty, _) => ty,
             _ => return
         };
 
diff --git a/src/librustc_typeck/coherence/inherent_impls_overlap.rs b/src/librustc_typeck/coherence/inherent_impls_overlap.rs
index 6a346b02b79..c0260d6714d 100644
--- a/src/librustc_typeck/coherence/inherent_impls_overlap.rs
+++ b/src/librustc_typeck/coherence/inherent_impls_overlap.rs
@@ -122,10 +122,10 @@ impl<'a, 'tcx> InherentOverlapChecker<'a, 'tcx> {
 impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for InherentOverlapChecker<'a, 'tcx> {
     fn visit_item(&mut self, item: &'v hir::Item) {
         match item.node {
-            hir::ItemEnum(..) |
-            hir::ItemStruct(..) |
-            hir::ItemTrait(..) |
-            hir::ItemUnion(..) => {
+            hir::ItemKind::Enum(..) |
+            hir::ItemKind::Struct(..) |
+            hir::ItemKind::Trait(..) |
+            hir::ItemKind::Union(..) => {
                 let type_def_id = self.tcx.hir.local_def_id(item.id);
                 self.check_for_overlapping_inherent_impls(type_def_id);
             }
diff --git a/src/librustc_typeck/coherence/orphan.rs b/src/librustc_typeck/coherence/orphan.rs
index 6d6594e5543..9be509b3588 100644
--- a/src/librustc_typeck/coherence/orphan.rs
+++ b/src/librustc_typeck/coherence/orphan.rs
@@ -34,7 +34,7 @@ impl<'cx, 'tcx, 'v> ItemLikeVisitor<'v> for OrphanChecker<'cx, 'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
         let def_id = self.tcx.hir.local_def_id(item.id);
         match item.node {
-            hir::ItemImpl(.., Some(_), _, _) => {
+            hir::ItemKind::Impl(.., Some(_), _, _) => {
                 // "Trait" impl
                 debug!("coherence2::orphan check: trait impl {}",
                        self.tcx.hir.node_to_string(item.id));
diff --git a/src/librustc_typeck/coherence/unsafety.rs b/src/librustc_typeck/coherence/unsafety.rs
index 5a442881a63..9e19854a571 100644
--- a/src/librustc_typeck/coherence/unsafety.rs
+++ b/src/librustc_typeck/coherence/unsafety.rs
@@ -84,7 +84,7 @@ impl<'cx, 'tcx, 'v> UnsafetyChecker<'cx, 'tcx> {
 impl<'cx, 'tcx, 'v> ItemLikeVisitor<'v> for UnsafetyChecker<'cx, 'tcx> {
     fn visit_item(&mut self, item: &'v hir::Item) {
         match item.node {
-            hir::ItemImpl(unsafety, polarity, _, ref generics, ..) => {
+            hir::ItemKind::Impl(unsafety, polarity, _, ref generics, ..) => {
                 self.check_unsafety_coherence(item, Some(generics), unsafety, polarity);
             }
             _ => {}
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 5fa98e3ebe6..4b628d6ffad 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -129,7 +129,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CollectItemTypesVisitor<'a, 'tcx> {
     }
 
     fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
-        if let hir::ExprClosure(..) = expr.node {
+        if let hir::ExprKind::Closure(..) = expr.node {
             let def_id = self.tcx.hir.local_def_id(expr.id);
             self.tcx.generics_of(def_id);
             self.tcx.type_of(def_id);
@@ -266,13 +266,13 @@ fn type_param_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeItem(item) => {
             match item.node {
-                ItemFn(.., ref generics, _) |
-                ItemImpl(_, _, _, ref generics, ..) |
-                ItemTy(_, ref generics) |
-                ItemEnum(_, ref generics) |
-                ItemStruct(_, ref generics) |
-                ItemUnion(_, ref generics) => generics,
-                ItemTrait(_, _, ref generics, ..) => {
+                ItemKind::Fn(.., ref generics, _) |
+                ItemKind::Impl(_, _, _, ref generics, ..) |
+                ItemKind::Ty(_, ref generics) |
+                ItemKind::Enum(_, ref generics) |
+                ItemKind::Struct(_, ref generics) |
+                ItemKind::Union(_, ref generics) => generics,
+                ItemKind::Trait(_, _, ref generics, ..) => {
                     // Implied `Self: Trait` and supertrait bounds.
                     if param_id == item_node_id {
                         result.predicates.push(
@@ -287,7 +287,7 @@ fn type_param_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeForeignItem(item) => {
             match item.node {
-                ForeignItemFn(_, _, ref generics) => generics,
+                ForeignItemKind::Fn(_, _, ref generics) => generics,
                 _ => return result
             }
         }
@@ -346,7 +346,7 @@ fn is_param<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                       param_id: ast::NodeId)
                       -> bool
 {
-    if let hir::TyPath(hir::QPath::Resolved(None, ref path)) = ast_ty.node {
+    if let hir::TyKind::Path(hir::QPath::Resolved(None, ref path)) = ast_ty.node {
         match path.def {
             Def::SelfTy(Some(def_id), None) |
             Def::TyParam(def_id) => {
@@ -365,45 +365,45 @@ fn convert_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_id: ast::NodeId) {
     let def_id = tcx.hir.local_def_id(item_id);
     match it.node {
         // These don't define types.
-        hir::ItemExternCrate(_) |
-        hir::ItemUse(..) |
-        hir::ItemMod(_) |
-        hir::ItemGlobalAsm(_) => {}
-        hir::ItemForeignMod(ref foreign_mod) => {
+        hir::ItemKind::ExternCrate(_) |
+        hir::ItemKind::Use(..) |
+        hir::ItemKind::Mod(_) |
+        hir::ItemKind::GlobalAsm(_) => {}
+        hir::ItemKind::ForeignMod(ref foreign_mod) => {
             for item in &foreign_mod.items {
                 let def_id = tcx.hir.local_def_id(item.id);
                 tcx.generics_of(def_id);
                 tcx.type_of(def_id);
                 tcx.predicates_of(def_id);
-                if let hir::ForeignItemFn(..) = item.node {
+                if let hir::ForeignItemKind::Fn(..) = item.node {
                     tcx.fn_sig(def_id);
                 }
             }
         }
-        hir::ItemEnum(ref enum_definition, _) => {
+        hir::ItemKind::Enum(ref enum_definition, _) => {
             tcx.generics_of(def_id);
             tcx.type_of(def_id);
             tcx.predicates_of(def_id);
             convert_enum_variant_types(tcx, def_id, &enum_definition.variants);
         },
-        hir::ItemImpl(..) => {
+        hir::ItemKind::Impl(..) => {
             tcx.generics_of(def_id);
             tcx.type_of(def_id);
             tcx.impl_trait_ref(def_id);
             tcx.predicates_of(def_id);
         },
-        hir::ItemTrait(..) => {
+        hir::ItemKind::Trait(..) => {
             tcx.generics_of(def_id);
             tcx.trait_def(def_id);
             tcx.at(it.span).super_predicates_of(def_id);
             tcx.predicates_of(def_id);
         },
-        hir::ItemTraitAlias(..) => {
+        hir::ItemKind::TraitAlias(..) => {
             span_err!(tcx.sess, it.span, E0645,
                       "trait aliases are not yet implemented (see issue #41517)");
         },
-        hir::ItemStruct(ref struct_def, _) |
-        hir::ItemUnion(ref struct_def, _) => {
+        hir::ItemKind::Struct(ref struct_def, _) |
+        hir::ItemKind::Union(ref struct_def, _) => {
             tcx.generics_of(def_id);
             tcx.type_of(def_id);
             tcx.predicates_of(def_id);
@@ -419,12 +419,15 @@ fn convert_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_id: ast::NodeId) {
                 convert_variant_ctor(tcx, struct_def.id());
             }
         },
-        hir::ItemExistential(..) => {}
-        hir::ItemTy(..) | hir::ItemStatic(..) | hir::ItemConst(..) | hir::ItemFn(..) => {
+        hir::ItemKind::Existential(..) => {}
+        hir::ItemKind::Ty(..) |
+        hir::ItemKind::Static(..) |
+        hir::ItemKind::Const(..) |
+        hir::ItemKind::Fn(..) => {
             tcx.generics_of(def_id);
             tcx.type_of(def_id);
             tcx.predicates_of(def_id);
-            if let hir::ItemFn(..) = it.node {
+            if let hir::ItemKind::Fn(..) = it.node {
                 tcx.fn_sig(def_id);
             }
         }
@@ -561,7 +564,7 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
     let repr = ReprOptions::new(tcx, def_id);
     let (kind, variants) = match item.node {
-        ItemEnum(ref def, _) => {
+        ItemKind::Enum(ref def, _) => {
             let mut distance_from_explicit = 0;
             (AdtKind::Enum, def.variants.iter().map(|v| {
                 let did = tcx.hir.local_def_id(v.node.data.id());
@@ -576,7 +579,7 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                 convert_struct_variant(tcx, did, v.node.name, discr, &v.node.data)
             }).collect())
         }
-        ItemStruct(ref def, _) => {
+        ItemKind::Struct(ref def, _) => {
             // Use separate constructor id for unit/tuple structs and reuse did for braced structs.
             let ctor_id = if !def.is_struct() {
                 Some(tcx.hir.local_def_id(def.id()))
@@ -588,7 +591,7 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                        ty::VariantDiscr::Relative(0), def)
             ])
         }
-        ItemUnion(ref def, _) => {
+        ItemKind::Union(ref def, _) => {
             (AdtKind::Union, vec![
                 convert_struct_variant(tcx, def_id, item.name,
                                        ty::VariantDiscr::Relative(0), def)
@@ -614,8 +617,8 @@ fn super_predicates_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     };
 
     let (generics, bounds) = match item.node {
-        hir::ItemTrait(.., ref generics, ref supertraits, _) => (generics, supertraits),
-        hir::ItemTraitAlias(ref generics, ref supertraits) => (generics, supertraits),
+        hir::ItemKind::Trait(.., ref generics, ref supertraits, _) => (generics, supertraits),
+        hir::ItemKind::TraitAlias(ref generics, ref supertraits) => (generics, supertraits),
         _ => span_bug!(item.span,
                        "super_predicates invoked on non-trait"),
     };
@@ -658,8 +661,8 @@ fn trait_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     let item = tcx.hir.expect_item(node_id);
 
     let (is_auto, unsafety) = match item.node {
-        hir::ItemTrait(is_auto, unsafety, ..) => (is_auto == hir::IsAuto::Yes, unsafety),
-        hir::ItemTraitAlias(..) => (false, hir::Unsafety::Normal),
+        hir::ItemKind::Trait(is_auto, unsafety, ..) => (is_auto == hir::IsAuto::Yes, unsafety),
+        hir::ItemKind::TraitAlias(..) => (false, hir::Unsafety::Normal),
         _ => span_bug!(item.span, "trait_def_of_item invoked on non-trait"),
     };
 
@@ -701,7 +704,7 @@ fn has_late_bound_regions<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         fn visit_ty(&mut self, ty: &'tcx hir::Ty) {
             if self.has_late_bound_regions.is_some() { return }
             match ty.node {
-                hir::TyBareFn(..) => {
+                hir::TyKind::BareFn(..) => {
                     self.outer_index.shift_in(1);
                     intravisit::walk_ty(self, ty);
                     self.outer_index.shift_out(1);
@@ -774,12 +777,12 @@ fn has_late_bound_regions<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             _ => None,
         },
         hir_map::NodeForeignItem(item) => match item.node {
-            hir::ForeignItemFn(ref fn_decl, _, ref generics) =>
+            hir::ForeignItemKind::Fn(ref fn_decl, _, ref generics) =>
                 has_late_bound_regions(tcx, generics, fn_decl),
             _ => None,
         },
         hir_map::NodeItem(item) => match item.node {
-            hir::ItemFn(ref fn_decl, .., ref generics, _) =>
+            hir::ItemKind::Fn(ref fn_decl, .., ref generics, _) =>
                 has_late_bound_regions(tcx, generics, fn_decl),
             _ => None,
         },
@@ -805,12 +808,12 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             let parent_id = tcx.hir.get_parent(node_id);
             Some(tcx.hir.local_def_id(parent_id))
         }
-        NodeExpr(&hir::Expr { node: hir::ExprClosure(..), .. }) => {
+        NodeExpr(&hir::Expr { node: hir::ExprKind::Closure(..), .. }) => {
             Some(tcx.closure_base_def_id(def_id))
         }
         NodeItem(item) => {
             match item.node {
-                ItemExistential(hir::ExistTy { impl_trait_fn, .. }) => impl_trait_fn,
+                ItemKind::Existential(hir::ExistTy { impl_trait_fn, .. }) => impl_trait_fn,
                 _ => None,
             }
         },
@@ -828,19 +831,20 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeItem(item) => {
             match item.node {
-                ItemFn(.., ref generics, _) |
-                ItemImpl(_, _, _, ref generics, ..) => generics,
-
-                ItemTy(_, ref generics) |
-                ItemEnum(_, ref generics) |
-                ItemStruct(_, ref generics) |
-                ItemExistential(hir::ExistTy { ref generics, .. }) |
-                ItemUnion(_, ref generics) => {
+                ItemKind::Fn(.., ref generics, _) |
+                ItemKind::Impl(_, _, _, ref generics, ..) => generics,
+
+                ItemKind::Ty(_, ref generics) |
+                ItemKind::Enum(_, ref generics) |
+                ItemKind::Struct(_, ref generics) |
+                ItemKind::Existential(hir::ExistTy { ref generics, .. }) |
+                ItemKind::Union(_, ref generics) => {
                     allow_defaults = true;
                     generics
                 }
 
-                ItemTrait(_, _, ref generics, ..) | ItemTraitAlias(ref generics, ..) => {
+                ItemKind::Trait(_, _, ref generics, ..) |
+                ItemKind::TraitAlias(ref generics, ..) => {
                     // Add in the self type parameter.
                     //
                     // Something of a hack: use the node id for the trait, also as
@@ -869,9 +873,9 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeForeignItem(item) => {
             match item.node {
-                ForeignItemStatic(..) => &no_generics,
-                ForeignItemFn(_, _, ref generics) => generics,
-                ForeignItemType => &no_generics,
+                ForeignItemKind::Static(..) => &no_generics,
+                ForeignItemKind::Fn(_, _, ref generics) => generics,
+                ForeignItemKind::Type => &no_generics,
             }
         }
 
@@ -946,7 +950,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     // provide junk type parameter defs - the only place that
     // cares about anything but the length is instantiation,
     // and we don't do that for closures.
-    if let NodeExpr(&hir::Expr { node: hir::ExprClosure(.., gen), .. }) = node {
+    if let NodeExpr(&hir::Expr { node: hir::ExprKind::Closure(.., gen), .. }) = node {
         let dummy_args = if gen.is_some() {
             &["<yield_ty>", "<return_ty>", "<witness>"][..]
         } else {
@@ -1043,33 +1047,33 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeItem(item) => {
             match item.node {
-                ItemStatic(ref t, ..) | ItemConst(ref t, _) |
-                ItemTy(ref t, _) | ItemImpl(.., ref t, _) => {
+                ItemKind::Static(ref t, ..) | ItemKind::Const(ref t, _) |
+                ItemKind::Ty(ref t, _) | ItemKind::Impl(.., ref t, _) => {
                     icx.to_ty(t)
                 }
-                ItemFn(..) => {
+                ItemKind::Fn(..) => {
                     let substs = Substs::identity_for_item(tcx, def_id);
                     tcx.mk_fn_def(def_id, substs)
                 }
-                ItemEnum(..) |
-                ItemStruct(..) |
-                ItemUnion(..) => {
+                ItemKind::Enum(..) |
+                ItemKind::Struct(..) |
+                ItemKind::Union(..) => {
                     let def = tcx.adt_def(def_id);
                     let substs = Substs::identity_for_item(tcx, def_id);
                     tcx.mk_adt(def, substs)
                 }
                 // this is only reachable once we have named existential types
-                ItemExistential(hir::ExistTy { impl_trait_fn: None, .. }) => unimplemented!(),
+                ItemKind::Existential(hir::ExistTy { impl_trait_fn: None, .. }) => unimplemented!(),
                 // existential types desugared from impl Trait
-                ItemExistential(hir::ExistTy { impl_trait_fn: Some(owner), .. }) => {
+                ItemKind::Existential(hir::ExistTy { impl_trait_fn: Some(owner), .. }) => {
                     tcx.typeck_tables_of(owner).concrete_existential_types[&def_id]
                 },
-                ItemTrait(..) | ItemTraitAlias(..) |
-                ItemMod(..) |
-                ItemForeignMod(..) |
-                ItemGlobalAsm(..) |
-                ItemExternCrate(..) |
-                ItemUse(..) => {
+                ItemKind::Trait(..) | ItemKind::TraitAlias(..) |
+                ItemKind::Mod(..) |
+                ItemKind::ForeignMod(..) |
+                ItemKind::GlobalAsm(..) |
+                ItemKind::ExternCrate(..) |
+                ItemKind::Use(..) => {
                     span_bug!(
                         item.span,
                         "compute_type_of_item: unexpected item type: {:?}",
@@ -1080,17 +1084,17 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeForeignItem(foreign_item) => {
             match foreign_item.node {
-                ForeignItemFn(..) => {
+                ForeignItemKind::Fn(..) => {
                     let substs = Substs::identity_for_item(tcx, def_id);
                     tcx.mk_fn_def(def_id, substs)
                 }
-                ForeignItemStatic(ref t, _) => icx.to_ty(t),
-                ForeignItemType => tcx.mk_foreign(def_id),
+                ForeignItemKind::Static(ref t, _) => icx.to_ty(t),
+                ForeignItemKind::Type => tcx.mk_foreign(def_id),
             }
         }
 
         NodeStructCtor(&ref def) |
-        NodeVariant(&Spanned { node: hir::Variant_ { data: ref def, .. }, .. }) => {
+        NodeVariant(&Spanned { node: hir::VariantKind { data: ref def, .. }, .. }) => {
             match *def {
                 VariantData::Unit(..) | VariantData::Struct(..) => {
                     tcx.type_of(tcx.hir.get_parent_did(node_id))
@@ -1104,7 +1108,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         NodeField(field) => icx.to_ty(&field.ty),
 
-        NodeExpr(&hir::Expr { node: hir::ExprClosure(.., gen), .. }) => {
+        NodeExpr(&hir::Expr { node: hir::ExprKind::Closure(.., gen), .. }) => {
             if gen.is_some() {
                 let hir_id = tcx.hir.node_to_hir_id(node_id);
                 return tcx.typeck_tables_of(def_id).node_id_to_type(hir_id);
@@ -1118,12 +1122,12 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         }
 
         NodeAnonConst(_) => match tcx.hir.get(tcx.hir.get_parent_node(node_id)) {
-            NodeTy(&hir::Ty { node: TyArray(_, ref constant), .. }) |
-            NodeTy(&hir::Ty { node: TyTypeof(ref constant), .. }) |
-            NodeExpr(&hir::Expr { node: ExprRepeat(_, ref constant), .. })
+            NodeTy(&hir::Ty { node: hir::TyKind::Array(_, ref constant), .. }) |
+            NodeTy(&hir::Ty { node: hir::TyKind::Typeof(ref constant), .. }) |
+            NodeExpr(&hir::Expr { node: ExprKind::Repeat(_, ref constant), .. })
                 if constant.id == node_id => tcx.types.usize,
 
-            NodeVariant(&Spanned { node: Variant_ { disr_expr: Some(ref e), .. }, .. })
+            NodeVariant(&Spanned { node: VariantKind { disr_expr: Some(ref e), .. }, .. })
                 if e.id == node_id => {
                     tcx.adt_def(tcx.hir.get_parent_did(node_id))
                         .repr.discr_type().to_ty(tcx)
@@ -1165,17 +1169,17 @@ fn fn_sig<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             AstConv::ty_of_fn(&icx, sig.header.unsafety, sig.header.abi, &sig.decl)
         }
 
-        NodeItem(hir::Item { node: ItemFn(decl, header, _, _), .. }) => {
+        NodeItem(hir::Item { node: ItemKind::Fn(decl, header, _, _), .. }) => {
             AstConv::ty_of_fn(&icx, header.unsafety, header.abi, decl)
         }
 
-        NodeForeignItem(&hir::ForeignItem { node: ForeignItemFn(ref fn_decl, _, _), .. }) => {
+        NodeForeignItem(&hir::ForeignItem { node: ForeignItemKind::Fn(ref fn_decl, _, _), .. }) => {
             let abi = tcx.hir.get_foreign_abi(node_id);
             compute_sig_of_foreign_fn_decl(tcx, def_id, fn_decl, abi)
         }
 
         NodeStructCtor(&VariantData::Tuple(ref fields, _)) |
-        NodeVariant(&Spanned { node: hir::Variant_ {
+        NodeVariant(&Spanned { node: hir::VariantKind {
             data: VariantData::Tuple(ref fields, _), ..
         }, .. }) => {
             let ty = tcx.type_of(tcx.hir.get_parent_did(node_id));
@@ -1191,7 +1195,7 @@ fn fn_sig<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             ))
         }
 
-        NodeExpr(&hir::Expr { node: hir::ExprClosure(..), .. }) => {
+        NodeExpr(&hir::Expr { node: hir::ExprKind::Closure(..), .. }) => {
             // Closure signatures are not like other function
             // signatures and cannot be accessed through `fn_sig`. For
             // example, a closure signature excludes the `self`
@@ -1223,7 +1227,7 @@ fn impl_trait_ref<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
     let node_id = tcx.hir.as_local_node_id(def_id).unwrap();
     match tcx.hir.expect_item(node_id).node {
-        hir::ItemImpl(.., ref opt_trait_ref, _, _) => {
+        hir::ItemKind::Impl(.., ref opt_trait_ref, _, _) => {
             opt_trait_ref.as_ref().map(|ast_trait_ref| {
                 let selfty = tcx.type_of(def_id);
                 AstConv::instantiate_mono_trait_ref(&icx, ast_trait_ref, selfty)
@@ -1238,7 +1242,7 @@ fn impl_polarity<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                            -> hir::ImplPolarity {
     let node_id = tcx.hir.as_local_node_id(def_id).unwrap();
     match tcx.hir.expect_item(node_id).node {
-        hir::ItemImpl(_, polarity, ..) => polarity,
+        hir::ItemKind::Impl(_, polarity, ..) => polarity,
         ref item => bug!("impl_polarity: {:?} not an impl", item)
     }
 }
@@ -1371,23 +1375,23 @@ fn explicit_predicates_of<'a, 'tcx>(
 
         NodeItem(item) => {
             match item.node {
-                ItemImpl(_, _, defaultness, ref generics, ..) => {
+                ItemKind::Impl(_, _, defaultness, ref generics, ..) => {
                     if defaultness.is_default() {
                         is_default_impl_trait = tcx.impl_trait_ref(def_id);
                     }
                     generics
                 }
-                ItemFn(.., ref generics, _) |
-                ItemTy(_, ref generics) |
-                ItemEnum(_, ref generics) |
-                ItemStruct(_, ref generics) |
-                ItemUnion(_, ref generics) => generics,
+                ItemKind::Fn(.., ref generics, _) |
+                ItemKind::Ty(_, ref generics) |
+                ItemKind::Enum(_, ref generics) |
+                ItemKind::Struct(_, ref generics) |
+                ItemKind::Union(_, ref generics) => generics,
 
-                ItemTrait(_, _, ref generics, .., ref items) => {
+                ItemKind::Trait(_, _, ref generics, .., ref items) => {
                     is_trait = Some((ty::TraitRef::identity(tcx, def_id), items));
                     generics
                 }
-                ItemExistential(ref exist_ty) => {
+                ItemKind::Existential(ref exist_ty) => {
                     let substs = Substs::identity_for_item(tcx, def_id);
                     let anon_ty = tcx.mk_anon(def_id, substs);
 
@@ -1412,9 +1416,9 @@ fn explicit_predicates_of<'a, 'tcx>(
 
         NodeForeignItem(item) => {
             match item.node {
-                ForeignItemStatic(..) => &no_generics,
-                ForeignItemFn(_, _, ref generics) => generics,
-                ForeignItemType => &no_generics,
+                ForeignItemKind::Static(..) => &no_generics,
+                ForeignItemKind::Fn(_, _, ref generics) => generics,
+                ForeignItemKind::Type => &no_generics,
             }
         }
 
@@ -1578,7 +1582,7 @@ fn explicit_predicates_of<'a, 'tcx>(
     // before uses of `U`.  This avoids false ambiguity errors
     // in trait checking. See `setup_constraining_predicates`
     // for details.
-    if let NodeItem(&Item { node: ItemImpl(..), .. }) = node {
+    if let NodeItem(&Item { node: ItemKind::Impl(..), .. }) = node {
         let self_ty = tcx.type_of(def_id);
         let trait_ref = tcx.impl_trait_ref(def_id);
         ctp::setup_constraining_predicates(tcx,
diff --git a/src/librustc_typeck/impl_wf_check.rs b/src/librustc_typeck/impl_wf_check.rs
index b57bb1fccfb..b7921301957 100644
--- a/src/librustc_typeck/impl_wf_check.rs
+++ b/src/librustc_typeck/impl_wf_check.rs
@@ -72,7 +72,7 @@ struct ImplWfCheck<'a, 'tcx: 'a> {
 impl<'a, 'tcx> ItemLikeVisitor<'tcx> for ImplWfCheck<'a, 'tcx> {
     fn visit_item(&mut self, item: &'tcx hir::Item) {
         match item.node {
-            hir::ItemImpl(.., ref impl_item_refs) => {
+            hir::ItemKind::Impl(.., ref impl_item_refs) => {
                 let impl_def_id = self.tcx.hir.local_def_id(item.id);
                 enforce_impl_params_are_constrained(self.tcx,
                                                     impl_def_id,
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index b50f55effad..e343fb1a57b 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -189,7 +189,7 @@ fn check_main_fn_ty<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             match tcx.hir.find(main_id) {
                 Some(hir_map::NodeItem(it)) => {
                     match it.node {
-                        hir::ItemFn(.., ref generics, _) => {
+                        hir::ItemKind::Fn(.., ref generics, _) => {
                             let mut error = false;
                             if !generics.params.is_empty() {
                                 let msg = format!("`main` function is not allowed to have generic \
@@ -261,7 +261,7 @@ fn check_start_fn_ty<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             match tcx.hir.find(start_id) {
                 Some(hir_map::NodeItem(it)) => {
                     match it.node {
-                        hir::ItemFn(.., ref generics, _) => {
+                        hir::ItemKind::Fn(.., ref generics, _) => {
                             let mut error = false;
                             if !generics.params.is_empty() {
                                 struct_span_err!(tcx.sess, generics.span, E0132,
diff --git a/src/librustc_typeck/outlives/implicit_infer.rs b/src/librustc_typeck/outlives/implicit_infer.rs
index a015122d62e..e378f1a2dce 100644
--- a/src/librustc_typeck/outlives/implicit_infer.rs
+++ b/src/librustc_typeck/outlives/implicit_infer.rs
@@ -77,7 +77,7 @@ impl<'cx, 'tcx> ItemLikeVisitor<'tcx> for InferVisitor<'cx, 'tcx> {
 
         let mut item_required_predicates = RequiredPredicates::default();
         match item.node {
-            hir::ItemUnion(..) | hir::ItemEnum(..) | hir::ItemStruct(..) => {
+            hir::ItemKind::Union(..) | hir::ItemKind::Enum(..) | hir::ItemKind::Struct(..) => {
                 let adt_def = self.tcx.adt_def(item_did);
 
                 // Iterate over all fields in item_did
diff --git a/src/librustc_typeck/outlives/mod.rs b/src/librustc_typeck/outlives/mod.rs
index 9c483924992..5801a6ada3f 100644
--- a/src/librustc_typeck/outlives/mod.rs
+++ b/src/librustc_typeck/outlives/mod.rs
@@ -41,7 +41,7 @@ fn inferred_outlives_of<'a, 'tcx>(
 
     match tcx.hir.get(id) {
         hir_map::NodeItem(item) => match item.node {
-            hir::ItemStruct(..) | hir::ItemEnum(..) | hir::ItemUnion(..) => {
+            hir::ItemKind::Struct(..) | hir::ItemKind::Enum(..) | hir::ItemKind::Union(..) => {
                 let crate_map = tcx.inferred_outlives_crate(LOCAL_CRATE);
 
                 let predicates = crate_map
diff --git a/src/librustc_typeck/variance/constraints.rs b/src/librustc_typeck/variance/constraints.rs
index ad7a3051f64..9fecf5e73e7 100644
--- a/src/librustc_typeck/variance/constraints.rs
+++ b/src/librustc_typeck/variance/constraints.rs
@@ -80,8 +80,8 @@ pub fn add_constraints_from_crate<'a, 'tcx>(terms_cx: TermsContext<'a, 'tcx>)
 impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for ConstraintContext<'a, 'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
         match item.node {
-            hir::ItemStruct(ref struct_def, _) |
-            hir::ItemUnion(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) |
+            hir::ItemKind::Union(ref struct_def, _) => {
                 self.visit_node_helper(item.id);
 
                 if let hir::VariantData::Tuple(..) = *struct_def {
@@ -89,7 +89,7 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for ConstraintContext<'a, 'tcx> {
                 }
             }
 
-            hir::ItemEnum(ref enum_def, _) => {
+            hir::ItemKind::Enum(ref enum_def, _) => {
                 self.visit_node_helper(item.id);
 
                 for variant in &enum_def.variants {
@@ -99,13 +99,13 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for ConstraintContext<'a, 'tcx> {
                 }
             }
 
-            hir::ItemFn(..) => {
+            hir::ItemKind::Fn(..) => {
                 self.visit_node_helper(item.id);
             }
 
-            hir::ItemForeignMod(ref foreign_mod) => {
+            hir::ItemKind::ForeignMod(ref foreign_mod) => {
                 for foreign_item in &foreign_mod.items {
-                    if let hir::ForeignItemFn(..) = foreign_item.node {
+                    if let hir::ForeignItemKind::Fn(..) = foreign_item.node {
                         self.visit_node_helper(foreign_item.id);
                     }
                 }
diff --git a/src/librustc_typeck/variance/mod.rs b/src/librustc_typeck/variance/mod.rs
index adea9788b3c..3d70550c1df 100644
--- a/src/librustc_typeck/variance/mod.rs
+++ b/src/librustc_typeck/variance/mod.rs
@@ -62,10 +62,10 @@ fn variances_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_def_id: DefId)
     };
     match tcx.hir.get(id) {
         hir::map::NodeItem(item) => match item.node {
-            hir::ItemEnum(..) |
-            hir::ItemStruct(..) |
-            hir::ItemUnion(..) |
-            hir::ItemFn(..) => {}
+            hir::ItemKind::Enum(..) |
+            hir::ItemKind::Struct(..) |
+            hir::ItemKind::Union(..) |
+            hir::ItemKind::Fn(..) => {}
 
             _ => unsupported()
         },
@@ -83,7 +83,7 @@ fn variances_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_def_id: DefId)
         },
 
         hir::map::NodeForeignItem(item) => match item.node {
-            hir::ForeignItemFn(..) => {}
+            hir::ForeignItemKind::Fn(..) => {}
 
             _ => unsupported()
         },
diff --git a/src/librustc_typeck/variance/terms.rs b/src/librustc_typeck/variance/terms.rs
index b9ab00130b3..0aec31609b0 100644
--- a/src/librustc_typeck/variance/terms.rs
+++ b/src/librustc_typeck/variance/terms.rs
@@ -142,8 +142,8 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for TermsContext<'a, 'tcx> {
                self.tcx.hir.node_to_string(item.id));
 
         match item.node {
-            hir::ItemStruct(ref struct_def, _) |
-            hir::ItemUnion(ref struct_def, _) => {
+            hir::ItemKind::Struct(ref struct_def, _) |
+            hir::ItemKind::Union(ref struct_def, _) => {
                 self.add_inferreds_for_item(item.id);
 
                 if let hir::VariantData::Tuple(..) = *struct_def {
@@ -151,7 +151,7 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for TermsContext<'a, 'tcx> {
                 }
             }
 
-            hir::ItemEnum(ref enum_def, _) => {
+            hir::ItemKind::Enum(ref enum_def, _) => {
                 self.add_inferreds_for_item(item.id);
 
                 for variant in &enum_def.variants {
@@ -161,13 +161,13 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for TermsContext<'a, 'tcx> {
                 }
             }
 
-            hir::ItemFn(..) => {
+            hir::ItemKind::Fn(..) => {
                 self.add_inferreds_for_item(item.id);
             }
 
-            hir::ItemForeignMod(ref foreign_mod) => {
+            hir::ItemKind::ForeignMod(ref foreign_mod) => {
                 for foreign_item in &foreign_mod.items {
-                    if let hir::ForeignItemFn(..) = foreign_item.node {
+                    if let hir::ForeignItemKind::Fn(..) = foreign_item.node {
                         self.add_inferreds_for_item(foreign_item.id);
                     }
                 }
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs
index 527aef80a8d..0cdab134815 100644
--- a/src/librustdoc/clean/auto_trait.rs
+++ b/src/librustdoc/clean/auto_trait.rs
@@ -10,6 +10,7 @@
 
 use rustc::traits::auto_trait as auto;
 use rustc::ty::TypeFoldable;
+use rustc::hir;
 use std::fmt::Debug;
 
 use super::*;
@@ -65,9 +66,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
         let did = self.cx.tcx.hir.local_def_id(id);
 
         let def_ctor = match *item {
-            hir::ItemStruct(_, _) => Def::Struct,
-            hir::ItemUnion(_, _) => Def::Union,
-            hir::ItemEnum(_, _) => Def::Enum,
+            hir::ItemKind::Struct(_, _) => Def::Struct,
+            hir::ItemKind::Union(_, _) => Def::Union,
+            hir::ItemKind::Enum(_, _) => Def::Enum,
             _ => panic!("Unexpected type {:?} {:?}", item, id),
         };
 
@@ -216,7 +217,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
 
             let ty = hir::Ty {
                 id: ast::DUMMY_NODE_ID,
-                node: hir::Ty_::TyPath(hir::QPath::Resolved(None, P(new_path))),
+                node: hir::TyKind::Path(hir::QPath::Resolved(None, P(new_path))),
                 span: DUMMY_SP,
                 hir_id: hir::DUMMY_HIR_ID,
             };
@@ -279,7 +280,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
         debug!("ty_param_to_ty({:?}) {:?}", param, param.def_id);
         hir::Ty {
             id: ast::DUMMY_NODE_ID,
-            node: hir::Ty_::TyPath(hir::QPath::Resolved(
+            node: hir::TyKind::Path(hir::QPath::Resolved(
                 None,
                 P(hir::Path {
                     span: DUMMY_SP,
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 030b36c2212..2bf1f6e553f 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -283,10 +283,10 @@ impl Clean<ExternalCrate> for CrateNum {
             cx.tcx.hir.krate().module.item_ids.iter().filter_map(|&id| {
                 let item = cx.tcx.hir.expect_item(id.id);
                 match item.node {
-                    hir::ItemMod(_) => {
+                    hir::ItemKind::Mod(_) => {
                         as_primitive(Def::Mod(cx.tcx.hir.local_def_id(id.id)))
                     }
-                    hir::ItemUse(ref path, hir::UseKind::Single)
+                    hir::ItemKind::Use(ref path, hir::UseKind::Single)
                     if item.vis.node.is_pub() => {
                         as_primitive(path.def).map(|(_, prim, attrs)| {
                             // Pretend the primitive is local.
@@ -325,10 +325,10 @@ impl Clean<ExternalCrate> for CrateNum {
             cx.tcx.hir.krate().module.item_ids.iter().filter_map(|&id| {
                 let item = cx.tcx.hir.expect_item(id.id);
                 match item.node {
-                    hir::ItemMod(_) => {
+                    hir::ItemKind::Mod(_) => {
                         as_keyword(Def::Mod(cx.tcx.hir.local_def_id(id.id)))
                     }
-                    hir::ItemUse(ref path, hir::UseKind::Single)
+                    hir::ItemKind::Use(ref path, hir::UseKind::Single)
                     if item.vis.node.is_pub() => {
                         as_keyword(path.def).map(|(_, prim, attrs)| {
                             (cx.tcx.hir.local_def_id(id.id), prim, attrs)
@@ -2586,7 +2586,7 @@ pub struct PolyTrait {
 /// it does not preserve mutability or boxes.
 #[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Debug, Hash)]
 pub enum Type {
-    /// structs/enums/traits (most that'd be an hir::TyPath)
+    /// structs/enums/traits (most that'd be an hir::TyKind::Path)
     ResolvedPath {
         path: Path,
         typarams: Option<Vec<GenericBound>>,
@@ -2852,9 +2852,9 @@ impl Clean<Type> for hir::Ty {
     fn clean(&self, cx: &DocContext) -> Type {
         use rustc::hir::*;
         match self.node {
-            TyNever => Never,
-            TyPtr(ref m) => RawPointer(m.mutbl.clean(cx), box m.ty.clean(cx)),
-            TyRptr(ref l, ref m) => {
+            TyKind::Never => Never,
+            TyKind::Ptr(ref m) => RawPointer(m.mutbl.clean(cx), box m.ty.clean(cx)),
+            TyKind::Rptr(ref l, ref m) => {
                 let lifetime = if l.is_elided() {
                     None
                 } else {
@@ -2863,8 +2863,8 @@ impl Clean<Type> for hir::Ty {
                 BorrowedRef {lifetime: lifetime, mutability: m.mutbl.clean(cx),
                              type_: box m.ty.clean(cx)}
             }
-            TySlice(ref ty) => Slice(box ty.clean(cx)),
-            TyArray(ref ty, ref length) => {
+            TyKind::Slice(ref ty) => Slice(box ty.clean(cx)),
+            TyKind::Array(ref ty, ref length) => {
                 let def_id = cx.tcx.hir.local_def_id(length.id);
                 let param_env = cx.tcx.param_env(def_id);
                 let substs = Substs::identity_for_item(cx.tcx, def_id);
@@ -2878,8 +2878,8 @@ impl Clean<Type> for hir::Ty {
                 let length = print_const(cx, length);
                 Array(box ty.clean(cx), length)
             },
-            TyTup(ref tys) => Tuple(tys.clean(cx)),
-            TyPath(hir::QPath::Resolved(None, ref path)) => {
+            TyKind::Tup(ref tys) => Tuple(tys.clean(cx)),
+            TyKind::Path(hir::QPath::Resolved(None, ref path)) => {
                 if let Some(new_ty) = cx.ty_substs.borrow().get(&path.def).cloned() {
                     return new_ty;
                 }
@@ -2900,7 +2900,7 @@ impl Clean<Type> for hir::Ty {
                     }
                 };
 
-                if let Some(&hir::ItemTy(ref ty, ref generics)) = alias {
+                if let Some(&hir::ItemKind::Ty(ref ty, ref generics)) = alias {
                     let provided_params = &path.segments.last().unwrap();
                     let mut ty_substs = FxHashMap();
                     let mut lt_substs = FxHashMap();
@@ -2965,7 +2965,7 @@ impl Clean<Type> for hir::Ty {
                 }
                 resolve_type(cx, path.clean(cx), self.id)
             }
-            TyPath(hir::QPath::Resolved(Some(ref qself), ref p)) => {
+            TyKind::Path(hir::QPath::Resolved(Some(ref qself), ref p)) => {
                 let mut segments: Vec<_> = p.segments.clone().into();
                 segments.pop();
                 let trait_path = hir::Path {
@@ -2979,7 +2979,7 @@ impl Clean<Type> for hir::Ty {
                     trait_: box resolve_type(cx, trait_path.clean(cx), self.id)
                 }
             }
-            TyPath(hir::QPath::TypeRelative(ref qself, ref segment)) => {
+            TyKind::Path(hir::QPath::TypeRelative(ref qself, ref segment)) => {
                 let mut def = Def::Err;
                 let ty = hir_ty_to_ty(cx.tcx, self);
                 if let ty::TyProjection(proj) = ty.sty {
@@ -2996,7 +2996,7 @@ impl Clean<Type> for hir::Ty {
                     trait_: box resolve_type(cx, trait_path.clean(cx), self.id)
                 }
             }
-            TyTraitObject(ref bounds, ref lifetime) => {
+            TyKind::TraitObject(ref bounds, ref lifetime) => {
                 match bounds[0].clean(cx).trait_ {
                     ResolvedPath { path, typarams: None, did, is_generic } => {
                         let mut bounds: Vec<self::GenericBound> = bounds[1..].iter().map(|bound| {
@@ -3011,9 +3011,9 @@ impl Clean<Type> for hir::Ty {
                     _ => Infer // shouldn't happen
                 }
             }
-            TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
-            TyInfer | TyErr => Infer,
-            TyTypeof(..) => panic!("Unimplemented type {:?}", self.node),
+            TyKind::BareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
+            TyKind::Infer | TyKind::Err => Infer,
+            TyKind::Typeof(..) => panic!("Unimplemented type {:?}", self.node),
         }
     }
 }
@@ -4018,7 +4018,7 @@ impl Clean<Vec<Item>> for hir::ForeignMod {
 impl Clean<Item> for hir::ForeignItem {
     fn clean(&self, cx: &DocContext) -> Item {
         let inner = match self.node {
-            hir::ForeignItemFn(ref decl, ref names, ref generics) => {
+            hir::ForeignItemKind::Fn(ref decl, ref names, ref generics) => {
                 let (generics, decl) = enter_impl_trait(cx, || {
                     (generics.clean(cx), (&**decl, &names[..]).clean(cx))
                 });
@@ -4033,14 +4033,14 @@ impl Clean<Item> for hir::ForeignItem {
                     },
                 })
             }
-            hir::ForeignItemStatic(ref ty, mutbl) => {
+            hir::ForeignItemKind::Static(ref ty, mutbl) => {
                 ForeignStaticItem(Static {
                     type_: ty.clean(cx),
                     mutability: if mutbl {Mutable} else {Immutable},
                     expr: "".to_string(),
                 })
             }
-            hir::ForeignItemType => {
+            hir::ForeignItemKind::Type => {
                 ForeignTypeItem
             }
         };
@@ -4370,7 +4370,7 @@ pub fn path_to_def_local(tcx: &TyCtxt, path: &[&str]) -> Option<DefId> {
                 }
 
                 items = match &item.node {
-                    &hir::ItemMod(ref m) => m.item_ids.clone(),
+                    &hir::ItemKind::Mod(ref m) => m.item_ids.clone(),
                     _ => panic!("Unexpected item {:?} in path {:?} path")
                 };
                 break;
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index 53032b9b98c..bd35cc0acda 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -706,7 +706,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirCollector<'a, 'hir> {
     }
 
     fn visit_item(&mut self, item: &'hir hir::Item) {
-        let name = if let hir::ItemImpl(.., ref ty, _) = item.node {
+        let name = if let hir::ItemKind::Impl(.., ref ty, _) = item.node {
             self.map.node_to_pretty_string(ty.id)
         } else {
             item.name.to_string()
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index b7a9f95fdc0..875ba111ec0 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -297,7 +297,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
         if !self.view_item_stack.insert(def_node_id) { return false }
 
         let ret = match tcx.hir.get(def_node_id) {
-            hir_map::NodeItem(&hir::Item { node: hir::ItemMod(ref m), .. }) if glob => {
+            hir_map::NodeItem(&hir::Item { node: hir::ItemKind::Mod(ref m), .. }) if glob => {
                 let prev = mem::replace(&mut self.inlining, true);
                 for i in &m.item_ids {
                     let i = self.cx.tcx.hir.expect_item(i.id);
@@ -340,7 +340,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
         }
 
         match item.node {
-            hir::ItemForeignMod(ref fm) => {
+            hir::ItemKind::ForeignMod(ref fm) => {
                 // If inlining we only want to include public functions.
                 om.foreigns.push(if self.inlining {
                     hir::ForeignMod {
@@ -353,8 +353,8 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
             }
             // If we're inlining, skip private items.
             _ if self.inlining && !item.vis.node.is_pub() => {}
-            hir::ItemGlobalAsm(..) => {}
-            hir::ItemExternCrate(orig_name) => {
+            hir::ItemKind::GlobalAsm(..) => {}
+            hir::ItemKind::ExternCrate(orig_name) => {
                 let def_id = self.cx.tcx.hir.local_def_id(item.id);
                 om.extern_crates.push(ExternCrate {
                     cnum: self.cx.tcx.extern_mod_stmt_cnum(def_id)
@@ -366,8 +366,8 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                     whence: item.span,
                 })
             }
-            hir::ItemUse(_, hir::UseKind::ListStem) => {}
-            hir::ItemUse(ref path, kind) => {
+            hir::ItemKind::Use(_, hir::UseKind::ListStem) => {}
+            hir::ItemKind::Use(ref path, kind) => {
                 let is_glob = kind == hir::UseKind::Glob;
 
                 // struct and variant constructors always show up alongside their definitions, we've
@@ -409,7 +409,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                     whence: item.span,
                 });
             }
-            hir::ItemMod(ref m) => {
+            hir::ItemKind::Mod(ref m) => {
                 om.mods.push(self.visit_mod_contents(item.span,
                                                      item.attrs.clone(),
                                                      item.vis.clone(),
@@ -417,15 +417,15 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                                                      m,
                                                      Some(name)));
             },
-            hir::ItemEnum(ref ed, ref gen) =>
+            hir::ItemKind::Enum(ref ed, ref gen) =>
                 om.enums.push(self.visit_enum_def(item, name, ed, gen)),
-            hir::ItemStruct(ref sd, ref gen) =>
+            hir::ItemKind::Struct(ref sd, ref gen) =>
                 om.structs.push(self.visit_variant_data(item, name, sd, gen)),
-            hir::ItemUnion(ref sd, ref gen) =>
+            hir::ItemKind::Union(ref sd, ref gen) =>
                 om.unions.push(self.visit_union_data(item, name, sd, gen)),
-            hir::ItemFn(ref fd, header, ref gen, body) =>
+            hir::ItemKind::Fn(ref fd, header, ref gen, body) =>
                 om.fns.push(self.visit_fn(item, name, &**fd, header, gen, body)),
-            hir::ItemTy(ref ty, ref gen) => {
+            hir::ItemKind::Ty(ref ty, ref gen) => {
                 let t = Typedef {
                     ty: ty.clone(),
                     gen: gen.clone(),
@@ -439,7 +439,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                 };
                 om.typedefs.push(t);
             },
-            hir::ItemStatic(ref ty, ref mut_, ref exp) => {
+            hir::ItemKind::Static(ref ty, ref mut_, ref exp) => {
                 let s = Static {
                     type_: ty.clone(),
                     mutability: mut_.clone(),
@@ -454,7 +454,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                 };
                 om.statics.push(s);
             },
-            hir::ItemConst(ref ty, ref exp) => {
+            hir::ItemKind::Const(ref ty, ref exp) => {
                 let s = Constant {
                     type_: ty.clone(),
                     expr: exp.clone(),
@@ -468,7 +468,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                 };
                 om.constants.push(s);
             },
-            hir::ItemTrait(is_auto, unsafety, ref gen, ref b, ref item_ids) => {
+            hir::ItemKind::Trait(is_auto, unsafety, ref gen, ref b, ref item_ids) => {
                 let items = item_ids.iter()
                                     .map(|ti| self.cx.tcx.hir.trait_item(ti.id).clone())
                                     .collect();
@@ -488,11 +488,11 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                 };
                 om.traits.push(t);
             },
-            hir::ItemTraitAlias(..) => {
+            hir::ItemKind::TraitAlias(..) => {
                 unimplemented!("trait objects are not yet implemented")
             },
 
-            hir::ItemImpl(unsafety,
+            hir::ItemKind::Impl(unsafety,
                           polarity,
                           defaultness,
                           ref gen,
@@ -523,7 +523,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
                     om.impls.push(i);
                 }
             },
-            hir::ItemExistential(_) => {
+            hir::ItemKind::Existential(_) => {
                 // FIXME(oli-obk): actually generate docs for real existential items
             }
         }
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 281ebaff272..1241e230b26 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -1073,7 +1073,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
                 return attrs;
             }
 
-            if self.cx.ecfg.proc_macro_enabled() {
+            if self.cx.ecfg.use_extern_macros_enabled() {
                 attr = find_attr_invoc(&mut attrs);
             }
             traits = collect_derives(&mut self.cx, &mut attrs);
@@ -1096,7 +1096,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
                 return attrs;
             }
 
-            if self.cx.ecfg.proc_macro_enabled() {
+            if self.cx.ecfg.use_extern_macros_enabled() {
                 attr = find_attr_invoc(&mut attrs);
             }
             attrs
@@ -1406,7 +1406,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
                          foreign_item: ast::ForeignItem) -> SmallVector<ast::ForeignItem> {
         let (attr, traits, foreign_item) = self.classify_item(foreign_item);
 
-        let explain = if self.cx.ecfg.proc_macro_enabled() {
+        let explain = if self.cx.ecfg.use_extern_macros_enabled() {
             feature_gate::EXPLAIN_PROC_MACROS_IN_EXTERN
         } else {
             feature_gate::EXPLAIN_MACROS_IN_EXTERN
@@ -1592,7 +1592,7 @@ impl<'feat> ExpansionConfig<'feat> {
         fn enable_trace_macros = trace_macros,
         fn enable_allow_internal_unstable = allow_internal_unstable,
         fn enable_custom_derive = custom_derive,
-        fn proc_macro_enabled = proc_macro,
+        fn use_extern_macros_enabled = use_extern_macros,
         fn macros_in_extern_enabled = macros_in_extern,
         fn proc_macro_mod = proc_macro_mod,
         fn proc_macro_gen = proc_macro_gen,
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index f033c5006c5..1a73096505f 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -39,13 +39,6 @@ use symbol::{keywords, Symbol};
 use std::{env, path};
 
 macro_rules! set {
-    (proc_macro) => {{
-        fn f(features: &mut Features, span: Span) {
-            features.declared_lib_features.push((Symbol::intern("proc_macro"), span));
-            features.proc_macro = true;
-        }
-        f as fn(&mut Features, Span)
-    }};
     ($field: ident) => {{
         fn f(features: &mut Features, _: Span) {
             features.$field = true;
@@ -303,9 +296,6 @@ declare_features! (
     // rustc internal
     (active, abi_unadjusted, "1.16.0", None, None),
 
-    // Procedural macros 2.0.
-    (active, proc_macro, "1.16.0", Some(38356), Some(Edition::Edition2018)),
-
     // Declarative macros 2.0 (`macro`).
     (active, decl_macro, "1.17.0", Some(39412), None),
 
@@ -626,6 +616,8 @@ declare_features! (
     (accepted, global_allocator, "1.28.0", Some(27389), None),
     // Allows `#[repr(transparent)]` attribute on newtype structs
     (accepted, repr_transparent, "1.28.0", Some(43036), None),
+    // Defining procedural macros in `proc-macro` crates
+    (accepted, proc_macro, "1.29.0", Some(38356), None),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1033,15 +1025,8 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
 
     ("windows_subsystem", Whitelisted, Ungated),
 
-    ("proc_macro_attribute", Normal, Gated(Stability::Unstable,
-                                           "proc_macro",
-                                           "attribute proc macros are currently unstable",
-                                           cfg_fn!(proc_macro))),
-
-    ("proc_macro", Normal, Gated(Stability::Unstable,
-                                 "proc_macro",
-                                 "function-like proc macros are currently unstable",
-                                 cfg_fn!(proc_macro))),
+    ("proc_macro_attribute", Normal, Ungated),
+    ("proc_macro", Normal, Ungated),
 
     ("rustc_derive_registrar", Normal, Gated(Stability::Unstable,
                                              "rustc_derive_registrar",
@@ -1542,7 +1527,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
             }
         }
 
-        if self.context.features.proc_macro && attr::is_known(attr) {
+        if self.context.features.use_extern_macros && attr::is_known(attr) {
             return
         }
 
@@ -1990,7 +1975,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
 /// A collector for mutually exclusive and interdependent features and their flag spans.
 #[derive(Default)]
 struct FeatureChecker {
-    proc_macro: Option<Span>,
+    use_extern_macros: Option<Span>,
     custom_attribute: Option<Span>,
 }
 
@@ -1999,9 +1984,9 @@ impl FeatureChecker {
     // the branching can be eliminated by modifying `set!()` to set these spans
     // only for the features that need to be checked for mutual exclusion.
     fn collect(&mut self, features: &Features, span: Span) {
-        if features.proc_macro {
-            // If self.proc_macro is None, set to Some(span)
-            self.proc_macro = self.proc_macro.or(Some(span));
+        if features.use_extern_macros {
+            // If self.use_extern_macros is None, set to Some(span)
+            self.use_extern_macros = self.use_extern_macros.or(Some(span));
         }
 
         if features.custom_attribute {
@@ -2010,8 +1995,8 @@ impl FeatureChecker {
     }
 
     fn check(self, handler: &Handler) {
-        if let (Some(pm_span), Some(ca_span)) = (self.proc_macro, self.custom_attribute) {
-            handler.struct_span_err(pm_span, "Cannot use `#![feature(proc_macro)]` and \
+        if let (Some(pm_span), Some(ca_span)) = (self.use_extern_macros, self.custom_attribute) {
+            handler.struct_span_err(pm_span, "Cannot use `#![feature(use_extern_macros)]` and \
                                               `#![feature(custom_attribute)] at the same time")
                 .span_note(ca_span, "`#![feature(custom_attribute)]` declared here")
                 .emit();
diff --git a/src/test/compile-fail-fulldeps/issue-15778-fail.rs b/src/test/compile-fail-fulldeps/issue-15778-fail.rs
index 8c6889f715f..d56571ee1ac 100644
--- a/src/test/compile-fail-fulldeps/issue-15778-fail.rs
+++ b/src/test/compile-fail-fulldeps/issue-15778-fail.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // compile-flags: -D crate-not-okay
 
-#![feature(plugin, custom_attribute)] //~ ERROR crate is not marked with #![crate_okay]
+#![feature(plugin)] //~ ERROR crate is not marked with #![crate_okay]
 #![plugin(lint_for_crate)]
 
 pub fn main() { }
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs b/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
index 749d87e37b5..64af21dbe10 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
@@ -13,7 +13,7 @@
 
 //! Attributes producing expressions in invalid locations
 
-#![feature(proc_macro, stmt_expr_attributes, proc_macro_expr)]
+#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{duplicate, no_output};
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs b/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
index ce04fdfb976..05b5c918ef0 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
@@ -11,7 +11,7 @@
 // aux-build:attr-stmt-expr.rs
 // ignore-stage1
 
-#![feature(proc_macro, proc_macro_expr)]
+#![feature(use_extern_macros, proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr};
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attribute-with-error.rs b/src/test/compile-fail-fulldeps/proc-macro/attribute-with-error.rs
index edfedebf870..9e7bbb2b8f7 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attribute-with-error.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attribute-with-error.rs
@@ -11,7 +11,7 @@
 // aux-build:attribute-with-error.rs
 // ignore-stage1
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate attribute_with_error;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attributes-included.rs b/src/test/compile-fail-fulldeps/proc-macro/attributes-included.rs
index 9947e8f66ce..ea66d3c0ef6 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attributes-included.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attributes-included.rs
@@ -10,23 +10,25 @@
 
 // aux-build:attributes-included.rs
 // ignore-stage1
+// compile-pass
 
-#![feature(proc_macro, rustc_attrs, proc_macro_path_invoc)]
+#![feature(use_extern_macros)]
 #![warn(unused)]
 
 extern crate attributes_included;
 
-#[attributes_included::bar]
+use attributes_included::*;
+
+#[bar]
 #[inline]
 /// doc
-#[attributes_included::foo]
+#[foo]
 #[inline]
 /// doc
 fn foo() {
     let a: i32 = "foo"; //~ WARN: unused variable
 }
 
-#[rustc_error]
-fn main() { //~ ERROR: compilation successful
+fn main() {
     foo()
 }
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
index 8bae1697dcb..22ddc913995 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr_proc_macro.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr_proc_macro.rs
index db0c19e96f8..679cb772868 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr_proc_macro.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attr_proc_macro.rs
@@ -10,7 +10,7 @@
 
 // force-host
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attribute-with-error.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attribute-with-error.rs
index 85a7a0bf633..14284092669 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attribute-with-error.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attribute-with-error.rs
@@ -12,7 +12,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attributes-included.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attributes-included.rs
index f3f7cb1406c..a1f4209662d 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attributes-included.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/attributes-included.rs
@@ -11,7 +11,6 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro.rs
index 89ac11b309d..6484725814a 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro.rs
@@ -10,7 +10,7 @@
 
 // force-host
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro2.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro2.rs
index 5fc20bcda88..3f0a4574367 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro2.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/bang_proc_macro2.rs
@@ -10,7 +10,7 @@
 
 // force-host
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue-41211.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue-41211.rs
index 99400bd147c..5365e8238e9 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue-41211.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue-41211.rs
@@ -12,7 +12,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 use proc_macro::TokenStream;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_50493.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_50493.rs
index 7d36517d970..e71b792a48a 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_50493.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_50493.rs
@@ -11,7 +11,6 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro, proc_macro_lib)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/more-gates.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/more-gates.rs
index def12f8e4ec..4d89384137b 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/more-gates.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/more-gates.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/proc-macro-gates.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/proc-macro-gates.rs
index 25579f1fc83..0f8fd5b5709 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/proc-macro-gates.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/proc-macro-gates.rs
@@ -12,7 +12,6 @@
 // force-host
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/test-macros.rs b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/test-macros.rs
index d1c5b9050aa..581c7cb15a5 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/auxiliary/test-macros.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/auxiliary/test-macros.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/feature-gate-proc_macro.rs b/src/test/compile-fail-fulldeps/proc-macro/feature-gate-proc_macro.rs
deleted file mode 100644
index eeede4b8aa1..00000000000
--- a/src/test/compile-fail-fulldeps/proc-macro/feature-gate-proc_macro.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:attr_proc_macro.rs
-#![feature(use_extern_macros)]
-
-extern crate attr_proc_macro;
-use attr_proc_macro::attr_proc_macro;
-
-#[attr_proc_macro]
-//~^ ERROR: attribute procedural macros are experimental
-struct Foo;
-
-fn main() {
-    let _ = Foo;
-}
diff --git a/src/test/compile-fail-fulldeps/proc-macro/issue-41211.rs b/src/test/compile-fail-fulldeps/proc-macro/issue-41211.rs
index 17237912be4..8fced7d8c70 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/issue-41211.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/issue-41211.rs
@@ -13,7 +13,7 @@
 // FIXME: https://github.com/rust-lang/rust/issues/41430
 // This is a temporary regression test for the ICE reported in #41211
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 #![emit_unchanged]
 //~^ ERROR: cannot find attribute macro `emit_unchanged` in this scope
 extern crate issue_41211;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/macro-use-attr.rs b/src/test/compile-fail-fulldeps/proc-macro/macro-use-attr.rs
index 76253487b51..bb7f341f967 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/macro-use-attr.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/macro-use-attr.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:attr_proc_macro.rs
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 #[macro_use] extern crate attr_proc_macro;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/macros-in-extern.rs b/src/test/compile-fail-fulldeps/proc-macro/macros-in-extern.rs
index 75d5ac6495a..9a35dc0edc4 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/macros-in-extern.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/macros-in-extern.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // ignore-wasm32
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate test_macros;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/more-gates.rs b/src/test/compile-fail-fulldeps/proc-macro/more-gates.rs
index a799f79ef70..ff9f1705c5b 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/more-gates.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/more-gates.rs
@@ -10,7 +10,7 @@
 
 // aux-build:more-gates.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate more_gates as foo;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
index 288cab71ff4..9ed665b6e68 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
@@ -9,9 +9,10 @@
 // except according to those terms.
 
 // aux-build:attr_proc_macro.rs
+// ignore-tidy-linelength
 
-#![feature(proc_macro, custom_attribute)]
-//~^ ERROR Cannot use `#![feature(proc_macro)]` and `#![feature(custom_attribute)] at the same time
+#![feature(use_extern_macros, custom_attribute)]
+//~^ ERROR Cannot use `#![feature(use_extern_macros)]` and `#![feature(custom_attribute)] at the same time
 
 extern crate attr_proc_macro;
 use attr_proc_macro::attr_proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
index 70b2b5fdd33..51b1bfca294 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
@@ -16,7 +16,7 @@
 // gate-test-proc_macro_mod
 // gate-test-proc_macro_gen
 
-#![feature(proc_macro, stmt_expr_attributes)]
+#![feature(use_extern_macros, stmt_expr_attributes)]
 
 extern crate proc_macro_gates as foo;
 
diff --git a/src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs b/src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs
index 4303048138d..30752e8ddb1 100644
--- a/src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs
+++ b/src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs
@@ -52,7 +52,7 @@ fn deref_coercion(x: &mut u32) {
 // - [x] coerce_unsized e.g. `&[T; n]`, `&mut [T; n] -> &[T]`,
 //                      `&mut [T; n] -> &mut [T]`, `&Concrete -> &Trait`
 // - [x] Method Call Receivers (the case we want to support!)
-// - [x] ExprIndex and ExprUnary Deref; only need to handle coerce_index_op
+// - [x] ExprKind::Index and ExprKind::Unary Deref; only need to handle coerce_index_op
 // - [x] overloaded_binops
 
 fn overloaded_call_traits() {
diff --git a/src/test/compile-fail/issue-26548.rs b/src/test/compile-fail/issue-26548.rs
index aab674fbb1a..fc4f3d1fb53 100644
--- a/src/test/compile-fail/issue-26548.rs
+++ b/src/test/compile-fail/issue-26548.rs
@@ -8,9 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: cycle detected when computing layout of
-// note-pattern: ...which requires computing layout of
-// note-pattern: ...which again requires computing layout of
+//~^^^^^^^^^^ ERROR cycle detected when computing layout of
+//~| NOTE ...which requires computing layout of
+//~| NOTE ...which again requires computing layout of
+//~| NOTE cycle used when compile_codegen_unit
 
 trait Mirror { type It: ?Sized; }
 impl<T: ?Sized> Mirror for T { type It = Self; }
diff --git a/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs
index 0f90cb3752c..7eafd834c49 100644
--- a/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs
@@ -35,7 +35,7 @@ use rustc_plugin::Registry;
 #[plugin_registrar]
 pub fn plugin_registrar(reg: &mut Registry) {
     reg.register_syntax_extension(
-        Symbol::intern("derive_TotalSum"),
+        Symbol::intern("rustc_derive_TotalSum"),
         MultiDecorator(box expand));
 }
 
diff --git a/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs b/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
index f026d8e2365..545eabe00ff 100644
--- a/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
@@ -11,7 +11,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(use_extern_macros, proc_macro_non_items, proc_macro_quote)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs b/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
index e3246673fab..fa208e14b7d 100644
--- a/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
@@ -57,19 +57,19 @@ declare_lint!(CRATE_NOT_GREEN, Warn, "crate not marked with #![crate_green]");
 fake_lint_pass! {
     PassOkay,
     lint_array!(CRATE_NOT_OKAY), // Single lint
-    "crate_okay"
+    "rustc_crate_okay"
 }
 
 fake_lint_pass! {
     PassRedBlue,
     lint_array!(CRATE_NOT_RED, CRATE_NOT_BLUE), // Multiple lints
-    "crate_red", "crate_blue"
+    "rustc_crate_red", "rustc_crate_blue"
 }
 
 fake_lint_pass! {
     PassGreyGreen,
     lint_array!(CRATE_NOT_GREY, CRATE_NOT_GREEN, ), // Trailing comma
-    "crate_grey", "crate_green"
+    "rustc_crate_grey", "rustc_crate_green"
 }
 
 #[plugin_registrar]
diff --git a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs
index d698af50579..64fdd7f9a95 100644
--- a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs
@@ -37,13 +37,13 @@ pub fn plugin_registrar(reg: &mut Registry) {
     reg.register_macro("make_a_1", expand_make_a_1);
     reg.register_macro("identity", expand_identity);
     reg.register_syntax_extension(
-        Symbol::intern("into_multi_foo"),
+        Symbol::intern("rustc_into_multi_foo"),
         MultiModifier(Box::new(expand_into_foo_multi)));
     reg.register_syntax_extension(
-        Symbol::intern("duplicate"),
+        Symbol::intern("rustc_duplicate"),
         MultiDecorator(Box::new(expand_duplicate)));
     reg.register_syntax_extension(
-        Symbol::intern("caller"),
+        Symbol::intern("rustc_caller"),
         MultiDecorator(Box::new(expand_caller)));
 }
 
diff --git a/src/test/run-pass-fulldeps/derive-totalsum-attr.rs b/src/test/run-pass-fulldeps/derive-totalsum-attr.rs
index ef5198b9ae0..e088f5e4262 100644
--- a/src/test/run-pass-fulldeps/derive-totalsum-attr.rs
+++ b/src/test/run-pass-fulldeps/derive-totalsum-attr.rs
@@ -11,7 +11,7 @@
 // aux-build:custom_derive_plugin_attr.rs
 // ignore-stage1
 
-#![feature(plugin, custom_derive, custom_attribute)]
+#![feature(plugin, custom_derive, rustc_attrs)]
 #![plugin(custom_derive_plugin_attr)]
 
 trait TotalSum {
@@ -32,7 +32,7 @@ impl TotalSum for Seven {
     }
 }
 
-#[derive(TotalSum)]
+#[rustc_derive_TotalSum]
 struct Foo {
     seven: Seven,
     bar: Bar,
@@ -41,7 +41,7 @@ struct Foo {
     nan: NaN,
 }
 
-#[derive(TotalSum)]
+#[rustc_derive_TotalSum]
 struct Bar {
     quux: isize,
     bleh: isize,
diff --git a/src/test/run-pass-fulldeps/issue-15778-pass.rs b/src/test/run-pass-fulldeps/issue-15778-pass.rs
index 25800d40e71..6fcf0a0450c 100644
--- a/src/test/run-pass-fulldeps/issue-15778-pass.rs
+++ b/src/test/run-pass-fulldeps/issue-15778-pass.rs
@@ -12,12 +12,12 @@
 // ignore-stage1
 // compile-flags: -D crate-not-okay
 
-#![feature(plugin, custom_attribute)]
+#![feature(plugin, rustc_attrs)]
 #![plugin(lint_for_crate)]
-#![crate_okay]
-#![crate_blue]
-#![crate_red]
-#![crate_grey]
-#![crate_green]
+#![rustc_crate_okay]
+#![rustc_crate_blue]
+#![rustc_crate_red]
+#![rustc_crate_grey]
+#![rustc_crate_green]
 
 pub fn main() { }
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 6dc651bb653..ce552d3ab7d 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
@@ -11,7 +11,7 @@
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
-#![feature(plugin, custom_attribute, attr_literals)]
+#![feature(plugin, rustc_attrs, attr_literals)]
 #![plugin(macro_crate_test)]
 
 #[macro_use]
@@ -30,16 +30,16 @@ extern crate macro_crate_test;
 // This results in a function named `simple` that calls `f(1, "hello", 3.14)`.
 // As a result, the expression `simple()` evaluates to `(1, "helllo", 3.14)`.
 
-#[caller(simple, 1, "hello", 3.14)]
-#[caller(simple1, 2, "bye", 6.28)]
-#[caller(simple2, 3, "hi", 1.01)]
+#[rustc_caller(simple, 1, "hello", 3.14)]
+#[rustc_caller(simple1, 2, "bye", 6.28)]
+#[rustc_caller(simple2, 3, "hi", 1.01)]
 fn f(num: isize, string: &'static str, float: f32) -> (isize, &'static str, f32) {
     (num, string, float)
 }
 
-#[caller(complex, true, 10)]
-#[caller(complex1, false, 15)]
-#[caller(complex2, true, 20)]
+#[rustc_caller(complex, true, 10)]
+#[rustc_caller(complex1, false, 15)]
+#[rustc_caller(complex2, true, 20)]
 fn g(emit: bool, num: i32) -> Option<i32> {
     match emit {
         true => Some(num),
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 3c215b6ca48..9245e85edd6 100644
--- a/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
+++ b/src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
@@ -11,7 +11,7 @@
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
-#![feature(plugin, custom_attribute)]
+#![feature(plugin, rustc_attrs)]
 #![plugin(macro_crate_test)]
 
 #[macro_use]
@@ -20,27 +20,27 @@ extern crate macro_crate_test;
 
 // The duplicate macro will create a copy of the item with the given identifier.
 
-#[duplicate(MyCopy)]
+#[rustc_duplicate(MyCopy)]
 struct MyStruct {
     number: i32
 }
 
 trait TestTrait {
-    #[duplicate(TestType2)]
+    #[rustc_duplicate(TestType2)]
     type TestType;
 
-    #[duplicate(required_fn2)]
+    #[rustc_duplicate(required_fn2)]
     fn required_fn(&self);
 
-    #[duplicate(provided_fn2)]
+    #[rustc_duplicate(provided_fn2)]
     fn provided_fn(&self) { }
 }
 
 impl TestTrait for MyStruct {
-    #[duplicate(TestType2)]
+    #[rustc_duplicate(TestType2)]
     type TestType = f64;
 
-    #[duplicate(required_fn2)]
+    #[rustc_duplicate(required_fn2)]
     fn required_fn(&self) { }
 }
 
diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs
index 9b2e36c8cea..06f78b10e5e 100644
--- a/src/test/run-pass-fulldeps/macro-crate.rs
+++ b/src/test/run-pass-fulldeps/macro-crate.rs
@@ -11,26 +11,26 @@
 // aux-build:macro_crate_test.rs
 // ignore-stage1
 
-#![feature(plugin, custom_attribute)]
+#![feature(plugin, rustc_attrs)]
 #![plugin(macro_crate_test)]
 
 #[macro_use] #[no_link]
 extern crate macro_crate_test;
 
 #[derive(PartialEq, Clone, Debug)]
-#[into_multi_foo]
+#[rustc_into_multi_foo]
 fn foo() -> AnotherFakeTypeThatHadBetterGoAway {}
 
 // Check that the `#[into_multi_foo]`-generated `foo2` is configured away
 fn foo2() {}
 
 trait Qux {
-    #[into_multi_foo]
+    #[rustc_into_multi_foo]
     fn bar();
 }
 
 impl Qux for i32 {
-    #[into_multi_foo]
+    #[rustc_into_multi_foo]
     fn bar() {}
 }
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-args.rs b/src/test/run-pass-fulldeps/proc-macro/attr-args.rs
index bf7ac507ea5..26522396d6b 100644
--- a/src/test/run-pass-fulldeps/proc-macro/attr-args.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/attr-args.rs
@@ -12,14 +12,13 @@
 // ignore-stage1
 
 #![allow(warnings)]
-#![feature(proc_macro, proc_macro_path_invoc)]
+#![feature(use_extern_macros)]
 
 extern crate attr_args;
-use attr_args::attr_with_args;
+use attr_args::{attr_with_args, identity};
 
 #[attr_with_args(text = "Hello, world!")]
 fn foo() {}
 
-#[::attr_args::identity(
-  fn main() { assert_eq!(foo(), "Hello, world!"); })]
+#[identity(fn main() { assert_eq!(foo(), "Hello, world!"); })]
 struct Dummy;
diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-cfg.rs b/src/test/run-pass-fulldeps/proc-macro/attr-cfg.rs
index 5a28d756df5..4ee30b8252b 100644
--- a/src/test/run-pass-fulldeps/proc-macro/attr-cfg.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/attr-cfg.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // revisions: foo bar
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate attr_cfg;
 use attr_cfg::attr_cfg;
diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-on-trait.rs b/src/test/run-pass-fulldeps/proc-macro/attr-on-trait.rs
index 95e4f2211c6..256096f118a 100644
--- a/src/test/run-pass-fulldeps/proc-macro/attr-on-trait.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/attr-on-trait.rs
@@ -11,12 +11,14 @@
 // aux-build:attr-on-trait.rs
 // ignore-stage1
 
-#![feature(proc_macro, proc_macro_path_invoc)]
+#![feature(use_extern_macros)]
 
 extern crate attr_on_trait;
 
+use attr_on_trait::foo;
+
 trait Foo {
-    #[attr_on_trait::foo]
+    #[foo]
     fn foo() {}
 }
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
index d928f8e5573..021b10e033f 100644
--- a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
@@ -11,7 +11,7 @@
 // aux-build:attr-stmt-expr.rs
 // ignore-stage1
 
-#![feature(proc_macro, stmt_expr_attributes, proc_macro_stmt, proc_macro_expr)]
+#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_stmt, proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr,
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs
index 5f12cc96e9f..655bfa3ff63 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-cfg.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-cfg.rs
index 9145c46cfc7..f9037aa8bf9 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-cfg.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-cfg.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-on-trait.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-on-trait.rs
index 8e977034027..5e5c775b1ff 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-on-trait.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-on-trait.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
index 972368b7b53..4d5e22b4eb6 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-stmt-expr.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/bang-macro.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/bang-macro.rs
index 122a47aff71..8b7c6cd10b8 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/bang-macro.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/bang-macro.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/call-site.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/call-site.rs
index ab4e082ed74..65eb8f4bec2 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/call-site.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/call-site.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 use proc_macro::*;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
index 55c4c32a94d..c6bcc37ac4a 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(proc_macro_non_items, proc_macro_quote, use_extern_macros)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/gen-lifetime-token.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/gen-lifetime-token.rs
index e288050a928..978de27b70a 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/gen-lifetime-token.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/gen-lifetime-token.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
index b8562ffc344..8f95bdd9c39 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(use_extern_macros, proc_macro_quote, proc_macro_non_items)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro as proc_macro_renamed; // This does not break `quote!`
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs
index 63b4a6a1c62..56c163b8ce3 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs
@@ -7,6 +7,7 @@
 // <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.
+
 #![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
 #![feature(macro_vis_matcher)]
 #![feature(macro_at_most_once_rep)]
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-42708.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-42708.rs
index 58b4b2a5293..906caceb869 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-42708.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-42708.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-50061.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-50061.rs
index b3cd3758e65..6de17522fc9 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-50061.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-50061.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 use proc_macro::TokenStream;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/lifetimes.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/lifetimes.rs
index f31f57b442a..0ee26b6a1b9 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/lifetimes.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/lifetimes.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/modify-ast.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/modify-ast.rs
index c37682220da..498c6811d9c 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/modify-ast.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/modify-ast.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/negative-token.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/negative-token.rs
index e76e4d585f4..fd639696991 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/negative-token.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/negative-token.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/not-joint.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/not-joint.rs
index a640fabe04f..e00a4d89e8d 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/not-joint.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/not-joint.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/span-api-tests.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/span-api-tests.rs
index 6ab9d6d0b8a..8e2c5c0a088 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/span-api-tests.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/span-api-tests.rs
@@ -12,7 +12,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
+#![feature(proc_macro_span)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/test-macros.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/test-macros.rs
index d1c5b9050aa..581c7cb15a5 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/test-macros.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/test-macros.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
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 f0d48972894..505994f66e7 100644
--- a/src/test/run-pass-fulldeps/proc-macro/call-site.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/call-site.rs
@@ -11,7 +11,7 @@
 // aux-build:call-site.rs
 // ignore-stage1
 
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(proc_macro_non_items, use_extern_macros)]
 
 extern crate call_site;
 use call_site::*;
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-b.rs b/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
index d4176c0efbf..35d5084d9f6 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
@@ -11,7 +11,7 @@
 // aux-build:derive-b.rs
 // ignore-stage1
 
-#![feature(proc_macro, proc_macro_path_invoc)]
+#![feature(use_extern_macros, proc_macro_path_invoc)]
 
 extern crate derive_b;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/gen-lifetime-token.rs b/src/test/run-pass-fulldeps/proc-macro/gen-lifetime-token.rs
index 539e3aa8ecb..c8a9bea3631 100644
--- a/src/test/run-pass-fulldeps/proc-macro/gen-lifetime-token.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/gen-lifetime-token.rs
@@ -10,7 +10,7 @@
 
 // aux-build:gen-lifetime-token.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate gen_lifetime_token as bar;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/issue-42708.rs b/src/test/run-pass-fulldeps/proc-macro/issue-42708.rs
index a6b7d93c279..df4a1d8994b 100644
--- a/src/test/run-pass-fulldeps/proc-macro/issue-42708.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/issue-42708.rs
@@ -11,7 +11,7 @@
 // aux-build:issue-42708.rs
 // ignore-stage1
 
-#![feature(decl_macro, proc_macro, proc_macro_path_invoc)]
+#![feature(decl_macro, use_extern_macros, proc_macro_path_invoc)]
 #![allow(unused)]
 
 extern crate issue_42708;
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 03f69c09277..15dff94c88c 100644
--- a/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
@@ -11,7 +11,7 @@
 // aux-build:issue-50061.rs
 // ignore-stage1
 
-#![feature(proc_macro, proc_macro_path_invoc, decl_macro)]
+#![feature(use_extern_macros, proc_macro_path_invoc, decl_macro)]
 
 extern crate issue_50061;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs b/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
index 0bcb23cc8bb..cfe0ce19a46 100644
--- a/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
@@ -11,7 +11,7 @@
 // aux-build:lifetimes.rs
 // ignore-stage1
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate lifetimes;
 use lifetimes::*;
diff --git a/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs b/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
index 59b9b0baa8a..e5f8c844b6b 100644
--- a/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // ignore-wasm32
 
-#![feature(proc_macro, macros_in_extern)]
+#![feature(use_extern_macros, macros_in_extern)]
 
 extern crate test_macros;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/modify-ast.rs b/src/test/run-pass-fulldeps/proc-macro/modify-ast.rs
index 13a6dbd2ae5..0b584fdd44d 100644
--- a/src/test/run-pass-fulldeps/proc-macro/modify-ast.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/modify-ast.rs
@@ -10,7 +10,7 @@
 
 // aux-build:modify-ast.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate modify_ast;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/not-joint.rs b/src/test/run-pass-fulldeps/proc-macro/not-joint.rs
index 34dfae9f158..8a59d57a938 100644
--- a/src/test/run-pass-fulldeps/proc-macro/not-joint.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/not-joint.rs
@@ -10,7 +10,7 @@
 
 // aux-build:not-joint.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate not_joint as bar;
 use bar::{tokens, nothing};
diff --git a/src/test/run-pass-fulldeps/proc_macro.rs b/src/test/run-pass-fulldeps/proc_macro.rs
index aad94c89f2a..46b62d7e34a 100644
--- a/src/test/run-pass-fulldeps/proc_macro.rs
+++ b/src/test/run-pass-fulldeps/proc_macro.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // ignore-cross-compile
 
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(use_extern_macros, proc_macro_non_items)]
 
 extern crate proc_macro_def;
 
diff --git a/src/test/ui-fulldeps/auxiliary/invalid-punct-ident.rs b/src/test/ui-fulldeps/auxiliary/invalid-punct-ident.rs
index 6bdfe5f86aa..cc899fa610d 100644
--- a/src/test/ui-fulldeps/auxiliary/invalid-punct-ident.rs
+++ b/src/test/ui-fulldeps/auxiliary/invalid-punct-ident.rs
@@ -11,8 +11,8 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
+#![feature(proc_macro_raw_ident)]
 
 extern crate proc_macro;
 use proc_macro::*;
diff --git a/src/test/ui-fulldeps/lifetimes.rs b/src/test/ui-fulldeps/lifetimes.rs
index 6e88143d637..3200e8fb2b1 100644
--- a/src/test/ui-fulldeps/lifetimes.rs
+++ b/src/test/ui-fulldeps/lifetimes.rs
@@ -10,7 +10,7 @@
 
 // aux-build:lifetimes.rs
 
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(use_extern_macros, proc_macro_non_items)]
 
 extern crate lifetimes;
 
diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/macro-brackets.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/macro-brackets.rs
index ab1cfe1dbd6..be1777f3ebd 100644
--- a/src/test/ui-fulldeps/proc-macro/auxiliary/macro-brackets.rs
+++ b/src/test/ui-fulldeps/proc-macro/auxiliary/macro-brackets.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 use proc_macro::*;
diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/parent-source-spans.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/parent-source-spans.rs
index ed11b2db2f5..f5590405e61 100644
--- a/src/test/ui-fulldeps/proc-macro/auxiliary/parent-source-spans.rs
+++ b/src/test/ui-fulldeps/proc-macro/auxiliary/parent-source-spans.rs
@@ -9,7 +9,8 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
+#![feature(proc_macro_diagnostic, proc_macro_span)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs
index 5b8fcab0baa..70151278947 100644
--- a/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs
+++ b/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs
@@ -9,8 +9,9 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
+#![feature(proc_macro_diagnostic, proc_macro_span)]
 
 extern crate proc_macro;
 
diff --git a/src/test/ui-fulldeps/proc-macro/generate-mod.rs b/src/test/ui-fulldeps/proc-macro/generate-mod.rs
index ff64421047f..168df906ad6 100644
--- a/src/test/ui-fulldeps/proc-macro/generate-mod.rs
+++ b/src/test/ui-fulldeps/proc-macro/generate-mod.rs
@@ -12,7 +12,7 @@
 
 // aux-build:generate-mod.rs
 
-#![feature(proc_macro, proc_macro_gen, proc_macro_path_invoc)]
+#![feature(use_extern_macros, proc_macro_gen, proc_macro_path_invoc)]
 
 extern crate generate_mod;
 
diff --git a/src/test/ui-fulldeps/proc-macro/macro-brackets.rs b/src/test/ui-fulldeps/proc-macro/macro-brackets.rs
index cb734e2d10b..1c16faa9986 100644
--- a/src/test/ui-fulldeps/proc-macro/macro-brackets.rs
+++ b/src/test/ui-fulldeps/proc-macro/macro-brackets.rs
@@ -10,7 +10,7 @@
 
 // aux-build:macro-brackets.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 extern crate macro_brackets as bar;
 use bar::doit;
diff --git a/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved-2.rs b/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved-2.rs
index 89d5f22da91..9cfd486606a 100644
--- a/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved-2.rs
+++ b/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved-2.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/resolve-error.rs b/src/test/ui-fulldeps/resolve-error.rs
index 9cc825fcddd..df9b263534f 100644
--- a/src/test/ui-fulldeps/resolve-error.rs
+++ b/src/test/ui-fulldeps/resolve-error.rs
@@ -13,7 +13,7 @@
 // aux-build:attr_proc_macro.rs
 // aux-build:bang_proc_macro.rs
 
-#![feature(proc_macro)]
+#![feature(use_extern_macros)]
 
 #[macro_use]
 extern crate derive_foo;
diff --git a/src/test/compile-fail/issue-10176.rs b/src/test/ui/issue-10176.rs
index c968844ae21..c968844ae21 100644
--- a/src/test/compile-fail/issue-10176.rs
+++ b/src/test/ui/issue-10176.rs
diff --git a/src/test/ui/issue-10176.stderr b/src/test/ui/issue-10176.stderr
new file mode 100644
index 00000000000..02e0b899b3f
--- /dev/null
+++ b/src/test/ui/issue-10176.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-10176.rs:12:5
+   |
+LL | fn f() -> isize {
+   |           ----- expected `isize` because of return type
+LL |     (return 1, return 2)
+   |     ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
+   |
+   = note: expected type `isize`
+              found type `(!, !)`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-10200.rs b/src/test/ui/issue-10200.rs
index 8c58ef6261e..8c58ef6261e 100644
--- a/src/test/compile-fail/issue-10200.rs
+++ b/src/test/ui/issue-10200.rs
diff --git a/src/test/ui/issue-10200.stderr b/src/test/ui/issue-10200.stderr
new file mode 100644
index 00000000000..4eb07827628
--- /dev/null
+++ b/src/test/ui/issue-10200.stderr
@@ -0,0 +1,9 @@
+error[E0532]: expected tuple struct/variant, found function `foo`
+  --> $DIR/issue-10200.rs:16:9
+   |
+LL |         foo(x) //~ ERROR expected tuple struct/variant, found function `foo`
+   |         ^^^ did you mean `Foo`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/ui/issue-10291.nll.stderr b/src/test/ui/issue-10291.nll.stderr
new file mode 100644
index 00000000000..1358fe010b4
--- /dev/null
+++ b/src/test/ui/issue-10291.nll.stderr
@@ -0,0 +1,14 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-10291.rs:13:9
+   |
+LL |         x //~ ERROR E0312
+   |         ^
+
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-10291.rs:12:5
+   |
+LL |     drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ free region requires that `'x` must outlive `'static`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-10291.rs b/src/test/ui/issue-10291.rs
index d4e7dc7e9a3..d4e7dc7e9a3 100644
--- a/src/test/compile-fail/issue-10291.rs
+++ b/src/test/ui/issue-10291.rs
diff --git a/src/test/ui/issue-10291.stderr b/src/test/ui/issue-10291.stderr
new file mode 100644
index 00000000000..af5929782f6
--- /dev/null
+++ b/src/test/ui/issue-10291.stderr
@@ -0,0 +1,23 @@
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/issue-10291.rs:13:9
+   |
+LL |         x //~ ERROR E0312
+   |         ^
+   |
+note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 12:65...
+  --> $DIR/issue-10291.rs:12:65
+   |
+LL |       drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+   |  _________________________________________________________________^
+LL | |         x //~ ERROR E0312
+LL | |     }));
+   | |_____^
+note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 11:9
+  --> $DIR/issue-10291.rs:11:9
+   |
+LL | fn test<'x>(x: &'x isize) {
+   |         ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0312`.
diff --git a/src/test/ui/issue-10398.nll.stderr b/src/test/ui/issue-10398.nll.stderr
new file mode 100644
index 00000000000..d13e843b94b
--- /dev/null
+++ b/src/test/ui/issue-10398.nll.stderr
@@ -0,0 +1,13 @@
+error[E0382]: use of moved value: `x`
+  --> $DIR/issue-10398.rs:17:14
+   |
+LL |         let _a = x;
+   |                  - value moved here
+LL |         drop(x);
+   |              ^ value used here after move
+   |
+   = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-10398.rs b/src/test/ui/issue-10398.rs
index 08e8effc626..08e8effc626 100644
--- a/src/test/compile-fail/issue-10398.rs
+++ b/src/test/ui/issue-10398.rs
diff --git a/src/test/ui/issue-10398.stderr b/src/test/ui/issue-10398.stderr
new file mode 100644
index 00000000000..e3b816df3f4
--- /dev/null
+++ b/src/test/ui/issue-10398.stderr
@@ -0,0 +1,13 @@
+error[E0382]: use of moved value: `x`
+  --> $DIR/issue-10398.rs:17:14
+   |
+LL |         let _a = x;
+   |             -- value moved here
+LL |         drop(x);
+   |              ^ value used here after move
+   |
+   = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-10401.rs b/src/test/ui/issue-10401.rs
index e36193aee25..e36193aee25 100644
--- a/src/test/compile-fail/issue-10401.rs
+++ b/src/test/ui/issue-10401.rs
diff --git a/src/test/ui/issue-10401.stderr b/src/test/ui/issue-10401.stderr
new file mode 100644
index 00000000000..8c91c11a67c
--- /dev/null
+++ b/src/test/ui/issue-10401.stderr
@@ -0,0 +1,16 @@
+error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
+  --> $DIR/issue-10401.rs:13:5
+   |
+LL |     a += { "b" };
+   |     -^^^^^^^^^^^
+   |     |
+   |     cannot use `+=` on type `&str`
+   |     `+` can't be used to concatenate two `&str` strings
+help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
+   |
+LL |     a.to_owned() += { "b" };
+   |     ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0368`.
diff --git a/src/test/compile-fail/issue-10412.rs b/src/test/ui/issue-10412.rs
index ee553730a35..ee553730a35 100644
--- a/src/test/compile-fail/issue-10412.rs
+++ b/src/test/ui/issue-10412.rs
diff --git a/src/test/ui/issue-10412.stderr b/src/test/ui/issue-10412.stderr
new file mode 100644
index 00000000000..7f2f2dbf509
--- /dev/null
+++ b/src/test/ui/issue-10412.stderr
@@ -0,0 +1,51 @@
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:11:20
+   |
+LL | trait Serializable<'self, T> { //~ ERROR lifetimes cannot use keyword names
+   |                    ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:12:25
+   |
+LL |     fn serialize(val : &'self T) -> Vec<u8>; //~ ERROR lifetimes cannot use keyword names
+   |                         ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:13:38
+   |
+LL |     fn deserialize(repr : &[u8]) -> &'self T; //~ ERROR lifetimes cannot use keyword names
+   |                                      ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:16:6
+   |
+LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names
+   |      ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:16:36
+   |
+LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names
+   |                                    ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:19:25
+   |
+LL |     fn serialize(val : &'self str) -> Vec<u8> { //~ ERROR lifetimes cannot use keyword names
+   |                         ^^^^^
+
+error: lifetimes cannot use keyword names
+  --> $DIR/issue-10412.rs:22:37
+   |
+LL |     fn deserialize(repr: &[u8]) -> &'self str { //~ ERROR lifetimes cannot use keyword names
+   |                                     ^^^^^
+
+error[E0106]: missing lifetime specifier
+  --> $DIR/issue-10412.rs:16:13
+   |
+LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names
+   |             ^^^^^^^^^^^^^^^^^ expected lifetime parameter
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/compile-fail/issue-10465.rs b/src/test/ui/issue-10465.rs
index ed91e935407..ed91e935407 100644
--- a/src/test/compile-fail/issue-10465.rs
+++ b/src/test/ui/issue-10465.rs
diff --git a/src/test/ui/issue-10465.stderr b/src/test/ui/issue-10465.stderr
new file mode 100644
index 00000000000..add4b832e83
--- /dev/null
+++ b/src/test/ui/issue-10465.stderr
@@ -0,0 +1,13 @@
+error[E0599]: no method named `foo` found for type `&b::B` in the current scope
+  --> $DIR/issue-10465.rs:27:15
+   |
+LL |             b.foo(); //~ ERROR: no method named `foo` found
+   |               ^^^
+   |
+   = help: items from traits can only be used if the trait is in scope
+   = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
+           `use a::A;`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-10536.rs b/src/test/ui/issue-10536.rs
index 3b0ea55cfa9..2b71fb5c67f 100644
--- a/src/test/compile-fail/issue-10536.rs
+++ b/src/test/ui/issue-10536.rs
@@ -24,8 +24,10 @@ pub fn main() {
     foo!();
 
     assert!({one! two()});
+    //~^ ERROR macros that expand to items must either be surrounded with braces or followed by a
 
     // regardless of whether nested macro_rules works, the following should at
     // least throw a conventional error.
     assert!({one! two});
+    //~^ ERROR expected
 }
diff --git a/src/test/ui/issue-10536.stderr b/src/test/ui/issue-10536.stderr
new file mode 100644
index 00000000000..ba404d0dd3f
--- /dev/null
+++ b/src/test/ui/issue-10536.stderr
@@ -0,0 +1,14 @@
+error: macros that expand to items must either be surrounded with braces or followed by a semicolon
+  --> $DIR/issue-10536.rs:26:22
+   |
+LL |     assert!({one! two()});
+   |                      ^^
+
+error: expected `(` or `{`, found `}`
+  --> $DIR/issue-10536.rs:31:22
+   |
+LL |     assert!({one! two});
+   |                      ^ expected `(` or `{`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-10545.rs b/src/test/ui/issue-10545.rs
index 708eea39a95..708eea39a95 100644
--- a/src/test/compile-fail/issue-10545.rs
+++ b/src/test/ui/issue-10545.rs
diff --git a/src/test/ui/issue-10545.stderr b/src/test/ui/issue-10545.stderr
new file mode 100644
index 00000000000..28f95dff3bc
--- /dev/null
+++ b/src/test/ui/issue-10545.stderr
@@ -0,0 +1,9 @@
+error[E0603]: struct `S` is private
+  --> $DIR/issue-10545.rs:17:11
+   |
+LL | fn foo(_: a::S) { //~ ERROR: struct `S` is private
+   |           ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/src/test/compile-fail/issue-10656.rs b/src/test/ui/issue-10656.rs
index 0b335a526a4..7fd5a0d1348 100644
--- a/src/test/compile-fail/issue-10656.rs
+++ b/src/test/ui/issue-10656.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: missing documentation for crate
-
 #![deny(missing_docs)]
 #![crate_type="lib"]
+//~^^ ERROR missing documentation for crate
diff --git a/src/test/ui/issue-10656.stderr b/src/test/ui/issue-10656.stderr
new file mode 100644
index 00000000000..d67463f0263
--- /dev/null
+++ b/src/test/ui/issue-10656.stderr
@@ -0,0 +1,15 @@
+error: missing documentation for crate
+  --> $DIR/issue-10656.rs:11:1
+   |
+LL | / #![deny(missing_docs)]
+LL | | #![crate_type="lib"]
+   | |____________________^
+   |
+note: lint level defined here
+  --> $DIR/issue-10656.rs:11:9
+   |
+LL | #![deny(missing_docs)]
+   |         ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-10764.rs b/src/test/ui/issue-10764.rs
index cd4ec495556..cd4ec495556 100644
--- a/src/test/compile-fail/issue-10764.rs
+++ b/src/test/ui/issue-10764.rs
diff --git a/src/test/ui/issue-10764.stderr b/src/test/ui/issue-10764.stderr
new file mode 100644
index 00000000000..6aacbef0897
--- /dev/null
+++ b/src/test/ui/issue-10764.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-10764.rs:14:15
+   |
+LL | fn main() { f(bar) }
+   |               ^^^ expected "Rust" fn, found "C" fn
+   |
+   = note: expected type `fn()`
+              found type `extern "C" fn() {bar}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-10877.rs b/src/test/ui/issue-10877.rs
index 39f25b837cd..39f25b837cd 100644
--- a/src/test/compile-fail/issue-10877.rs
+++ b/src/test/ui/issue-10877.rs
diff --git a/src/test/ui/issue-10877.stderr b/src/test/ui/issue-10877.stderr
new file mode 100644
index 00000000000..6db0bf6dc65
--- /dev/null
+++ b/src/test/ui/issue-10877.stderr
@@ -0,0 +1,27 @@
+error[E0130]: patterns aren't allowed in foreign function declarations
+  --> $DIR/issue-10877.rs:13:12
+   |
+LL |     fn foo(1: ());
+   |            ^ pattern not allowed in foreign function
+
+error[E0130]: patterns aren't allowed in foreign function declarations
+  --> $DIR/issue-10877.rs:15:12
+   |
+LL |     fn bar((): isize);
+   |            ^^ pattern not allowed in foreign function
+
+error[E0130]: patterns aren't allowed in foreign function declarations
+  --> $DIR/issue-10877.rs:17:12
+   |
+LL |     fn baz(Foo { x }: isize);
+   |            ^^^^^^^^^ pattern not allowed in foreign function
+
+error[E0130]: patterns aren't allowed in foreign function declarations
+  --> $DIR/issue-10877.rs:19:12
+   |
+LL |     fn qux((x,y): ());
+   |            ^^^^^ pattern not allowed in foreign function
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0130`.
diff --git a/src/test/compile-fail/issue-10991.rs b/src/test/ui/issue-10991.rs
index 2d00f339f33..2d00f339f33 100644
--- a/src/test/compile-fail/issue-10991.rs
+++ b/src/test/ui/issue-10991.rs
diff --git a/src/test/ui/issue-10991.stderr b/src/test/ui/issue-10991.stderr
new file mode 100644
index 00000000000..3ae3bbe06cb
--- /dev/null
+++ b/src/test/ui/issue-10991.stderr
@@ -0,0 +1,11 @@
+error[E0605]: non-primitive cast: `()` as `usize`
+  --> $DIR/issue-10991.rs:13:14
+   |
+LL |     let _t = nil as usize; //~ ERROR: non-primitive cast: `()` as `usize`
+   |              ^^^^^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0605`.
diff --git a/src/test/compile-fail/issue-11154.rs b/src/test/ui/issue-11154.rs
index 1ff68123374..1ff68123374 100644
--- a/src/test/compile-fail/issue-11154.rs
+++ b/src/test/ui/issue-11154.rs
diff --git a/src/test/ui/issue-11154.stderr b/src/test/ui/issue-11154.stderr
new file mode 100644
index 00000000000..8eec8b37c85
--- /dev/null
+++ b/src/test/ui/issue-11154.stderr
@@ -0,0 +1,6 @@
+error: cannot prefer dynamic linking when performing LTO
+
+note: only 'staticlib', 'bin', and 'cdylib' outputs are supported with LTO
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-11192.nll.stderr b/src/test/ui/issue-11192.nll.stderr
new file mode 100644
index 00000000000..d5a67083a23
--- /dev/null
+++ b/src/test/ui/issue-11192.nll.stderr
@@ -0,0 +1,18 @@
+error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable
+  --> $DIR/issue-11192.rs:30:10
+   |
+LL |     let mut test = |foo: &Foo| {
+   |                    ----------- mutable borrow occurs here
+LL |         println!("access {}", foo.x);
+LL |         ptr = box Foo { x: ptr.x + 1 };
+   |         --- previous borrow occurs due to use of `ptr` in closure
+...
+LL |     test(&*ptr);
+   |     -----^^^^^-
+   |     |    |
+   |     |    immutable borrow occurs here
+   |     borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/compile-fail/issue-11192.rs b/src/test/ui/issue-11192.rs
index 7d8a1528aba..7d8a1528aba 100644
--- a/src/test/compile-fail/issue-11192.rs
+++ b/src/test/ui/issue-11192.rs
diff --git a/src/test/ui/issue-11192.stderr b/src/test/ui/issue-11192.stderr
new file mode 100644
index 00000000000..e9853ac0ca8
--- /dev/null
+++ b/src/test/ui/issue-11192.stderr
@@ -0,0 +1,18 @@
+error[E0502]: cannot borrow `*ptr` as immutable because `ptr` is also borrowed as mutable
+  --> $DIR/issue-11192.rs:30:11
+   |
+LL |     let mut test = |foo: &Foo| {
+   |                    ----------- mutable borrow occurs here
+LL |         println!("access {}", foo.x);
+LL |         ptr = box Foo { x: ptr.x + 1 };
+   |         --- previous borrow occurs due to use of `ptr` in closure
+...
+LL |     test(&*ptr);
+   |           ^^^^ immutable borrow occurs here
+LL |     //~^ ERROR: cannot borrow `*ptr` as immutable
+LL | }
+   | - mutable borrow ends here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/compile-fail/issue-11374.rs b/src/test/ui/issue-11374.rs
index 1e444a6bebf..1e444a6bebf 100644
--- a/src/test/compile-fail/issue-11374.rs
+++ b/src/test/ui/issue-11374.rs
diff --git a/src/test/ui/issue-11374.stderr b/src/test/ui/issue-11374.stderr
new file mode 100644
index 00000000000..3465069129b
--- /dev/null
+++ b/src/test/ui/issue-11374.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-11374.rs:36:15
+   |
+LL |     c.read_to(v); //~ ERROR E0308
+   |               ^
+   |               |
+   |               expected &mut [u8], found struct `std::vec::Vec`
+   |               help: consider mutably borrowing here: `&mut v`
+   |
+   = note: expected type `&mut [u8]`
+              found type `std::vec::Vec<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-11493.ast.stderr b/src/test/ui/issue-11493.ast.stderr
new file mode 100644
index 00000000000..99b996387e7
--- /dev/null
+++ b/src/test/ui/issue-11493.ast.stderr
@@ -0,0 +1,16 @@
+error[E0597]: borrowed value does not live long enough (Ast)
+  --> $DIR/issue-11493.rs:20:35
+   |
+LL |     let y = x.as_ref().unwrap_or(&id(5));
+   |                                   ^^^^^ - temporary value dropped here while still borrowed
+   |                                   |
+   |                                   temporary value does not live long enough
+...
+LL | }
+   | - temporary value needs to live until here
+   |
+   = note: consider using a `let` binding to increase its lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-11493.mir.stderr b/src/test/ui/issue-11493.mir.stderr
new file mode 100644
index 00000000000..99b996387e7
--- /dev/null
+++ b/src/test/ui/issue-11493.mir.stderr
@@ -0,0 +1,16 @@
+error[E0597]: borrowed value does not live long enough (Ast)
+  --> $DIR/issue-11493.rs:20:35
+   |
+LL |     let y = x.as_ref().unwrap_or(&id(5));
+   |                                   ^^^^^ - temporary value dropped here while still borrowed
+   |                                   |
+   |                                   temporary value does not live long enough
+...
+LL | }
+   | - temporary value needs to live until here
+   |
+   = note: consider using a `let` binding to increase its lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-11493.rs b/src/test/ui/issue-11493.rs
index 3045c06ca4c..80ecc24543e 100644
--- a/src/test/compile-fail/issue-11493.rs
+++ b/src/test/ui/issue-11493.rs
@@ -9,10 +9,16 @@
 // except according to those terms.
 
 // This file must never have a trailing newline
+//
+// revisions: ast mir
+// compile-flags: -Z borrowck=compare
 
 fn id<T>(x: T) -> T { x }
 
 fn main() {
     let x = Some(3);
-    let y = x.as_ref().unwrap_or(&id(5)); //~ ERROR: borrowed value does not live long enough
+    let y = x.as_ref().unwrap_or(&id(5));
+    //[ast]~^ ERROR borrowed value does not live long enough (Ast)
+    //[mir]~^^ ERROR borrowed value does not live long enough (Ast)
+    // This actually passes in mir
 }
diff --git a/src/test/compile-fail/issue-11515.rs b/src/test/ui/issue-11515.rs
index 7afb8314ea6..7afb8314ea6 100644
--- a/src/test/compile-fail/issue-11515.rs
+++ b/src/test/ui/issue-11515.rs
diff --git a/src/test/ui/issue-11515.stderr b/src/test/ui/issue-11515.stderr
new file mode 100644
index 00000000000..25e2a45438e
--- /dev/null
+++ b/src/test/ui/issue-11515.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-11515.rs:19:33
+   |
+LL |     let test = box Test { func: closure }; //~ ERROR mismatched types
+   |                                 ^^^^^^^ expected trait `std::ops::FnMut`, found trait `std::ops::Fn`
+   |
+   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+              found type `std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-11681.rs b/src/test/ui/issue-11681.rs
index 71f1d5dcc9a..71f1d5dcc9a 100644
--- a/src/test/compile-fail/issue-11681.rs
+++ b/src/test/ui/issue-11681.rs
diff --git a/src/test/ui/issue-11681.stderr b/src/test/ui/issue-11681.stderr
new file mode 100644
index 00000000000..ef3d24c6657
--- /dev/null
+++ b/src/test/ui/issue-11681.stderr
@@ -0,0 +1,18 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-11681.rs:22:20
+   |
+LL |   let testValue = &Test; //~ ERROR borrowed value does not live long enough
+   |                    ^^^^ temporary value does not live long enough
+LL |   return testValue;
+LL | }
+   | - temporary value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 21:15...
+  --> $DIR/issue-11681.rs:21:15
+   |
+LL | fn createTest<'a>() -> &'a Test {
+   |               ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-11692-1.rs b/src/test/ui/issue-11692-1.rs
index f577aad04e6..f577aad04e6 100644
--- a/src/test/compile-fail/issue-11692-1.rs
+++ b/src/test/ui/issue-11692-1.rs
diff --git a/src/test/ui/issue-11692-1.stderr b/src/test/ui/issue-11692-1.stderr
new file mode 100644
index 00000000000..daf53af3ace
--- /dev/null
+++ b/src/test/ui/issue-11692-1.stderr
@@ -0,0 +1,8 @@
+error: format argument must be a string literal.
+  --> $DIR/issue-11692-1.rs:12:12
+   |
+LL |     print!(test!());
+   |            ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-11692-2.rs b/src/test/ui/issue-11692-2.rs
index acac2d151fe..acac2d151fe 100644
--- a/src/test/compile-fail/issue-11692-2.rs
+++ b/src/test/ui/issue-11692-2.rs
diff --git a/src/test/ui/issue-11692-2.stderr b/src/test/ui/issue-11692-2.stderr
new file mode 100644
index 00000000000..51d6041e922
--- /dev/null
+++ b/src/test/ui/issue-11692-2.stderr
@@ -0,0 +1,8 @@
+error: cannot find macro `test!` in this scope
+  --> $DIR/issue-11692-2.rs:12:13
+   |
+LL |     concat!(test!());
+   |             ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-11740.rs b/src/test/ui/issue-11740.rs
index 0bda06be9e8..0bda06be9e8 100644
--- a/src/test/compile-fail/issue-11740.rs
+++ b/src/test/ui/issue-11740.rs
diff --git a/src/test/ui/issue-11740.stderr b/src/test/ui/issue-11740.stderr
new file mode 100644
index 00000000000..a1913e0057c
--- /dev/null
+++ b/src/test/ui/issue-11740.stderr
@@ -0,0 +1,11 @@
+error: compilation successful
+  --> $DIR/issue-11740.rs:35:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let element = Element { attrs: Vec::new() };
+LL | |     let _ = unsafe { element.get_attr("foo") };
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-11771.rs b/src/test/ui/issue-11771.rs
index 69899105bc3..69899105bc3 100644
--- a/src/test/compile-fail/issue-11771.rs
+++ b/src/test/ui/issue-11771.rs
diff --git a/src/test/ui/issue-11771.stderr b/src/test/ui/issue-11771.stderr
new file mode 100644
index 00000000000..a31c4fa008d
--- /dev/null
+++ b/src/test/ui/issue-11771.stderr
@@ -0,0 +1,19 @@
+error[E0277]: cannot add `()` to `{integer}`
+  --> $DIR/issue-11771.rs:13:7
+   |
+LL |     1 +
+   |       ^ no implementation for `{integer} + ()`
+   |
+   = help: the trait `std::ops::Add<()>` is not implemented for `{integer}`
+
+error[E0277]: cannot add `()` to `{integer}`
+  --> $DIR/issue-11771.rs:18:7
+   |
+LL |     1 +
+   |       ^ no implementation for `{integer} + ()`
+   |
+   = help: the trait `std::ops::Add<()>` is not implemented for `{integer}`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-11844.rs b/src/test/ui/issue-11844.rs
index a6dbe954ec0..a6dbe954ec0 100644
--- a/src/test/compile-fail/issue-11844.rs
+++ b/src/test/ui/issue-11844.rs
diff --git a/src/test/ui/issue-11844.stderr b/src/test/ui/issue-11844.stderr
new file mode 100644
index 00000000000..d773e88d01c
--- /dev/null
+++ b/src/test/ui/issue-11844.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-11844.rs:16:9
+   |
+LL |         Ok(a) => //~ ERROR: mismatched types
+   |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
+   |
+   = note: expected type `std::option::Option<std::boxed::Box<{integer}>>`
+              found type `std::result::Result<_, _>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-11873.nll.stderr b/src/test/ui/issue-11873.nll.stderr
new file mode 100644
index 00000000000..c12cbbfdd53
--- /dev/null
+++ b/src/test/ui/issue-11873.nll.stderr
@@ -0,0 +1,14 @@
+error[E0505]: cannot move out of `v` because it is borrowed
+  --> $DIR/issue-11873.rs:14:14
+   |
+LL |     let mut f = || v.push(2);
+   |                 ------------ borrow of `v` occurs here
+LL |     let _w = v; //~ ERROR: cannot move out of `v`
+   |              ^ move out of `v` occurs here
+LL | 
+LL |     f();
+   |     - borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/src/test/compile-fail/issue-11873.rs b/src/test/ui/issue-11873.rs
index 4618851529a..4618851529a 100644
--- a/src/test/compile-fail/issue-11873.rs
+++ b/src/test/ui/issue-11873.rs
diff --git a/src/test/ui/issue-11873.stderr b/src/test/ui/issue-11873.stderr
new file mode 100644
index 00000000000..f4da011f572
--- /dev/null
+++ b/src/test/ui/issue-11873.stderr
@@ -0,0 +1,11 @@
+error[E0505]: cannot move out of `v` because it is borrowed
+  --> $DIR/issue-11873.rs:14:9
+   |
+LL |     let mut f = || v.push(2);
+   |                 -- borrow of `v` occurs here
+LL |     let _w = v; //~ ERROR: cannot move out of `v`
+   |         ^^ move out of `v` occurs here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/src/test/compile-fail/issue-12028.rs b/src/test/ui/issue-12028.rs
index 980385ce4cc..980385ce4cc 100644
--- a/src/test/compile-fail/issue-12028.rs
+++ b/src/test/ui/issue-12028.rs
diff --git a/src/test/ui/issue-12028.stderr b/src/test/ui/issue-12028.stderr
new file mode 100644
index 00000000000..f756e0a29d1
--- /dev/null
+++ b/src/test/ui/issue-12028.stderr
@@ -0,0 +1,9 @@
+error[E0284]: type annotations required: cannot resolve `<_ as StreamHasher>::S == <H as StreamHasher>::S`
+  --> $DIR/issue-12028.rs:39:14
+   |
+LL |         self.input_stream(&mut stream); //~ ERROR type annotations required
+   |              ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0284`.
diff --git a/src/test/ui/issue-12041.nll.stderr b/src/test/ui/issue-12041.nll.stderr
new file mode 100644
index 00000000000..b880317a2a6
--- /dev/null
+++ b/src/test/ui/issue-12041.nll.stderr
@@ -0,0 +1,11 @@
+error[E0382]: use of moved value: `tx`
+  --> $DIR/issue-12041.rs:18:22
+   |
+LL |             let tx = tx;
+   |                      ^^ value moved here in previous iteration of loop
+   |
+   = note: move occurs because `tx` has type `std::sync::mpsc::Sender<i32>`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-12041.rs b/src/test/ui/issue-12041.rs
index f0f4bf5ca71..f0f4bf5ca71 100644
--- a/src/test/compile-fail/issue-12041.rs
+++ b/src/test/ui/issue-12041.rs
diff --git a/src/test/ui/issue-12041.stderr b/src/test/ui/issue-12041.stderr
new file mode 100644
index 00000000000..6172d78b513
--- /dev/null
+++ b/src/test/ui/issue-12041.stderr
@@ -0,0 +1,11 @@
+error[E0382]: use of moved value: `tx`
+  --> $DIR/issue-12041.rs:18:17
+   |
+LL |             let tx = tx;
+   |                 ^^ value moved here in previous iteration of loop
+   |
+   = note: move occurs because `tx` has type `std::sync::mpsc::Sender<i32>`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-12116.rs b/src/test/ui/issue-12116.rs
index a8d2c552553..a8d2c552553 100644
--- a/src/test/compile-fail/issue-12116.rs
+++ b/src/test/ui/issue-12116.rs
diff --git a/src/test/ui/issue-12116.stderr b/src/test/ui/issue-12116.stderr
new file mode 100644
index 00000000000..3bf0984b256
--- /dev/null
+++ b/src/test/ui/issue-12116.stderr
@@ -0,0 +1,14 @@
+error: unreachable pattern
+  --> $DIR/issue-12116.rs:25:9
+   |
+LL |         &IntList::Cons(val, box IntList::Nil)  => IntList::Cons(val, box IntList::Nil),
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-12116.rs:15:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-12127.rs b/src/test/ui/issue-12127.rs
index 5565a9a5761..5565a9a5761 100644
--- a/src/test/compile-fail/issue-12127.rs
+++ b/src/test/ui/issue-12127.rs
diff --git a/src/test/ui/issue-12127.stderr b/src/test/ui/issue-12127.stderr
new file mode 100644
index 00000000000..afd483823a6
--- /dev/null
+++ b/src/test/ui/issue-12127.stderr
@@ -0,0 +1,13 @@
+error[E0382]: use of moved value: `f`
+  --> $DIR/issue-12127.rs:21:9
+   |
+LL |         f();
+   |         - value moved here
+LL |         f();
+   |         ^ value used here after move
+   |
+   = note: move occurs because `f` has type `[closure@$DIR/issue-12127.rs:18:24: 18:41 x:std::boxed::Box<isize>]`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-12369.rs b/src/test/ui/issue-12369.rs
index 1b9af393ccc..1b9af393ccc 100644
--- a/src/test/compile-fail/issue-12369.rs
+++ b/src/test/ui/issue-12369.rs
diff --git a/src/test/ui/issue-12369.stderr b/src/test/ui/issue-12369.stderr
new file mode 100644
index 00000000000..2e8cd840fb7
--- /dev/null
+++ b/src/test/ui/issue-12369.stderr
@@ -0,0 +1,14 @@
+error: unreachable pattern
+  --> $DIR/issue-12369.rs:20:9
+   |
+LL |         &[10,a, ref rest..] => 10 //~ ERROR: unreachable pattern
+   |         ^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-12369.rs:12:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-12470.nll.stderr b/src/test/ui/issue-12470.nll.stderr
new file mode 100644
index 00000000000..09cbfe4f66d
--- /dev/null
+++ b/src/test/ui/issue-12470.nll.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `*b` does not live long enough
+  --> $DIR/issue-12470.rs:38:18
+   |
+LL |     let bb: &B = &*b;    //~ ERROR does not live long enough
+   |                  ^^^ borrowed value does not live long enough
+LL |     make_a(bb)
+LL | }
+   | - borrowed value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 36:16...
+  --> $DIR/issue-12470.rs:36:16
+   |
+LL | fn make_make_a<'a>() -> A<'a> {
+   |                ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-12470.rs b/src/test/ui/issue-12470.rs
index 93785817e14..93785817e14 100644
--- a/src/test/compile-fail/issue-12470.rs
+++ b/src/test/ui/issue-12470.rs
diff --git a/src/test/ui/issue-12470.stderr b/src/test/ui/issue-12470.stderr
new file mode 100644
index 00000000000..91788e96297
--- /dev/null
+++ b/src/test/ui/issue-12470.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `*b` does not live long enough
+  --> $DIR/issue-12470.rs:38:19
+   |
+LL |     let bb: &B = &*b;    //~ ERROR does not live long enough
+   |                   ^^ borrowed value does not live long enough
+LL |     make_a(bb)
+LL | }
+   | - borrowed value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 36:16...
+  --> $DIR/issue-12470.rs:36:16
+   |
+LL | fn make_make_a<'a>() -> A<'a> {
+   |                ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-12552.rs b/src/test/ui/issue-12552.rs
index e4788bac256..e4788bac256 100644
--- a/src/test/compile-fail/issue-12552.rs
+++ b/src/test/ui/issue-12552.rs
diff --git a/src/test/ui/issue-12552.stderr b/src/test/ui/issue-12552.stderr
new file mode 100644
index 00000000000..9a3d5ef02c6
--- /dev/null
+++ b/src/test/ui/issue-12552.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-12552.rs:16:5
+   |
+LL |     Some(k) => match k { //~ ERROR mismatched types
+   |     ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
+   |
+   = note: expected type `std::result::Result<_, {integer}>`
+              found type `std::option::Option<_>`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-12552.rs:19:5
+   |
+LL |     None => () //~ ERROR mismatched types
+   |     ^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
+   |
+   = note: expected type `std::result::Result<_, {integer}>`
+              found type `std::option::Option<_>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-12567.nll.stderr b/src/test/ui/issue-12567.nll.stderr
new file mode 100644
index 00000000000..a040f7c3c8d
--- /dev/null
+++ b/src/test/ui/issue-12567.nll.stderr
@@ -0,0 +1,31 @@
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:14:11
+   |
+LL |     match (l1, l2) {
+   |           ^^^^^^^^ cannot move out of here
+help: to prevent move, use ref or ref mut
+   |
+LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
+   |                 ^^^^^^
+help: to prevent move, use ref or ref mut
+   |
+LL |         (&[hd1, ..], &[ref hd2, ..])
+   |                        ^^^^^^^
+
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:14:11
+   |
+LL |     match (l1, l2) {
+   |           ^^^^^^^^ cannot move out of here
+help: to prevent move, use ref or ref mut
+   |
+LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
+   |                 ^^^^^^
+help: to prevent move, use ref or ref mut
+   |
+LL |         (&[ref hd1, ..], &[hd2, ..])
+   |            ^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0508`.
diff --git a/src/test/compile-fail/issue-12567.rs b/src/test/ui/issue-12567.rs
index 30cdd07b399..30cdd07b399 100644
--- a/src/test/compile-fail/issue-12567.rs
+++ b/src/test/ui/issue-12567.rs
diff --git a/src/test/ui/issue-12567.stderr b/src/test/ui/issue-12567.stderr
new file mode 100644
index 00000000000..60acffdcb06
--- /dev/null
+++ b/src/test/ui/issue-12567.stderr
@@ -0,0 +1,39 @@
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:16:16
+   |
+LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
+   |                ^--^^^^^
+   |                ||
+   |                |hint: to prevent move, use `ref hd` or `ref mut hd`
+   |                cannot move out of here
+
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:16:30
+   |
+LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
+   |                              ^--^^^^^
+   |                              ||
+   |                              |hint: to prevent move, use `ref hd` or `ref mut hd`
+   |                              cannot move out of here
+
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:20:11
+   |
+LL |         (&[hd1, ..], &[hd2, ..])
+   |           ^---^^^^^
+   |           ||
+   |           |hint: to prevent move, use `ref hd1` or `ref mut hd1`
+   |           cannot move out of here
+
+error[E0508]: cannot move out of type `[T]`, a non-copy slice
+  --> $DIR/issue-12567.rs:20:23
+   |
+LL |         (&[hd1, ..], &[hd2, ..])
+   |                       ^---^^^^^
+   |                       ||
+   |                       |hint: to prevent move, use `ref hd2` or `ref mut hd2`
+   |                       cannot move out of here
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0508`.
diff --git a/src/test/compile-fail/issue-12796.rs b/src/test/ui/issue-12796.rs
index 0c3c82a99f2..0c3c82a99f2 100644
--- a/src/test/compile-fail/issue-12796.rs
+++ b/src/test/ui/issue-12796.rs
diff --git a/src/test/ui/issue-12796.stderr b/src/test/ui/issue-12796.stderr
new file mode 100644
index 00000000000..c8bedd3853c
--- /dev/null
+++ b/src/test/ui/issue-12796.stderr
@@ -0,0 +1,11 @@
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-12796.rs:13:22
+   |
+LL |         fn inner(_: &Self) {
+   |            -----     ^^^^ use of type variable from outer function
+   |            |
+   |            help: try using a local type parameter instead: `inner<Self>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0401`.
diff --git a/src/test/compile-fail/issue-12863.rs b/src/test/ui/issue-12863.rs
index d3432410c54..d3432410c54 100644
--- a/src/test/compile-fail/issue-12863.rs
+++ b/src/test/ui/issue-12863.rs
diff --git a/src/test/ui/issue-12863.stderr b/src/test/ui/issue-12863.stderr
new file mode 100644
index 00000000000..eb2957a8225
--- /dev/null
+++ b/src/test/ui/issue-12863.stderr
@@ -0,0 +1,9 @@
+error[E0532]: expected unit struct/variant or constant, found function `foo::bar`
+  --> $DIR/issue-12863.rs:15:9
+   |
+LL |         foo::bar => {} //~ ERROR expected unit struct/variant or constant, found function `foo::bar`
+   |         ^^^^^^^^ not a unit struct/variant or constant
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/compile-fail/issue-12997-1.rs b/src/test/ui/issue-12997-1.rs
index 2d8d7857c99..2d8d7857c99 100644
--- a/src/test/compile-fail/issue-12997-1.rs
+++ b/src/test/ui/issue-12997-1.rs
diff --git a/src/test/ui/issue-12997-1.stderr b/src/test/ui/issue-12997-1.stderr
new file mode 100644
index 00000000000..856538417d9
--- /dev/null
+++ b/src/test/ui/issue-12997-1.stderr
@@ -0,0 +1,14 @@
+error: functions used as benches must have signature `fn(&mut Bencher) -> impl Termination`
+  --> $DIR/issue-12997-1.rs:16:1
+   |
+LL | fn foo() { } //~ ERROR functions used as benches
+   | ^^^^^^^^^^^^
+
+error: functions used as benches must have signature `fn(&mut Bencher) -> impl Termination`
+  --> $DIR/issue-12997-1.rs:19:1
+   |
+LL | fn bar(x: isize, y: isize) { } //~ ERROR functions used as benches
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-12997-2.rs b/src/test/ui/issue-12997-2.rs
index 8d3df68577b..8d3df68577b 100644
--- a/src/test/compile-fail/issue-12997-2.rs
+++ b/src/test/ui/issue-12997-2.rs
diff --git a/src/test/ui/issue-12997-2.stderr b/src/test/ui/issue-12997-2.stderr
new file mode 100644
index 00000000000..3030ee4779b
--- /dev/null
+++ b/src/test/ui/issue-12997-2.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-12997-2.rs:16:1
+   |
+LL | fn bar(x: isize) { }
+   | ^^^^^^^^^^^^^^^^^^^^ expected isize, found mutable reference
+   |
+   = note: expected type `isize`
+              found type `&mut __test::test::Bencher`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-13033.rs b/src/test/ui/issue-13033.rs
index f1fd617717a..f1fd617717a 100644
--- a/src/test/compile-fail/issue-13033.rs
+++ b/src/test/ui/issue-13033.rs
diff --git a/src/test/ui/issue-13033.stderr b/src/test/ui/issue-13033.stderr
new file mode 100644
index 00000000000..2db3cb80a81
--- /dev/null
+++ b/src/test/ui/issue-13033.stderr
@@ -0,0 +1,15 @@
+error[E0053]: method `bar` has an incompatible type for trait
+  --> $DIR/issue-13033.rs:18:30
+   |
+LL |     fn bar(&mut self, other: &mut Foo);
+   |                              -------- type in trait
+...
+LL |     fn bar(&mut self, other: &Foo) {}
+   |                              ^^^^ types differ in mutability
+   |
+   = note: expected type `fn(&mut Baz, &mut dyn Foo)`
+              found type `fn(&mut Baz, &dyn Foo)`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0053`.
diff --git a/src/test/compile-fail/issue-13352.rs b/src/test/ui/issue-13352.rs
index e9d76c758cd..e9d76c758cd 100644
--- a/src/test/compile-fail/issue-13352.rs
+++ b/src/test/ui/issue-13352.rs
diff --git a/src/test/ui/issue-13352.stderr b/src/test/ui/issue-13352.stderr
new file mode 100644
index 00000000000..5324eb21186
--- /dev/null
+++ b/src/test/ui/issue-13352.stderr
@@ -0,0 +1,11 @@
+error[E0277]: cannot add `()` to `usize`
+  --> $DIR/issue-13352.rs:19:13
+   |
+LL |     2_usize + (loop {});
+   |             ^ no implementation for `usize + ()`
+   |
+   = help: the trait `std::ops::Add<()>` is not implemented for `usize`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-13359.rs b/src/test/ui/issue-13359.rs
index e33859e8c19..e33859e8c19 100644
--- a/src/test/compile-fail/issue-13359.rs
+++ b/src/test/ui/issue-13359.rs
diff --git a/src/test/ui/issue-13359.stderr b/src/test/ui/issue-13359.stderr
new file mode 100644
index 00000000000..77f10be982b
--- /dev/null
+++ b/src/test/ui/issue-13359.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-13359.rs:16:9
+   |
+LL |     foo(1*(1 as isize));
+   |         ^^^^^^^^^^^^^^ expected i16, found isize
+
+error[E0308]: mismatched types
+  --> $DIR/issue-13359.rs:20:9
+   |
+LL |     bar(1*(1 as usize));
+   |         ^^^^^^^^^^^^^^ expected u32, found usize
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-13404.rs b/src/test/ui/issue-13404.rs
index 0059e92e07f..0059e92e07f 100644
--- a/src/test/compile-fail/issue-13404.rs
+++ b/src/test/ui/issue-13404.rs
diff --git a/src/test/ui/issue-13404.stderr b/src/test/ui/issue-13404.stderr
new file mode 100644
index 00000000000..b71d3ceab5b
--- /dev/null
+++ b/src/test/ui/issue-13404.stderr
@@ -0,0 +1,9 @@
+error[E0432]: unresolved import `b::f`
+  --> $DIR/issue-13404.rs:12:5
+   |
+LL | use b::f; //~ ERROR: unresolved import `b::f` [E0432]
+   |     ^^^^ no `f` in `b`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-13407.rs b/src/test/ui/issue-13407.rs
index afb2e867f45..afb2e867f45 100644
--- a/src/test/compile-fail/issue-13407.rs
+++ b/src/test/ui/issue-13407.rs
diff --git a/src/test/ui/issue-13407.stderr b/src/test/ui/issue-13407.stderr
new file mode 100644
index 00000000000..e5ef50e984a
--- /dev/null
+++ b/src/test/ui/issue-13407.stderr
@@ -0,0 +1,25 @@
+error[E0603]: unit struct `C` is private
+  --> $DIR/issue-13407.rs:16:5
+   |
+LL |     A::C = 1;
+   |     ^^^^
+
+error[E0308]: mismatched types
+  --> $DIR/issue-13407.rs:16:12
+   |
+LL |     A::C = 1;
+   |            ^ expected struct `A::C`, found integral variable
+   |
+   = note: expected type `A::C`
+              found type `{integer}`
+
+error[E0070]: invalid left-hand side expression
+  --> $DIR/issue-13407.rs:16:5
+   |
+LL |     A::C = 1;
+   |     ^^^^^^^^ left-hand of expression not valid
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0070, E0308, E0603.
+For more information about an error, try `rustc --explain E0070`.
diff --git a/src/test/compile-fail/issue-13446.rs b/src/test/ui/issue-13446.rs
index 6ad3ec67b29..6ad3ec67b29 100644
--- a/src/test/compile-fail/issue-13446.rs
+++ b/src/test/ui/issue-13446.rs
diff --git a/src/test/ui/issue-13446.stderr b/src/test/ui/issue-13446.stderr
new file mode 100644
index 00000000000..68fece30c81
--- /dev/null
+++ b/src/test/ui/issue-13446.stderr
@@ -0,0 +1,13 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-13446.rs:16:26
+   |
+LL | static VEC: [u32; 256] = vec![];
+   |                          ^^^^^^ expected array of 256 elements, found struct `std::vec::Vec`
+   |
+   = note: expected type `[u32; 256]`
+              found type `std::vec::Vec<_>`
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-13466.rs b/src/test/ui/issue-13466.rs
index abddf6ba7a3..abddf6ba7a3 100644
--- a/src/test/compile-fail/issue-13466.rs
+++ b/src/test/ui/issue-13466.rs
diff --git a/src/test/ui/issue-13466.stderr b/src/test/ui/issue-13466.stderr
new file mode 100644
index 00000000000..be845fb8e22
--- /dev/null
+++ b/src/test/ui/issue-13466.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-13466.rs:18:9
+   |
+LL |         Ok(u) => u,
+   |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
+   |
+   = note: expected type `std::option::Option<{integer}>`
+              found type `std::result::Result<_, _>`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-13466.rs:24:9
+   |
+LL |         Err(e) => panic!(e)
+   |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
+   |
+   = note: expected type `std::option::Option<{integer}>`
+              found type `std::result::Result<_, _>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-13482-2.rs b/src/test/ui/issue-13482-2.rs
index fe7fbb176cc..fe7fbb176cc 100644
--- a/src/test/compile-fail/issue-13482-2.rs
+++ b/src/test/ui/issue-13482-2.rs
diff --git a/src/test/ui/issue-13482-2.stderr b/src/test/ui/issue-13482-2.stderr
new file mode 100644
index 00000000000..1ecae3b867a
--- /dev/null
+++ b/src/test/ui/issue-13482-2.stderr
@@ -0,0 +1,9 @@
+error[E0527]: pattern requires 0 elements but array has 2
+  --> $DIR/issue-13482-2.rs:16:9
+   |
+LL |         [] => None, //~ ERROR pattern requires 0 elements but array has 2
+   |         ^^ expected 2 elements
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0527`.
diff --git a/src/test/compile-fail/issue-13482.rs b/src/test/ui/issue-13482.rs
index 32a63b79a32..32a63b79a32 100644
--- a/src/test/compile-fail/issue-13482.rs
+++ b/src/test/ui/issue-13482.rs
diff --git a/src/test/ui/issue-13482.stderr b/src/test/ui/issue-13482.stderr
new file mode 100644
index 00000000000..95273bb46bc
--- /dev/null
+++ b/src/test/ui/issue-13482.stderr
@@ -0,0 +1,9 @@
+error[E0527]: pattern requires 0 elements but array has 2
+  --> $DIR/issue-13482.rs:14:5
+   |
+LL |     [] => None, //~ ERROR pattern requires 0 elements but array has 2
+   |     ^^ expected 2 elements
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0527`.
diff --git a/src/test/compile-fail/issue-13497-2.rs b/src/test/ui/issue-13497-2.rs
index 31716837493..31716837493 100644
--- a/src/test/compile-fail/issue-13497-2.rs
+++ b/src/test/ui/issue-13497-2.rs
diff --git a/src/test/ui/issue-13497-2.stderr b/src/test/ui/issue-13497-2.stderr
new file mode 100644
index 00000000000..72770f8c84c
--- /dev/null
+++ b/src/test/ui/issue-13497-2.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `rawLines` does not live long enough
+  --> $DIR/issue-13497-2.rs:13:5
+   |
+LL |     rawLines //~ ERROR `rawLines` does not live long enough
+   |     ^^^^^^^^ borrowed value does not live long enough
+LL |         .iter().map(|l| l.trim()).collect()
+LL | }
+   | - borrowed value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 11:24...
+  --> $DIR/issue-13497-2.rs:11:24
+   |
+LL | fn read_lines_borrowed<'a>() -> Vec<&'a str> {
+   |                        ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-13497.rs b/src/test/ui/issue-13497.rs
index d544a92d9c3..d544a92d9c3 100644
--- a/src/test/compile-fail/issue-13497.rs
+++ b/src/test/ui/issue-13497.rs
diff --git a/src/test/ui/issue-13497.stderr b/src/test/ui/issue-13497.stderr
new file mode 100644
index 00000000000..ab6d041bd48
--- /dev/null
+++ b/src/test/ui/issue-13497.stderr
@@ -0,0 +1,12 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/issue-13497.rs:12:5
+   |
+LL |     &str //~ ERROR missing lifetime specifier
+   |     ^ expected lifetime parameter
+   |
+   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
+   = help: consider giving it a 'static lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/compile-fail/issue-1362.rs b/src/test/ui/issue-1362.rs
index d51db479599..d51db479599 100644
--- a/src/test/compile-fail/issue-1362.rs
+++ b/src/test/ui/issue-1362.rs
diff --git a/src/test/ui/issue-1362.stderr b/src/test/ui/issue-1362.stderr
new file mode 100644
index 00000000000..c19e256eb92
--- /dev/null
+++ b/src/test/ui/issue-1362.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-1362.rs:14:16
+   |
+LL |   let x: u32 = 20i32; //~ ERROR mismatched types
+   |                ^^^^^ expected u32, found i32
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-13641.rs b/src/test/ui/issue-13641.rs
index 3b690e08f61..3b690e08f61 100644
--- a/src/test/compile-fail/issue-13641.rs
+++ b/src/test/ui/issue-13641.rs
diff --git a/src/test/ui/issue-13641.stderr b/src/test/ui/issue-13641.stderr
new file mode 100644
index 00000000000..0f96b5f66b1
--- /dev/null
+++ b/src/test/ui/issue-13641.stderr
@@ -0,0 +1,15 @@
+error[E0603]: struct `Foo` is private
+  --> $DIR/issue-13641.rs:19:5
+   |
+LL |     a::Foo::new();
+   |     ^^^^^^^^^^^
+
+error[E0603]: enum `Bar` is private
+  --> $DIR/issue-13641.rs:21:5
+   |
+LL |     a::Bar::new();
+   |     ^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/src/test/compile-fail/issue-13727.rs b/src/test/ui/issue-13727.rs
index 2e815548e89..2e815548e89 100644
--- a/src/test/compile-fail/issue-13727.rs
+++ b/src/test/ui/issue-13727.rs
diff --git a/src/test/ui/issue-13727.stderr b/src/test/ui/issue-13727.stderr
new file mode 100644
index 00000000000..47b9a0211a9
--- /dev/null
+++ b/src/test/ui/issue-13727.stderr
@@ -0,0 +1,14 @@
+error: unreachable pattern
+  --> $DIR/issue-13727.rs:17:5
+   |
+LL |     512 => print!("0b1111/n"),
+   |     ^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-13727.rs:12:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-13847.rs b/src/test/ui/issue-13847.rs
index 0314f109a7c..0314f109a7c 100644
--- a/src/test/compile-fail/issue-13847.rs
+++ b/src/test/ui/issue-13847.rs
diff --git a/src/test/ui/issue-13847.stderr b/src/test/ui/issue-13847.stderr
new file mode 100644
index 00000000000..fad3245034d
--- /dev/null
+++ b/src/test/ui/issue-13847.stderr
@@ -0,0 +1,9 @@
+error[E0609]: no field `is_failure` on type `!`
+  --> $DIR/issue-13847.rs:12:12
+   |
+LL |     return.is_failure //~ ERROR no field `is_failure` on type `!`
+   |            ^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-13853-2.rs b/src/test/ui/issue-13853-2.rs
index 1635a8f69a6..1635a8f69a6 100644
--- a/src/test/compile-fail/issue-13853-2.rs
+++ b/src/test/ui/issue-13853-2.rs
diff --git a/src/test/ui/issue-13853-2.stderr b/src/test/ui/issue-13853-2.stderr
new file mode 100644
index 00000000000..c15290fb1d9
--- /dev/null
+++ b/src/test/ui/issue-13853-2.stderr
@@ -0,0 +1,11 @@
+error[E0615]: attempted to take value of method `get` on type `std::boxed::Box<(dyn ResponseHook + 'static)>`
+  --> $DIR/issue-13853-2.rs:15:39
+   |
+LL | fn foo(res : Box<ResponseHook>) { res.get } //~ ERROR attempted to take value of method
+   |                                       ^^^
+   |
+   = help: maybe a `()` to call it is missing?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0615`.
diff --git a/src/test/compile-fail/issue-13853-5.rs b/src/test/ui/issue-13853-5.rs
index 78b079a7c44..78b079a7c44 100644
--- a/src/test/compile-fail/issue-13853-5.rs
+++ b/src/test/ui/issue-13853-5.rs
diff --git a/src/test/ui/issue-13853-5.stderr b/src/test/ui/issue-13853-5.stderr
new file mode 100644
index 00000000000..e93b03b43ee
--- /dev/null
+++ b/src/test/ui/issue-13853-5.stderr
@@ -0,0 +1,9 @@
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-13853-5.rs:17:10
+   |
+LL | impl<'a, T: Deserializable> Deserializable for &'a str {
+   |          ^ unconstrained type parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/compile-fail/issue-13853.rs b/src/test/ui/issue-13853.rs
index 86a6bdfd4dd..86a6bdfd4dd 100644
--- a/src/test/compile-fail/issue-13853.rs
+++ b/src/test/ui/issue-13853.rs
diff --git a/src/test/ui/issue-13853.stderr b/src/test/ui/issue-13853.stderr
new file mode 100644
index 00000000000..188bfd59301
--- /dev/null
+++ b/src/test/ui/issue-13853.stderr
@@ -0,0 +1,34 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-13853.rs:24:9
+   |
+LL |     fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
+   |                                                     - expected `I` because of return type
+...
+LL |         self.iter() //~ ERROR mismatched types
+   |         ^^^^^^^^^^^ expected type parameter, found struct `std::slice::Iter`
+   |
+   = note: expected type `I`
+              found type `std::slice::Iter<'_, N>`
+
+error[E0599]: no method named `iter` found for type `&G` in the current scope
+  --> $DIR/issue-13853.rs:37:23
+   |
+LL |     for node in graph.iter() { //~ ERROR no method named `iter` found
+   |                       ^^^^
+
+error[E0308]: mismatched types
+  --> $DIR/issue-13853.rs:47:13
+   |
+LL |     iterate(graph); //~ ERROR mismatched types
+   |             ^^^^^
+   |             |
+   |             expected reference, found struct `std::vec::Vec`
+   |             help: consider borrowing here: `&graph`
+   |
+   = note: expected type `&_`
+              found type `std::vec::Vec<Stuff>`
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0308, E0599.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-14091-2.rs b/src/test/ui/issue-14091-2.rs
index d3823a8cc55..a4351733a87 100644
--- a/src/test/compile-fail/issue-14091-2.rs
+++ b/src/test/ui/issue-14091-2.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: cannot apply unary operator `!` to type `BytePos`
+//
 
 // Very
 
@@ -23,4 +23,5 @@ fn main() {
     let x = BytePos(1);
 
     assert!(x, x);
+    //~^ ERROR cannot apply unary operator `!` to type `BytePos`
 }
diff --git a/src/test/ui/issue-14091-2.stderr b/src/test/ui/issue-14091-2.stderr
new file mode 100644
index 00000000000..ccabd801c85
--- /dev/null
+++ b/src/test/ui/issue-14091-2.stderr
@@ -0,0 +1,11 @@
+error[E0600]: cannot apply unary operator `!` to type `BytePos`
+  --> $DIR/issue-14091-2.rs:25:5
+   |
+LL |     assert!(x, x);
+   |     ^^^^^^^^^^^^^^ cannot apply unary operator `!`
+   |
+   = note: an implementation of `std::ops::Not` might be missing for `BytePos`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0600`.
diff --git a/src/test/compile-fail/issue-14091.rs b/src/test/ui/issue-14091.rs
index 9c594ef485f..9e436b8e629 100644
--- a/src/test/compile-fail/issue-14091.rs
+++ b/src/test/ui/issue-14091.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types
-
-fn main(){assert!(1,1);}
+fn main(){
+    assert!(1,1);
+    //~^ ERROR mismatched types
+}
diff --git a/src/test/ui/issue-14091.stderr b/src/test/ui/issue-14091.stderr
new file mode 100644
index 00000000000..9db2a0e2a86
--- /dev/null
+++ b/src/test/ui/issue-14091.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-14091.rs:12:5
+   |
+LL |     assert!(1,1);
+   |     ^^^^^^^^^^^^^ expected bool, found integral variable
+   |
+   = note: expected type `bool`
+              found type `{integer}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-14221.rs b/src/test/ui/issue-14221.rs
index d11fe99c07f..d11fe99c07f 100644
--- a/src/test/compile-fail/issue-14221.rs
+++ b/src/test/ui/issue-14221.rs
diff --git a/src/test/ui/issue-14221.stderr b/src/test/ui/issue-14221.stderr
new file mode 100644
index 00000000000..9252a4f304f
--- /dev/null
+++ b/src/test/ui/issue-14221.stderr
@@ -0,0 +1,30 @@
+warning[E0170]: pattern binding `A` is named the same as one of the variants of the type `E`
+  --> $DIR/issue-14221.rs:23:13
+   |
+LL |             A => "A",
+   |             ^ help: to match on the variant, qualify the path: `E::A`
+
+warning[E0170]: pattern binding `B` is named the same as one of the variants of the type `E`
+  --> $DIR/issue-14221.rs:25:13
+   |
+LL |             B => "B", //~ ERROR: unreachable pattern
+   |             ^ help: to match on the variant, qualify the path: `E::B`
+
+error: unreachable pattern
+  --> $DIR/issue-14221.rs:25:13
+   |
+LL |             A => "A",
+   |             - matches any value
+LL | //~^ WARN pattern binding `A` is named the same as one of the variants of the type `E`
+LL |             B => "B", //~ ERROR: unreachable pattern
+   |             ^ unreachable pattern
+   |
+note: lint level defined here
+  --> $DIR/issue-14221.rs:11:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0170`.
diff --git a/src/test/compile-fail/issue-14227.rs b/src/test/ui/issue-14227.rs
index 250e78ce246..250e78ce246 100644
--- a/src/test/compile-fail/issue-14227.rs
+++ b/src/test/ui/issue-14227.rs
diff --git a/src/test/ui/issue-14227.stderr b/src/test/ui/issue-14227.stderr
new file mode 100644
index 00000000000..f5f39465b18
--- /dev/null
+++ b/src/test/ui/issue-14227.stderr
@@ -0,0 +1,9 @@
+error[E0080]: could not evaluate static initializer
+  --> $DIR/issue-14227.rs:16:20
+   |
+LL | static CRASH: () = symbol;
+   |                    ^^^^^^ tried to read from foreign (extern) static
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/issue-14285.nll.stderr b/src/test/ui/issue-14285.nll.stderr
new file mode 100644
index 00000000000..440365cae3e
--- /dev/null
+++ b/src/test/ui/issue-14285.nll.stderr
@@ -0,0 +1,17 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-14285.rs:22:7
+   |
+LL |     B(a)    //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621]
+   |       ^
+
+error[E0621]: explicit lifetime required in the type of `a`
+  --> $DIR/issue-14285.rs:22:7
+   |
+LL | fn foo<'a>(a: &Foo) -> B<'a> {
+   |            - consider changing the type of `a` to `&'a (dyn Foo + 'a)`
+LL |     B(a)    //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621]
+   |       ^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-14285.rs b/src/test/ui/issue-14285.rs
index dceecee6ca7..dceecee6ca7 100644
--- a/src/test/compile-fail/issue-14285.rs
+++ b/src/test/ui/issue-14285.rs
diff --git a/src/test/ui/issue-14285.stderr b/src/test/ui/issue-14285.stderr
new file mode 100644
index 00000000000..b5ab7bdb9d1
--- /dev/null
+++ b/src/test/ui/issue-14285.stderr
@@ -0,0 +1,11 @@
+error[E0621]: explicit lifetime required in the type of `a`
+  --> $DIR/issue-14285.rs:22:5
+   |
+LL | fn foo<'a>(a: &Foo) -> B<'a> {
+   |            - consider changing the type of `a` to `&'a (dyn Foo + 'a)`
+LL |     B(a)    //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621]
+   |     ^^^^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-14309.rs b/src/test/ui/issue-14309.rs
index f76fa3e4a8e..f76fa3e4a8e 100644
--- a/src/test/compile-fail/issue-14309.rs
+++ b/src/test/ui/issue-14309.rs
diff --git a/src/test/ui/issue-14309.stderr b/src/test/ui/issue-14309.stderr
new file mode 100644
index 00000000000..e062c633ee6
--- /dev/null
+++ b/src/test/ui/issue-14309.stderr
@@ -0,0 +1,82 @@
+error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-14309.rs:40:15
+   |
+LL |     fn foo(x: A); //~ ERROR type `A` which is not FFI-safe
+   |               ^
+   |
+note: lint level defined here
+  --> $DIR/issue-14309.rs:11:9
+   |
+LL | #![deny(improper_ctypes)]
+   |         ^^^^^^^^^^^^^^^
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-14309.rs:14:1
+   |
+LL | / struct A {
+LL | |     x: i32
+LL | | }
+   | |_^
+
+error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-14309.rs:41:15
+   |
+LL |     fn bar(x: B); //~ ERROR type `A`
+   |               ^
+   |
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-14309.rs:14:1
+   |
+LL | / struct A {
+LL | |     x: i32
+LL | | }
+   | |_^
+
+error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-14309.rs:43:15
+   |
+LL |     fn qux(x: A2); //~ ERROR type `A`
+   |               ^^
+   |
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-14309.rs:14:1
+   |
+LL | / struct A {
+LL | |     x: i32
+LL | | }
+   | |_^
+
+error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-14309.rs:44:16
+   |
+LL |     fn quux(x: B2); //~ ERROR type `A`
+   |                ^^
+   |
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-14309.rs:14:1
+   |
+LL | / struct A {
+LL | |     x: i32
+LL | | }
+   | |_^
+
+error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-14309.rs:46:16
+   |
+LL |     fn fred(x: D); //~ ERROR type `A`
+   |                ^
+   |
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-14309.rs:14:1
+   |
+LL | / struct A {
+LL | |     x: i32
+LL | | }
+   | |_^
+
+error: aborting due to 5 previous errors
+
diff --git a/src/test/compile-fail/issue-14366.rs b/src/test/ui/issue-14366.rs
index 0b154d0a3ea..0b154d0a3ea 100644
--- a/src/test/compile-fail/issue-14366.rs
+++ b/src/test/ui/issue-14366.rs
diff --git a/src/test/ui/issue-14366.stderr b/src/test/ui/issue-14366.stderr
new file mode 100644
index 00000000000..260ca443689
--- /dev/null
+++ b/src/test/ui/issue-14366.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/issue-14366.rs:12:14
+   |
+LL |     let _x = "test" as &::std::any::Any;
+   |              ^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `str`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required for the cast to the object type `dyn std::any::Any`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-1448-2.rs b/src/test/ui/issue-1448-2.rs
index ddfed3647c2..ddfed3647c2 100644
--- a/src/test/compile-fail/issue-1448-2.rs
+++ b/src/test/ui/issue-1448-2.rs
diff --git a/src/test/ui/issue-1448-2.stderr b/src/test/ui/issue-1448-2.stderr
new file mode 100644
index 00000000000..5769b0c3b9f
--- /dev/null
+++ b/src/test/ui/issue-1448-2.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-1448-2.rs:16:24
+   |
+LL |     println!("{}", foo(10i32)); //~ ERROR mismatched types
+   |                        ^^^^^ expected u32, found i32
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-14541.rs b/src/test/ui/issue-14541.rs
index 84c600d2201..84c600d2201 100644
--- a/src/test/compile-fail/issue-14541.rs
+++ b/src/test/ui/issue-14541.rs
diff --git a/src/test/ui/issue-14541.stderr b/src/test/ui/issue-14541.stderr
new file mode 100644
index 00000000000..fcff500cfda
--- /dev/null
+++ b/src/test/ui/issue-14541.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-14541.rs:15:9
+   |
+LL |     let vec3 { y: _, z: _ } = v;
+   |         ^^^^^^^^^^^^^^^^^^^ expected struct `vec2`, found struct `vec3`
+   |
+   = note: expected type `vec2`
+              found type `vec3`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-14721.rs b/src/test/ui/issue-14721.rs
index 58e8e10ee37..58e8e10ee37 100644
--- a/src/test/compile-fail/issue-14721.rs
+++ b/src/test/ui/issue-14721.rs
diff --git a/src/test/ui/issue-14721.stderr b/src/test/ui/issue-14721.stderr
new file mode 100644
index 00000000000..93e51140caa
--- /dev/null
+++ b/src/test/ui/issue-14721.stderr
@@ -0,0 +1,9 @@
+error[E0609]: no field `desc` on type `&str`
+  --> $DIR/issue-14721.rs:13:24
+   |
+LL |     println!("{}", foo.desc); //~ no field `desc` on type `&str`
+   |                        ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-1476.rs b/src/test/ui/issue-1476.rs
index 48bf71f5892..48bf71f5892 100644
--- a/src/test/compile-fail/issue-1476.rs
+++ b/src/test/ui/issue-1476.rs
diff --git a/src/test/ui/issue-1476.stderr b/src/test/ui/issue-1476.stderr
new file mode 100644
index 00000000000..afdda3e15da
--- /dev/null
+++ b/src/test/ui/issue-1476.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/issue-1476.rs:12:20
+   |
+LL |     println!("{}", x); //~ ERROR cannot find value `x` in this scope
+   |                    ^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-14772.rs b/src/test/ui/issue-14772.rs
index aaaad67be52..aaaad67be52 100644
--- a/src/test/compile-fail/issue-14772.rs
+++ b/src/test/ui/issue-14772.rs
diff --git a/src/test/ui/issue-14772.stderr b/src/test/ui/issue-14772.stderr
new file mode 100644
index 00000000000..1116cd38edf
--- /dev/null
+++ b/src/test/ui/issue-14772.stderr
@@ -0,0 +1,8 @@
+error: only functions may be used as tests
+  --> $DIR/issue-14772.rs:14:1
+   |
+LL | mod foo {} //~ ERROR only functions may be used as tests
+   | ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-14845.rs b/src/test/ui/issue-14845.rs
index 74f0833e8d1..74f0833e8d1 100644
--- a/src/test/compile-fail/issue-14845.rs
+++ b/src/test/ui/issue-14845.rs
diff --git a/src/test/ui/issue-14845.stderr b/src/test/ui/issue-14845.stderr
new file mode 100644
index 00000000000..a994026946e
--- /dev/null
+++ b/src/test/ui/issue-14845.stderr
@@ -0,0 +1,15 @@
+error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid
+  --> $DIR/issue-14845.rs:18:14
+   |
+LL |     let _f = &x.a as *mut u8; //~ ERROR casting
+   |              ^^^^^^^^^^^^^^^
+
+error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid
+  --> $DIR/issue-14845.rs:21:14
+   |
+LL |     let _v = &local as *mut u8; //~ ERROR casting
+   |              ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0606`.
diff --git a/src/test/compile-fail/issue-14853.rs b/src/test/ui/issue-14853.rs
index e4da3e4fa43..e4da3e4fa43 100644
--- a/src/test/compile-fail/issue-14853.rs
+++ b/src/test/ui/issue-14853.rs
diff --git a/src/test/ui/issue-14853.stderr b/src/test/ui/issue-14853.stderr
new file mode 100644
index 00000000000..6c2f6bb9c69
--- /dev/null
+++ b/src/test/ui/issue-14853.stderr
@@ -0,0 +1,12 @@
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/issue-14853.rs:22:5
+   |
+LL |     fn yay<T: Debug>(_: Option<Self>, thing: &[T]);
+   |     ----------------------------------------------- definition of `yay` from trait
+...
+LL |     fn yay<T: Str>(_:Option<X>, thing: &[T]) {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Str`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0276`.
diff --git a/src/test/compile-fail/issue-14915.rs b/src/test/ui/issue-14915.rs
index 810d6656a8f..810d6656a8f 100644
--- a/src/test/compile-fail/issue-14915.rs
+++ b/src/test/ui/issue-14915.rs
diff --git a/src/test/ui/issue-14915.stderr b/src/test/ui/issue-14915.stderr
new file mode 100644
index 00000000000..aa418f5df86
--- /dev/null
+++ b/src/test/ui/issue-14915.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `+` cannot be applied to type `std::boxed::Box<isize>`
+  --> $DIR/issue-14915.rs:16:20
+   |
+LL |     println!("{}", x + 1);
+   |                    ^^^^^
+   |
+   = note: an implementation of `std::ops::Add` might be missing for `std::boxed::Box<isize>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/ui/issue-15034.nll.stderr b/src/test/ui/issue-15034.nll.stderr
new file mode 100644
index 00000000000..19fe83f8f6c
--- /dev/null
+++ b/src/test/ui/issue-15034.nll.stderr
@@ -0,0 +1,17 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-15034.rs:27:9
+   |
+LL |         Parser { lexer: lexer }
+   |         ^^^^^^
+
+error[E0621]: explicit lifetime required in the type of `lexer`
+  --> $DIR/issue-15034.rs:27:25
+   |
+LL |     pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
+   |                ----- consider changing the type of `lexer` to `&'a mut Lexer<'a>`
+LL |         Parser { lexer: lexer }
+   |                         ^^^^^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-15034.rs b/src/test/ui/issue-15034.rs
index a62e46820d3..a62e46820d3 100644
--- a/src/test/compile-fail/issue-15034.rs
+++ b/src/test/ui/issue-15034.rs
diff --git a/src/test/ui/issue-15034.stderr b/src/test/ui/issue-15034.stderr
new file mode 100644
index 00000000000..3bbf4235a29
--- /dev/null
+++ b/src/test/ui/issue-15034.stderr
@@ -0,0 +1,11 @@
+error[E0621]: explicit lifetime required in the type of `lexer`
+  --> $DIR/issue-15034.rs:27:25
+   |
+LL |     pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
+   |                ----- consider changing the type of `lexer` to `&'a mut Lexer<'a>`
+LL |         Parser { lexer: lexer }
+   |                         ^^^^^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-15094.rs b/src/test/ui/issue-15094.rs
index 1dd6763cbe5..1dd6763cbe5 100644
--- a/src/test/compile-fail/issue-15094.rs
+++ b/src/test/ui/issue-15094.rs
diff --git a/src/test/ui/issue-15094.stderr b/src/test/ui/issue-15094.stderr
new file mode 100644
index 00000000000..7928a6be350
--- /dev/null
+++ b/src/test/ui/issue-15094.stderr
@@ -0,0 +1,12 @@
+error[E0053]: method `call_once` has an incompatible type for trait
+  --> $DIR/issue-15094.rs:21:5
+   |
+LL |     fn call_once(self, _args: ()) {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected "rust-call" fn, found "Rust" fn
+   |
+   = note: expected type `extern "rust-call" fn(Debuger<T>, ())`
+              found type `fn(Debuger<T>, ())`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0053`.
diff --git a/src/test/compile-fail/issue-15129.rs b/src/test/ui/issue-15129.rs
index 7a7ba46de74..7a7ba46de74 100644
--- a/src/test/compile-fail/issue-15129.rs
+++ b/src/test/ui/issue-15129.rs
diff --git a/src/test/ui/issue-15129.stderr b/src/test/ui/issue-15129.stderr
new file mode 100644
index 00000000000..e65e6516222
--- /dev/null
+++ b/src/test/ui/issue-15129.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `(T1(()), V2(_))` not covered
+  --> $DIR/issue-15129.rs:22:11
+   |
+LL |     match (T::T1(()), V::V2(true)) {
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `(T1(()), V2(_))` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-15167.rs b/src/test/ui/issue-15167.rs
index d224b8a548c..d224b8a548c 100644
--- a/src/test/compile-fail/issue-15167.rs
+++ b/src/test/ui/issue-15167.rs
diff --git a/src/test/ui/issue-15167.stderr b/src/test/ui/issue-15167.stderr
new file mode 100644
index 00000000000..b15c493ad69
--- /dev/null
+++ b/src/test/ui/issue-15167.stderr
@@ -0,0 +1,39 @@
+error[E0425]: cannot find value `n` in this scope
+  --> $DIR/issue-15167.rs:13:25
+   |
+LL | macro_rules! f { () => (n) }
+   |                         ^ not found in this scope
+...
+LL |         println!("{}", f!());
+   |                        ---- in this macro invocation
+
+error[E0425]: cannot find value `n` in this scope
+  --> $DIR/issue-15167.rs:13:25
+   |
+LL | macro_rules! f { () => (n) }
+   |                         ^ not found in this scope
+...
+LL |         println!("{}", f!());
+   |                        ---- in this macro invocation
+
+error[E0425]: cannot find value `n` in this scope
+  --> $DIR/issue-15167.rs:13:25
+   |
+LL | macro_rules! f { () => (n) }
+   |                         ^ not found in this scope
+...
+LL |         println!("{}", f!());
+   |                        ---- in this macro invocation
+
+error[E0425]: cannot find value `n` in this scope
+  --> $DIR/issue-15167.rs:13:25
+   |
+LL | macro_rules! f { () => (n) }
+   |                         ^ not found in this scope
+...
+LL |         println!("{}", f!());
+   |                        ---- in this macro invocation
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-15207.rs b/src/test/ui/issue-15207.rs
index 70da8cf4169..70da8cf4169 100644
--- a/src/test/compile-fail/issue-15207.rs
+++ b/src/test/ui/issue-15207.rs
diff --git a/src/test/ui/issue-15207.stderr b/src/test/ui/issue-15207.stderr
new file mode 100644
index 00000000000..77e52012277
--- /dev/null
+++ b/src/test/ui/issue-15207.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no method named `push` found for type `!` in the current scope
+  --> $DIR/issue-15207.rs:13:15
+   |
+LL |         break.push(1) //~ ERROR no method named `push` found for type `!`
+   |               ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-15381.rs b/src/test/ui/issue-15381.rs
index 1cdd803971b..1cdd803971b 100644
--- a/src/test/compile-fail/issue-15381.rs
+++ b/src/test/ui/issue-15381.rs
diff --git a/src/test/ui/issue-15381.stderr b/src/test/ui/issue-15381.stderr
new file mode 100644
index 00000000000..7a936a82108
--- /dev/null
+++ b/src/test/ui/issue-15381.stderr
@@ -0,0 +1,9 @@
+error[E0005]: refutable pattern in `for` loop binding: `&[]` not covered
+  --> $DIR/issue-15381.rs:14:9
+   |
+LL |     for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) {
+   |         ^^^^^^^^ pattern `&[]` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0005`.
diff --git a/src/test/compile-fail/issue-15756.rs b/src/test/ui/issue-15756.rs
index c123e85a0e0..c123e85a0e0 100644
--- a/src/test/compile-fail/issue-15756.rs
+++ b/src/test/ui/issue-15756.rs
diff --git a/src/test/ui/issue-15756.stderr b/src/test/ui/issue-15756.stderr
new file mode 100644
index 00000000000..af70f125302
--- /dev/null
+++ b/src/test/ui/issue-15756.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `[T]` cannot be known at compilation time
+  --> $DIR/issue-15756.rs:17:10
+   |
+LL |     &mut something
+   |          ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `[T]`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: all local variables must have a statically known size
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-15783.rs b/src/test/ui/issue-15783.rs
index 37a2f1582bf..37a2f1582bf 100644
--- a/src/test/compile-fail/issue-15783.rs
+++ b/src/test/ui/issue-15783.rs
diff --git a/src/test/ui/issue-15783.stderr b/src/test/ui/issue-15783.stderr
new file mode 100644
index 00000000000..d565bad2448
--- /dev/null
+++ b/src/test/ui/issue-15783.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-15783.rs:18:19
+   |
+LL |     let msg = foo(x);
+   |                   ^ expected slice, found array of 1 elements
+   |
+   = note: expected type `std::option::Option<&[&str]>`
+              found type `std::option::Option<&[&str; 1]>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-15896.rs b/src/test/ui/issue-15896.rs
index 35ef9ba2b4b..35ef9ba2b4b 100644
--- a/src/test/compile-fail/issue-15896.rs
+++ b/src/test/ui/issue-15896.rs
diff --git a/src/test/ui/issue-15896.stderr b/src/test/ui/issue-15896.stderr
new file mode 100644
index 00000000000..b41848c8cdf
--- /dev/null
+++ b/src/test/ui/issue-15896.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-15896.rs:21:11
+   |
+LL |           Tau{t: x},
+   |           ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau`
+   |
+   = note: expected type `main::R`
+              found type `main::Tau`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-15965.rs b/src/test/ui/issue-15965.rs
index 76ba5a0f4b3..76ba5a0f4b3 100644
--- a/src/test/compile-fail/issue-15965.rs
+++ b/src/test/ui/issue-15965.rs
diff --git a/src/test/ui/issue-15965.stderr b/src/test/ui/issue-15965.stderr
new file mode 100644
index 00000000000..216c6460c77
--- /dev/null
+++ b/src/test/ui/issue-15965.stderr
@@ -0,0 +1,13 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-15965.rs:13:9
+   |
+LL | /         { return () }
+LL | | //~^ ERROR type annotations needed [E0282]
+LL | |     ()
+   | |______^ cannot infer type for `_`
+   |
+   = note: type must be known at this point
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-16048.rs b/src/test/ui/issue-16048.rs
index cda83fe54b0..cda83fe54b0 100644
--- a/src/test/compile-fail/issue-16048.rs
+++ b/src/test/ui/issue-16048.rs
diff --git a/src/test/ui/issue-16048.stderr b/src/test/ui/issue-16048.stderr
new file mode 100644
index 00000000000..97883fb2a95
--- /dev/null
+++ b/src/test/ui/issue-16048.stderr
@@ -0,0 +1,12 @@
+error[E0195]: lifetime parameters or bounds on method `get` do not match the trait declaration
+  --> $DIR/issue-16048.rs:31:11
+   |
+LL |     fn get<'p, T : Test<'p>>(&self) -> T;
+   |           ------------------ lifetimes in impl do not match this method in trait
+...
+LL |     fn get<'p, T : Test<'a>>(&self) -> T {
+   |           ^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0195`.
diff --git a/src/test/compile-fail/issue-16098.rs b/src/test/ui/issue-16098.rs
index 68ac19b383f..68ac19b383f 100644
--- a/src/test/compile-fail/issue-16098.rs
+++ b/src/test/ui/issue-16098.rs
diff --git a/src/test/ui/issue-16098.stderr b/src/test/ui/issue-16098.stderr
new file mode 100644
index 00000000000..31162ca50cc
--- /dev/null
+++ b/src/test/ui/issue-16098.stderr
@@ -0,0 +1,13 @@
+error: recursion limit reached while expanding the macro `prob1`
+  --> $DIR/issue-16098.rs:17:18
+   |
+LL |             $n + prob1!($n - 1); //~ ERROR recursion limit reached while expanding the macro `prob1`
+   |                  ^^^^^^^^^^^^^^
+...
+LL |     println!("Problem 1: {}", prob1!(1000));
+   |                               ------------ in this macro invocation
+   |
+   = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-16149.rs b/src/test/ui/issue-16149.rs
index 60117bd88d4..60117bd88d4 100644
--- a/src/test/compile-fail/issue-16149.rs
+++ b/src/test/ui/issue-16149.rs
diff --git a/src/test/ui/issue-16149.stderr b/src/test/ui/issue-16149.stderr
new file mode 100644
index 00000000000..b0b6e9dfcd0
--- /dev/null
+++ b/src/test/ui/issue-16149.stderr
@@ -0,0 +1,12 @@
+error[E0530]: match bindings cannot shadow statics
+  --> $DIR/issue-16149.rs:17:9
+   |
+LL |     static externalValue: isize;
+   |     ---------------------------- a static `externalValue` is defined here
+...
+LL |         externalValue => true,
+   |         ^^^^^^^^^^^^^ cannot be named the same as a static
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0530`.
diff --git a/src/test/compile-fail/issue-16250.rs b/src/test/ui/issue-16250.rs
index f9d01003005..f9d01003005 100644
--- a/src/test/compile-fail/issue-16250.rs
+++ b/src/test/ui/issue-16250.rs
diff --git a/src/test/ui/issue-16250.stderr b/src/test/ui/issue-16250.stderr
new file mode 100644
index 00000000000..c826b20b65f
--- /dev/null
+++ b/src/test/ui/issue-16250.stderr
@@ -0,0 +1,21 @@
+error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout
+  --> $DIR/issue-16250.rs:16:20
+   |
+LL |     pub fn foo(x: (Foo)); //~ ERROR unspecified layout
+   |                    ^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-16250.rs:11:9
+   |
+LL | #![deny(warnings)]
+   |         ^^^^^^^^
+   = note: #[deny(improper_ctypes)] implied by #[deny(warnings)]
+   = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
+note: type defined here
+  --> $DIR/issue-16250.rs:13:1
+   |
+LL | pub struct Foo;
+   | ^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-16338.rs b/src/test/ui/issue-16338.rs
index 438073e3b2f..438073e3b2f 100644
--- a/src/test/compile-fail/issue-16338.rs
+++ b/src/test/ui/issue-16338.rs
diff --git a/src/test/ui/issue-16338.stderr b/src/test/ui/issue-16338.stderr
new file mode 100644
index 00000000000..c670f1e3e9c
--- /dev/null
+++ b/src/test/ui/issue-16338.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-16338.rs:17:9
+   |
+LL |     let Slice { data: data, len: len } = "foo";
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found struct `Slice`
+   |
+   = note: expected type `str`
+              found type `Slice<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-16401.rs b/src/test/ui/issue-16401.rs
index 3060bbea43c..3060bbea43c 100644
--- a/src/test/compile-fail/issue-16401.rs
+++ b/src/test/ui/issue-16401.rs
diff --git a/src/test/ui/issue-16401.stderr b/src/test/ui/issue-16401.stderr
new file mode 100644
index 00000000000..179415c7621
--- /dev/null
+++ b/src/test/ui/issue-16401.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-16401.rs:18:9
+   |
+LL |         Slice { data: data, len: len } => (),
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
+   |
+   = note: expected type `()`
+              found type `Slice<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-16538.rs b/src/test/ui/issue-16538.rs
index cc652119377..cc652119377 100644
--- a/src/test/compile-fail/issue-16538.rs
+++ b/src/test/ui/issue-16538.rs
diff --git a/src/test/ui/issue-16538.stderr b/src/test/ui/issue-16538.stderr
new file mode 100644
index 00000000000..9bc3590ebab
--- /dev/null
+++ b/src/test/ui/issue-16538.stderr
@@ -0,0 +1,19 @@
+error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-16538.rs:23:27
+   |
+LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
+   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: `*const usize` cannot be shared between threads safely
+  --> $DIR/issue-16538.rs:23:1
+   |
+LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const usize` cannot be shared between threads safely
+   |
+   = help: the trait `std::marker::Sync` is not implemented for `*const usize`
+   = note: shared static variables must have a type that implements `Sync`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0015, E0277.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-16562.rs b/src/test/ui/issue-16562.rs
index a400263a243..a400263a243 100644
--- a/src/test/compile-fail/issue-16562.rs
+++ b/src/test/ui/issue-16562.rs
diff --git a/src/test/ui/issue-16562.stderr b/src/test/ui/issue-16562.stderr
new file mode 100644
index 00000000000..a4525033e25
--- /dev/null
+++ b/src/test/ui/issue-16562.stderr
@@ -0,0 +1,9 @@
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-16562.rs:20:6
+   |
+LL | impl<T, M: MatrixShape> Collection for Col<M, usize> {
+   |      ^ unconstrained type parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/ui/issue-16683.nll.stderr b/src/test/ui/issue-16683.nll.stderr
new file mode 100644
index 00000000000..d789f580b27
--- /dev/null
+++ b/src/test/ui/issue-16683.nll.stderr
@@ -0,0 +1,22 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-16683.rs:14:9
+   |
+LL |         self.a(); //~ ERROR cannot infer
+   |         ^^^^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-16683.rs:14:14
+   |
+LL |         self.a(); //~ ERROR cannot infer
+   |              ^
+
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-16683.rs:14:9
+   |
+LL |     fn b(&self) {
+   |          - let's call the lifetime of this reference `'1`
+LL |         self.a(); //~ ERROR cannot infer
+   |         ^^^^^^^^ argument requires that `'1` must outlive `'a`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-16683.rs b/src/test/ui/issue-16683.rs
index fcbf8a3d351..fcbf8a3d351 100644
--- a/src/test/compile-fail/issue-16683.rs
+++ b/src/test/ui/issue-16683.rs
diff --git a/src/test/ui/issue-16683.stderr b/src/test/ui/issue-16683.stderr
new file mode 100644
index 00000000000..ceb5347ca80
--- /dev/null
+++ b/src/test/ui/issue-16683.stderr
@@ -0,0 +1,30 @@
+error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
+  --> $DIR/issue-16683.rs:14:14
+   |
+LL |         self.a(); //~ ERROR cannot infer
+   |              ^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 13:5...
+  --> $DIR/issue-16683.rs:13:5
+   |
+LL | /     fn b(&self) {
+LL | |         self.a(); //~ ERROR cannot infer
+LL | |     }
+   | |_____^
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/issue-16683.rs:14:9
+   |
+LL |         self.a(); //~ ERROR cannot infer
+   |         ^^^^
+note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 11:9...
+  --> $DIR/issue-16683.rs:11:9
+   |
+LL | trait T<'a> {
+   |         ^^
+   = note: ...so that the types are compatible:
+           expected &'a Self
+              found &Self
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/ui/issue-16922.nll.stderr b/src/test/ui/issue-16922.nll.stderr
new file mode 100644
index 00000000000..902baaf579f
--- /dev/null
+++ b/src/test/ui/issue-16922.nll.stderr
@@ -0,0 +1,17 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-16922.rs:14:14
+   |
+LL |     Box::new(value) as Box<Any>
+   |              ^^^^^
+
+error[E0621]: explicit lifetime required in the type of `value`
+  --> $DIR/issue-16922.rs:14:5
+   |
+LL | fn foo<T: Any>(value: &T) -> Box<Any> {
+   |                ----- consider changing the type of `value` to `&'static T`
+LL |     Box::new(value) as Box<Any>
+   |     ^^^^^^^^^^^^^^^ lifetime `'static` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-16922.rs b/src/test/ui/issue-16922.rs
index 1768c834cb3..1768c834cb3 100644
--- a/src/test/compile-fail/issue-16922.rs
+++ b/src/test/ui/issue-16922.rs
diff --git a/src/test/ui/issue-16922.stderr b/src/test/ui/issue-16922.stderr
new file mode 100644
index 00000000000..cf81d4b4d08
--- /dev/null
+++ b/src/test/ui/issue-16922.stderr
@@ -0,0 +1,11 @@
+error[E0621]: explicit lifetime required in the type of `value`
+  --> $DIR/issue-16922.rs:14:5
+   |
+LL | fn foo<T: Any>(value: &T) -> Box<Any> {
+   |                ----- consider changing the type of `value` to `&'static T`
+LL |     Box::new(value) as Box<Any>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-16939.rs b/src/test/ui/issue-16939.rs
index e16c58b8a6c..e16c58b8a6c 100644
--- a/src/test/compile-fail/issue-16939.rs
+++ b/src/test/ui/issue-16939.rs
diff --git a/src/test/ui/issue-16939.stderr b/src/test/ui/issue-16939.stderr
new file mode 100644
index 00000000000..23848049370
--- /dev/null
+++ b/src/test/ui/issue-16939.stderr
@@ -0,0 +1,9 @@
+error[E0057]: this function takes 0 parameters but 1 parameter was supplied
+  --> $DIR/issue-16939.rs:15:9
+   |
+LL |     |t| f(t); //~ ERROR E0057
+   |         ^^^^ expected 0 parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0057`.
diff --git a/src/test/compile-fail/issue-16966.rs b/src/test/ui/issue-16966.rs
index ecf81c8af17..ecf81c8af17 100644
--- a/src/test/compile-fail/issue-16966.rs
+++ b/src/test/ui/issue-16966.rs
diff --git a/src/test/ui/issue-16966.stderr b/src/test/ui/issue-16966.stderr
new file mode 100644
index 00000000000..f7129a6fe1b
--- /dev/null
+++ b/src/test/ui/issue-16966.stderr
@@ -0,0 +1,13 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-16966.rs:13:5
+   |
+LL | /     panic!(
+LL | |         std::default::Default::default()
+LL | |     );
+   | |______^ cannot infer type for `M`
+   |
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-1697.rs b/src/test/ui/issue-1697.rs
index f8a68264339..f8a68264339 100644
--- a/src/test/compile-fail/issue-1697.rs
+++ b/src/test/ui/issue-1697.rs
diff --git a/src/test/ui/issue-1697.stderr b/src/test/ui/issue-1697.stderr
new file mode 100644
index 00000000000..28a7fbcaabe
--- /dev/null
+++ b/src/test/ui/issue-1697.stderr
@@ -0,0 +1,9 @@
+error[E0432]: unresolved import `unresolved`
+  --> $DIR/issue-1697.rs:13:5
+   |
+LL | use unresolved::*; //~ ERROR unresolved import `unresolved` [E0432]
+   |     ^^^^^^^^^^ Maybe a missing `extern crate unresolved;`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-16994.rs b/src/test/ui/issue-16994.rs
index ae4e8ce1df8..ae4e8ce1df8 100644
--- a/src/test/compile-fail/issue-16994.rs
+++ b/src/test/ui/issue-16994.rs
diff --git a/src/test/ui/issue-16994.stderr b/src/test/ui/issue-16994.stderr
new file mode 100644
index 00000000000..8392b9da411
--- /dev/null
+++ b/src/test/ui/issue-16994.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-16994.rs:18:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b)));
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-17001.rs b/src/test/ui/issue-17001.rs
index 413e8b464ff..413e8b464ff 100644
--- a/src/test/compile-fail/issue-17001.rs
+++ b/src/test/ui/issue-17001.rs
diff --git a/src/test/ui/issue-17001.stderr b/src/test/ui/issue-17001.stderr
new file mode 100644
index 00000000000..a8e0cd8591b
--- /dev/null
+++ b/src/test/ui/issue-17001.stderr
@@ -0,0 +1,9 @@
+error[E0574]: expected struct, variant or union type, found module `foo`
+  --> $DIR/issue-17001.rs:14:13
+   |
+LL |     let p = foo { x: () }; //~ ERROR expected struct, variant or union type, found module `foo`
+   |             ^^^ not a struct, variant or union type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0574`.
diff --git a/src/test/compile-fail/issue-17025.rs b/src/test/ui/issue-17025.rs
index f250103b144..f250103b144 100644
--- a/src/test/compile-fail/issue-17025.rs
+++ b/src/test/ui/issue-17025.rs
diff --git a/src/test/compile-fail/issue-17033.rs b/src/test/ui/issue-17033.rs
index 1cd43cbb0f8..1cd43cbb0f8 100644
--- a/src/test/compile-fail/issue-17033.rs
+++ b/src/test/ui/issue-17033.rs
diff --git a/src/test/ui/issue-17033.stderr b/src/test/ui/issue-17033.stderr
new file mode 100644
index 00000000000..d6884f18881
--- /dev/null
+++ b/src/test/ui/issue-17033.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-17033.rs:12:10
+   |
+LL |     (*p)(()) //~  ERROR mismatched types
+   |          ^^
+   |          |
+   |          expected &mut (), found ()
+   |          help: consider mutably borrowing here: `&mut ()`
+   |
+   = note: expected type `&mut ()`
+              found type `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-17252.rs b/src/test/ui/issue-17252.rs
index 1c3e6890c8e..1c3e6890c8e 100644
--- a/src/test/compile-fail/issue-17252.rs
+++ b/src/test/ui/issue-17252.rs
diff --git a/src/test/ui/issue-17252.stderr b/src/test/ui/issue-17252.stderr
new file mode 100644
index 00000000000..8f97a841666
--- /dev/null
+++ b/src/test/ui/issue-17252.stderr
@@ -0,0 +1,16 @@
+error[E0391]: cycle detected when processing `FOO`
+  --> $DIR/issue-17252.rs:11:20
+   |
+LL | const FOO: usize = FOO; //~ ERROR E0391
+   |                    ^^^
+   |
+   = note: ...which again requires processing `FOO`, completing the cycle
+note: cycle used when processing `main::{{constant}}`
+  --> $DIR/issue-17252.rs:14:18
+   |
+LL |     let _x: [u8; FOO]; // caused stack overflow prior to fix
+   |                  ^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/compile-fail/issue-17337.rs b/src/test/ui/issue-17337.rs
index 1208321b529..1208321b529 100644
--- a/src/test/compile-fail/issue-17337.rs
+++ b/src/test/ui/issue-17337.rs
diff --git a/src/test/ui/issue-17337.stderr b/src/test/ui/issue-17337.stderr
new file mode 100644
index 00000000000..03215473745
--- /dev/null
+++ b/src/test/ui/issue-17337.stderr
@@ -0,0 +1,14 @@
+error: use of deprecated item 'Foo::foo': text
+  --> $DIR/issue-17337.rs:26:6
+   |
+LL |     .foo(); //~ ERROR use of deprecated item
+   |      ^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-17337.rs:12:9
+   |
+LL | #![deny(deprecated)]
+   |         ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-17373.rs b/src/test/ui/issue-17373.rs
index f6e6a8a0852..f6e6a8a0852 100644
--- a/src/test/compile-fail/issue-17373.rs
+++ b/src/test/ui/issue-17373.rs
diff --git a/src/test/ui/issue-17373.stderr b/src/test/ui/issue-17373.stderr
new file mode 100644
index 00000000000..38e93e65bdc
--- /dev/null
+++ b/src/test/ui/issue-17373.stderr
@@ -0,0 +1,9 @@
+error[E0614]: type `!` cannot be dereferenced
+  --> $DIR/issue-17373.rs:12:5
+   |
+LL |     *return //~ ERROR type `!` cannot be dereferenced
+   |     ^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0614`.
diff --git a/src/test/ui/issue-17385.nll.stderr b/src/test/ui/issue-17385.nll.stderr
new file mode 100644
index 00000000000..c3387e58fcf
--- /dev/null
+++ b/src/test/ui/issue-17385.nll.stderr
@@ -0,0 +1,77 @@
+error[E0382]: use of moved value: `foo`
+  --> $DIR/issue-17385.rs:28:5
+   |
+LL |       drop(foo);
+   |            --- value moved here
+LL | /     match foo { //~ ERROR use of moved value
+LL | |         X(1) => (),
+LL | |         _ => unreachable!()
+LL | |     }
+   | |_____^ value used here after move
+   |
+   = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
+
+error[E0382]: borrow of moved value: `foo`
+  --> $DIR/issue-17385.rs:28:5
+   |
+LL |       drop(foo);
+   |            --- value moved here
+LL | /     match foo { //~ ERROR use of moved value
+LL | |         X(1) => (),
+LL | |         _ => unreachable!()
+LL | |     }
+   | |_____^ value borrowed here after move
+   |
+   = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `foo.0`
+  --> $DIR/issue-17385.rs:29:11
+   |
+LL |     drop(foo);
+   |          --- value moved here
+LL |     match foo { //~ ERROR use of moved value
+LL |         X(1) => (),
+   |           ^ value used here after move
+   |
+   = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `e`
+  --> $DIR/issue-17385.rs:35:5
+   |
+LL |       drop(e);
+   |            - value moved here
+LL | /     match e { //~ ERROR use of moved value
+LL | |         Enum::Variant1 => unreachable!(),
+LL | |         Enum::Variant2 => ()
+LL | |     }
+   | |_____^ value used here after move
+   |
+   = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
+
+error[E0382]: borrow of moved value: `e`
+  --> $DIR/issue-17385.rs:35:5
+   |
+LL |       drop(e);
+   |            - value moved here
+LL | /     match e { //~ ERROR use of moved value
+LL | |         Enum::Variant1 => unreachable!(),
+LL | |         Enum::Variant2 => ()
+LL | |     }
+   | |_____^ value borrowed here after move
+   |
+   = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `e`
+  --> $DIR/issue-17385.rs:36:9
+   |
+LL |     drop(e);
+   |          - value moved here
+LL |     match e { //~ ERROR use of moved value
+LL |         Enum::Variant1 => unreachable!(),
+   |         ^^^^^^^^^^^^^^ value used here after move
+   |
+   = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-17385.rs b/src/test/ui/issue-17385.rs
index eb293c79247..eb293c79247 100644
--- a/src/test/compile-fail/issue-17385.rs
+++ b/src/test/ui/issue-17385.rs
diff --git a/src/test/ui/issue-17385.stderr b/src/test/ui/issue-17385.stderr
new file mode 100644
index 00000000000..01d6d1a2720
--- /dev/null
+++ b/src/test/ui/issue-17385.stderr
@@ -0,0 +1,23 @@
+error[E0382]: use of moved value: `foo`
+  --> $DIR/issue-17385.rs:28:11
+   |
+LL |     drop(foo);
+   |          --- value moved here
+LL |     match foo { //~ ERROR use of moved value
+   |           ^^^ value used here after move
+   |
+   = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `e`
+  --> $DIR/issue-17385.rs:35:11
+   |
+LL |     drop(e);
+   |          - value moved here
+LL |     match e { //~ ERROR use of moved value
+   |           ^ value used here after move
+   |
+   = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-17405.rs b/src/test/ui/issue-17405.rs
index 5a6bd5ed588..5a6bd5ed588 100644
--- a/src/test/compile-fail/issue-17405.rs
+++ b/src/test/ui/issue-17405.rs
diff --git a/src/test/ui/issue-17405.stderr b/src/test/ui/issue-17405.stderr
new file mode 100644
index 00000000000..bcccfd301b7
--- /dev/null
+++ b/src/test/ui/issue-17405.stderr
@@ -0,0 +1,9 @@
+error[E0574]: expected struct, variant or union type, found enum `Foo`
+  --> $DIR/issue-17405.rs:17:9
+   |
+LL |         Foo { i } => () //~ ERROR expected struct, variant or union type, found enum `Foo`
+   |         ^^^ not a struct, variant or union type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0574`.
diff --git a/src/test/compile-fail/issue-17431-1.rs b/src/test/ui/issue-17431-1.rs
index 260cc366fae..260cc366fae 100644
--- a/src/test/compile-fail/issue-17431-1.rs
+++ b/src/test/ui/issue-17431-1.rs
diff --git a/src/test/ui/issue-17431-1.stderr b/src/test/ui/issue-17431-1.stderr
new file mode 100644
index 00000000000..fb27693c85e
--- /dev/null
+++ b/src/test/ui/issue-17431-1.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-1.rs:11:1
+   |
+LL | struct Foo { foo: Option<Option<Foo>> }
+   | ^^^^^^^^^^   ------------------------ recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-2.rs b/src/test/ui/issue-17431-2.rs
index f39fb0e31c6..f39fb0e31c6 100644
--- a/src/test/compile-fail/issue-17431-2.rs
+++ b/src/test/ui/issue-17431-2.rs
diff --git a/src/test/ui/issue-17431-2.stderr b/src/test/ui/issue-17431-2.stderr
new file mode 100644
index 00000000000..7e87babe93e
--- /dev/null
+++ b/src/test/ui/issue-17431-2.stderr
@@ -0,0 +1,23 @@
+error[E0072]: recursive type `Baz` has infinite size
+  --> $DIR/issue-17431-2.rs:11:1
+   |
+LL | struct Baz { q: Option<Foo> }
+   | ^^^^^^^^^^   -------------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Baz` representable
+
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-2.rs:14:1
+   |
+LL | struct Foo { q: Option<Baz> }
+   | ^^^^^^^^^^   -------------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-3.rs b/src/test/ui/issue-17431-3.rs
index 9ba085591f0..9ba085591f0 100644
--- a/src/test/compile-fail/issue-17431-3.rs
+++ b/src/test/ui/issue-17431-3.rs
diff --git a/src/test/ui/issue-17431-3.stderr b/src/test/ui/issue-17431-3.stderr
new file mode 100644
index 00000000000..c12a4c11c2c
--- /dev/null
+++ b/src/test/ui/issue-17431-3.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-3.rs:13:1
+   |
+LL | struct Foo { foo: Mutex<Option<Foo>> }
+   | ^^^^^^^^^^   ----------------------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-4.rs b/src/test/ui/issue-17431-4.rs
index 665c3cf8fe6..665c3cf8fe6 100644
--- a/src/test/compile-fail/issue-17431-4.rs
+++ b/src/test/ui/issue-17431-4.rs
diff --git a/src/test/ui/issue-17431-4.stderr b/src/test/ui/issue-17431-4.stderr
new file mode 100644
index 00000000000..acfd688b622
--- /dev/null
+++ b/src/test/ui/issue-17431-4.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-4.rs:13:1
+   |
+LL | struct Foo<T> { foo: Option<Option<Foo<T>>>, marker: marker::PhantomData<T> }
+   | ^^^^^^^^^^^^^   --------------------------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-5.rs b/src/test/ui/issue-17431-5.rs
index 85ed4d5d634..85ed4d5d634 100644
--- a/src/test/compile-fail/issue-17431-5.rs
+++ b/src/test/ui/issue-17431-5.rs
diff --git a/src/test/ui/issue-17431-5.stderr b/src/test/ui/issue-17431-5.stderr
new file mode 100644
index 00000000000..ddfea58a857
--- /dev/null
+++ b/src/test/ui/issue-17431-5.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Bar` has infinite size
+  --> $DIR/issue-17431-5.rs:15:1
+   |
+LL | struct Bar<T> { x: Bar<Foo> , marker: marker::PhantomData<T> }
+   | ^^^^^^^^^^^^^   ----------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-6.rs b/src/test/ui/issue-17431-6.rs
index 4c1e82c3d6a..4c1e82c3d6a 100644
--- a/src/test/compile-fail/issue-17431-6.rs
+++ b/src/test/ui/issue-17431-6.rs
diff --git a/src/test/ui/issue-17431-6.stderr b/src/test/ui/issue-17431-6.stderr
new file mode 100644
index 00000000000..ab2cc439f17
--- /dev/null
+++ b/src/test/ui/issue-17431-6.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-6.rs:13:1
+   |
+LL | enum Foo { X(Mutex<Option<Foo>>) }
+   | ^^^^^^^^     ------------------ recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17431-7.rs b/src/test/ui/issue-17431-7.rs
index 71b85da29fc..71b85da29fc 100644
--- a/src/test/compile-fail/issue-17431-7.rs
+++ b/src/test/ui/issue-17431-7.rs
diff --git a/src/test/ui/issue-17431-7.stderr b/src/test/ui/issue-17431-7.stderr
new file mode 100644
index 00000000000..7f9118860b9
--- /dev/null
+++ b/src/test/ui/issue-17431-7.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `Foo` has infinite size
+  --> $DIR/issue-17431-7.rs:11:1
+   |
+LL | enum Foo { Voo(Option<Option<Foo>>) }
+   | ^^^^^^^^       ------------------- recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-17444.rs b/src/test/ui/issue-17444.rs
index dafcff23838..dafcff23838 100644
--- a/src/test/compile-fail/issue-17444.rs
+++ b/src/test/ui/issue-17444.rs
diff --git a/src/test/ui/issue-17444.stderr b/src/test/ui/issue-17444.stderr
new file mode 100644
index 00000000000..3f87d806e7e
--- /dev/null
+++ b/src/test/ui/issue-17444.stderr
@@ -0,0 +1,9 @@
+error[E0606]: casting `Test` as `*const isize` is invalid
+  --> $DIR/issue-17444.rs:16:14
+   |
+LL |     let _x = Test::Foo as *const isize;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0606`.
diff --git a/src/test/compile-fail/issue-17458.rs b/src/test/ui/issue-17458.rs
index f5b7a0c13b7..f5b7a0c13b7 100644
--- a/src/test/compile-fail/issue-17458.rs
+++ b/src/test/ui/issue-17458.rs
diff --git a/src/test/ui/issue-17458.stderr b/src/test/ui/issue-17458.stderr
new file mode 100644
index 00000000000..7a43813fa6d
--- /dev/null
+++ b/src/test/ui/issue-17458.stderr
@@ -0,0 +1,9 @@
+error[E0018]: raw pointers cannot be cast to integers in statics
+  --> $DIR/issue-17458.rs:11:19
+   |
+LL | static X: usize = 0 as *const usize as usize;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0018`.
diff --git a/src/test/ui/issue-17545.nll.stderr b/src/test/ui/issue-17545.nll.stderr
new file mode 100644
index 00000000000..50a4b3f7f3e
--- /dev/null
+++ b/src/test/ui/issue-17545.nll.stderr
@@ -0,0 +1,17 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-17545.rs:17:10
+   |
+LL |         &id(()), //~ ERROR borrowed value does not live long enough
+   |          ^^^^^^ temporary value does not live long enough
+LL |     ));
+   |       - temporary value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:12...
+  --> $DIR/issue-17545.rs:15:12
+   |
+LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
+   |            ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-17545.rs b/src/test/ui/issue-17545.rs
index 9264305e6ea..9264305e6ea 100644
--- a/src/test/compile-fail/issue-17545.rs
+++ b/src/test/ui/issue-17545.rs
diff --git a/src/test/ui/issue-17545.stderr b/src/test/ui/issue-17545.stderr
new file mode 100644
index 00000000000..ce698665583
--- /dev/null
+++ b/src/test/ui/issue-17545.stderr
@@ -0,0 +1,18 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-17545.rs:17:10
+   |
+LL |         &id(()), //~ ERROR borrowed value does not live long enough
+   |          ^^^^^^ temporary value does not live long enough
+LL |     ));
+   |       - temporary value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:12...
+  --> $DIR/issue-17545.rs:15:12
+   |
+LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
+   |            ^^
+   = note: consider using a `let` binding to increase its lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-17546.rs b/src/test/ui/issue-17546.rs
index fe125b973d9..fe125b973d9 100644
--- a/src/test/compile-fail/issue-17546.rs
+++ b/src/test/ui/issue-17546.rs
diff --git a/src/test/ui/issue-17546.stderr b/src/test/ui/issue-17546.stderr
new file mode 100644
index 00000000000..39f7d5fcc04
--- /dev/null
+++ b/src/test/ui/issue-17546.stderr
@@ -0,0 +1,55 @@
+error[E0573]: expected type, found variant `NoResult`
+  --> $DIR/issue-17546.rs:22:17
+   |
+LL |     fn new() -> NoResult<MyEnum, String> {
+   |                 --------^^^^^^^^^^^^^^^^
+   |                 |
+   |                 did you mean `Result`?
+   |                 help: you can try using the variant's enum: `foo::MyEnum`
+
+error[E0573]: expected type, found variant `Result`
+  --> $DIR/issue-17546.rs:32:17
+   |
+LL |     fn new() -> Result<foo::MyEnum, String> {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
+help: possible better candidates are found in other modules, you can import them into scope
+   |
+LL |     use std::fmt::Result;
+   |
+LL |     use std::io::Result;
+   |
+LL |     use std::prelude::v1::Result;
+   |
+LL |     use std::result::Result;
+   |
+and 1 other candidates
+
+error[E0573]: expected type, found variant `Result`
+  --> $DIR/issue-17546.rs:38:13
+   |
+LL | fn new() -> Result<foo::MyEnum, String> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
+help: possible better candidates are found in other modules, you can import them into scope
+   |
+LL | use std::fmt::Result;
+   |
+LL | use std::io::Result;
+   |
+LL | use std::prelude::v1::Result;
+   |
+LL | use std::result::Result;
+   |
+and 1 other candidates
+
+error[E0573]: expected type, found variant `NoResult`
+  --> $DIR/issue-17546.rs:43:15
+   |
+LL | fn newer() -> NoResult<foo::MyEnum, String> {
+   |               --------^^^^^^^^^^^^^^^^^^^^^
+   |               |
+   |               did you mean `Result`?
+   |               help: you can try using the variant's enum: `foo::MyEnum`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0573`.
diff --git a/src/test/compile-fail/issue-17551.rs b/src/test/ui/issue-17551.rs
index b55863f0dda..b55863f0dda 100644
--- a/src/test/compile-fail/issue-17551.rs
+++ b/src/test/ui/issue-17551.rs
diff --git a/src/test/ui/issue-17551.stderr b/src/test/ui/issue-17551.stderr
new file mode 100644
index 00000000000..0cdee0337d8
--- /dev/null
+++ b/src/test/ui/issue-17551.stderr
@@ -0,0 +1,11 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-17551.rs:16:15
+   |
+LL |     let foo = B(marker::PhantomData); //~ ERROR type annotations needed
+   |         ---   ^ cannot infer type for `T`
+   |         |
+   |         consider giving `foo` a type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-17651.rs b/src/test/ui/issue-17651.rs
index cbd0da4b53c..cbd0da4b53c 100644
--- a/src/test/compile-fail/issue-17651.rs
+++ b/src/test/ui/issue-17651.rs
diff --git a/src/test/ui/issue-17651.stderr b/src/test/ui/issue-17651.stderr
new file mode 100644
index 00000000000..d21b3060315
--- /dev/null
+++ b/src/test/ui/issue-17651.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
+  --> $DIR/issue-17651.rs:15:9
+   |
+LL |     (|| Box::new(*(&[0][..])))();
+   |         ^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `[{integer}]`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required by `<std::boxed::Box<T>>::new`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-17718-const-bad-values.rs b/src/test/ui/issue-17718-const-bad-values.rs
index 17ec77d77ee..17ec77d77ee 100644
--- a/src/test/compile-fail/issue-17718-const-bad-values.rs
+++ b/src/test/ui/issue-17718-const-bad-values.rs
diff --git a/src/test/ui/issue-17718-const-bad-values.stderr b/src/test/ui/issue-17718-const-bad-values.stderr
new file mode 100644
index 00000000000..0ab7f965b63
--- /dev/null
+++ b/src/test/ui/issue-17718-const-bad-values.stderr
@@ -0,0 +1,28 @@
+error[E0017]: references in constants may only refer to immutable values
+  --> $DIR/issue-17718-const-bad-values.rs:11:34
+   |
+LL | const C1: &'static mut [usize] = &mut [];
+   |                                  ^^^^^^^ constants require immutable values
+
+error[E0013]: constants cannot refer to statics, use a constant instead
+  --> $DIR/issue-17718-const-bad-values.rs:15:41
+   |
+LL | const C2: &'static mut usize = unsafe { &mut S };
+   |                                         ^^^^^^
+
+error[E0017]: references in constants may only refer to immutable values
+  --> $DIR/issue-17718-const-bad-values.rs:15:41
+   |
+LL | const C2: &'static mut usize = unsafe { &mut S };
+   |                                         ^^^^^^ constants require immutable values
+
+error[E0017]: references in constants may only refer to immutable values
+  --> $DIR/issue-17718-const-bad-values.rs:15:32
+   |
+LL | const C2: &'static mut usize = unsafe { &mut S };
+   |                                ^^^^^^^^^^^^^^^^^ constants require immutable values
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0013, E0017.
+For more information about an error, try `rustc --explain E0013`.
diff --git a/src/test/compile-fail/issue-17718-const-borrow.rs b/src/test/ui/issue-17718-const-borrow.rs
index 07123c69492..07123c69492 100644
--- a/src/test/compile-fail/issue-17718-const-borrow.rs
+++ b/src/test/ui/issue-17718-const-borrow.rs
diff --git a/src/test/ui/issue-17718-const-borrow.stderr b/src/test/ui/issue-17718-const-borrow.stderr
new file mode 100644
index 00000000000..3b0217060f7
--- /dev/null
+++ b/src/test/ui/issue-17718-const-borrow.stderr
@@ -0,0 +1,21 @@
+error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
+  --> $DIR/issue-17718-const-borrow.rs:14:39
+   |
+LL | const B: &'static UnsafeCell<usize> = &A;
+   |                                       ^^
+
+error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
+  --> $DIR/issue-17718-const-borrow.rs:19:39
+   |
+LL | const E: &'static UnsafeCell<usize> = &D.a;
+   |                                       ^^^^
+
+error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
+  --> $DIR/issue-17718-const-borrow.rs:21:23
+   |
+LL | const F: &'static C = &D;
+   |                       ^^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0492`.
diff --git a/src/test/compile-fail/issue-17718-const-naming.rs b/src/test/ui/issue-17718-const-naming.rs
index 4857c2fb446..4857c2fb446 100644
--- a/src/test/compile-fail/issue-17718-const-naming.rs
+++ b/src/test/ui/issue-17718-const-naming.rs
diff --git a/src/test/ui/issue-17718-const-naming.stderr b/src/test/ui/issue-17718-const-naming.stderr
new file mode 100644
index 00000000000..9636db31390
--- /dev/null
+++ b/src/test/ui/issue-17718-const-naming.stderr
@@ -0,0 +1,28 @@
+error: constant item is never used: `foo`
+  --> $DIR/issue-17718-const-naming.rs:14:1
+   |
+LL | const foo: isize = 3;
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-17718-const-naming.rs:12:8
+   |
+LL | #[deny(warnings)]
+   |        ^^^^^^^^
+   = note: #[deny(dead_code)] implied by #[deny(warnings)]
+
+error: constant `foo` should have an upper case name such as `FOO`
+  --> $DIR/issue-17718-const-naming.rs:14:1
+   |
+LL | const foo: isize = 3;
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-17718-const-naming.rs:12:8
+   |
+LL | #[deny(warnings)]
+   |        ^^^^^^^^
+   = note: #[deny(non_upper_case_globals)] implied by #[deny(warnings)]
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-17718-constants-not-static.rs b/src/test/ui/issue-17718-constants-not-static.rs
index 9b7ed463499..9b7ed463499 100644
--- a/src/test/compile-fail/issue-17718-constants-not-static.rs
+++ b/src/test/ui/issue-17718-constants-not-static.rs
diff --git a/src/test/ui/issue-17718-constants-not-static.stderr b/src/test/ui/issue-17718-constants-not-static.stderr
new file mode 100644
index 00000000000..61d8399aba9
--- /dev/null
+++ b/src/test/ui/issue-17718-constants-not-static.stderr
@@ -0,0 +1,13 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-17718-constants-not-static.rs:15:31
+   |
+LL | fn foo() -> &'static usize { &id(FOO) }
+   |                               ^^^^^^^ - temporary value only lives until here
+   |                               |
+   |                               temporary value does not live long enough
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-17718-patterns.rs b/src/test/ui/issue-17718-patterns.rs
index b9f5e98b6fa..b9f5e98b6fa 100644
--- a/src/test/compile-fail/issue-17718-patterns.rs
+++ b/src/test/ui/issue-17718-patterns.rs
diff --git a/src/test/ui/issue-17718-patterns.stderr b/src/test/ui/issue-17718-patterns.stderr
new file mode 100644
index 00000000000..13cab9a08b1
--- /dev/null
+++ b/src/test/ui/issue-17718-patterns.stderr
@@ -0,0 +1,21 @@
+error[E0530]: match bindings cannot shadow statics
+  --> $DIR/issue-17718-patterns.rs:17:9
+   |
+LL | static A1: usize = 1;
+   | --------------------- a static `A1` is defined here
+...
+LL |         A1 => {} //~ ERROR: match bindings cannot shadow statics
+   |         ^^ cannot be named the same as a static
+
+error[E0530]: match bindings cannot shadow statics
+  --> $DIR/issue-17718-patterns.rs:18:9
+   |
+LL | static mut A2: usize = 1;
+   | ------------------------- a static `A2` is defined here
+...
+LL |         A2 => {} //~ ERROR: match bindings cannot shadow statics
+   |         ^^ cannot be named the same as a static
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0530`.
diff --git a/src/test/compile-fail/issue-17718-references.rs b/src/test/ui/issue-17718-references.rs
index 586cfebcd16..586cfebcd16 100644
--- a/src/test/compile-fail/issue-17718-references.rs
+++ b/src/test/ui/issue-17718-references.rs
diff --git a/src/test/ui/issue-17718-references.stderr b/src/test/ui/issue-17718-references.stderr
new file mode 100644
index 00000000000..6e89a83b308
--- /dev/null
+++ b/src/test/ui/issue-17718-references.stderr
@@ -0,0 +1,21 @@
+error[E0013]: constants cannot refer to statics, use a constant instead
+  --> $DIR/issue-17718-references.rs:19:28
+   |
+LL | const T2: &'static usize = &S; //~ ERROR: constants cannot refer to statics
+   |                            ^^
+
+error[E0013]: constants cannot refer to statics, use a constant instead
+  --> $DIR/issue-17718-references.rs:24:19
+   |
+LL | const T6: usize = S; //~ ERROR: constants cannot refer to statics
+   |                   ^
+
+error[E0013]: constants cannot refer to statics, use a constant instead
+  --> $DIR/issue-17718-references.rs:29:33
+   |
+LL | const T10: Struct = Struct { a: S };
+   |                                 ^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0013`.
diff --git a/src/test/compile-fail/issue-17718-static-move.rs b/src/test/ui/issue-17718-static-move.rs
index a5a7117956f..a5a7117956f 100644
--- a/src/test/compile-fail/issue-17718-static-move.rs
+++ b/src/test/ui/issue-17718-static-move.rs
diff --git a/src/test/ui/issue-17718-static-move.stderr b/src/test/ui/issue-17718-static-move.stderr
new file mode 100644
index 00000000000..a6384cfce8f
--- /dev/null
+++ b/src/test/ui/issue-17718-static-move.stderr
@@ -0,0 +1,12 @@
+error[E0507]: cannot move out of static item
+  --> $DIR/issue-17718-static-move.rs:16:14
+   |
+LL |     let _a = FOO; //~ ERROR: cannot move out of static item
+   |              ^^^
+   |              |
+   |              cannot move out of static item
+   |              help: consider using a reference instead: `&FOO`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/compile-fail/issue-17718-static-sync.rs b/src/test/ui/issue-17718-static-sync.rs
index c5349d4e82b..c5349d4e82b 100644
--- a/src/test/compile-fail/issue-17718-static-sync.rs
+++ b/src/test/ui/issue-17718-static-sync.rs
diff --git a/src/test/ui/issue-17718-static-sync.stderr b/src/test/ui/issue-17718-static-sync.stderr
new file mode 100644
index 00000000000..d6816826a00
--- /dev/null
+++ b/src/test/ui/issue-17718-static-sync.stderr
@@ -0,0 +1,12 @@
+error[E0277]: `Foo` cannot be shared between threads safely
+  --> $DIR/issue-17718-static-sync.rs:19:1
+   |
+LL | static BAR: Foo = Foo;
+   | ^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be shared between threads safely
+   |
+   = help: the trait `std::marker::Sync` is not implemented for `Foo`
+   = note: shared static variables must have a type that implements `Sync`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/issue-17728.nll.stderr b/src/test/ui/issue-17728.nll.stderr
new file mode 100644
index 00000000000..b9931e45bd2
--- /dev/null
+++ b/src/test/ui/issue-17728.nll.stderr
@@ -0,0 +1,25 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-17728.rs:23:49
+   |
+LL |         let maybe_room = room.direction_to_room.get(&direction);
+   |                                                 ^^^
+
+error[E0308]: match arms have incompatible types
+  --> $DIR/issue-17728.rs:110:5
+   |
+LL | /     match to_parse { //~ ERROR match arms have incompatible types
+LL | |         "w" | "west" => RoomDirection::West,
+LL | |         "e" | "east" => RoomDirection::East,
+LL | |         "n" | "north" => RoomDirection::North,
+...  |
+LL | |         _ => None
+   | |              ---- match arm with an incompatible type
+LL | |     }
+   | |_____^ expected enum `RoomDirection`, found enum `std::option::Option`
+   |
+   = note: expected type `RoomDirection`
+              found type `std::option::Option<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-17728.rs b/src/test/ui/issue-17728.rs
index 8516a8ea52e..8516a8ea52e 100644
--- a/src/test/compile-fail/issue-17728.rs
+++ b/src/test/ui/issue-17728.rs
diff --git a/src/test/ui/issue-17728.stderr b/src/test/ui/issue-17728.stderr
new file mode 100644
index 00000000000..e46c48c4c39
--- /dev/null
+++ b/src/test/ui/issue-17728.stderr
@@ -0,0 +1,31 @@
+error[E0623]: lifetime mismatch
+  --> $DIR/issue-17728.rs:25:28
+   |
+LL |     fn attemptTraverse(&self, room: &Room, directionStr: &str) -> Result<&Room, &str> {
+   |                                     -----                         -------------------
+   |                                     |
+   |                                     this parameter and the return type are declared with different lifetimes...
+...
+LL |             Some(entry) => Ok(entry),
+   |                            ^^^^^^^^^ ...but data from `room` is returned here
+
+error[E0308]: match arms have incompatible types
+  --> $DIR/issue-17728.rs:110:5
+   |
+LL | /     match to_parse { //~ ERROR match arms have incompatible types
+LL | |         "w" | "west" => RoomDirection::West,
+LL | |         "e" | "east" => RoomDirection::East,
+LL | |         "n" | "north" => RoomDirection::North,
+...  |
+LL | |         _ => None
+   | |              ---- match arm with an incompatible type
+LL | |     }
+   | |_____^ expected enum `RoomDirection`, found enum `std::option::Option`
+   |
+   = note: expected type `RoomDirection`
+              found type `std::option::Option<_>`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0308, E0623.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-17740.rs b/src/test/ui/issue-17740.rs
index 1d5ef4360dc..1d5ef4360dc 100644
--- a/src/test/compile-fail/issue-17740.rs
+++ b/src/test/ui/issue-17740.rs
diff --git a/src/test/ui/issue-17740.stderr b/src/test/ui/issue-17740.stderr
new file mode 100644
index 00000000000..e4f5485953c
--- /dev/null
+++ b/src/test/ui/issue-17740.stderr
@@ -0,0 +1,53 @@
+error[E0308]: mismatched method receiver
+  --> $DIR/issue-17740.rs:16:18
+   |
+LL |     fn bar(self: &mut Foo) {
+   |                  ^^^^^^^^ lifetime mismatch
+   |
+   = note: expected type `Foo<'a>`
+              found type `Foo<'_>`
+note: the anonymous lifetime #2 defined on the method body at 16:5...
+  --> $DIR/issue-17740.rs:16:5
+   |
+LL | /     fn bar(self: &mut Foo) {
+LL | |     //~^ mismatched method receiver
+LL | |     //~| expected type `Foo<'a>`
+LL | |     //~| found type `Foo<'_>`
+...  |
+LL | |     //~| lifetime mismatch
+LL | |     }
+   | |_____^
+note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 15:7
+  --> $DIR/issue-17740.rs:15:7
+   |
+LL | impl <'a> Foo<'a>{
+   |       ^^
+
+error[E0308]: mismatched method receiver
+  --> $DIR/issue-17740.rs:16:18
+   |
+LL |     fn bar(self: &mut Foo) {
+   |                  ^^^^^^^^ lifetime mismatch
+   |
+   = note: expected type `Foo<'a>`
+              found type `Foo<'_>`
+note: the lifetime 'a as defined on the impl at 15:7...
+  --> $DIR/issue-17740.rs:15:7
+   |
+LL | impl <'a> Foo<'a>{
+   |       ^^
+note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 16:5
+  --> $DIR/issue-17740.rs:16:5
+   |
+LL | /     fn bar(self: &mut Foo) {
+LL | |     //~^ mismatched method receiver
+LL | |     //~| expected type `Foo<'a>`
+LL | |     //~| found type `Foo<'_>`
+...  |
+LL | |     //~| lifetime mismatch
+LL | |     }
+   | |_____^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-17758.nll.stderr b/src/test/ui/issue-17758.nll.stderr
new file mode 100644
index 00000000000..124fc6f0b39
--- /dev/null
+++ b/src/test/ui/issue-17758.nll.stderr
@@ -0,0 +1,22 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-17758.rs:17:9
+   |
+LL |         self.foo();
+   |         ^^^^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-17758.rs:17:14
+   |
+LL |         self.foo();
+   |              ^^^
+
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-17758.rs:17:9
+   |
+LL |     fn bar(&self) {
+   |            - let's call the lifetime of this reference `'1`
+LL |         self.foo();
+   |         ^^^^^^^^^^ argument requires that `'1` must outlive `'a`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-17758.rs b/src/test/ui/issue-17758.rs
index a47f5c16a46..a47f5c16a46 100644
--- a/src/test/compile-fail/issue-17758.rs
+++ b/src/test/ui/issue-17758.rs
diff --git a/src/test/ui/issue-17758.stderr b/src/test/ui/issue-17758.stderr
new file mode 100644
index 00000000000..3d78b2e2d7f
--- /dev/null
+++ b/src/test/ui/issue-17758.stderr
@@ -0,0 +1,31 @@
+error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
+  --> $DIR/issue-17758.rs:17:14
+   |
+LL |         self.foo();
+   |              ^^^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 16:5...
+  --> $DIR/issue-17758.rs:16:5
+   |
+LL | /     fn bar(&self) {
+LL | |         self.foo();
+LL | |         //~^ ERROR cannot infer
+LL | |     }
+   | |_____^
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/issue-17758.rs:17:9
+   |
+LL |         self.foo();
+   |         ^^^^
+note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 14:11...
+  --> $DIR/issue-17758.rs:14:11
+   |
+LL | trait Foo<'a> {
+   |           ^^
+   = note: ...so that the types are compatible:
+           expected &'a Self
+              found &Self
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/compile-fail/issue-17800.rs b/src/test/ui/issue-17800.rs
index f7cae91aa93..f7cae91aa93 100644
--- a/src/test/compile-fail/issue-17800.rs
+++ b/src/test/ui/issue-17800.rs
diff --git a/src/test/ui/issue-17800.stderr b/src/test/ui/issue-17800.stderr
new file mode 100644
index 00000000000..2cc562fbd7a
--- /dev/null
+++ b/src/test/ui/issue-17800.stderr
@@ -0,0 +1,18 @@
+error[E0026]: variant `MyOption::MySome` does not have a field named `x`
+  --> $DIR/issue-17800.rs:18:28
+   |
+LL |         MyOption::MySome { x: 42 } => (),
+   |                            ^^^^^ variant `MyOption::MySome` does not have this field
+
+error[E0027]: pattern does not mention field `0`
+  --> $DIR/issue-17800.rs:18:9
+   |
+LL |         MyOption::MySome { x: 42 } => (),
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `0`
+   |
+   = note: trying to match a tuple variant with a struct variant pattern
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0026, E0027.
+For more information about an error, try `rustc --explain E0026`.
diff --git a/src/test/compile-fail/issue-17904-2.rs b/src/test/ui/issue-17904-2.rs
index a15ccb71aa7..a15ccb71aa7 100644
--- a/src/test/compile-fail/issue-17904-2.rs
+++ b/src/test/ui/issue-17904-2.rs
diff --git a/src/test/ui/issue-17904-2.stderr b/src/test/ui/issue-17904-2.stderr
new file mode 100644
index 00000000000..00013d4d52b
--- /dev/null
+++ b/src/test/ui/issue-17904-2.stderr
@@ -0,0 +1,11 @@
+error[E0392]: parameter `T` is never used
+  --> $DIR/issue-17904-2.rs:14:12
+   |
+LL | struct Foo<T> where T: Copy; //~ ERROR parameter `T` is never used
+   |            ^ unused type parameter
+   |
+   = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/compile-fail/issue-17905.rs b/src/test/ui/issue-17905.rs
index f11d482ea16..f11d482ea16 100644
--- a/src/test/compile-fail/issue-17905.rs
+++ b/src/test/ui/issue-17905.rs
diff --git a/src/test/ui/issue-17905.stderr b/src/test/ui/issue-17905.stderr
new file mode 100644
index 00000000000..1a7aba17480
--- /dev/null
+++ b/src/test/ui/issue-17905.stderr
@@ -0,0 +1,9 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/issue-17905.rs:15:5
+   |
+LL |     &str, //~ ERROR missing lifetime specifier
+   |     ^ expected lifetime parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/compile-fail/issue-17933.rs b/src/test/ui/issue-17933.rs
index 049a0665c54..049a0665c54 100644
--- a/src/test/compile-fail/issue-17933.rs
+++ b/src/test/ui/issue-17933.rs
diff --git a/src/test/ui/issue-17933.stderr b/src/test/ui/issue-17933.stderr
new file mode 100644
index 00000000000..ec0f4785c8f
--- /dev/null
+++ b/src/test/ui/issue-17933.stderr
@@ -0,0 +1,9 @@
+error[E0532]: expected unit struct/variant or constant, found static `self::X`
+  --> $DIR/issue-17933.rs:15:9
+   |
+LL |         self::X => { },
+   |         ^^^^^^^ not a unit struct/variant or constant
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/ui/issue-17954.ast.nll.stderr b/src/test/ui/issue-17954.ast.nll.stderr
new file mode 100644
index 00000000000..f731e8eeae6
--- /dev/null
+++ b/src/test/ui/issue-17954.ast.nll.stderr
@@ -0,0 +1,14 @@
+error[E0597]: `FOO` does not live long enough
+  --> $DIR/issue-17954.rs:20:13
+   |
+LL |     let a = &FOO;
+   |             ^^^^ borrowed value does not live long enough
+...
+LL | }
+   | - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-17954.ast.stderr b/src/test/ui/issue-17954.ast.stderr
new file mode 100644
index 00000000000..677d2cbfffc
--- /dev/null
+++ b/src/test/ui/issue-17954.ast.stderr
@@ -0,0 +1,14 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-17954.rs:20:14
+   |
+LL |     let a = &FOO;
+   |              ^^^ temporary value does not live long enough
+...
+LL | }
+   | - temporary value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-17954.mir.stderr b/src/test/ui/issue-17954.mir.stderr
new file mode 100644
index 00000000000..f731e8eeae6
--- /dev/null
+++ b/src/test/ui/issue-17954.mir.stderr
@@ -0,0 +1,14 @@
+error[E0597]: `FOO` does not live long enough
+  --> $DIR/issue-17954.rs:20:13
+   |
+LL |     let a = &FOO;
+   |             ^^^^ borrowed value does not live long enough
+...
+LL | }
+   | - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-17954.rs b/src/test/ui/issue-17954.rs
index 4211057610b..4211057610b 100644
--- a/src/test/compile-fail/issue-17954.rs
+++ b/src/test/ui/issue-17954.rs
diff --git a/src/test/compile-fail/issue-17959.rs b/src/test/ui/issue-17959.rs
index 37c8173c4f6..37c8173c4f6 100644
--- a/src/test/compile-fail/issue-17959.rs
+++ b/src/test/ui/issue-17959.rs
diff --git a/src/test/ui/issue-17959.stderr b/src/test/ui/issue-17959.stderr
new file mode 100644
index 00000000000..626b670ae35
--- /dev/null
+++ b/src/test/ui/issue-17959.stderr
@@ -0,0 +1,23 @@
+error[E0367]: The requirement `T: std::marker::Sized` is added only by the Drop impl.
+  --> $DIR/issue-17959.rs:21:1
+   |
+LL | / impl<T> Drop for G<T> {
+LL | | //~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
+LL | |     fn drop(&mut self) {
+LL | |         if !self._ptr.is_null() {
+LL | |         }
+LL | |     }
+LL | | }
+   | |_^
+   |
+note: The same requirement must be part of the struct/enum definition
+  --> $DIR/issue-17959.rs:17:1
+   |
+LL | / struct G<T: ?Sized> {
+LL | |     _ptr: *const T
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0367`.
diff --git a/src/test/compile-fail/issue-17994.rs b/src/test/ui/issue-17994.rs
index 25141b9b825..25141b9b825 100644
--- a/src/test/compile-fail/issue-17994.rs
+++ b/src/test/ui/issue-17994.rs
diff --git a/src/test/ui/issue-17994.stderr b/src/test/ui/issue-17994.stderr
new file mode 100644
index 00000000000..77bcc469538
--- /dev/null
+++ b/src/test/ui/issue-17994.stderr
@@ -0,0 +1,9 @@
+error[E0091]: type parameter `T` is unused
+  --> $DIR/issue-17994.rs:12:10
+   |
+LL | type Huh<T> where T: Tr = isize; //~  ERROR type parameter `T` is unused
+   |          ^ unused type parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0091`.
diff --git a/src/test/compile-fail/issue-17999.rs b/src/test/ui/issue-17999.rs
index 88945f80eae..88945f80eae 100644
--- a/src/test/compile-fail/issue-17999.rs
+++ b/src/test/ui/issue-17999.rs
diff --git a/src/test/ui/issue-17999.stderr b/src/test/ui/issue-17999.stderr
new file mode 100644
index 00000000000..1a24015da54
--- /dev/null
+++ b/src/test/ui/issue-17999.stderr
@@ -0,0 +1,20 @@
+error: unused variable: `x`
+  --> $DIR/issue-17999.rs:15:13
+   |
+LL |         let x = (); //~ ERROR: unused variable: `x`
+   |             ^ help: consider using `_x` instead
+   |
+note: lint level defined here
+  --> $DIR/issue-17999.rs:11:9
+   |
+LL | #![deny(unused_variables)]
+   |         ^^^^^^^^^^^^^^^^
+
+error: unused variable: `a`
+  --> $DIR/issue-17999.rs:17:13
+   |
+LL |             a => {} //~ ERROR: unused variable: `a`
+   |             ^ help: consider using `_a` instead
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-18058.rs b/src/test/ui/issue-18058.rs
index 4c815e689d4..4c815e689d4 100644
--- a/src/test/compile-fail/issue-18058.rs
+++ b/src/test/ui/issue-18058.rs
diff --git a/src/test/ui/issue-18058.stderr b/src/test/ui/issue-18058.stderr
new file mode 100644
index 00000000000..ded375a9332
--- /dev/null
+++ b/src/test/ui/issue-18058.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `Undefined` in this scope
+  --> $DIR/issue-18058.rs:11:6
+   |
+LL | impl Undefined {}
+   |      ^^^^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-18107.rs b/src/test/ui/issue-18107.rs
index 260038b7add..260038b7add 100644
--- a/src/test/compile-fail/issue-18107.rs
+++ b/src/test/ui/issue-18107.rs
diff --git a/src/test/ui/issue-18107.stderr b/src/test/ui/issue-18107.stderr
new file mode 100644
index 00000000000..4a273ab6735
--- /dev/null
+++ b/src/test/ui/issue-18107.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `(dyn AbstractRenderer + 'static)` cannot be known at compilation time
+  --> $DIR/issue-18107.rs:14:5
+   |
+LL |     AbstractRenderer
+   |     ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `(dyn AbstractRenderer + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: the return type of a function must have a statically known size
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-18118-2.rs b/src/test/ui/issue-18118-2.rs
index 6efe532b5fd..6efe532b5fd 100644
--- a/src/test/compile-fail/issue-18118-2.rs
+++ b/src/test/ui/issue-18118-2.rs
diff --git a/src/test/ui/issue-18118-2.stderr b/src/test/ui/issue-18118-2.stderr
new file mode 100644
index 00000000000..c0b306140c5
--- /dev/null
+++ b/src/test/ui/issue-18118-2.stderr
@@ -0,0 +1,9 @@
+error[E0013]: constants cannot refer to statics, use a constant instead
+  --> $DIR/issue-18118-2.rs:14:9
+   |
+LL |         &p
+   |         ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0013`.
diff --git a/src/test/ui/issue-18118.nll.stderr b/src/test/ui/issue-18118.nll.stderr
new file mode 100644
index 00000000000..7acab8426f6
--- /dev/null
+++ b/src/test/ui/issue-18118.nll.stderr
@@ -0,0 +1,67 @@
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:15:17
+   |
+LL |         let p = 3;
+   |                 ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:15:17
+   |
+LL |         let p = 3;
+   |                 ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:18:9
+   |
+LL |         &p //~ ERROR `p` does not live long enough
+   |         ^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:12:5
+   |
+LL | /     const z: &'static isize = {
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |         //~| ERROR statements in constants are unstable
+LL | |         let p = 3;
+...  |
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |     };
+   | |______^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:12:5
+   |
+LL | /     const z: &'static isize = {
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |         //~| ERROR statements in constants are unstable
+LL | |         let p = 3;
+...  |
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |     };
+   | |______^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0597]: `p` does not live long enough
+  --> $DIR/issue-18118.rs:18:9
+   |
+LL |         &p //~ ERROR `p` does not live long enough
+   |         ^^ borrowed value does not live long enough
+LL |         //~^ ERROR let bindings in constants are unstable
+LL |     };
+   |     - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to 6 previous errors
+
+Some errors occurred: E0597, E0658.
+For more information about an error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-18118.rs b/src/test/ui/issue-18118.rs
index 7194c159c1e..7194c159c1e 100644
--- a/src/test/compile-fail/issue-18118.rs
+++ b/src/test/ui/issue-18118.rs
diff --git a/src/test/ui/issue-18118.stderr b/src/test/ui/issue-18118.stderr
new file mode 100644
index 00000000000..2d83b86e5f4
--- /dev/null
+++ b/src/test/ui/issue-18118.stderr
@@ -0,0 +1,67 @@
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:15:17
+   |
+LL |         let p = 3;
+   |                 ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:15:17
+   |
+LL |         let p = 3;
+   |                 ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:18:9
+   |
+LL |         &p //~ ERROR `p` does not live long enough
+   |         ^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: let bindings in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:12:5
+   |
+LL | /     const z: &'static isize = {
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |         //~| ERROR statements in constants are unstable
+LL | |         let p = 3;
+...  |
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |     };
+   | |______^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-18118.rs:12:5
+   |
+LL | /     const z: &'static isize = {
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |         //~| ERROR statements in constants are unstable
+LL | |         let p = 3;
+...  |
+LL | |         //~^ ERROR let bindings in constants are unstable
+LL | |     };
+   | |______^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0597]: `p` does not live long enough
+  --> $DIR/issue-18118.rs:18:10
+   |
+LL |         &p //~ ERROR `p` does not live long enough
+   |          ^ borrowed value does not live long enough
+LL |         //~^ ERROR let bindings in constants are unstable
+LL |     };
+   |     - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to 6 previous errors
+
+Some errors occurred: E0597, E0658.
+For more information about an error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-18119.rs b/src/test/ui/issue-18119.rs
index 412f7566f47..412f7566f47 100644
--- a/src/test/compile-fail/issue-18119.rs
+++ b/src/test/ui/issue-18119.rs
diff --git a/src/test/ui/issue-18119.stderr b/src/test/ui/issue-18119.stderr
new file mode 100644
index 00000000000..e0e2d089b7b
--- /dev/null
+++ b/src/test/ui/issue-18119.stderr
@@ -0,0 +1,21 @@
+error[E0573]: expected type, found constant `X`
+  --> $DIR/issue-18119.rs:15:6
+   |
+LL | impl X {}
+   |      ^ not a type
+
+error[E0573]: expected type, found static `Y`
+  --> $DIR/issue-18119.rs:17:6
+   |
+LL | impl Y {}
+   |      ^ not a type
+
+error[E0573]: expected type, found function `foo`
+  --> $DIR/issue-18119.rs:19:6
+   |
+LL | impl foo {}
+   |      ^^^ not a type
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0573`.
diff --git a/src/test/compile-fail/issue-18159.rs b/src/test/ui/issue-18159.rs
index 8991eded3d6..8991eded3d6 100644
--- a/src/test/compile-fail/issue-18159.rs
+++ b/src/test/ui/issue-18159.rs
diff --git a/src/test/ui/issue-18159.stderr b/src/test/ui/issue-18159.stderr
new file mode 100644
index 00000000000..894660f1ebf
--- /dev/null
+++ b/src/test/ui/issue-18159.stderr
@@ -0,0 +1,12 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-18159.rs:12:9
+   |
+LL |     let x; //~ ERROR type annotations needed
+   |         ^
+   |         |
+   |         cannot infer type for `_`
+   |         consider giving `x` a type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-18294.rs b/src/test/ui/issue-18294.rs
index efc1ba1635c..efc1ba1635c 100644
--- a/src/test/compile-fail/issue-18294.rs
+++ b/src/test/ui/issue-18294.rs
diff --git a/src/test/ui/issue-18294.stderr b/src/test/ui/issue-18294.stderr
new file mode 100644
index 00000000000..151deefb2b7
--- /dev/null
+++ b/src/test/ui/issue-18294.stderr
@@ -0,0 +1,9 @@
+error[E0018]: raw pointers cannot be cast to integers in constants
+  --> $DIR/issue-18294.rs:13:22
+   |
+LL |     const Y: usize = &X as *const u32 as usize; //~ ERROR E0018
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0018`.
diff --git a/src/test/compile-fail/issue-18389.rs b/src/test/ui/issue-18389.rs
index aad3d52153a..aad3d52153a 100644
--- a/src/test/compile-fail/issue-18389.rs
+++ b/src/test/ui/issue-18389.rs
diff --git a/src/test/ui/issue-18389.stderr b/src/test/ui/issue-18389.stderr
new file mode 100644
index 00000000000..6f067301d04
--- /dev/null
+++ b/src/test/ui/issue-18389.stderr
@@ -0,0 +1,15 @@
+error[E0445]: private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
+  --> $DIR/issue-18389.rs:17:1
+   |
+LL | / pub trait Public: Private<
+LL | | //~^ ERROR private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
+LL | |     <Self as Public>::P,
+LL | |     <Self as Public>::R
+...  |
+LL | |     fn call_inner(&self);
+LL | | }
+   | |_^ can't leak private trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0445`.
diff --git a/src/test/compile-fail/issue-18400.rs b/src/test/ui/issue-18400.rs
index dd17189aeea..dd17189aeea 100644
--- a/src/test/compile-fail/issue-18400.rs
+++ b/src/test/ui/issue-18400.rs
diff --git a/src/test/ui/issue-18400.stderr b/src/test/ui/issue-18400.stderr
new file mode 100644
index 00000000000..2426d429ca1
--- /dev/null
+++ b/src/test/ui/issue-18400.stderr
@@ -0,0 +1,75 @@
+error[E0275]: overflow evaluating the requirement `_: std::marker::Sized`
+  --> $DIR/issue-18400.rs:34:7
+   |
+LL |     0.contains(bits);
+   |       ^^^^^^^^
+   |
+   = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
+   = note: required because of the requirements on the impl of `Set<&[_]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[_]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[_]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[_]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[_]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[_]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[_]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[_]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[_]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+   = note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-18423.rs b/src/test/ui/issue-18423.rs
index 5945a7a1c9a..5945a7a1c9a 100644
--- a/src/test/compile-fail/issue-18423.rs
+++ b/src/test/ui/issue-18423.rs
diff --git a/src/test/ui/issue-18423.stderr b/src/test/ui/issue-18423.stderr
new file mode 100644
index 00000000000..25406198193
--- /dev/null
+++ b/src/test/ui/issue-18423.stderr
@@ -0,0 +1,9 @@
+error[E0107]: wrong number of lifetime parameters: expected 0, found 1
+  --> $DIR/issue-18423.rs:14:8
+   |
+LL |     x: Box<'a, isize> //~ ERROR wrong number of lifetime parameters
+   |        ^^^^^^^^^^^^^^ unexpected lifetime parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/compile-fail/issue-18446.rs b/src/test/ui/issue-18446.rs
index 60afea5a621..60afea5a621 100644
--- a/src/test/compile-fail/issue-18446.rs
+++ b/src/test/ui/issue-18446.rs
diff --git a/src/test/ui/issue-18446.stderr b/src/test/ui/issue-18446.stderr
new file mode 100644
index 00000000000..d1914fc14f8
--- /dev/null
+++ b/src/test/ui/issue-18446.stderr
@@ -0,0 +1,21 @@
+error[E0034]: multiple applicable items in scope
+  --> $DIR/issue-18446.rs:28:7
+   |
+LL |     x.foo(); //~ ERROR multiple applicable items in scope [E0034]
+   |       ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl for the type `dyn T`
+  --> $DIR/issue-18446.rs:19:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+note: candidate #2 is defined in the trait `T`
+  --> $DIR/issue-18446.rs:15:5
+   |
+LL |     fn foo(&self);
+   |     ^^^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `T::foo(&x)` instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0034`.
diff --git a/src/test/compile-fail/issue-18532.rs b/src/test/ui/issue-18532.rs
index 2be5fdcac4e..2be5fdcac4e 100644
--- a/src/test/compile-fail/issue-18532.rs
+++ b/src/test/ui/issue-18532.rs
diff --git a/src/test/ui/issue-18532.stderr b/src/test/ui/issue-18532.stderr
new file mode 100644
index 00000000000..8f10cb0f7b0
--- /dev/null
+++ b/src/test/ui/issue-18532.stderr
@@ -0,0 +1,9 @@
+error[E0618]: expected function, found `!`
+  --> $DIR/issue-18532.rs:16:5
+   |
+LL |     (return)((),()); //~ ERROR expected function, found `!`
+   |     ^^^^^^^^^^^^^^^ not a function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/ui/issue-18566.nll.stderr b/src/test/ui/issue-18566.nll.stderr
new file mode 100644
index 00000000000..b5ed33d07c5
--- /dev/null
+++ b/src/test/ui/issue-18566.nll.stderr
@@ -0,0 +1,13 @@
+error[E0499]: cannot borrow `*s` as mutable more than once at a time
+  --> $DIR/issue-18566.rs:33:19
+   |
+LL |     MyPtr(s).poke(s);
+   |     --------------^-
+   |     |     |       |
+   |     |     |       second mutable borrow occurs here
+   |     |     first mutable borrow occurs here
+   |     borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/compile-fail/issue-18566.rs b/src/test/ui/issue-18566.rs
index 41e82d0cd89..41e82d0cd89 100644
--- a/src/test/compile-fail/issue-18566.rs
+++ b/src/test/ui/issue-18566.rs
diff --git a/src/test/ui/issue-18566.stderr b/src/test/ui/issue-18566.stderr
new file mode 100644
index 00000000000..e07fde114f2
--- /dev/null
+++ b/src/test/ui/issue-18566.stderr
@@ -0,0 +1,12 @@
+error[E0499]: cannot borrow `*s` as mutable more than once at a time
+  --> $DIR/issue-18566.rs:33:19
+   |
+LL |     MyPtr(s).poke(s);
+   |           -       ^- first borrow ends here
+   |           |       |
+   |           |       second mutable borrow occurs here
+   |           first mutable borrow occurs here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/compile-fail/issue-18611.rs b/src/test/ui/issue-18611.rs
index a3ad76e1be0..a3ad76e1be0 100644
--- a/src/test/compile-fail/issue-18611.rs
+++ b/src/test/ui/issue-18611.rs
diff --git a/src/test/ui/issue-18611.stderr b/src/test/ui/issue-18611.stderr
new file mode 100644
index 00000000000..d890a322f0c
--- /dev/null
+++ b/src/test/ui/issue-18611.stderr
@@ -0,0 +1,11 @@
+error[E0277]: the trait bound `isize: HasState` is not satisfied
+  --> $DIR/issue-18611.rs:11:1
+   |
+LL | / fn add_state(op: <isize as HasState>::State) {
+LL | | //~^ ERROR `isize: HasState` is not satisfied
+LL | | }
+   | |_^ the trait `HasState` is not implemented for `isize`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-1871.rs b/src/test/ui/issue-1871.rs
index e4d132c8641..e4d132c8641 100644
--- a/src/test/compile-fail/issue-1871.rs
+++ b/src/test/ui/issue-1871.rs
diff --git a/src/test/ui/issue-1871.stderr b/src/test/ui/issue-1871.stderr
new file mode 100644
index 00000000000..0546848df9b
--- /dev/null
+++ b/src/test/ui/issue-1871.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no method named `honk` found for type `{integer}` in the current scope
+  --> $DIR/issue-1871.rs:17:9
+   |
+LL |       f.honk() //~ ERROR no method named `honk` found
+   |         ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issue-18783.nll.stderr b/src/test/ui/issue-18783.nll.stderr
new file mode 100644
index 00000000000..6bb7b4229d7
--- /dev/null
+++ b/src/test/ui/issue-18783.nll.stderr
@@ -0,0 +1,33 @@
+error[E0499]: cannot borrow `y` as mutable more than once at a time
+  --> $DIR/issue-18783.rs:17:21
+   |
+LL |     c.push(Box::new(|| y = 0));
+   |                     -- - previous borrow occurs due to use of `y` in closure
+   |                     |
+   |                     first mutable borrow occurs here
+LL |     c.push(Box::new(|| y = 0));
+   |                     ^^ - borrow occurs due to use of `y` in closure
+   |                     |
+   |                     second mutable borrow occurs here
+LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time
+LL | }
+   | - borrow later used here, when `c` is dropped
+
+error[E0499]: cannot borrow `y` as mutable more than once at a time
+  --> $DIR/issue-18783.rs:26:29
+   |
+LL |     Push::push(&c, Box::new(|| y = 0));
+   |                             -- - previous borrow occurs due to use of `y` in closure
+   |                             |
+   |                             first mutable borrow occurs here
+LL |     Push::push(&c, Box::new(|| y = 0));
+   |                             ^^ - borrow occurs due to use of `y` in closure
+   |                             |
+   |                             second mutable borrow occurs here
+LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time
+LL | }
+   | - borrow later used here, when `c` is dropped
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/compile-fail/issue-18783.rs b/src/test/ui/issue-18783.rs
index 9a7b3781f1e..9a7b3781f1e 100644
--- a/src/test/compile-fail/issue-18783.rs
+++ b/src/test/ui/issue-18783.rs
diff --git a/src/test/ui/issue-18783.stderr b/src/test/ui/issue-18783.stderr
new file mode 100644
index 00000000000..64d2809a36a
--- /dev/null
+++ b/src/test/ui/issue-18783.stderr
@@ -0,0 +1,33 @@
+error[E0499]: cannot borrow `y` as mutable more than once at a time
+  --> $DIR/issue-18783.rs:17:21
+   |
+LL |     c.push(Box::new(|| y = 0));
+   |                     -- - previous borrow occurs due to use of `y` in closure
+   |                     |
+   |                     first mutable borrow occurs here
+LL |     c.push(Box::new(|| y = 0));
+   |                     ^^ - borrow occurs due to use of `y` in closure
+   |                     |
+   |                     second mutable borrow occurs here
+LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `y` as mutable more than once at a time
+  --> $DIR/issue-18783.rs:26:29
+   |
+LL |     Push::push(&c, Box::new(|| y = 0));
+   |                             -- - previous borrow occurs due to use of `y` in closure
+   |                             |
+   |                             first mutable borrow occurs here
+LL |     Push::push(&c, Box::new(|| y = 0));
+   |                             ^^ - borrow occurs due to use of `y` in closure
+   |                             |
+   |                             second mutable borrow occurs here
+LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time
+LL | }
+   | - first borrow ends here
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/compile-fail/issue-18919.rs b/src/test/ui/issue-18919.rs
index cc87a0977a0..cc87a0977a0 100644
--- a/src/test/compile-fail/issue-18919.rs
+++ b/src/test/ui/issue-18919.rs
diff --git a/src/test/ui/issue-18919.stderr b/src/test/ui/issue-18919.stderr
new file mode 100644
index 00000000000..012a1eb4d21
--- /dev/null
+++ b/src/test/ui/issue-18919.stderr
@@ -0,0 +1,15 @@
+error[E0277]: the size for values of type `dyn for<'r> std::ops::Fn(&'r isize) -> isize` cannot be known at compilation time
+  --> $DIR/issue-18919.rs:13:1
+   |
+LL | / fn ho_func(f: Option<FuncType>) {
+LL | |     //~^ ERROR the size for values of type
+LL | | }
+   | |_^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `dyn for<'r> std::ops::Fn(&'r isize) -> isize`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required by `std::option::Option`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-18937.rs b/src/test/ui/issue-18937.rs
index f7f84e6452d..f7f84e6452d 100644
--- a/src/test/compile-fail/issue-18937.rs
+++ b/src/test/ui/issue-18937.rs
diff --git a/src/test/ui/issue-18937.stderr b/src/test/ui/issue-18937.stderr
new file mode 100644
index 00000000000..7b4c35e0dbe
--- /dev/null
+++ b/src/test/ui/issue-18937.stderr
@@ -0,0 +1,18 @@
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/issue-18937.rs:29:5
+   |
+LL | /     fn foo<F>(&mut self, f: F)
+LL | |         where F: fmt::Debug + 'a,
+LL | |               Self: Sized;
+   | |__________________________- definition of `foo` from trait
+...
+LL | /     fn foo<F>(&mut self, f: F) //~ ERROR impl has stricter
+LL | |         where F: fmt::Debug + 'static,
+LL | |     {
+LL | |         self.list.push(Box::new(f));
+LL | |     }
+   | |_____^ impl has extra requirement `F: 'static`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0276`.
diff --git a/src/test/compile-fail/issue-18959.rs b/src/test/ui/issue-18959.rs
index 7a6d012a3b6..7a6d012a3b6 100644
--- a/src/test/compile-fail/issue-18959.rs
+++ b/src/test/ui/issue-18959.rs
diff --git a/src/test/ui/issue-18959.stderr b/src/test/ui/issue-18959.stderr
new file mode 100644
index 00000000000..42a1c2d4d03
--- /dev/null
+++ b/src/test/ui/issue-18959.stderr
@@ -0,0 +1,11 @@
+error[E0038]: the trait `Bar` cannot be made into an object
+  --> $DIR/issue-18959.rs:21:1
+   |
+LL | fn foo(b: &Bar) {
+   | ^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+   |
+   = note: method `foo` has generic type parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-1900.rs b/src/test/ui/issue-1900.rs
index ccdd9db25c4..e41bb0030ae 100644
--- a/src/test/compile-fail/issue-1900.rs
+++ b/src/test/ui/issue-1900.rs
@@ -8,5 +8,5 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: `main` function is not allowed to have generic parameters
 fn main<T>() { }
+//~^ ERROR `main` function is not allowed to have generic parameters
diff --git a/src/test/ui/issue-1900.stderr b/src/test/ui/issue-1900.stderr
new file mode 100644
index 00000000000..512a923fadd
--- /dev/null
+++ b/src/test/ui/issue-1900.stderr
@@ -0,0 +1,9 @@
+error[E0131]: `main` function is not allowed to have generic parameters
+  --> $DIR/issue-1900.rs:11:8
+   |
+LL | fn main<T>() { }
+   |        ^^^ `main` cannot have generic parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0131`.
diff --git a/src/test/compile-fail/issue-19086.rs b/src/test/ui/issue-19086.rs
index ba571ce17fd..ba571ce17fd 100644
--- a/src/test/compile-fail/issue-19086.rs
+++ b/src/test/ui/issue-19086.rs
diff --git a/src/test/ui/issue-19086.stderr b/src/test/ui/issue-19086.stderr
new file mode 100644
index 00000000000..b71d40065c3
--- /dev/null
+++ b/src/test/ui/issue-19086.stderr
@@ -0,0 +1,9 @@
+error[E0532]: expected tuple struct/variant, found struct variant `FooB`
+  --> $DIR/issue-19086.rs:20:9
+   |
+LL |         FooB(a, b) => println!("{} {}", a, b),
+   |         ^^^^ did you mean `FooB { /* fields */ }`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/compile-fail/issue-19244-1.rs b/src/test/ui/issue-19244-1.rs
index df34aab4b8f..df34aab4b8f 100644
--- a/src/test/compile-fail/issue-19244-1.rs
+++ b/src/test/ui/issue-19244-1.rs
diff --git a/src/test/ui/issue-19244-1.stderr b/src/test/ui/issue-19244-1.stderr
new file mode 100644
index 00000000000..28e66b2d974
--- /dev/null
+++ b/src/test/ui/issue-19244-1.stderr
@@ -0,0 +1,9 @@
+error[E0609]: no field `1` on type `(usize,)`
+  --> $DIR/issue-19244-1.rs:14:24
+   |
+LL |     let a: [isize; TUP.1];
+   |                        ^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-19244-2.rs b/src/test/ui/issue-19244-2.rs
index 864f8f6b54e..864f8f6b54e 100644
--- a/src/test/compile-fail/issue-19244-2.rs
+++ b/src/test/ui/issue-19244-2.rs
diff --git a/src/test/ui/issue-19244-2.stderr b/src/test/ui/issue-19244-2.stderr
new file mode 100644
index 00000000000..3969c77f24d
--- /dev/null
+++ b/src/test/ui/issue-19244-2.stderr
@@ -0,0 +1,11 @@
+error[E0609]: no field `nonexistent_field` on type `MyStruct`
+  --> $DIR/issue-19244-2.rs:15:27
+   |
+LL |     let a: [isize; STRUCT.nonexistent_field];
+   |                           ^^^^^^^^^^^^^^^^^ unknown field
+   |
+   = note: available fields are: `field`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-19380.rs b/src/test/ui/issue-19380.rs
index 322952ffef1..322952ffef1 100644
--- a/src/test/compile-fail/issue-19380.rs
+++ b/src/test/ui/issue-19380.rs
diff --git a/src/test/ui/issue-19380.stderr b/src/test/ui/issue-19380.stderr
new file mode 100644
index 00000000000..a251d3b2990
--- /dev/null
+++ b/src/test/ui/issue-19380.stderr
@@ -0,0 +1,11 @@
+error[E0038]: the trait `Qiz` cannot be made into an object
+  --> $DIR/issue-19380.rs:21:3
+   |
+LL |   foos: &'static [&'static (Qiz + 'static)]
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Qiz` cannot be made into an object
+   |
+   = note: method `qiz` has no receiver
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-19482.rs b/src/test/ui/issue-19482.rs
index b54f008f8ce..b54f008f8ce 100644
--- a/src/test/compile-fail/issue-19482.rs
+++ b/src/test/ui/issue-19482.rs
diff --git a/src/test/ui/issue-19482.stderr b/src/test/ui/issue-19482.stderr
new file mode 100644
index 00000000000..5e2d427ab72
--- /dev/null
+++ b/src/test/ui/issue-19482.stderr
@@ -0,0 +1,9 @@
+error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
+  --> $DIR/issue-19482.rs:20:12
+   |
+LL | fn bar(x: &Foo) {}
+   |            ^^^ missing associated type `A` value
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0191`.
diff --git a/src/test/compile-fail/issue-19521.rs b/src/test/ui/issue-19521.rs
index 93d95ca0b0f..93d95ca0b0f 100644
--- a/src/test/compile-fail/issue-19521.rs
+++ b/src/test/ui/issue-19521.rs
diff --git a/src/test/ui/issue-19521.stderr b/src/test/ui/issue-19521.stderr
new file mode 100644
index 00000000000..8f81bcbd4c4
--- /dev/null
+++ b/src/test/ui/issue-19521.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no method named `homura` found for type `&'static str` in the current scope
+  --> $DIR/issue-19521.rs:12:8
+   |
+LL |     "".homura()(); //~ ERROR no method named `homura` found
+   |        ^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-19538.rs b/src/test/ui/issue-19538.rs
index a6190500582..a6190500582 100644
--- a/src/test/compile-fail/issue-19538.rs
+++ b/src/test/ui/issue-19538.rs
diff --git a/src/test/ui/issue-19538.stderr b/src/test/ui/issue-19538.stderr
new file mode 100644
index 00000000000..3cd73ad9d45
--- /dev/null
+++ b/src/test/ui/issue-19538.stderr
@@ -0,0 +1,20 @@
+error[E0038]: the trait `Bar` cannot be made into an object
+  --> $DIR/issue-19538.rs:27:15
+   |
+LL |     let test: &mut Bar = &mut thing;
+   |               ^^^^^^^^ the trait `Bar` cannot be made into an object
+   |
+   = note: method `foo` has generic type parameters
+
+error[E0038]: the trait `Bar` cannot be made into an object
+  --> $DIR/issue-19538.rs:27:26
+   |
+LL |     let test: &mut Bar = &mut thing;
+   |                          ^^^^^^^^^^ the trait `Bar` cannot be made into an object
+   |
+   = note: method `foo` has generic type parameters
+   = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&mut dyn Bar>` for `&mut Thing`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-19601.rs b/src/test/ui/issue-19601.rs
index 02b4932cea8..02b4932cea8 100644
--- a/src/test/compile-fail/issue-19601.rs
+++ b/src/test/ui/issue-19601.rs
diff --git a/src/test/ui/issue-19601.stderr b/src/test/ui/issue-19601.stderr
new file mode 100644
index 00000000000..594d76605fe
--- /dev/null
+++ b/src/test/ui/issue-19601.stderr
@@ -0,0 +1,9 @@
+error: compilation successful
+  --> $DIR/issue-19601.rs:18:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-19660.rs b/src/test/ui/issue-19660.rs
index c4b871a28c5..c4b871a28c5 100644
--- a/src/test/compile-fail/issue-19660.rs
+++ b/src/test/ui/issue-19660.rs
diff --git a/src/test/ui/issue-19660.stderr b/src/test/ui/issue-19660.stderr
new file mode 100644
index 00000000000..f5d903f38eb
--- /dev/null
+++ b/src/test/ui/issue-19660.stderr
@@ -0,0 +1,4 @@
+error: requires `copy` lang_item
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-19692.rs b/src/test/ui/issue-19692.rs
index ca1715445e5..ca1715445e5 100644
--- a/src/test/compile-fail/issue-19692.rs
+++ b/src/test/ui/issue-19692.rs
diff --git a/src/test/ui/issue-19692.stderr b/src/test/ui/issue-19692.stderr
new file mode 100644
index 00000000000..33361ff8488
--- /dev/null
+++ b/src/test/ui/issue-19692.stderr
@@ -0,0 +1,12 @@
+error[E0599]: no method named `kaname` found for type `Homura` in the current scope
+  --> $DIR/issue-19692.rs:14:40
+   |
+LL | struct Homura;
+   | -------------- method `kaname` not found for this
+...
+LL |     let Some(ref madoka) = Some(homura.kaname()); //~ ERROR no method named `kaname` found
+   |                                        ^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-19734.rs b/src/test/ui/issue-19734.rs
index a3820d20aac..a3820d20aac 100644
--- a/src/test/compile-fail/issue-19734.rs
+++ b/src/test/ui/issue-19734.rs
diff --git a/src/test/ui/issue-19734.stderr b/src/test/ui/issue-19734.stderr
new file mode 100644
index 00000000000..1d07f4dedc3
--- /dev/null
+++ b/src/test/ui/issue-19734.stderr
@@ -0,0 +1,8 @@
+error: cannot find macro `undef!` in this scope
+  --> $DIR/issue-19734.rs:16:5
+   |
+LL |     undef!();
+   |     ^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-19883.rs b/src/test/ui/issue-19883.rs
index 9b6a87702a9..9b6a87702a9 100644
--- a/src/test/compile-fail/issue-19883.rs
+++ b/src/test/ui/issue-19883.rs
diff --git a/src/test/ui/issue-19883.stderr b/src/test/ui/issue-19883.stderr
new file mode 100644
index 00000000000..b4262b4cdb3
--- /dev/null
+++ b/src/test/ui/issue-19883.stderr
@@ -0,0 +1,9 @@
+error[E0576]: cannot find associated type `Dst` in trait `From`
+  --> $DIR/issue-19883.rs:19:30
+   |
+LL |         <Dst as From<Self>>::Dst
+   |                              ^^^ not found in `From`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0576`.
diff --git a/src/test/compile-fail/issue-19982.rs b/src/test/ui/issue-19982.rs
index 9dbca997341..9dbca997341 100644
--- a/src/test/compile-fail/issue-19982.rs
+++ b/src/test/ui/issue-19982.rs
diff --git a/src/test/ui/issue-19982.stderr b/src/test/ui/issue-19982.stderr
new file mode 100644
index 00000000000..9f13ba640a9
--- /dev/null
+++ b/src/test/ui/issue-19982.stderr
@@ -0,0 +1,9 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/issue-19982.rs:15:10
+   |
+LL | impl Fn<(&(),)> for Foo { } //~ ERROR missing lifetime specifier
+   |          ^ expected lifetime parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/compile-fail/issue-19991.rs b/src/test/ui/issue-19991.rs
index e07dfaf9fe5..e07dfaf9fe5 100644
--- a/src/test/compile-fail/issue-19991.rs
+++ b/src/test/ui/issue-19991.rs
diff --git a/src/test/ui/issue-19991.stderr b/src/test/ui/issue-19991.stderr
new file mode 100644
index 00000000000..45b2ef8b280
--- /dev/null
+++ b/src/test/ui/issue-19991.stderr
@@ -0,0 +1,17 @@
+error[E0317]: if may be missing an else clause
+  --> $DIR/issue-19991.rs:15:5
+   |
+LL | /     if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
+LL | |                                            //~| expected type `()`
+LL | |                                            //~| found type `{integer}`
+LL | |                                            //~| expected (), found integral variable
+LL | |         765
+LL | |     };
+   | |_____^ expected (), found integral variable
+   |
+   = note: expected type `()`
+              found type `{integer}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0317`.
diff --git a/src/test/compile-fail/issue-20005.rs b/src/test/ui/issue-20005.rs
index 8db09182fa3..8db09182fa3 100644
--- a/src/test/compile-fail/issue-20005.rs
+++ b/src/test/ui/issue-20005.rs
diff --git a/src/test/ui/issue-20005.stderr b/src/test/ui/issue-20005.stderr
new file mode 100644
index 00000000000..2fdfa4ba6f8
--- /dev/null
+++ b/src/test/ui/issue-20005.stderr
@@ -0,0 +1,22 @@
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-20005.rs:18:5
+   |
+LL | /     fn to<Dst>(  //~ ERROR the size for values of type
+LL | |         self
+LL | |     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
+LL | |         From::from(self)
+LL | |     }
+   | |_____^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `Self`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = help: consider adding a `where Self: std::marker::Sized` bound
+note: required by `From`
+  --> $DIR/issue-20005.rs:11:1
+   |
+LL | trait From<Src> {
+   | ^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-20162.rs b/src/test/ui/issue-20162.rs
index b2f3a2da516..b2f3a2da516 100644
--- a/src/test/compile-fail/issue-20162.rs
+++ b/src/test/ui/issue-20162.rs
diff --git a/src/test/ui/issue-20162.stderr b/src/test/ui/issue-20162.stderr
new file mode 100644
index 00000000000..0fb7009d574
--- /dev/null
+++ b/src/test/ui/issue-20162.stderr
@@ -0,0 +1,9 @@
+error[E0277]: the trait bound `X: std::cmp::Ord` is not satisfied
+  --> $DIR/issue-20162.rs:15:7
+   |
+LL |     b.sort();
+   |       ^^^^ the trait `std::cmp::Ord` is not implemented for `X`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-20225.rs b/src/test/ui/issue-20225.rs
index da98f21e461..da98f21e461 100644
--- a/src/test/compile-fail/issue-20225.rs
+++ b/src/test/ui/issue-20225.rs
diff --git a/src/test/ui/issue-20225.stderr b/src/test/ui/issue-20225.stderr
new file mode 100644
index 00000000000..7813dc5c11d
--- /dev/null
+++ b/src/test/ui/issue-20225.stderr
@@ -0,0 +1,30 @@
+error[E0053]: method `call` has an incompatible type for trait
+  --> $DIR/issue-20225.rs:16:3
+   |
+LL |   extern "rust-call" fn call(&self, (_,): (T,)) {}
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
+   |
+   = note: expected type `extern "rust-call" fn(&Foo, (&'a T,))`
+              found type `extern "rust-call" fn(&Foo, (T,))`
+
+error[E0053]: method `call_mut` has an incompatible type for trait
+  --> $DIR/issue-20225.rs:22:3
+   |
+LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
+   |
+   = note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))`
+              found type `extern "rust-call" fn(&mut Foo, (T,))`
+
+error[E0053]: method `call_once` has an incompatible type for trait
+  --> $DIR/issue-20225.rs:30:3
+   |
+LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
+   |
+   = note: expected type `extern "rust-call" fn(Foo, (&'a T,))`
+              found type `extern "rust-call" fn(Foo, (T,))`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0053`.
diff --git a/src/test/compile-fail/issue-20261.rs b/src/test/ui/issue-20261.rs
index bb4dbdcd0cb..bb4dbdcd0cb 100644
--- a/src/test/compile-fail/issue-20261.rs
+++ b/src/test/ui/issue-20261.rs
diff --git a/src/test/ui/issue-20261.stderr b/src/test/ui/issue-20261.stderr
new file mode 100644
index 00000000000..a4a2aec8969
--- /dev/null
+++ b/src/test/ui/issue-20261.stderr
@@ -0,0 +1,13 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-20261.rs:14:11
+   |
+LL |     for (ref i,) in [].iter() {
+   |         -------- consider giving `__next` a type
+LL |         i.clone();
+   |           ^^^^^ cannot infer type for `_`
+   |
+   = note: type must be known at this point
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-20313.rs b/src/test/ui/issue-20313.rs
index dfb23c05036..dfb23c05036 100644
--- a/src/test/compile-fail/issue-20313.rs
+++ b/src/test/ui/issue-20313.rs
diff --git a/src/test/ui/issue-20313.stderr b/src/test/ui/issue-20313.stderr
new file mode 100644
index 00000000000..95afda1b514
--- /dev/null
+++ b/src/test/ui/issue-20313.stderr
@@ -0,0 +1,11 @@
+error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602)
+  --> $DIR/issue-20313.rs:13:5
+   |
+LL |     fn sqrt(x: f32) -> f32; //~ ERROR linking to LLVM intrinsics is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/compile-fail/issue-20413.rs b/src/test/ui/issue-20413.rs
index a48c03aa178..a48c03aa178 100644
--- a/src/test/compile-fail/issue-20413.rs
+++ b/src/test/ui/issue-20413.rs
diff --git a/src/test/ui/issue-20413.stderr b/src/test/ui/issue-20413.stderr
new file mode 100644
index 00000000000..bfb2665e867
--- /dev/null
+++ b/src/test/ui/issue-20413.stderr
@@ -0,0 +1,94 @@
+error[E0392]: parameter `T` is never used
+  --> $DIR/issue-20413.rs:15:15
+   |
+LL | struct NoData<T>;
+   |               ^ unused type parameter
+   |
+   = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
+
+error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: std::marker::Sized`
+  --> $DIR/issue-20413.rs:18:1
+   |
+LL | / impl<T> Foo for T where NoData<T>: Foo {
+LL | | //~^ ERROR: overflow evaluating the requirement
+LL | |   fn answer(self) {
+LL | |     let val: NoData<T> = NoData;
+LL | |   }
+LL | | }
+   | |_^
+   |
+   = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<NoData<T>>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<NoData<T>>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<T>>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<T>>`
+   = note: required because of the requirements on the impl of `Foo` for `NoData<T>`
+note: required by `Foo`
+  --> $DIR/issue-20413.rs:11:1
+   |
+LL | trait Foo {
+   | ^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0275, E0392.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-20433.rs b/src/test/ui/issue-20433.rs
index f760cd59968..f760cd59968 100644
--- a/src/test/compile-fail/issue-20433.rs
+++ b/src/test/ui/issue-20433.rs
diff --git a/src/test/ui/issue-20433.stderr b/src/test/ui/issue-20433.stderr
new file mode 100644
index 00000000000..38dd4e5e7fe
--- /dev/null
+++ b/src/test/ui/issue-20433.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
+  --> $DIR/issue-20433.rs:16:5
+   |
+LL |     fn iceman(c: Vec<[i32]>) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `[i32]`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required by `std::vec::Vec`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-20605.rs b/src/test/ui/issue-20605.rs
index 60d012ab134..60d012ab134 100644
--- a/src/test/compile-fail/issue-20605.rs
+++ b/src/test/ui/issue-20605.rs
diff --git a/src/test/ui/issue-20605.stderr b/src/test/ui/issue-20605.stderr
new file mode 100644
index 00000000000..10e90faf2df
--- /dev/null
+++ b/src/test/ui/issue-20605.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `dyn std::iter::Iterator<Item=&mut u8>` cannot be known at compilation time
+  --> $DIR/issue-20605.rs:12:17
+   |
+LL |     for item in *things { *item = 0 }
+   |                 ^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `dyn std::iter::Iterator<Item=&mut u8>`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required by `std::iter::IntoIterator::into_iter`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-20616-1.rs b/src/test/ui/issue-20616-1.rs
index 3e29383d62c..3e29383d62c 100644
--- a/src/test/compile-fail/issue-20616-1.rs
+++ b/src/test/ui/issue-20616-1.rs
diff --git a/src/test/ui/issue-20616-1.stderr b/src/test/ui/issue-20616-1.stderr
new file mode 100644
index 00000000000..1ee965d2186
--- /dev/null
+++ b/src/test/ui/issue-20616-1.stderr
@@ -0,0 +1,8 @@
+error: expected one of `,`, `:`, or `>`, found `T`
+  --> $DIR/issue-20616-1.rs:19:16
+   |
+LL | type Type_1<'a T> = &'a T; //~ error: expected one of `,`, `:`, or `>`, found `T`
+   |                ^ expected one of `,`, `:`, or `>` here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-2.rs b/src/test/ui/issue-20616-2.rs
index 1ec7a74559a..1ec7a74559a 100644
--- a/src/test/compile-fail/issue-20616-2.rs
+++ b/src/test/ui/issue-20616-2.rs
diff --git a/src/test/ui/issue-20616-2.stderr b/src/test/ui/issue-20616-2.stderr
new file mode 100644
index 00000000000..1c103b21a18
--- /dev/null
+++ b/src/test/ui/issue-20616-2.stderr
@@ -0,0 +1,8 @@
+error: expected one of `,` or `>`, found `(`
+  --> $DIR/issue-20616-2.rs:22:31
+   |
+LL | type Type_2 = Type_1_<'static ()>; //~ error: expected one of `,` or `>`, found `(`
+   |                               ^ expected one of `,` or `>` here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-3.rs b/src/test/ui/issue-20616-3.rs
index 885fd246547..885fd246547 100644
--- a/src/test/compile-fail/issue-20616-3.rs
+++ b/src/test/ui/issue-20616-3.rs
diff --git a/src/test/ui/issue-20616-3.stderr b/src/test/ui/issue-20616-3.stderr
new file mode 100644
index 00000000000..b4b40b3637d
--- /dev/null
+++ b/src/test/ui/issue-20616-3.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, lifetime, or type, found `,`
+  --> $DIR/issue-20616-3.rs:25:24
+   |
+LL | type Type_3<T> = Box<T,,>; //~ error: expected one of `>`, identifier, lifetime, or type, found `,`
+   |                        ^ expected one of `>`, identifier, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-4.rs b/src/test/ui/issue-20616-4.rs
index 0dbe92fc1bc..0dbe92fc1bc 100644
--- a/src/test/compile-fail/issue-20616-4.rs
+++ b/src/test/ui/issue-20616-4.rs
diff --git a/src/test/ui/issue-20616-4.stderr b/src/test/ui/issue-20616-4.stderr
new file mode 100644
index 00000000000..0a734e4fdcd
--- /dev/null
+++ b/src/test/ui/issue-20616-4.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, lifetime, or type, found `,`
+  --> $DIR/issue-20616-4.rs:28:34
+   |
+LL | type Type_4<T> = Type_1_<'static,, T>;
+   |                                  ^ expected one of `>`, identifier, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-5.rs b/src/test/ui/issue-20616-5.rs
index 794e5178f4b..794e5178f4b 100644
--- a/src/test/compile-fail/issue-20616-5.rs
+++ b/src/test/ui/issue-20616-5.rs
diff --git a/src/test/ui/issue-20616-5.stderr b/src/test/ui/issue-20616-5.stderr
new file mode 100644
index 00000000000..504be1632ba
--- /dev/null
+++ b/src/test/ui/issue-20616-5.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, lifetime, or type, found `,`
+  --> $DIR/issue-20616-5.rs:34:34
+   |
+LL | type Type_5<'a> = Type_1_<'a, (),,>;
+   |                                  ^ expected one of `>`, identifier, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-6.rs b/src/test/ui/issue-20616-6.rs
index fe91751a4a0..fe91751a4a0 100644
--- a/src/test/compile-fail/issue-20616-6.rs
+++ b/src/test/ui/issue-20616-6.rs
diff --git a/src/test/ui/issue-20616-6.stderr b/src/test/ui/issue-20616-6.stderr
new file mode 100644
index 00000000000..41dea4137af
--- /dev/null
+++ b/src/test/ui/issue-20616-6.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, lifetime, or type, found `,`
+  --> $DIR/issue-20616-6.rs:37:26
+   |
+LL | type Type_6 = Type_5_<'a,,>;
+   |                          ^ expected one of `>`, identifier, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-7.rs b/src/test/ui/issue-20616-7.rs
index 184ad027102..184ad027102 100644
--- a/src/test/compile-fail/issue-20616-7.rs
+++ b/src/test/ui/issue-20616-7.rs
diff --git a/src/test/ui/issue-20616-7.stderr b/src/test/ui/issue-20616-7.stderr
new file mode 100644
index 00000000000..caf66895fab
--- /dev/null
+++ b/src/test/ui/issue-20616-7.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, lifetime, or type, found `,`
+  --> $DIR/issue-20616-7.rs:40:22
+   |
+LL | type Type_7 = Box<(),,>; //~ error: expected one of `>`, identifier, lifetime, or type, found `,`
+   |                      ^ expected one of `>`, identifier, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-8.rs b/src/test/ui/issue-20616-8.rs
index 5cdec33e94b..5cdec33e94b 100644
--- a/src/test/compile-fail/issue-20616-8.rs
+++ b/src/test/ui/issue-20616-8.rs
diff --git a/src/test/ui/issue-20616-8.stderr b/src/test/ui/issue-20616-8.stderr
new file mode 100644
index 00000000000..6d840fc562b
--- /dev/null
+++ b/src/test/ui/issue-20616-8.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, or lifetime, found `,`
+  --> $DIR/issue-20616-8.rs:43:16
+   |
+LL | type Type_8<'a,,> = &'a (); //~ error: expected one of `>`, identifier, or lifetime, found `,`
+   |                ^ expected one of `>`, identifier, or lifetime here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20616-9.rs b/src/test/ui/issue-20616-9.rs
index 7995addb692..7995addb692 100644
--- a/src/test/compile-fail/issue-20616-9.rs
+++ b/src/test/ui/issue-20616-9.rs
diff --git a/src/test/ui/issue-20616-9.stderr b/src/test/ui/issue-20616-9.stderr
new file mode 100644
index 00000000000..f9cc4e0b480
--- /dev/null
+++ b/src/test/ui/issue-20616-9.stderr
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, or lifetime, found `,`
+  --> $DIR/issue-20616-9.rs:46:15
+   |
+LL | type Type_9<T,,> = Box<T>; //~ error: expected one of `>`, identifier, or lifetime, found `,`
+   |               ^ expected one of `>`, identifier, or lifetime here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20714.rs b/src/test/ui/issue-20714.rs
index cb322f00723..cb322f00723 100644
--- a/src/test/compile-fail/issue-20714.rs
+++ b/src/test/ui/issue-20714.rs
diff --git a/src/test/ui/issue-20714.stderr b/src/test/ui/issue-20714.stderr
new file mode 100644
index 00000000000..1ea85ee440e
--- /dev/null
+++ b/src/test/ui/issue-20714.stderr
@@ -0,0 +1,12 @@
+error[E0618]: expected function, found `G`
+  --> $DIR/issue-20714.rs:14:13
+   |
+LL | struct G;
+   | --------- `G` defined here
+...
+LL |     let g = G(); //~ ERROR: expected function, found `G`
+   |             ^^^ not a function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/compile-fail/issue-20772.rs b/src/test/ui/issue-20772.rs
index d67c76a1525..d67c76a1525 100644
--- a/src/test/compile-fail/issue-20772.rs
+++ b/src/test/ui/issue-20772.rs
diff --git a/src/test/ui/issue-20772.stderr b/src/test/ui/issue-20772.stderr
new file mode 100644
index 00000000000..b898962c9cc
--- /dev/null
+++ b/src/test/ui/issue-20772.stderr
@@ -0,0 +1,21 @@
+error[E0391]: cycle detected when computing the supertraits of `T`
+  --> $DIR/issue-20772.rs:11:1
+   |
+LL | / trait T : Iterator<Item=Self::Item>
+LL | | //~^ ERROR cycle detected
+LL | | //~| ERROR associated type `Item` not found for `Self`
+LL | | {}
+   | |__^
+   |
+   = note: ...which again requires computing the supertraits of `T`, completing the cycle
+
+error[E0220]: associated type `Item` not found for `Self`
+  --> $DIR/issue-20772.rs:11:25
+   |
+LL | trait T : Iterator<Item=Self::Item>
+   |                         ^^^^^^^^^^ associated type `Item` not found
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0220, E0391.
+For more information about an error, try `rustc --explain E0220`.
diff --git a/src/test/ui/issue-20801.nll.stderr b/src/test/ui/issue-20801.nll.stderr
new file mode 100644
index 00000000000..39b1405991a
--- /dev/null
+++ b/src/test/ui/issue-20801.nll.stderr
@@ -0,0 +1,8 @@
+error: internal compiler error: Accessing `(*_8)` with the kind `Write(Move)` shouldn't be possible
+  --> $DIR/issue-20801.rs:45:22
+   |
+LL |     let d = unsafe { *const_ptr() };
+   |                      ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-20801.rs b/src/test/ui/issue-20801.rs
index d3b97a9c058..d3b97a9c058 100644
--- a/src/test/compile-fail/issue-20801.rs
+++ b/src/test/ui/issue-20801.rs
diff --git a/src/test/ui/issue-20801.stderr b/src/test/ui/issue-20801.stderr
new file mode 100644
index 00000000000..3989957b7b4
--- /dev/null
+++ b/src/test/ui/issue-20801.stderr
@@ -0,0 +1,27 @@
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-20801.rs:36:22
+   |
+LL |     let a = unsafe { *mut_ref() };
+   |                      ^^^^^^^^^^ cannot move out of borrowed content
+
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-20801.rs:39:22
+   |
+LL |     let b = unsafe { *imm_ref() };
+   |                      ^^^^^^^^^^ cannot move out of borrowed content
+
+error[E0507]: cannot move out of dereference of raw pointer
+  --> $DIR/issue-20801.rs:42:22
+   |
+LL |     let c = unsafe { *mut_ptr() };
+   |                      ^^^^^^^^^^ cannot move out of dereference of raw pointer
+
+error[E0507]: cannot move out of dereference of raw pointer
+  --> $DIR/issue-20801.rs:45:22
+   |
+LL |     let d = unsafe { *const_ptr() };
+   |                      ^^^^^^^^^^^^ cannot move out of dereference of raw pointer
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/compile-fail/issue-20825.rs b/src/test/ui/issue-20825.rs
index cbb987cd512..cbb987cd512 100644
--- a/src/test/compile-fail/issue-20825.rs
+++ b/src/test/ui/issue-20825.rs
diff --git a/src/test/ui/issue-20825.stderr b/src/test/ui/issue-20825.stderr
new file mode 100644
index 00000000000..e49e3668536
--- /dev/null
+++ b/src/test/ui/issue-20825.stderr
@@ -0,0 +1,11 @@
+error[E0391]: cycle detected when computing the supertraits of `Processor`
+  --> $DIR/issue-20825.rs:15:1
+   |
+LL | pub trait Processor: Subscriber<Input = Self::Input> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: ...which again requires computing the supertraits of `Processor`, completing the cycle
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/compile-fail/issue-20831-debruijn.rs b/src/test/ui/issue-20831-debruijn.rs
index 3f00f561ae9..3f00f561ae9 100644
--- a/src/test/compile-fail/issue-20831-debruijn.rs
+++ b/src/test/ui/issue-20831-debruijn.rs
diff --git a/src/test/ui/issue-20831-debruijn.stderr b/src/test/ui/issue-20831-debruijn.stderr
new file mode 100644
index 00000000000..fc9a0fdbe54
--- /dev/null
+++ b/src/test/ui/issue-20831-debruijn.stderr
@@ -0,0 +1,35 @@
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+  --> $DIR/issue-20831-debruijn.rs:38:5
+   |
+LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | |         // Not obvious, but there is an implicit lifetime here -------^
+LL | |         //~^^ ERROR cannot infer
+LL | |         //
+...  |
+LL | |         self.sub = t;
+LL | |     }
+   | |_____^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 38:5...
+  --> $DIR/issue-20831-debruijn.rs:38:5
+   |
+LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | |         // Not obvious, but there is an implicit lifetime here -------^
+LL | |         //~^^ ERROR cannot infer
+LL | |         //
+...  |
+LL | |         self.sub = t;
+LL | |     }
+   | |_____^
+note: ...but the lifetime must also be valid for the lifetime 'a as defined on the impl at 36:6...
+  --> $DIR/issue-20831-debruijn.rs:36:6
+   |
+LL | impl<'a> Publisher<'a> for MyStruct<'a> {
+   |      ^^
+   = note: ...so that the types are compatible:
+           expected Publisher<'_>
+              found Publisher<'_>
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/compile-fail/issue-20939.rs b/src/test/ui/issue-20939.rs
index 5282ce4bb88..5282ce4bb88 100644
--- a/src/test/compile-fail/issue-20939.rs
+++ b/src/test/ui/issue-20939.rs
diff --git a/src/test/ui/issue-20939.stderr b/src/test/ui/issue-20939.stderr
new file mode 100644
index 00000000000..c8f7e58540b
--- /dev/null
+++ b/src/test/ui/issue-20939.stderr
@@ -0,0 +1,9 @@
+error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
+  --> $DIR/issue-20939.rs:13:1
+   |
+LL | impl<'a> Foo for Foo+'a {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0371`.
diff --git a/src/test/compile-fail/issue-2111.rs b/src/test/ui/issue-2111.rs
index 8180ce52bdb..8180ce52bdb 100644
--- a/src/test/compile-fail/issue-2111.rs
+++ b/src/test/ui/issue-2111.rs
diff --git a/src/test/ui/issue-2111.stderr b/src/test/ui/issue-2111.stderr
new file mode 100644
index 00000000000..5aa1b02779b
--- /dev/null
+++ b/src/test/ui/issue-2111.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `(None, None)` not covered
+  --> $DIR/issue-2111.rs:12:9
+   |
+LL |   match (a,b) {
+   |         ^^^^^ pattern `(None, None)` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-21160.rs b/src/test/ui/issue-21160.rs
index 0de0ab2269b..0de0ab2269b 100644
--- a/src/test/compile-fail/issue-21160.rs
+++ b/src/test/ui/issue-21160.rs
diff --git a/src/test/ui/issue-21160.stderr b/src/test/ui/issue-21160.stderr
new file mode 100644
index 00000000000..75ed9988b89
--- /dev/null
+++ b/src/test/ui/issue-21160.stderr
@@ -0,0 +1,11 @@
+error[E0277]: the trait bound `Bar: std::hash::Hash` is not satisfied
+  --> $DIR/issue-21160.rs:18:12
+   |
+LL | struct Foo(Bar);
+   |            ^^^ the trait `std::hash::Hash` is not implemented for `Bar`
+   |
+   = note: required by `std::hash::Hash::hash`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-21174.rs b/src/test/ui/issue-21174.rs
index 9d9b7e48043..9d9b7e48043 100644
--- a/src/test/compile-fail/issue-21174.rs
+++ b/src/test/ui/issue-21174.rs
diff --git a/src/test/ui/issue-21174.stderr b/src/test/ui/issue-21174.stderr
new file mode 100644
index 00000000000..391ed1e7698
--- /dev/null
+++ b/src/test/ui/issue-21174.stderr
@@ -0,0 +1,12 @@
+error[E0512]: transmute called with types of different sizes
+  --> $DIR/issue-21174.rs:17:30
+   |
+LL |     let new: T::B = unsafe { std::mem::transmute(value) };
+   |                              ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: source type: <T as Trait<'a>>::A (size can vary because of <T as Trait>::A)
+   = note: target type: <T as Trait<'a>>::B (size can vary because of <T as Trait>::B)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0512`.
diff --git a/src/test/compile-fail/issue-21177.rs b/src/test/ui/issue-21177.rs
index 9da57877a09..9da57877a09 100644
--- a/src/test/compile-fail/issue-21177.rs
+++ b/src/test/ui/issue-21177.rs
diff --git a/src/test/ui/issue-21177.stderr b/src/test/ui/issue-21177.stderr
new file mode 100644
index 00000000000..c924fb2ee94
--- /dev/null
+++ b/src/test/ui/issue-21177.stderr
@@ -0,0 +1,23 @@
+error[E0391]: cycle detected when computing the bounds for type parameter `T`
+  --> $DIR/issue-21177.rs:16:21
+   |
+LL | fn foo<T: Trait<A = T::B>>() { }
+   |                     ^^^^
+   |
+   = note: ...which again requires computing the bounds for type parameter `T`, completing the cycle
+note: cycle used when processing `foo`
+  --> $DIR/issue-21177.rs:16:21
+   |
+LL | fn foo<T: Trait<A = T::B>>() { }
+   |                     ^^^^
+
+error[E0220]: associated type `B` not found for `T`
+  --> $DIR/issue-21177.rs:16:21
+   |
+LL | fn foo<T: Trait<A = T::B>>() { }
+   |                     ^^^^ associated type `B` not found
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0220, E0391.
+For more information about an error, try `rustc --explain E0220`.
diff --git a/src/test/compile-fail/issue-21332.rs b/src/test/ui/issue-21332.rs
index db3334834d4..db3334834d4 100644
--- a/src/test/compile-fail/issue-21332.rs
+++ b/src/test/ui/issue-21332.rs
diff --git a/src/test/ui/issue-21332.stderr b/src/test/ui/issue-21332.stderr
new file mode 100644
index 00000000000..b5fbb71f8ca
--- /dev/null
+++ b/src/test/ui/issue-21332.stderr
@@ -0,0 +1,12 @@
+error[E0053]: method `next` has an incompatible type for trait
+  --> $DIR/issue-21332.rs:15:5
+   |
+LL |     fn next(&mut self) -> Result<i32, i32> { Ok(7) }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
+   |
+   = note: expected type `fn(&mut S) -> std::option::Option<i32>`
+              found type `fn(&mut S) -> std::result::Result<i32, i32>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0053`.
diff --git a/src/test/compile-fail/issue-21356.rs b/src/test/ui/issue-21356.rs
index f66c09291cc..f66c09291cc 100644
--- a/src/test/compile-fail/issue-21356.rs
+++ b/src/test/ui/issue-21356.rs
diff --git a/src/test/ui/issue-21356.stderr b/src/test/ui/issue-21356.stderr
new file mode 100644
index 00000000000..5787476c2f2
--- /dev/null
+++ b/src/test/ui/issue-21356.stderr
@@ -0,0 +1,10 @@
+error: invalid fragment specifier `t_ty`
+  --> $DIR/issue-21356.rs:13:22
+   |
+LL | macro_rules! test { ($wrong:t_ty ..) => () }
+   |                      ^^^^^^^^^^^
+   |
+   = help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-21449.rs b/src/test/ui/issue-21449.rs
index cc44cf88f09..cc44cf88f09 100644
--- a/src/test/compile-fail/issue-21449.rs
+++ b/src/test/ui/issue-21449.rs
diff --git a/src/test/ui/issue-21449.stderr b/src/test/ui/issue-21449.stderr
new file mode 100644
index 00000000000..d84b3b99c1f
--- /dev/null
+++ b/src/test/ui/issue-21449.stderr
@@ -0,0 +1,9 @@
+error[E0574]: expected struct, variant or union type, found module `MyMod`
+  --> $DIR/issue-21449.rs:14:17
+   |
+LL |     let myVar = MyMod { T: 0 };
+   |                 ^^^^^ not a struct, variant or union type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0574`.
diff --git a/src/test/compile-fail/issue-2149.rs b/src/test/ui/issue-2149.rs
index 256c5d8e6f7..256c5d8e6f7 100644
--- a/src/test/compile-fail/issue-2149.rs
+++ b/src/test/ui/issue-2149.rs
diff --git a/src/test/ui/issue-2149.stderr b/src/test/ui/issue-2149.stderr
new file mode 100644
index 00000000000..4ae9032cd1a
--- /dev/null
+++ b/src/test/ui/issue-2149.stderr
@@ -0,0 +1,22 @@
+error[E0277]: cannot add `std::vec::Vec<B>` to `()`
+  --> $DIR/issue-2149.rs:18:33
+   |
+LL |         for elt in self { r = r + f(*elt); }
+   |                                 ^ no implementation for `() + std::vec::Vec<B>`
+   |
+   = help: the trait `std::ops::Add<std::vec::Vec<B>>` is not implemented for `()`
+
+error[E0599]: no method named `bind` found for type `[&str; 1]` in the current scope
+  --> $DIR/issue-2149.rs:23:12
+   |
+LL |     ["hi"].bind(|x| [x] );
+   |            ^^^^
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+   = note: the following trait defines an item `bind`, perhaps you need to implement it:
+           candidate #1: `vec_monad`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0277, E0599.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/ui/issue-2150.rs
index 8b109b0a5c0..8b109b0a5c0 100644
--- a/src/test/compile-fail/issue-2150.rs
+++ b/src/test/ui/issue-2150.rs
diff --git a/src/test/ui/issue-2150.stderr b/src/test/ui/issue-2150.stderr
new file mode 100644
index 00000000000..c1944efab8b
--- /dev/null
+++ b/src/test/ui/issue-2150.stderr
@@ -0,0 +1,14 @@
+error: unreachable statement
+  --> $DIR/issue-2150.rs:18:5
+   |
+LL |     for x in &v { i += 1; }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-2150.rs:11:9
+   |
+LL | #![deny(unreachable_code)]
+   |         ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-2151.rs b/src/test/ui/issue-2151.rs
index 3cf971f3f8d..3cf971f3f8d 100644
--- a/src/test/compile-fail/issue-2151.rs
+++ b/src/test/ui/issue-2151.rs
diff --git a/src/test/ui/issue-2151.stderr b/src/test/ui/issue-2151.stderr
new file mode 100644
index 00000000000..592c4f424b0
--- /dev/null
+++ b/src/test/ui/issue-2151.stderr
@@ -0,0 +1,13 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-2151.rs:13:5
+   |
+LL |     let x = panic!();
+   |         - consider giving `x` a type
+LL |     x.clone(); //~ ERROR type annotations needed
+   |     ^ cannot infer type for `_`
+   |
+   = note: type must be known at this point
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-21554.rs b/src/test/ui/issue-21554.rs
index 1b87862a056..1b87862a056 100644
--- a/src/test/compile-fail/issue-21554.rs
+++ b/src/test/ui/issue-21554.rs
diff --git a/src/test/ui/issue-21554.stderr b/src/test/ui/issue-21554.stderr
new file mode 100644
index 00000000000..be7762f1aa2
--- /dev/null
+++ b/src/test/ui/issue-21554.stderr
@@ -0,0 +1,9 @@
+error[E0606]: casting `fn(i32) -> Inches {Inches::{{constructor}}}` as `f32` is invalid
+  --> $DIR/issue-21554.rs:14:5
+   |
+LL |     Inches as f32;
+   |     ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0606`.
diff --git a/src/test/compile-fail/issue-21701.rs b/src/test/ui/issue-21701.rs
index f24de2ffe6b..f24de2ffe6b 100644
--- a/src/test/compile-fail/issue-21701.rs
+++ b/src/test/ui/issue-21701.rs
diff --git a/src/test/ui/issue-21701.stderr b/src/test/ui/issue-21701.stderr
new file mode 100644
index 00000000000..9fb9a7b51f2
--- /dev/null
+++ b/src/test/ui/issue-21701.stderr
@@ -0,0 +1,20 @@
+error[E0618]: expected function, found `U`
+  --> $DIR/issue-21701.rs:12:13
+   |
+LL | fn foo<U>(t: U) {
+   |           - `U` defined here
+LL |     let y = t();
+   |             ^^^ not a function
+
+error[E0618]: expected function, found `Bar`
+  --> $DIR/issue-21701.rs:19:13
+   |
+LL | struct Bar;
+   | ----------- `Bar` defined here
+...
+LL |     let f = Bar();
+   |             ^^^^^ not a function
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/compile-fail/issue-21763.rs b/src/test/ui/issue-21763.rs
index b4f952c87d4..b4f952c87d4 100644
--- a/src/test/compile-fail/issue-21763.rs
+++ b/src/test/ui/issue-21763.rs
diff --git a/src/test/ui/issue-21763.stderr b/src/test/ui/issue-21763.stderr
new file mode 100644
index 00000000000..91db16e0f6d
--- /dev/null
+++ b/src/test/ui/issue-21763.stderr
@@ -0,0 +1,20 @@
+error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
+  --> $DIR/issue-21763.rs:19:5
+   |
+LL |     foo::<HashMap<Rc<()>, Rc<()>>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
+   |
+   = help: within `std::collections::HashMap<std::rc::Rc<()>, std::rc::Rc<()>>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
+   = note: required because it appears within the type `(std::rc::Rc<()>, std::rc::Rc<()>)`
+   = note: required because it appears within the type `std::marker::PhantomData<(std::rc::Rc<()>, std::rc::Rc<()>)>`
+   = note: required because it appears within the type `std::collections::hash::table::RawTable<std::rc::Rc<()>, std::rc::Rc<()>>`
+   = note: required because it appears within the type `std::collections::HashMap<std::rc::Rc<()>, std::rc::Rc<()>>`
+note: required by `foo`
+  --> $DIR/issue-21763.rs:16:1
+   |
+LL | fn foo<T: Send>() {}
+   | ^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-21837.rs b/src/test/ui/issue-21837.rs
index 86506de1ea9..86506de1ea9 100644
--- a/src/test/compile-fail/issue-21837.rs
+++ b/src/test/ui/issue-21837.rs
diff --git a/src/test/ui/issue-21837.stderr b/src/test/ui/issue-21837.stderr
new file mode 100644
index 00000000000..bbdebeefdd6
--- /dev/null
+++ b/src/test/ui/issue-21837.stderr
@@ -0,0 +1,16 @@
+error[E0277]: the trait bound `T: Bound` is not satisfied
+  --> $DIR/issue-21837.rs:18:9
+   |
+LL | impl<T> Trait2 for Foo<T> {} //~ ERROR the trait bound `T: Bound` is not satisfied
+   |         ^^^^^^ the trait `Bound` is not implemented for `T`
+   |
+   = help: consider adding a `where T: Bound` bound
+note: required by `Foo`
+  --> $DIR/issue-21837.rs:12:1
+   |
+LL | pub struct Foo<T: Bound>(T);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-21946.rs b/src/test/ui/issue-21946.rs
index 0d652be5c26..0d652be5c26 100644
--- a/src/test/compile-fail/issue-21946.rs
+++ b/src/test/ui/issue-21946.rs
diff --git a/src/test/ui/issue-21946.stderr b/src/test/ui/issue-21946.stderr
new file mode 100644
index 00000000000..ebb0c0c9ce0
--- /dev/null
+++ b/src/test/ui/issue-21946.stderr
@@ -0,0 +1,9 @@
+error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A`
+  --> $DIR/issue-21946.rs:17:6
+   |
+LL | impl Foo for FooStruct {
+   |      ^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-21974.rs b/src/test/ui/issue-21974.rs
index 6ddfa4c8e3e..6ddfa4c8e3e 100644
--- a/src/test/compile-fail/issue-21974.rs
+++ b/src/test/ui/issue-21974.rs
diff --git a/src/test/ui/issue-21974.stderr b/src/test/ui/issue-21974.stderr
new file mode 100644
index 00000000000..4cc28c9ceb5
--- /dev/null
+++ b/src/test/ui/issue-21974.stderr
@@ -0,0 +1,21 @@
+error[E0283]: type annotations required: cannot resolve `&'a T: Foo`
+  --> $DIR/issue-21974.rs:20:1
+   |
+LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required
+LL | |     where &'a T : Foo,
+LL | |           &'b T : Foo
+LL | | {
+LL | |     x.foo();
+LL | |     y.foo();
+LL | | }
+   | |_^
+   |
+note: required by `Foo`
+  --> $DIR/issue-21974.rs:16:1
+   |
+LL | trait Foo {
+   | ^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0283`.
diff --git a/src/test/compile-fail/issue-22034.rs b/src/test/ui/issue-22034.rs
index 5271ea79917..5271ea79917 100644
--- a/src/test/compile-fail/issue-22034.rs
+++ b/src/test/ui/issue-22034.rs
diff --git a/src/test/ui/issue-22034.stderr b/src/test/ui/issue-22034.stderr
new file mode 100644
index 00000000000..bac62a1301a
--- /dev/null
+++ b/src/test/ui/issue-22034.stderr
@@ -0,0 +1,11 @@
+error[E0277]: the trait bound `(): std::ops::Fn<()>` is not satisfied
+  --> $DIR/issue-22034.rs:18:16
+   |
+LL |         &mut *(ptr as *mut Fn())
+   |                ^^^ the trait `std::ops::Fn<()>` is not implemented for `()`
+   |
+   = note: required for the cast to the object type `dyn std::ops::Fn()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-22037.rs b/src/test/ui/issue-22037.rs
index ffa881b49c5..ffa881b49c5 100644
--- a/src/test/compile-fail/issue-22037.rs
+++ b/src/test/ui/issue-22037.rs
diff --git a/src/test/ui/issue-22037.stderr b/src/test/ui/issue-22037.stderr
new file mode 100644
index 00000000000..ae739afc704
--- /dev/null
+++ b/src/test/ui/issue-22037.stderr
@@ -0,0 +1,9 @@
+error[E0576]: cannot find associated type `X` in trait `A`
+  --> $DIR/issue-22037.rs:13:33
+   |
+LL |     fn a(&self) -> <Self as A>::X;
+   |                                 ^ not found in `A`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0576`.
diff --git a/src/test/compile-fail/issue-22289.rs b/src/test/ui/issue-22289.rs
index c23fc4f3344..c23fc4f3344 100644
--- a/src/test/compile-fail/issue-22289.rs
+++ b/src/test/ui/issue-22289.rs
diff --git a/src/test/ui/issue-22289.stderr b/src/test/ui/issue-22289.stderr
new file mode 100644
index 00000000000..202b25f1a5b
--- /dev/null
+++ b/src/test/ui/issue-22289.stderr
@@ -0,0 +1,11 @@
+error[E0605]: non-primitive cast: `i32` as `&(dyn std::any::Any + 'static)`
+  --> $DIR/issue-22289.rs:12:5
+   |
+LL |     0 as &std::any::Any; //~ ERROR non-primitive cast
+   |     ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0605`.
diff --git a/src/test/compile-fail/issue-22312.rs b/src/test/ui/issue-22312.rs
index 2128c420630..2128c420630 100644
--- a/src/test/compile-fail/issue-22312.rs
+++ b/src/test/ui/issue-22312.rs
diff --git a/src/test/ui/issue-22312.stderr b/src/test/ui/issue-22312.stderr
new file mode 100644
index 00000000000..abd712e5c29
--- /dev/null
+++ b/src/test/ui/issue-22312.stderr
@@ -0,0 +1,11 @@
+error[E0605]: non-primitive cast: `Self` as `&dyn std::ops::Index<usize, Output=<Self as std::ops::Index<usize>>::Output>`
+  --> $DIR/issue-22312.rs:21:24
+   |
+LL |         let indexer = &(*self as &Index<usize, Output = <Self as Index<usize>>::Output>);
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0605`.
diff --git a/src/test/compile-fail/issue-22384.rs b/src/test/ui/issue-22384.rs
index ae7fb01e057..ae7fb01e057 100644
--- a/src/test/compile-fail/issue-22384.rs
+++ b/src/test/ui/issue-22384.rs
diff --git a/src/test/ui/issue-22384.stderr b/src/test/ui/issue-22384.stderr
new file mode 100644
index 00000000000..b8cc1e643e5
--- /dev/null
+++ b/src/test/ui/issue-22384.stderr
@@ -0,0 +1,9 @@
+error[E0576]: cannot find associated type `foobar` in trait `Copy`
+  --> $DIR/issue-22384.rs:16:21
+   |
+LL |     <<i32 as Copy>::foobar as Trait>::foo();
+   |                     ^^^^^^ not found in `Copy`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0576`.
diff --git a/src/test/compile-fail/issue-22434.rs b/src/test/ui/issue-22434.rs
index 6effd02bac8..6effd02bac8 100644
--- a/src/test/compile-fail/issue-22434.rs
+++ b/src/test/ui/issue-22434.rs
diff --git a/src/test/ui/issue-22434.stderr b/src/test/ui/issue-22434.stderr
new file mode 100644
index 00000000000..914da801ad4
--- /dev/null
+++ b/src/test/ui/issue-22434.stderr
@@ -0,0 +1,9 @@
+error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
+  --> $DIR/issue-22434.rs:15:19
+   |
+LL | type I<'a> = &'a (Foo + 'a);
+   |                   ^^^^^^^^ missing associated type `A` value
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0191`.
diff --git a/src/test/compile-fail/issue-22468.rs b/src/test/ui/issue-22468.rs
index 50e5dd2955d..50e5dd2955d 100644
--- a/src/test/compile-fail/issue-22468.rs
+++ b/src/test/ui/issue-22468.rs
diff --git a/src/test/ui/issue-22468.stderr b/src/test/ui/issue-22468.stderr
new file mode 100644
index 00000000000..034a076fbfe
--- /dev/null
+++ b/src/test/ui/issue-22468.stderr
@@ -0,0 +1,11 @@
+error[E0618]: expected function, found `&str`
+  --> $DIR/issue-22468.rs:13:13
+   |
+LL |     let foo = "bar";
+   |         --- `&str` defined here
+LL |     let x = foo("baz");
+   |             ^^^^^^^^^^ not a function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/compile-fail/issue-22599.rs b/src/test/ui/issue-22599.rs
index b9ea3583296..b9ea3583296 100644
--- a/src/test/compile-fail/issue-22599.rs
+++ b/src/test/ui/issue-22599.rs
diff --git a/src/test/ui/issue-22599.stderr b/src/test/ui/issue-22599.stderr
new file mode 100644
index 00000000000..19c9b94a430
--- /dev/null
+++ b/src/test/ui/issue-22599.stderr
@@ -0,0 +1,14 @@
+error: unused variable: `a`
+  --> $DIR/issue-22599.rs:18:19
+   |
+LL |     v = match 0 { a => 0 }; //~ ERROR: unused variable: `a`
+   |                   ^ help: consider using `_a` instead
+   |
+note: lint level defined here
+  --> $DIR/issue-22599.rs:11:9
+   |
+LL | #![deny(unused_variables)]
+   |         ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-22603.rs b/src/test/ui/issue-22603.rs
index d08f916b870..d08f916b870 100644
--- a/src/test/compile-fail/issue-22603.rs
+++ b/src/test/ui/issue-22603.rs
diff --git a/src/test/ui/issue-22603.stderr b/src/test/ui/issue-22603.stderr
new file mode 100644
index 00000000000..b50a5a25a7a
--- /dev/null
+++ b/src/test/ui/issue-22603.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-22603.rs:21:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     println!("{:?}", Foo("bar"));
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-22673.rs b/src/test/ui/issue-22673.rs
index 2396007c3df..2396007c3df 100644
--- a/src/test/compile-fail/issue-22673.rs
+++ b/src/test/ui/issue-22673.rs
diff --git a/src/test/ui/issue-22673.stderr b/src/test/ui/issue-22673.stderr
new file mode 100644
index 00000000000..7e5b80c3711
--- /dev/null
+++ b/src/test/ui/issue-22673.stderr
@@ -0,0 +1,11 @@
+error[E0391]: cycle detected when computing the supertraits of `Expr`
+  --> $DIR/issue-22673.rs:11:1
+   |
+LL | trait Expr : PartialEq<Self::Item> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: ...which again requires computing the supertraits of `Expr`, completing the cycle
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/compile-fail/issue-22684.rs b/src/test/ui/issue-22684.rs
index a791758ad17..a791758ad17 100644
--- a/src/test/compile-fail/issue-22684.rs
+++ b/src/test/ui/issue-22684.rs
diff --git a/src/test/ui/issue-22684.stderr b/src/test/ui/issue-22684.stderr
new file mode 100644
index 00000000000..2c868bc8778
--- /dev/null
+++ b/src/test/ui/issue-22684.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-22684.rs:27:17
+   |
+LL |     let _: () = foo::Foo.bar(); //~ ERROR mismatched types
+   |                 ^^^^^^^^^^^^^^ expected (), found bool
+   |
+   = note: expected type `()`
+              found type `bool`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-22706.rs b/src/test/ui/issue-22706.rs
index 3d9ec0a6581..3d9ec0a6581 100644
--- a/src/test/compile-fail/issue-22706.rs
+++ b/src/test/ui/issue-22706.rs
diff --git a/src/test/ui/issue-22706.stderr b/src/test/ui/issue-22706.stderr
new file mode 100644
index 00000000000..2bbb3e5acad
--- /dev/null
+++ b/src/test/ui/issue-22706.stderr
@@ -0,0 +1,9 @@
+error[E0109]: type parameters are not allowed on this type
+  --> $DIR/issue-22706.rs:11:29
+   |
+LL | fn is_copy<T: ::std::marker<i32>::Copy>() {}
+   |                             ^^^ type parameter not allowed
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0109`.
diff --git a/src/test/compile-fail/issue-22789.rs b/src/test/ui/issue-22789.rs
index cba1c367bb9..cba1c367bb9 100644
--- a/src/test/compile-fail/issue-22789.rs
+++ b/src/test/ui/issue-22789.rs
diff --git a/src/test/ui/issue-22789.stderr b/src/test/ui/issue-22789.stderr
new file mode 100644
index 00000000000..afeae9c78ef
--- /dev/null
+++ b/src/test/ui/issue-22789.stderr
@@ -0,0 +1,11 @@
+error: compilation successful
+  --> $DIR/issue-22789.rs:14:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let k = |x: i32| { x + 1 };
+LL | |     Fn::call(&k, (0,));
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-2281-part1.rs b/src/test/ui/issue-2281-part1.rs
index e3fd9c48a52..e3fd9c48a52 100644
--- a/src/test/compile-fail/issue-2281-part1.rs
+++ b/src/test/ui/issue-2281-part1.rs
diff --git a/src/test/ui/issue-2281-part1.stderr b/src/test/ui/issue-2281-part1.stderr
new file mode 100644
index 00000000000..e88cfe2b2ac
--- /dev/null
+++ b/src/test/ui/issue-2281-part1.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `foobar` in this scope
+  --> $DIR/issue-2281-part1.rs:11:28
+   |
+LL | fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope
+   |                            ^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-22874.rs b/src/test/ui/issue-22874.rs
index e0a87b3a174..e0a87b3a174 100644
--- a/src/test/compile-fail/issue-22874.rs
+++ b/src/test/ui/issue-22874.rs
diff --git a/src/test/ui/issue-22874.stderr b/src/test/ui/issue-22874.stderr
new file mode 100644
index 00000000000..64c77a6a666
--- /dev/null
+++ b/src/test/ui/issue-22874.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `[std::string::String]` cannot be known at compilation time
+  --> $DIR/issue-22874.rs:12:5
+   |
+LL |     rows: [[String]],
+   |     ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `[std::string::String]`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: slice and array elements must have `Sized` type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-22933-1.rs b/src/test/ui/issue-22933-1.rs
index afb972faaca..afb972faaca 100644
--- a/src/test/compile-fail/issue-22933-1.rs
+++ b/src/test/ui/issue-22933-1.rs
diff --git a/src/test/ui/issue-22933-1.stderr b/src/test/ui/issue-22933-1.stderr
new file mode 100644
index 00000000000..eaebebe3b11
--- /dev/null
+++ b/src/test/ui/issue-22933-1.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-22933-1.rs:35:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-22933-3.rs b/src/test/ui/issue-22933-3.rs
index 62adae41adf..62adae41adf 100644
--- a/src/test/compile-fail/issue-22933-3.rs
+++ b/src/test/ui/issue-22933-3.rs
diff --git a/src/test/ui/issue-22933-3.stderr b/src/test/ui/issue-22933-3.stderr
new file mode 100644
index 00000000000..3d4d2df4d32
--- /dev/null
+++ b/src/test/ui/issue-22933-3.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no associated item named `MIN` found for type `u8` in the current scope
+  --> $DIR/issue-22933-3.rs:11:18
+   |
+LL | const FOO: [u32; u8::MIN as usize] = [];
+   |                  ^^^^^^^ associated item not found in `u8`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-23024.rs b/src/test/ui/issue-23024.rs
index 5d9b49f486c..5d9b49f486c 100644
--- a/src/test/compile-fail/issue-23024.rs
+++ b/src/test/ui/issue-23024.rs
diff --git a/src/test/ui/issue-23024.stderr b/src/test/ui/issue-23024.stderr
new file mode 100644
index 00000000000..39c79d8f14e
--- /dev/null
+++ b/src/test/ui/issue-23024.stderr
@@ -0,0 +1,24 @@
+error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625)
+  --> $DIR/issue-23024.rs:19:35
+   |
+LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
+   |                                   ^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error[E0243]: wrong number of type arguments: expected 1, found 0
+  --> $DIR/issue-23024.rs:19:35
+   |
+LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
+   |                                   ^^ expected 1 type argument
+
+error[E0191]: the value of the associated type `Output` (from the trait `std::ops::FnOnce`) must be specified
+  --> $DIR/issue-23024.rs:19:35
+   |
+LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
+   |                                   ^^ missing associated type `Output` value
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0191, E0243, E0658.
+For more information about an error, try `rustc --explain E0191`.
diff --git a/src/test/compile-fail/issue-23046.rs b/src/test/ui/issue-23046.rs
index 670706b7a9a..670706b7a9a 100644
--- a/src/test/compile-fail/issue-23046.rs
+++ b/src/test/ui/issue-23046.rs
diff --git a/src/test/ui/issue-23046.stderr b/src/test/ui/issue-23046.stderr
new file mode 100644
index 00000000000..3e5b4ec91d7
--- /dev/null
+++ b/src/test/ui/issue-23046.stderr
@@ -0,0 +1,9 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-23046.rs:27:15
+   |
+LL |     let ex = |x| { //~ ERROR type annotations needed
+   |               ^ consider giving this closure parameter a type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-23073.rs b/src/test/ui/issue-23073.rs
index 2d219177a80..2d219177a80 100644
--- a/src/test/compile-fail/issue-23073.rs
+++ b/src/test/ui/issue-23073.rs
diff --git a/src/test/ui/issue-23073.stderr b/src/test/ui/issue-23073.stderr
new file mode 100644
index 00000000000..44b2128af0a
--- /dev/null
+++ b/src/test/ui/issue-23073.stderr
@@ -0,0 +1,11 @@
+error[E0223]: ambiguous associated type
+  --> $DIR/issue-23073.rs:16:17
+   |
+LL |     type FooT = <<Self as Bar>::Foo>::T; //~ ERROR ambiguous associated type
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
+   |
+   = note: specify the type using the syntax `<<Self as Bar>::Foo as Trait>::T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0223`.
diff --git a/src/test/compile-fail/issue-23080-2.rs b/src/test/ui/issue-23080-2.rs
index fc365a4b9aa..fc365a4b9aa 100644
--- a/src/test/compile-fail/issue-23080-2.rs
+++ b/src/test/ui/issue-23080-2.rs
diff --git a/src/test/ui/issue-23080-2.stderr b/src/test/ui/issue-23080-2.stderr
new file mode 100644
index 00000000000..dda7fbd69cf
--- /dev/null
+++ b/src/test/ui/issue-23080-2.stderr
@@ -0,0 +1,18 @@
+error[E0380]: auto traits cannot have methods or associated items
+  --> $DIR/issue-23080-2.rs:17:1
+   |
+LL | / unsafe auto trait Trait {
+LL | | //~^ ERROR E0380
+LL | |     type Output;
+LL | | }
+   | |_^
+
+error[E0275]: overflow evaluating the requirement `<() as Trait>::Output`
+   |
+   = note: required because of the requirements on the impl of `Trait` for `()`
+   = note: required because of the requirements on the impl of `Trait` for `()`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0275, E0380.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-23080.rs b/src/test/ui/issue-23080.rs
index 153b6fd07e6..153b6fd07e6 100644
--- a/src/test/compile-fail/issue-23080.rs
+++ b/src/test/ui/issue-23080.rs
diff --git a/src/test/ui/issue-23080.stderr b/src/test/ui/issue-23080.stderr
new file mode 100644
index 00000000000..43e6f296033
--- /dev/null
+++ b/src/test/ui/issue-23080.stderr
@@ -0,0 +1,14 @@
+error[E0380]: auto traits cannot have methods or associated items
+  --> $DIR/issue-23080.rs:15:1
+   |
+LL | / unsafe auto trait Trait {
+LL | | //~^ ERROR E0380
+LL | |     fn method(&self) {
+LL | |         println!("Hello");
+LL | |     }
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0380`.
diff --git a/src/test/compile-fail/issue-23122-1.rs b/src/test/ui/issue-23122-1.rs
index 36d8450848d..36d8450848d 100644
--- a/src/test/compile-fail/issue-23122-1.rs
+++ b/src/test/ui/issue-23122-1.rs
diff --git a/src/test/ui/issue-23122-1.stderr b/src/test/ui/issue-23122-1.stderr
new file mode 100644
index 00000000000..a0e5386c111
--- /dev/null
+++ b/src/test/ui/issue-23122-1.stderr
@@ -0,0 +1,9 @@
+error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next`
+  --> $DIR/issue-23122-1.rs:17:15
+   |
+LL | impl<T: Next> Next for GetNext<T> {
+   |               ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-23122-2.rs b/src/test/ui/issue-23122-2.rs
index faaf78f894b..faaf78f894b 100644
--- a/src/test/compile-fail/issue-23122-2.rs
+++ b/src/test/ui/issue-23122-2.rs
diff --git a/src/test/ui/issue-23122-2.stderr b/src/test/ui/issue-23122-2.stderr
new file mode 100644
index 00000000000..c43f8d77823
--- /dev/null
+++ b/src/test/ui/issue-23122-2.stderr
@@ -0,0 +1,11 @@
+error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next`
+  --> $DIR/issue-23122-2.rs:17:15
+   |
+LL | impl<T: Next> Next for GetNext<T> {
+   |               ^^^^
+   |
+   = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/compile-fail/issue-23253.rs b/src/test/ui/issue-23253.rs
index 626604a87a7..626604a87a7 100644
--- a/src/test/compile-fail/issue-23253.rs
+++ b/src/test/ui/issue-23253.rs
diff --git a/src/test/ui/issue-23253.stderr b/src/test/ui/issue-23253.stderr
new file mode 100644
index 00000000000..f14ee510bd8
--- /dev/null
+++ b/src/test/ui/issue-23253.stderr
@@ -0,0 +1,9 @@
+error[E0609]: no field `a` on type `Foo`
+  --> $DIR/issue-23253.rs:14:14
+   |
+LL |     Foo::Bar.a;
+   |              ^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-23281.rs b/src/test/ui/issue-23281.rs
index 5de00eb8f68..5de00eb8f68 100644
--- a/src/test/compile-fail/issue-23281.rs
+++ b/src/test/ui/issue-23281.rs
diff --git a/src/test/ui/issue-23281.stderr b/src/test/ui/issue-23281.stderr
new file mode 100644
index 00000000000..ee5a9930df2
--- /dev/null
+++ b/src/test/ui/issue-23281.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time
+  --> $DIR/issue-23281.rs:16:5
+   |
+LL |     pub fn function(funs: Vec<Fn() -> ()>) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::Fn() + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required by `std::vec::Vec`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-2330.rs b/src/test/ui/issue-2330.rs
index f1a282695ac..f1a282695ac 100644
--- a/src/test/compile-fail/issue-2330.rs
+++ b/src/test/ui/issue-2330.rs
diff --git a/src/test/ui/issue-2330.stderr b/src/test/ui/issue-2330.stderr
new file mode 100644
index 00000000000..6b1d5e3b219
--- /dev/null
+++ b/src/test/ui/issue-2330.stderr
@@ -0,0 +1,9 @@
+error[E0404]: expected trait, found enum `chan`
+  --> $DIR/issue-2330.rs:18:6
+   |
+LL | impl chan for isize { //~ ERROR expected trait, found enum `chan`
+   |      ^^^^ not a trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0404`.
diff --git a/src/test/compile-fail/issue-23589.rs b/src/test/ui/issue-23589.rs
index 1c1d42da029..1c1d42da029 100644
--- a/src/test/compile-fail/issue-23589.rs
+++ b/src/test/ui/issue-23589.rs
diff --git a/src/test/ui/issue-23589.stderr b/src/test/ui/issue-23589.stderr
new file mode 100644
index 00000000000..f0c07b380b4
--- /dev/null
+++ b/src/test/ui/issue-23589.stderr
@@ -0,0 +1,9 @@
+error[E0214]: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-23589.rs:12:15
+   |
+LL |     let v: Vec(&str) = vec!['1', '2'];
+   |               ^^^^^^ only traits may use parentheses
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0214`.
diff --git a/src/test/compile-fail/issue-23595-2.rs b/src/test/ui/issue-23595-2.rs
index 6a3ce03fce5..6a3ce03fce5 100644
--- a/src/test/compile-fail/issue-23595-2.rs
+++ b/src/test/ui/issue-23595-2.rs
diff --git a/src/test/ui/issue-23595-2.stderr b/src/test/ui/issue-23595-2.stderr
new file mode 100644
index 00000000000..5ddaab6abfe
--- /dev/null
+++ b/src/test/ui/issue-23595-2.stderr
@@ -0,0 +1,9 @@
+error[E0220]: associated type `anything_here_kills_it` not found for `Self`
+  --> $DIR/issue-23595-2.rs:16:16
+   |
+LL |     type B = C<Self::anything_here_kills_it>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `anything_here_kills_it` not found
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0220`.
diff --git a/src/test/compile-fail/issue-23966.rs b/src/test/ui/issue-23966.rs
index 544d3c8af20..544d3c8af20 100644
--- a/src/test/compile-fail/issue-23966.rs
+++ b/src/test/ui/issue-23966.rs
diff --git a/src/test/ui/issue-23966.stderr b/src/test/ui/issue-23966.stderr
new file mode 100644
index 00000000000..07d2cfbf55f
--- /dev/null
+++ b/src/test/ui/issue-23966.stderr
@@ -0,0 +1,9 @@
+error[E0277]: the trait bound `(): std::ops::FnMut<(_, char)>` is not satisfied
+  --> $DIR/issue-23966.rs:12:16
+   |
+LL |     "".chars().fold(|_, _| (), ());
+   |                ^^^^ the trait `std::ops::FnMut<(_, char)>` is not implemented for `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-24013.rs b/src/test/ui/issue-24013.rs
index a7232781f6f..a7232781f6f 100644
--- a/src/test/compile-fail/issue-24013.rs
+++ b/src/test/ui/issue-24013.rs
diff --git a/src/test/ui/issue-24013.stderr b/src/test/ui/issue-24013.stderr
new file mode 100644
index 00000000000..324e705e5a1
--- /dev/null
+++ b/src/test/ui/issue-24013.stderr
@@ -0,0 +1,9 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-24013.rs:15:20
+   |
+LL |     unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
+   |                    ^^^^^^ cannot infer type for `_`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-24204.rs b/src/test/ui/issue-24204.rs
index 2a012da0083..2a012da0083 100644
--- a/src/test/compile-fail/issue-24204.rs
+++ b/src/test/ui/issue-24204.rs
diff --git a/src/test/ui/issue-24204.stderr b/src/test/ui/issue-24204.stderr
new file mode 100644
index 00000000000..809db284032
--- /dev/null
+++ b/src/test/ui/issue-24204.stderr
@@ -0,0 +1,17 @@
+error[E0271]: type mismatch resolving `<<T as Trait>::A as MultiDispatch<i32>>::O == T`
+  --> $DIR/issue-24204.rs:24:1
+   |
+LL | fn test<T: Trait<B=i32>>(b: i32) -> T where T::A: MultiDispatch<i32> { T::new(b) }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found type parameter
+   |
+   = note: expected type `<<T as Trait>::A as MultiDispatch<i32>>::O`
+              found type `T`
+note: required by `Trait`
+  --> $DIR/issue-24204.rs:17:1
+   |
+LL | trait Trait: Sized {
+   | ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0271`.
diff --git a/src/test/ui/issue-24267-flow-exit.nll.stderr b/src/test/ui/issue-24267-flow-exit.nll.stderr
new file mode 100644
index 00000000000..cf3553c6b0d
--- /dev/null
+++ b/src/test/ui/issue-24267-flow-exit.nll.stderr
@@ -0,0 +1,15 @@
+error[E0381]: borrow of possibly uninitialized variable: `x`
+  --> $DIR/issue-24267-flow-exit.rs:22:20
+   |
+LL |     println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+   |                    ^ use of possibly uninitialized `x`
+
+error[E0381]: borrow of possibly uninitialized variable: `x`
+  --> $DIR/issue-24267-flow-exit.rs:28:20
+   |
+LL |     println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+   |                    ^ use of possibly uninitialized `x`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0381`.
diff --git a/src/test/compile-fail/issue-24267-flow-exit.rs b/src/test/ui/issue-24267-flow-exit.rs
index 4aca6bf38e1..4aca6bf38e1 100644
--- a/src/test/compile-fail/issue-24267-flow-exit.rs
+++ b/src/test/ui/issue-24267-flow-exit.rs
diff --git a/src/test/ui/issue-24267-flow-exit.stderr b/src/test/ui/issue-24267-flow-exit.stderr
new file mode 100644
index 00000000000..7d1d5ac7df6
--- /dev/null
+++ b/src/test/ui/issue-24267-flow-exit.stderr
@@ -0,0 +1,15 @@
+error[E0381]: use of possibly uninitialized variable: `x`
+  --> $DIR/issue-24267-flow-exit.rs:22:20
+   |
+LL |     println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+   |                    ^ use of possibly uninitialized `x`
+
+error[E0381]: use of possibly uninitialized variable: `x`
+  --> $DIR/issue-24267-flow-exit.rs:28:20
+   |
+LL |     println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+   |                    ^ use of possibly uninitialized `x`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0381`.
diff --git a/src/test/compile-fail/issue-24322.rs b/src/test/ui/issue-24322.rs
index bb726aca921..bb726aca921 100644
--- a/src/test/compile-fail/issue-24322.rs
+++ b/src/test/ui/issue-24322.rs
diff --git a/src/test/ui/issue-24322.stderr b/src/test/ui/issue-24322.stderr
new file mode 100644
index 00000000000..d2cad8d3464
--- /dev/null
+++ b/src/test/ui/issue-24322.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-24322.rs:18:29
+   |
+LL |     let x: &fn(&B) -> u32 = &B::func; //~ ERROR mismatched types
+   |                             ^^^^^^^^ expected fn pointer, found fn item
+   |
+   = note: expected type `&for<'r> fn(&'r B) -> u32`
+              found type `&for<'r> fn(&'r B) -> u32 {B::func}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-24352.rs b/src/test/ui/issue-24352.rs
index 4b077314056..4b077314056 100644
--- a/src/test/compile-fail/issue-24352.rs
+++ b/src/test/ui/issue-24352.rs
diff --git a/src/test/ui/issue-24352.stderr b/src/test/ui/issue-24352.stderr
new file mode 100644
index 00000000000..8a4169055e7
--- /dev/null
+++ b/src/test/ui/issue-24352.stderr
@@ -0,0 +1,11 @@
+error[E0277]: cannot subtract `{integer}` from `f64`
+  --> $DIR/issue-24352.rs:13:12
+   |
+LL |     1.0f64 - 1 //~ ERROR E0277
+   |            ^ no implementation for `f64 - {integer}`
+   |
+   = help: the trait `std::ops::Sub<{integer}>` is not implemented for `f64`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/issue-24357.nll.stderr b/src/test/ui/issue-24357.nll.stderr
new file mode 100644
index 00000000000..f601a6fbc88
--- /dev/null
+++ b/src/test/ui/issue-24357.nll.stderr
@@ -0,0 +1,14 @@
+error[E0382]: use of moved value: `x`
+  --> $DIR/issue-24357.rs:16:12
+   |
+LL |    let f = move || { let y = x; };
+   |            ---------------------- value moved here
+LL |    //~^ NOTE value moved (into closure) here
+LL |    let z = x;
+   |            ^ value used here after move
+   |
+   = note: move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-24357.rs b/src/test/ui/issue-24357.rs
index 016ce93a0bd..016ce93a0bd 100644
--- a/src/test/compile-fail/issue-24357.rs
+++ b/src/test/ui/issue-24357.rs
diff --git a/src/test/ui/issue-24357.stderr b/src/test/ui/issue-24357.stderr
new file mode 100644
index 00000000000..be531ec8567
--- /dev/null
+++ b/src/test/ui/issue-24357.stderr
@@ -0,0 +1,14 @@
+error[E0382]: use of moved value: `x`
+  --> $DIR/issue-24357.rs:16:8
+   |
+LL |    let f = move || { let y = x; };
+   |            ------- value moved (into closure) here
+LL |    //~^ NOTE value moved (into closure) here
+LL |    let z = x;
+   |        ^ value used here after move
+   |
+   = note: move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-24363.rs b/src/test/ui/issue-24363.rs
index 619ad74ad00..619ad74ad00 100644
--- a/src/test/compile-fail/issue-24363.rs
+++ b/src/test/ui/issue-24363.rs
diff --git a/src/test/ui/issue-24363.stderr b/src/test/ui/issue-24363.stderr
new file mode 100644
index 00000000000..2695d6acea8
--- /dev/null
+++ b/src/test/ui/issue-24363.stderr
@@ -0,0 +1,18 @@
+error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
+  --> $DIR/issue-24363.rs:12:7
+   |
+LL |     1.create_a_type_error[ //~ `{integer}` is a primitive type and therefore doesn't have fields
+   |       ^^^^^^^^^^^^^^^^^^^
+
+error[E0369]: binary operation `+` cannot be applied to type `()`
+  --> $DIR/issue-24363.rs:13:9
+   |
+LL |         ()+() //~ ERROR binary operation `+` cannot be applied
+   |         ^^^^^
+   |
+   = note: an implementation of `std::ops::Add` might be missing for `()`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0369, E0610.
+For more information about an error, try `rustc --explain E0369`.
diff --git a/src/test/compile-fail/issue-24365.rs b/src/test/ui/issue-24365.rs
index 72df6fb5999..72df6fb5999 100644
--- a/src/test/compile-fail/issue-24365.rs
+++ b/src/test/ui/issue-24365.rs
diff --git a/src/test/ui/issue-24365.stderr b/src/test/ui/issue-24365.stderr
new file mode 100644
index 00000000000..0ad4674ca86
--- /dev/null
+++ b/src/test/ui/issue-24365.stderr
@@ -0,0 +1,21 @@
+error[E0609]: no field `b` on type `Foo`
+  --> $DIR/issue-24365.rs:20:22
+   |
+LL |     println!("{}", a.b); //~ no field `b` on type `Foo`
+   |                      ^
+
+error[E0609]: no field `attr_name_idx` on type `&Attribute`
+  --> $DIR/issue-24365.rs:27:18
+   |
+LL |     let z = (&x).attr_name_idx; //~ no field `attr_name_idx` on type `&Attribute`
+   |                  ^^^^^^^^^^^^^
+
+error[E0609]: no field `attr_name_idx` on type `Attribute`
+  --> $DIR/issue-24365.rs:28:15
+   |
+LL |     let y = x.attr_name_idx; //~ no field `attr_name_idx` on type `Attribute`
+   |               ^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-24446.rs b/src/test/ui/issue-24446.rs
index a9c7978642d..a9c7978642d 100644
--- a/src/test/compile-fail/issue-24446.rs
+++ b/src/test/ui/issue-24446.rs
diff --git a/src/test/ui/issue-24446.stderr b/src/test/ui/issue-24446.stderr
new file mode 100644
index 00000000000..2c13dd36558
--- /dev/null
+++ b/src/test/ui/issue-24446.stderr
@@ -0,0 +1,33 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-24446.rs:12:31
+   |
+LL |       static foo: Fn() -> u32 = || -> u32 {
+   |  _______________________________^
+LL | |         //~^ ERROR mismatched types
+LL | |         //~| ERROR the size for values of type
+LL | |         0
+LL | |     };
+   | |_____^ expected trait std::ops::Fn, found closure
+   |
+   = note: expected type `(dyn std::ops::Fn() -> u32 + 'static)`
+              found type `[closure@$DIR/issue-24446.rs:12:31: 16:6]`
+
+error[E0277]: the size for values of type `(dyn std::ops::Fn() -> u32 + 'static)` cannot be known at compilation time
+  --> $DIR/issue-24446.rs:12:31
+   |
+LL |       static foo: Fn() -> u32 = || -> u32 {
+   |  _______________________________^
+LL | |         //~^ ERROR mismatched types
+LL | |         //~| ERROR the size for values of type
+LL | |         0
+LL | |     };
+   | |_____^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::Fn() -> u32 + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: constant expressions must have a statically known size
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-24682.rs b/src/test/ui/issue-24682.rs
index 0e872f71df4..0e872f71df4 100644
--- a/src/test/compile-fail/issue-24682.rs
+++ b/src/test/ui/issue-24682.rs
diff --git a/src/test/ui/issue-24682.stderr b/src/test/ui/issue-24682.stderr
new file mode 100644
index 00000000000..1e16cb72a09
--- /dev/null
+++ b/src/test/ui/issue-24682.stderr
@@ -0,0 +1,22 @@
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/issue-24682.rs:15:11
+   |
+LL | /           N= //~ ERROR associated type bindings are not allowed here
+LL | |           Self::N> {
+   | |_________________^ associated type not allowed here
+
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/issue-24682.rs:21:13
+   |
+LL |            <N=()> //~ ERROR associated type bindings are not allowed here
+   |             ^^^^ associated type not allowed here
+
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/issue-24682.rs:25:13
+   |
+LL |         u32<N=()> //~ ERROR associated type bindings are not allowed here
+   |             ^^^^ associated type not allowed here
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0229`.
diff --git a/src/test/compile-fail/issue-24819.rs b/src/test/ui/issue-24819.rs
index 52f5f1cd079..52f5f1cd079 100644
--- a/src/test/compile-fail/issue-24819.rs
+++ b/src/test/ui/issue-24819.rs
diff --git a/src/test/ui/issue-24819.stderr b/src/test/ui/issue-24819.stderr
new file mode 100644
index 00000000000..33034b7072b
--- /dev/null
+++ b/src/test/ui/issue-24819.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-24819.rs:15:9
+   |
+LL |     foo(&mut v);
+   |         ^^^^^^ expected struct `std::collections::HashSet`, found struct `std::vec::Vec`
+   |
+   = note: expected type `&mut std::collections::HashSet<u32>`
+              found type `&mut std::vec::Vec<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-24883.rs b/src/test/ui/issue-24883.rs
index 097f2a5630c..097f2a5630c 100644
--- a/src/test/compile-fail/issue-24883.rs
+++ b/src/test/ui/issue-24883.rs
diff --git a/src/test/ui/issue-24883.stderr b/src/test/ui/issue-24883.stderr
new file mode 100644
index 00000000000..4b17747f109
--- /dev/null
+++ b/src/test/ui/issue-24883.stderr
@@ -0,0 +1,11 @@
+error: compilation successful
+  --> $DIR/issue-24883.rs:25:1
+   |
+LL | / fn main() {  //~ ERROR compilation successful
+LL | |     let _ = a::c::Bar(a::b::Foo);
+LL | |     let _ = a::Bar(a::b::Foo);
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-25076.rs b/src/test/ui/issue-25076.rs
index 1c255b4e631..1c255b4e631 100644
--- a/src/test/compile-fail/issue-25076.rs
+++ b/src/test/ui/issue-25076.rs
diff --git a/src/test/ui/issue-25076.stderr b/src/test/ui/issue-25076.stderr
new file mode 100644
index 00000000000..13ee70fdd9b
--- /dev/null
+++ b/src/test/ui/issue-25076.stderr
@@ -0,0 +1,15 @@
+error[E0277]: the trait bound `(): InOut<_>` is not satisfied
+  --> $DIR/issue-25076.rs:20:5
+   |
+LL |     do_fold(bot(), ()); //~ ERROR `(): InOut<_>` is not satisfied
+   |     ^^^^^^^ the trait `InOut<_>` is not implemented for `()`
+   |
+note: required by `do_fold`
+  --> $DIR/issue-25076.rs:15:1
+   |
+LL | fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-25368.rs b/src/test/ui/issue-25368.rs
index e70c0050221..e70c0050221 100644
--- a/src/test/compile-fail/issue-25368.rs
+++ b/src/test/ui/issue-25368.rs
diff --git a/src/test/ui/issue-25368.stderr b/src/test/ui/issue-25368.stderr
new file mode 100644
index 00000000000..56cbef7b89c
--- /dev/null
+++ b/src/test/ui/issue-25368.stderr
@@ -0,0 +1,12 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-25368.rs:21:17
+   |
+LL |     let (tx, rx) = channel();
+   |         -------- consider giving the pattern a type
+...
+LL |         tx.send(Foo{ foo: PhantomData }); //~ ERROR E0282
+   |                 ^^^ cannot infer type for `T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-25386.rs b/src/test/ui/issue-25386.rs
index b2775db5e75..b2775db5e75 100644
--- a/src/test/compile-fail/issue-25386.rs
+++ b/src/test/ui/issue-25386.rs
diff --git a/src/test/ui/issue-25386.stderr b/src/test/ui/issue-25386.stderr
new file mode 100644
index 00000000000..986961d36c9
--- /dev/null
+++ b/src/test/ui/issue-25386.stderr
@@ -0,0 +1,21 @@
+error[E0616]: field `c_object` of struct `stuff::Item` is private
+  --> $DIR/issue-25386.rs:29:11
+   |
+LL |         (*$var.c_object).$member.is_some()
+   |           ^^^^^^^^^^^^^
+...
+LL |     println!("{}", check_ptr_exist!(item, name));
+   |                    ---------------------------- in this macro invocation
+
+error[E0616]: field `name` of struct `stuff::CObj` is private
+  --> $DIR/issue-25386.rs:29:9
+   |
+LL |         (*$var.c_object).$member.is_some()
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     println!("{}", check_ptr_exist!(item, name));
+   |                    ---------------------------- in this macro invocation
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0616`.
diff --git a/src/test/compile-fail/issue-25396.rs b/src/test/ui/issue-25396.rs
index 7cfcbc5471a..7cfcbc5471a 100644
--- a/src/test/compile-fail/issue-25396.rs
+++ b/src/test/ui/issue-25396.rs
diff --git a/src/test/ui/issue-25396.stderr b/src/test/ui/issue-25396.stderr
new file mode 100644
index 00000000000..1946f391672
--- /dev/null
+++ b/src/test/ui/issue-25396.stderr
@@ -0,0 +1,59 @@
+error[E0252]: the name `baz` is defined multiple times
+  --> $DIR/issue-25396.rs:12:5
+   |
+LL | use foo::baz;
+   |     -------- previous import of the module `baz` here
+LL | use bar::baz; //~ ERROR the name `baz` is defined multiple times
+   |     ^^^^^^^^ `baz` reimported here
+   |
+   = note: `baz` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+LL | use bar::baz as other_baz; //~ ERROR the name `baz` is defined multiple times
+   |     ^^^^^^^^^^^^^^^^^^^^^
+
+error[E0252]: the name `Quux` is defined multiple times
+  --> $DIR/issue-25396.rs:15:5
+   |
+LL | use foo::Quux;
+   |     --------- previous import of the trait `Quux` here
+LL | use bar::Quux; //~ ERROR the name `Quux` is defined multiple times
+   |     ^^^^^^^^^ `Quux` reimported here
+   |
+   = note: `Quux` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+LL | use bar::Quux as OtherQuux; //~ ERROR the name `Quux` is defined multiple times
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0252]: the name `blah` is defined multiple times
+  --> $DIR/issue-25396.rs:18:5
+   |
+LL | use foo::blah;
+   |     --------- previous import of the type `blah` here
+LL | use bar::blah; //~ ERROR the name `blah` is defined multiple times
+   |     ^^^^^^^^^ `blah` reimported here
+   |
+   = note: `blah` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+LL | use bar::blah as other_blah; //~ ERROR the name `blah` is defined multiple times
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0252]: the name `WOMP` is defined multiple times
+  --> $DIR/issue-25396.rs:21:5
+   |
+LL | use foo::WOMP;
+   |     --------- previous import of the value `WOMP` here
+LL | use bar::WOMP; //~ ERROR the name `WOMP` is defined multiple times
+   |     ^^^^^^^^^ `WOMP` reimported here
+   |
+   = note: `WOMP` must be defined only once in the value namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+LL | use bar::WOMP as OtherWOMP; //~ ERROR the name `WOMP` is defined multiple times
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/src/test/compile-fail/issue-25439.rs b/src/test/ui/issue-25439.rs
index 6e33fd5ae71..6e33fd5ae71 100644
--- a/src/test/compile-fail/issue-25439.rs
+++ b/src/test/ui/issue-25439.rs
diff --git a/src/test/ui/issue-25439.stderr b/src/test/ui/issue-25439.stderr
new file mode 100644
index 00000000000..467bb1ad28e
--- /dev/null
+++ b/src/test/ui/issue-25439.stderr
@@ -0,0 +1,13 @@
+error[E0644]: closure/generator type that references itself
+  --> $DIR/issue-25439.rs:18:9
+   |
+LL |     fix(|_, x| x); //~ ERROR closure/generator type that references itself [E0644]
+   |         ^^^^^^^^ cyclic type of infinite size
+   |
+   = note: closures cannot capture themselves or take themselves as argument;
+           this error may be the result of a recent compiler bug-fix,
+           see https://github.com/rust-lang/rust/issues/46062 for more details
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0644`.
diff --git a/src/test/ui/issue-25579.ast.nll.stderr b/src/test/ui/issue-25579.ast.nll.stderr
new file mode 100644
index 00000000000..9f698e4d582
--- /dev/null
+++ b/src/test/ui/issue-25579.ast.nll.stderr
@@ -0,0 +1,9 @@
+error: compilation successful
+  --> $DIR/issue-25579.rs:31:1
+   |
+LL | / fn main() { //[mir]~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-25579.ast.stderr b/src/test/ui/issue-25579.ast.stderr
new file mode 100644
index 00000000000..49b483d7503
--- /dev/null
+++ b/src/test/ui/issue-25579.ast.stderr
@@ -0,0 +1,21 @@
+error[E0499]: cannot borrow `l.0` as mutable more than once at a time
+  --> $DIR/issue-25579.rs:24:32
+   |
+LL |         &mut Sexpression::Cons(ref mut expr) => { //[ast]~ ERROR [E0499]
+   |                                ^^^^^^^^^^^^ mutable borrow starts here in previous iteration of loop
+...
+LL | }
+   | - mutable borrow ends here
+
+error[E0506]: cannot assign to `l` because it is borrowed
+  --> $DIR/issue-25579.rs:25:13
+   |
+LL |         &mut Sexpression::Cons(ref mut expr) => { //[ast]~ ERROR [E0499]
+   |                                ------------ borrow of `l` occurs here
+LL |             l = &mut **expr; //[ast]~ ERROR [E0506]
+   |             ^^^^^^^^^^^^^^^ assignment to borrowed `l` occurs here
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0499, E0506.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/src/test/ui/issue-25579.mir.stderr b/src/test/ui/issue-25579.mir.stderr
new file mode 100644
index 00000000000..9f698e4d582
--- /dev/null
+++ b/src/test/ui/issue-25579.mir.stderr
@@ -0,0 +1,9 @@
+error: compilation successful
+  --> $DIR/issue-25579.rs:31:1
+   |
+LL | / fn main() { //[mir]~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-25579.rs b/src/test/ui/issue-25579.rs
index 71c1d63cf5a..71c1d63cf5a 100644
--- a/src/test/compile-fail/issue-25579.rs
+++ b/src/test/ui/issue-25579.rs
diff --git a/src/test/compile-fail/issue-25700.rs b/src/test/ui/issue-25700.rs
index 477c3237f84..477c3237f84 100644
--- a/src/test/compile-fail/issue-25700.rs
+++ b/src/test/ui/issue-25700.rs
diff --git a/src/test/ui/issue-25700.stderr b/src/test/ui/issue-25700.stderr
new file mode 100644
index 00000000000..786620ab750
--- /dev/null
+++ b/src/test/ui/issue-25700.stderr
@@ -0,0 +1,13 @@
+error[E0382]: use of moved value: `t`
+  --> $DIR/issue-25700.rs:23:10
+   |
+LL |     drop(t);
+   |          - value moved here
+LL |     drop(t); //~ ERROR use of moved value
+   |          ^ value used here after move
+   |
+   = note: move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/issue-2590.nll.stderr b/src/test/ui/issue-2590.nll.stderr
new file mode 100644
index 00000000000..fa2df26498a
--- /dev/null
+++ b/src/test/ui/issue-2590.nll.stderr
@@ -0,0 +1,9 @@
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-2590.rs:22:9
+   |
+LL |         self.tokens //~ ERROR cannot move out of borrowed content
+   |         ^^^^^^^^^^^ cannot move out of borrowed content
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/compile-fail/issue-2590.rs b/src/test/ui/issue-2590.rs
index d7e438d1049..d7e438d1049 100644
--- a/src/test/compile-fail/issue-2590.rs
+++ b/src/test/ui/issue-2590.rs
diff --git a/src/test/ui/issue-2590.stderr b/src/test/ui/issue-2590.stderr
new file mode 100644
index 00000000000..59ec66d42cd
--- /dev/null
+++ b/src/test/ui/issue-2590.stderr
@@ -0,0 +1,9 @@
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-2590.rs:22:9
+   |
+LL |         self.tokens //~ ERROR cannot move out of borrowed content
+   |         ^^^^ cannot move out of borrowed content
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/compile-fail/issue-25901.rs b/src/test/ui/issue-25901.rs
index 72fb2a682eb..72fb2a682eb 100644
--- a/src/test/compile-fail/issue-25901.rs
+++ b/src/test/ui/issue-25901.rs
diff --git a/src/test/ui/issue-25901.stderr b/src/test/ui/issue-25901.stderr
new file mode 100644
index 00000000000..8c20df5a230
--- /dev/null
+++ b/src/test/ui/issue-25901.stderr
@@ -0,0 +1,9 @@
+error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-25901.rs:14:24
+   |
+LL | static S: &'static B = &A;
+   |                        ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-26094.rs b/src/test/ui/issue-26094.rs
index 99add95e806..99add95e806 100644
--- a/src/test/compile-fail/issue-26094.rs
+++ b/src/test/ui/issue-26094.rs
diff --git a/src/test/ui/issue-26094.stderr b/src/test/ui/issue-26094.stderr
new file mode 100644
index 00000000000..bf902e16c0c
--- /dev/null
+++ b/src/test/ui/issue-26094.stderr
@@ -0,0 +1,15 @@
+error[E0061]: this function takes 0 parameters but 1 parameter was supplied
+  --> $DIR/issue-26094.rs:13:9
+   |
+LL |         $other(None)
+   |         ^^^^^^^^^^^^ expected 0 parameters
+...
+LL | fn some_function() {}
+   | ------------------ defined here
+...
+LL |     some_macro!(some_function);
+   |     --------------------------- in this macro invocation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0061`.
diff --git a/src/test/compile-fail/issue-26158.rs b/src/test/ui/issue-26158.rs
index 54f5313aed1..54f5313aed1 100644
--- a/src/test/compile-fail/issue-26158.rs
+++ b/src/test/ui/issue-26158.rs
diff --git a/src/test/ui/issue-26158.stderr b/src/test/ui/issue-26158.stderr
new file mode 100644
index 00000000000..07b968c8e78
--- /dev/null
+++ b/src/test/ui/issue-26158.stderr
@@ -0,0 +1,9 @@
+error[E0005]: refutable pattern in local binding: `&[]` not covered
+  --> $DIR/issue-26158.rs:15:9
+   |
+LL |     let &[[ref _a, ref _b..]..] = x; //~ ERROR refutable pattern
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ pattern `&[]` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0005`.
diff --git a/src/test/ui/issue-26217.nll.stderr b/src/test/ui/issue-26217.nll.stderr
new file mode 100644
index 00000000000..94e3692d53d
--- /dev/null
+++ b/src/test/ui/issue-26217.nll.stderr
@@ -0,0 +1,15 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-26217.rs:14:5
+   |
+LL |     foo::<&'a i32>();
+   |     ^^^^^^^^^^^^^^
+
+error[E0131]: `main` function is not allowed to have generic parameters
+  --> $DIR/issue-26217.rs:13:8
+   |
+LL | fn main<'a>() {
+   |        ^^^^ `main` cannot have generic parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0131`.
diff --git a/src/test/compile-fail/issue-26217.rs b/src/test/ui/issue-26217.rs
index 06a8fe52588..06a8fe52588 100644
--- a/src/test/compile-fail/issue-26217.rs
+++ b/src/test/ui/issue-26217.rs
diff --git a/src/test/ui/issue-26217.stderr b/src/test/ui/issue-26217.stderr
new file mode 100644
index 00000000000..f581826440e
--- /dev/null
+++ b/src/test/ui/issue-26217.stderr
@@ -0,0 +1,11 @@
+error[E0477]: the type `&'a i32` does not fulfill the required lifetime
+  --> $DIR/issue-26217.rs:14:5
+   |
+LL |     foo::<&'a i32>();
+   |     ^^^^^^^^^^^^^^
+   |
+   = note: type must satisfy the static lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0477`.
diff --git a/src/test/compile-fail/issue-26237.rs b/src/test/ui/issue-26237.rs
index 22772e596b1..22772e596b1 100644
--- a/src/test/compile-fail/issue-26237.rs
+++ b/src/test/ui/issue-26237.rs
diff --git a/src/test/ui/issue-26237.stderr b/src/test/ui/issue-26237.stderr
new file mode 100644
index 00000000000..ae6fda8b932
--- /dev/null
+++ b/src/test/ui/issue-26237.stderr
@@ -0,0 +1,15 @@
+error[E0618]: expected function, found `{integer}`
+  --> $DIR/issue-26237.rs:13:9
+   |
+LL |         $not_a_function($some_argument)
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a function
+...
+LL |     let mut value_a = 0;
+   |         ----------- `{integer}` defined here
+LL |     let mut value_b = 0;
+LL |     macro_panic!(value_a, value_b);
+   |     ------------------------------- in this macro invocation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/compile-fail/issue-26262.rs b/src/test/ui/issue-26262.rs
index 8d79fd4570d..8d79fd4570d 100644
--- a/src/test/compile-fail/issue-26262.rs
+++ b/src/test/ui/issue-26262.rs
diff --git a/src/test/ui/issue-26262.stderr b/src/test/ui/issue-26262.stderr
new file mode 100644
index 00000000000..2e0a211d061
--- /dev/null
+++ b/src/test/ui/issue-26262.stderr
@@ -0,0 +1,15 @@
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-26262.rs:17:6
+   |
+LL | impl<T: Tr> S<T::Assoc> {
+   |      ^ unconstrained type parameter
+
+error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-26262.rs:27:6
+   |
+LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+   |      ^^ unconstrained lifetime parameter
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/compile-fail/issue-26459.rs b/src/test/ui/issue-26459.rs
index 8be3d88bd5c..8be3d88bd5c 100644
--- a/src/test/compile-fail/issue-26459.rs
+++ b/src/test/ui/issue-26459.rs
diff --git a/src/test/ui/issue-26459.stderr b/src/test/ui/issue-26459.stderr
new file mode 100644
index 00000000000..d497c1c9209
--- /dev/null
+++ b/src/test/ui/issue-26459.stderr
@@ -0,0 +1,9 @@
+error[E0574]: expected struct, variant or union type, found builtin type `char`
+  --> $DIR/issue-26459.rs:13:9
+   |
+LL |         char{ch} => true
+   |         ^^^^ not a struct, variant or union type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0574`.
diff --git a/src/test/compile-fail/issue-26614.rs b/src/test/ui/issue-26614.rs
index c128fb3b479..c128fb3b479 100644
--- a/src/test/compile-fail/issue-26614.rs
+++ b/src/test/ui/issue-26614.rs
diff --git a/src/test/ui/issue-26614.stderr b/src/test/ui/issue-26614.stderr
new file mode 100644
index 00000000000..1752d80fde3
--- /dev/null
+++ b/src/test/ui/issue-26614.stderr
@@ -0,0 +1,11 @@
+error: compilation successful
+  --> $DIR/issue-26614.rs:24:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let c: <u32 as Mirror>::It = 5;
+LL | |     const CCCC: <u32 as Mirror>::It = 5;
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-26812.rs b/src/test/ui/issue-26812.rs
index 1dd00881078..1dd00881078 100644
--- a/src/test/compile-fail/issue-26812.rs
+++ b/src/test/ui/issue-26812.rs
diff --git a/src/test/ui/issue-26812.stderr b/src/test/ui/issue-26812.stderr
new file mode 100644
index 00000000000..82cc17b7665
--- /dev/null
+++ b/src/test/ui/issue-26812.stderr
@@ -0,0 +1,9 @@
+error[E0128]: type parameters with a default cannot use forward declared identifiers
+  --> $DIR/issue-26812.rs:13:10
+   |
+LL | fn avg<T=T::Item>(_: T) {}
+   |          ^^^^^^^ defaulted type parameters cannot be forward declared
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0128`.
diff --git a/src/test/compile-fail/issue-26905.rs b/src/test/ui/issue-26905.rs
index 3b8fac832a4..3b8fac832a4 100644
--- a/src/test/compile-fail/issue-26905.rs
+++ b/src/test/ui/issue-26905.rs
diff --git a/src/test/ui/issue-26905.stderr b/src/test/ui/issue-26905.stderr
new file mode 100644
index 00000000000..f18b58a8330
--- /dev/null
+++ b/src/test/ui/issue-26905.stderr
@@ -0,0 +1,12 @@
+error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
+  --> $DIR/issue-26905.rs:26:40
+   |
+LL | impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<MyRc<U>> for MyRc<T>{ } //~ERROR
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions
+   |
+   = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
+   = note: currently, 2 fields need coercions: _ptr (*const T to *const U), _boo (NotPhantomData<T> to NotPhantomData<U>)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0375`.
diff --git a/src/test/compile-fail/issue-26930.rs b/src/test/ui/issue-26930.rs
index 6c98f3e8560..6c98f3e8560 100644
--- a/src/test/compile-fail/issue-26930.rs
+++ b/src/test/ui/issue-26930.rs
diff --git a/src/test/ui/issue-26930.stderr b/src/test/ui/issue-26930.stderr
new file mode 100644
index 00000000000..f962f4c58c4
--- /dev/null
+++ b/src/test/ui/issue-26930.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-26930.rs:20:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-26948.rs b/src/test/ui/issue-26948.rs
index c63cb5defb7..c63cb5defb7 100644
--- a/src/test/compile-fail/issue-26948.rs
+++ b/src/test/ui/issue-26948.rs
diff --git a/src/test/ui/issue-26948.stderr b/src/test/ui/issue-26948.stderr
new file mode 100644
index 00000000000..982ce1d6c7b
--- /dev/null
+++ b/src/test/ui/issue-26948.stderr
@@ -0,0 +1,9 @@
+error[E0436]: functional record update syntax requires a struct
+  --> $DIR/issue-26948.rs:14:22
+   |
+LL |     Foo::A { x: 6, ..orig };
+   |                      ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0436`.
diff --git a/src/test/compile-fail/issue-27008.rs b/src/test/ui/issue-27008.rs
index f80135848e0..f80135848e0 100644
--- a/src/test/compile-fail/issue-27008.rs
+++ b/src/test/ui/issue-27008.rs
diff --git a/src/test/ui/issue-27008.stderr b/src/test/ui/issue-27008.stderr
new file mode 100644
index 00000000000..79831463664
--- /dev/null
+++ b/src/test/ui/issue-27008.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-27008.rs:14:17
+   |
+LL |     let b = [0; S];
+   |                 ^ expected usize, found struct `S`
+   |
+   = note: expected type `usize`
+              found type `S`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-27033.rs b/src/test/ui/issue-27033.rs
index b8552aaee90..b8552aaee90 100644
--- a/src/test/compile-fail/issue-27033.rs
+++ b/src/test/ui/issue-27033.rs
diff --git a/src/test/ui/issue-27033.stderr b/src/test/ui/issue-27033.stderr
new file mode 100644
index 00000000000..ba573c3eb6d
--- /dev/null
+++ b/src/test/ui/issue-27033.stderr
@@ -0,0 +1,18 @@
+error[E0530]: match bindings cannot shadow unit variants
+  --> $DIR/issue-27033.rs:13:9
+   |
+LL |         None @ _ => {} //~ ERROR match bindings cannot shadow unit variants
+   |         ^^^^ cannot be named the same as a unit variant
+
+error[E0530]: match bindings cannot shadow constants
+  --> $DIR/issue-27033.rs:17:9
+   |
+LL |     const C: u8 = 1;
+   |     ---------------- a constant `C` is defined here
+LL |     match 1 {
+LL |         C @ 2 => { //~ ERROR match bindings cannot shadow constant
+   |         ^ cannot be named the same as a constant
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0530`.
diff --git a/src/test/compile-fail/issue-27042.rs b/src/test/ui/issue-27042.rs
index 23afa4b6296..23afa4b6296 100644
--- a/src/test/compile-fail/issue-27042.rs
+++ b/src/test/ui/issue-27042.rs
diff --git a/src/test/ui/issue-27042.stderr b/src/test/ui/issue-27042.stderr
new file mode 100644
index 00000000000..48113445582
--- /dev/null
+++ b/src/test/ui/issue-27042.stderr
@@ -0,0 +1,42 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-27042.rs:16:16
+   |
+LL |         loop { break }; //~ ERROR mismatched types
+   |                ^^^^^ expected (), found i32
+   |
+   = note: expected type `()`
+              found type `i32`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-27042.rs:18:9
+   |
+LL | /         'b: //~ ERROR mismatched types
+LL | |         while true { break }; // but here we cite the whole loop
+   | |____________________________^ expected i32, found ()
+   |
+   = note: expected type `i32`
+              found type `()`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-27042.rs:21:9
+   |
+LL | /         'c: //~ ERROR mismatched types
+LL | |         for _ in None { break }; // but here we cite the whole loop
+   | |_______________________________^ expected i32, found ()
+   |
+   = note: expected type `i32`
+              found type `()`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-27042.rs:24:9
+   |
+LL | /         'd: //~ ERROR mismatched types
+LL | |         while let Some(_) = None { break };
+   | |__________________________________________^ expected i32, found ()
+   |
+   = note: expected type `i32`
+              found type `()`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-27060-2.rs b/src/test/ui/issue-27060-2.rs
index 619616adda6..619616adda6 100644
--- a/src/test/compile-fail/issue-27060-2.rs
+++ b/src/test/ui/issue-27060-2.rs
diff --git a/src/test/ui/issue-27060-2.stderr b/src/test/ui/issue-27060-2.stderr
new file mode 100644
index 00000000000..bb284138ebf
--- /dev/null
+++ b/src/test/ui/issue-27060-2.stderr
@@ -0,0 +1,14 @@
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/issue-27060-2.rs:13:5
+   |
+LL |     data: T, //~ ERROR the size for values of type
+   |     ^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `T`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = help: consider adding a `where T: std::marker::Sized` bound
+   = note: only the last field of a struct may have a dynamically sized type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-27078.rs b/src/test/ui/issue-27078.rs
index 294c288a970..294c288a970 100644
--- a/src/test/compile-fail/issue-27078.rs
+++ b/src/test/ui/issue-27078.rs
diff --git a/src/test/ui/issue-27078.stderr b/src/test/ui/issue-27078.stderr
new file mode 100644
index 00000000000..1a729c00fc1
--- /dev/null
+++ b/src/test/ui/issue-27078.stderr
@@ -0,0 +1,14 @@
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-27078.rs:15:12
+   |
+LL |     fn foo(self) -> &'static i32 {
+   |            ^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `Self`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = help: consider adding a `where Self: std::marker::Sized` bound
+   = note: all local variables must have a statically known size
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-2718-a.rs b/src/test/ui/issue-2718-a.rs
index 6de28cbbf35..6de28cbbf35 100644
--- a/src/test/compile-fail/issue-2718-a.rs
+++ b/src/test/ui/issue-2718-a.rs
diff --git a/src/test/ui/issue-2718-a.stderr b/src/test/ui/issue-2718-a.stderr
new file mode 100644
index 00000000000..a60e5d04455
--- /dev/null
+++ b/src/test/ui/issue-2718-a.stderr
@@ -0,0 +1,14 @@
+error[E0072]: recursive type `pingpong::pong` has infinite size
+  --> $DIR/issue-2718-a.rs:18:5
+   |
+LL |     pub struct pong(send_packet<ping>);
+   |     ^^^^^^^^^^^^^^^^-----------------^^
+   |     |               |
+   |     |               recursive without indirection
+   |     recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `pingpong::pong` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-27340.rs b/src/test/ui/issue-27340.rs
index ce3fa487d4e..ce3fa487d4e 100644
--- a/src/test/compile-fail/issue-27340.rs
+++ b/src/test/ui/issue-27340.rs
diff --git a/src/test/ui/issue-27340.stderr b/src/test/ui/issue-27340.stderr
new file mode 100644
index 00000000000..bae47b3d2a3
--- /dev/null
+++ b/src/test/ui/issue-27340.stderr
@@ -0,0 +1,12 @@
+error[E0204]: the trait `Copy` may not be implemented for this type
+  --> $DIR/issue-27340.rs:12:10
+   |
+LL | #[derive(Copy, Clone)]
+   |          ^^^^
+LL | //~^ ERROR the trait `Copy` may not be implemented for this type
+LL | struct Bar(Foo);
+   |            --- this field does not implement `Copy`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0204`.
diff --git a/src/test/compile-fail/issue-27433.rs b/src/test/ui/issue-27433.rs
index 782b2057438..782b2057438 100644
--- a/src/test/compile-fail/issue-27433.rs
+++ b/src/test/ui/issue-27433.rs
diff --git a/src/test/ui/issue-27433.stderr b/src/test/ui/issue-27433.stderr
new file mode 100644
index 00000000000..0fc04b082e5
--- /dev/null
+++ b/src/test/ui/issue-27433.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-27433.rs:13:23
+   |
+LL |     const FOO : u32 = foo;
+   |                       ^^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/ui/issue-27592.nll.stderr b/src/test/ui/issue-27592.nll.stderr
new file mode 100644
index 00000000000..0b55117cad2
--- /dev/null
+++ b/src/test/ui/issue-27592.nll.stderr
@@ -0,0 +1,19 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-27592.rs:26:33
+   |
+LL |     write(|| format_args!("{}", String::from("Hello world")));
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value only lives until here
+   |                                 |
+   |                                 temporary value does not live long enough
+
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-27592.rs:26:27
+   |
+LL |     write(|| format_args!("{}", String::from("Hello world")));
+   |                           ^^^^                             - temporary value only lives until here
+   |                           |
+   |                           temporary value does not live long enough
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-27592.rs b/src/test/ui/issue-27592.rs
index 731d4fb2bf6..731d4fb2bf6 100644
--- a/src/test/compile-fail/issue-27592.rs
+++ b/src/test/ui/issue-27592.rs
diff --git a/src/test/ui/issue-27592.stderr b/src/test/ui/issue-27592.stderr
new file mode 100644
index 00000000000..74b0541c01b
--- /dev/null
+++ b/src/test/ui/issue-27592.stderr
@@ -0,0 +1,21 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-27592.rs:26:27
+   |
+LL |     write(|| format_args!("{}", String::from("Hello world")));
+   |                           ^^^^                             -- temporary value needs to live until here
+   |                           |                                |
+   |                           |                                temporary value dropped here while still borrowed
+   |                           temporary value does not live long enough
+
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-27592.rs:26:33
+   |
+LL |     write(|| format_args!("{}", String::from("Hello world")));
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^-- temporary value needs to live until here
+   |                                 |                          |
+   |                                 |                          temporary value dropped here while still borrowed
+   |                                 temporary value does not live long enough
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-27815.rs b/src/test/ui/issue-27815.rs
index d9840abf0ca..d9840abf0ca 100644
--- a/src/test/compile-fail/issue-27815.rs
+++ b/src/test/ui/issue-27815.rs
diff --git a/src/test/ui/issue-27815.stderr b/src/test/ui/issue-27815.stderr
new file mode 100644
index 00000000000..987feaee9eb
--- /dev/null
+++ b/src/test/ui/issue-27815.stderr
@@ -0,0 +1,27 @@
+error[E0574]: expected struct, variant or union type, found module `A`
+  --> $DIR/issue-27815.rs:14:13
+   |
+LL |     let u = A { x: 1 }; //~ ERROR expected struct, variant or union type, found module `A`
+   |             ^ not a struct, variant or union type
+
+error[E0574]: expected struct, variant or union type, found builtin type `u32`
+  --> $DIR/issue-27815.rs:15:13
+   |
+LL |     let v = u32 { x: 1 }; //~ ERROR expected struct, variant or union type, found builtin type `u32`
+   |             ^^^ not a struct, variant or union type
+
+error[E0574]: expected struct, variant or union type, found module `A`
+  --> $DIR/issue-27815.rs:17:9
+   |
+LL |         A { x: 1 } => {}
+   |         ^ not a struct, variant or union type
+
+error[E0574]: expected struct, variant or union type, found builtin type `u32`
+  --> $DIR/issue-27815.rs:19:9
+   |
+LL |         u32 { x: 1 } => {}
+   |         ^^^ not a struct, variant or union type
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0574`.
diff --git a/src/test/compile-fail/issue-27895.rs b/src/test/ui/issue-27895.rs
index 6063755c04f..6063755c04f 100644
--- a/src/test/compile-fail/issue-27895.rs
+++ b/src/test/ui/issue-27895.rs
diff --git a/src/test/ui/issue-27895.stderr b/src/test/ui/issue-27895.stderr
new file mode 100644
index 00000000000..395c806fbdb
--- /dev/null
+++ b/src/test/ui/issue-27895.stderr
@@ -0,0 +1,9 @@
+error[E0080]: runtime values cannot be referenced in patterns
+  --> $DIR/issue-27895.rs:16:13
+   |
+LL |         0..=index => println!("winner"),
+   |             ^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/compile-fail/issue-28098.rs b/src/test/ui/issue-28098.rs
index 5dded2b1e16..5dded2b1e16 100644
--- a/src/test/compile-fail/issue-28098.rs
+++ b/src/test/ui/issue-28098.rs
diff --git a/src/test/ui/issue-28098.stderr b/src/test/ui/issue-28098.stderr
new file mode 100644
index 00000000000..3a6e1aea288
--- /dev/null
+++ b/src/test/ui/issue-28098.stderr
@@ -0,0 +1,57 @@
+error[E0277]: the trait bound `(): std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:12:13
+   |
+LL |     let _ = Iterator::next(&mut ());
+   |             ^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `()`
+   = note: required by `std::iter::Iterator::next`
+
+error[E0277]: the trait bound `bool: std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:15:14
+   |
+LL |     for _ in false {}
+   |              ^^^^^ `bool` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `bool`
+   = note: required by `std::iter::IntoIterator::into_iter`
+
+error[E0277]: the trait bound `(): std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:18:13
+   |
+LL |     let _ = Iterator::next(&mut ());
+   |             ^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `()`
+   = note: required by `std::iter::Iterator::next`
+
+error[E0277]: the trait bound `(): std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:27:13
+   |
+LL |     let _ = Iterator::next(&mut ());
+   |             ^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `()`
+   = note: required by `std::iter::Iterator::next`
+
+error[E0277]: the trait bound `(): std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:30:13
+   |
+LL |     let _ = Iterator::next(&mut ());
+   |             ^^^^^^^^^^^^^^ `()` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `()`
+   = note: required by `std::iter::Iterator::next`
+
+error[E0277]: the trait bound `bool: std::iter::Iterator` is not satisfied
+  --> $DIR/issue-28098.rs:33:14
+   |
+LL |     for _ in false {}
+   |              ^^^^^ `bool` is not an iterator; maybe try calling `.iter()` or a similar method
+   |
+   = help: the trait `std::iter::Iterator` is not implemented for `bool`
+   = note: required by `std::iter::IntoIterator::into_iter`
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-28105.rs b/src/test/ui/issue-28105.rs
index 8e58d1aaf24..8e58d1aaf24 100644
--- a/src/test/compile-fail/issue-28105.rs
+++ b/src/test/ui/issue-28105.rs
diff --git a/src/test/ui/issue-28105.stderr b/src/test/ui/issue-28105.stderr
new file mode 100644
index 00000000000..eb05dbea2be
--- /dev/null
+++ b/src/test/ui/issue-28105.stderr
@@ -0,0 +1,15 @@
+error[E0268]: `continue` outside of loop
+  --> $DIR/issue-28105.rs:14:5
+   |
+LL |     continue //~ ERROR `continue` outside of loop
+   |     ^^^^^^^^ cannot break outside of a loop
+
+error[E0268]: `break` outside of loop
+  --> $DIR/issue-28105.rs:16:5
+   |
+LL |     break //~ ERROR `break` outside of loop
+   |     ^^^^^ cannot break outside of a loop
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0268`.
diff --git a/src/test/compile-fail/issue-28109.rs b/src/test/ui/issue-28109.rs
index 0d372d30015..0d372d30015 100644
--- a/src/test/compile-fail/issue-28109.rs
+++ b/src/test/ui/issue-28109.rs
diff --git a/src/test/ui/issue-28109.stderr b/src/test/ui/issue-28109.stderr
new file mode 100644
index 00000000000..902fe2390b9
--- /dev/null
+++ b/src/test/ui/issue-28109.stderr
@@ -0,0 +1,15 @@
+error[E0426]: use of undeclared label `'b`
+  --> $DIR/issue-28109.rs:16:9
+   |
+LL |         'b //~ ERROR use of undeclared label
+   |         ^^ undeclared label `'b`
+
+error[E0426]: use of undeclared label `'c`
+  --> $DIR/issue-28109.rs:19:9
+   |
+LL |         'c //~ ERROR use of undeclared label
+   |         ^^ undeclared label `'c`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0426`.
diff --git a/src/test/compile-fail/issue-28113.rs b/src/test/ui/issue-28113.rs
index 7d2541966a4..7d2541966a4 100644
--- a/src/test/compile-fail/issue-28113.rs
+++ b/src/test/ui/issue-28113.rs
diff --git a/src/test/ui/issue-28113.stderr b/src/test/ui/issue-28113.stderr
new file mode 100644
index 00000000000..633257f1a4b
--- /dev/null
+++ b/src/test/ui/issue-28113.stderr
@@ -0,0 +1,9 @@
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-28113.rs:14:5
+   |
+LL |     || -> u8 { 5 }()
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-2823.rs b/src/test/ui/issue-2823.rs
index 631bcb7bd9e..631bcb7bd9e 100644
--- a/src/test/compile-fail/issue-2823.rs
+++ b/src/test/ui/issue-2823.rs
diff --git a/src/test/ui/issue-2823.stderr b/src/test/ui/issue-2823.stderr
new file mode 100644
index 00000000000..5a5cae7aab4
--- /dev/null
+++ b/src/test/ui/issue-2823.stderr
@@ -0,0 +1,16 @@
+error[E0599]: no method named `clone` found for type `C` in the current scope
+  --> $DIR/issue-2823.rs:23:16
+   |
+LL | struct C {
+   | -------- method `clone` not found for this
+...
+LL |     let _d = c.clone(); //~ ERROR no method named `clone` found
+   |                ^^^^^
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+   = note: the following trait defines an item `clone`, perhaps you need to implement it:
+           candidate #1: `std::clone::Clone`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-28324.rs b/src/test/ui/issue-28324.rs
index af73db2b4d2..af73db2b4d2 100644
--- a/src/test/compile-fail/issue-28324.rs
+++ b/src/test/ui/issue-28324.rs
diff --git a/src/test/ui/issue-28324.stderr b/src/test/ui/issue-28324.stderr
new file mode 100644
index 00000000000..c62d8bddf00
--- /dev/null
+++ b/src/test/ui/issue-28324.stderr
@@ -0,0 +1,9 @@
+error[E0080]: could not evaluate static initializer
+  --> $DIR/issue-28324.rs:17:23
+   |
+LL | pub static BAZ: u32 = *&error_message_count;
+   |                       ^^^^^^^^^^^^^^^^^^^^^ tried to read from foreign (extern) static
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/compile-fail/issue-28344.rs b/src/test/ui/issue-28344.rs
index d28c3146404..d28c3146404 100644
--- a/src/test/compile-fail/issue-28344.rs
+++ b/src/test/ui/issue-28344.rs
diff --git a/src/test/ui/issue-28344.stderr b/src/test/ui/issue-28344.stderr
new file mode 100644
index 00000000000..7ef2e906422
--- /dev/null
+++ b/src/test/ui/issue-28344.stderr
@@ -0,0 +1,32 @@
+error[E0191]: the value of the associated type `Output` (from the trait `std::ops::BitXor`) must be specified
+  --> $DIR/issue-28344.rs:14:17
+   |
+LL |     let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
+   |                 ^^^^^^^^^^^^^ missing associated type `Output` value
+
+error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
+  --> $DIR/issue-28344.rs:14:17
+   |
+LL |     let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
+   |                 ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
+   |
+   = help: did you mean `bitxor`?
+
+error[E0191]: the value of the associated type `Output` (from the trait `std::ops::BitXor`) must be specified
+  --> $DIR/issue-28344.rs:18:13
+   |
+LL |     let g = BitXor::bitor;
+   |             ^^^^^^^^^^^^^ missing associated type `Output` value
+
+error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
+  --> $DIR/issue-28344.rs:18:13
+   |
+LL |     let g = BitXor::bitor;
+   |             ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
+   |
+   = help: did you mean `bitxor`?
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0191, E0599.
+For more information about an error, try `rustc --explain E0191`.
diff --git a/src/test/compile-fail/issue-28433.rs b/src/test/ui/issue-28433.rs
index 9253a490733..9253a490733 100644
--- a/src/test/compile-fail/issue-28433.rs
+++ b/src/test/ui/issue-28433.rs
diff --git a/src/test/ui/issue-28433.stderr b/src/test/ui/issue-28433.stderr
new file mode 100644
index 00000000000..bde01ef3746
--- /dev/null
+++ b/src/test/ui/issue-28433.stderr
@@ -0,0 +1,14 @@
+error: expected identifier, found keyword `pub`
+  --> $DIR/issue-28433.rs:14:5
+   |
+LL |     pub duck,
+   |     ^^^ expected identifier, found keyword
+
+error: expected one of `(`, `,`, `=`, `{`, or `}`, found `duck`
+  --> $DIR/issue-28433.rs:14:9
+   |
+LL |     pub duck,
+   |         ^^^^ expected one of `(`, `,`, `=`, `{`, or `}` here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-28472.rs b/src/test/ui/issue-28472.rs
index 837de8eddcf..837de8eddcf 100644
--- a/src/test/compile-fail/issue-28472.rs
+++ b/src/test/ui/issue-28472.rs
diff --git a/src/test/ui/issue-28472.stderr b/src/test/ui/issue-28472.stderr
new file mode 100644
index 00000000000..37c04a7a774
--- /dev/null
+++ b/src/test/ui/issue-28472.stderr
@@ -0,0 +1,27 @@
+error[E0428]: the name `foo` is defined multiple times
+  --> $DIR/issue-28472.rs:16:3
+   |
+LL |     fn foo();
+   |     --------- previous definition of the value `foo` here
+LL | 
+LL | /   pub //~ ERROR the name `foo` is defined multiple times
+LL | |   fn foo();
+   | |___________^ `foo` redefined here
+   |
+   = note: `foo` must be defined only once in the value namespace of this module
+
+error[E0428]: the name `foo` is defined multiple times
+  --> $DIR/issue-28472.rs:19:3
+   |
+LL |     fn foo();
+   |     --------- previous definition of the value `foo` here
+...
+LL | /   pub //~ ERROR the name `foo` is defined multiple times
+LL | |   static mut foo: u32;
+   | |______________________^ `foo` redefined here
+   |
+   = note: `foo` must be defined only once in the value namespace of this module
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-2849.rs b/src/test/ui/issue-2849.rs
index 203b28bd5e4..203b28bd5e4 100644
--- a/src/test/compile-fail/issue-2849.rs
+++ b/src/test/ui/issue-2849.rs
diff --git a/src/test/ui/issue-2849.stderr b/src/test/ui/issue-2849.stderr
new file mode 100644
index 00000000000..ffd15a58880
--- /dev/null
+++ b/src/test/ui/issue-2849.stderr
@@ -0,0 +1,11 @@
+error[E0408]: variable `i` is not bound in all patterns
+  --> $DIR/issue-2849.rs:15:7
+   |
+LL |       foo::alpha | foo::beta(i) => {}
+   |       ^^^^^^^^^^             - variable not in all patterns
+   |       |
+   |       pattern doesn't bind `i`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0408`.
diff --git a/src/test/compile-fail/issue-28576.rs b/src/test/ui/issue-28576.rs
index bd7186708a6..bd7186708a6 100644
--- a/src/test/compile-fail/issue-28576.rs
+++ b/src/test/ui/issue-28576.rs
diff --git a/src/test/ui/issue-28576.stderr b/src/test/ui/issue-28576.stderr
new file mode 100644
index 00000000000..80f0f1ba1b1
--- /dev/null
+++ b/src/test/ui/issue-28576.stderr
@@ -0,0 +1,12 @@
+error[E0038]: the trait `Bar` cannot be made into an object
+  --> $DIR/issue-28576.rs:17:12
+   |
+LL | /            Bar //~ ERROR the trait `Bar` cannot be made into an object
+LL | |               <Assoc=()>
+   | |________________________^ the trait `Bar` cannot be made into an object
+   |
+   = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-28586.rs b/src/test/ui/issue-28586.rs
index b8571d2e85e..b8571d2e85e 100644
--- a/src/test/compile-fail/issue-28586.rs
+++ b/src/test/ui/issue-28586.rs
diff --git a/src/test/ui/issue-28586.stderr b/src/test/ui/issue-28586.stderr
new file mode 100644
index 00000000000..9820d64909e
--- /dev/null
+++ b/src/test/ui/issue-28586.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no associated item named `BYTES` found for type `usize` in the current scope
+  --> $DIR/issue-28586.rs:14:19
+   |
+LL | impl Foo for [u8; usize::BYTES] {}
+   |                   ^^^^^^^^^^^^ associated item not found in `usize`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-28992-empty.rs b/src/test/ui/issue-28992-empty.rs
index 536784508b7..536784508b7 100644
--- a/src/test/compile-fail/issue-28992-empty.rs
+++ b/src/test/ui/issue-28992-empty.rs
diff --git a/src/test/ui/issue-28992-empty.stderr b/src/test/ui/issue-28992-empty.stderr
new file mode 100644
index 00000000000..9b5e42f8eb9
--- /dev/null
+++ b/src/test/ui/issue-28992-empty.stderr
@@ -0,0 +1,16 @@
+error[E0532]: expected tuple struct/variant, found constant `C1`
+  --> $DIR/issue-28992-empty.rs:23:12
+   |
+LL |     if let C1(..) = 0 {} //~ ERROR expected tuple struct/variant, found constant `C1`
+   |            ^^ not a tuple struct/variant
+
+error[E0164]: expected tuple struct/variant, found associated constant `<S>::C2`
+  --> $DIR/issue-28992-empty.rs:24:12
+   |
+LL |     if let S::C2(..) = 0 {}
+   |            ^^^^^^^^^ not a tuple variant or struct
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0164, E0532.
+For more information about an error, try `rustc --explain E0164`.
diff --git a/src/test/compile-fail/issue-29084.rs b/src/test/ui/issue-29084.rs
index 6cb6bbf1893..6cb6bbf1893 100644
--- a/src/test/compile-fail/issue-29084.rs
+++ b/src/test/ui/issue-29084.rs
diff --git a/src/test/ui/issue-29084.stderr b/src/test/ui/issue-29084.stderr
new file mode 100644
index 00000000000..3f1f18dabd0
--- /dev/null
+++ b/src/test/ui/issue-29084.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-29084.rs:14:13
+   |
+LL |         bar(&mut $d);
+   |             ^^^^^^^ expected u8, found &mut u8
+...
+LL |     foo!(0u8);
+   |     ---------- in this macro invocation
+   |
+   = note: expected type `u8`
+              found type `&mut u8`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-29147.rs b/src/test/ui/issue-29147.rs
index 0ecaa409412..0ecaa409412 100644
--- a/src/test/compile-fail/issue-29147.rs
+++ b/src/test/ui/issue-29147.rs
diff --git a/src/test/ui/issue-29147.stderr b/src/test/ui/issue-29147.stderr
new file mode 100644
index 00000000000..d0ad0c99aa0
--- /dev/null
+++ b/src/test/ui/issue-29147.stderr
@@ -0,0 +1,15 @@
+error[E0283]: type annotations required: cannot resolve `S5<_>: Foo`
+  --> $DIR/issue-29147.rs:31:13
+   |
+LL |     let _ = <S5<_>>::xxx; //~ ERROR cannot resolve `S5<_>: Foo`
+   |             ^^^^^^^^^^^^
+   |
+note: required by `Foo::xxx`
+  --> $DIR/issue-29147.rs:20:13
+   |
+LL | trait Foo { fn xxx(&self); }
+   |             ^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0283`.
diff --git a/src/test/compile-fail/issue-29161.rs b/src/test/ui/issue-29161.rs
index 97ba222fe45..97ba222fe45 100644
--- a/src/test/compile-fail/issue-29161.rs
+++ b/src/test/ui/issue-29161.rs
diff --git a/src/test/ui/issue-29161.stderr b/src/test/ui/issue-29161.stderr
new file mode 100644
index 00000000000..fb6a41d2eca
--- /dev/null
+++ b/src/test/ui/issue-29161.stderr
@@ -0,0 +1,16 @@
+error[E0449]: unnecessary visibility qualifier
+  --> $DIR/issue-29161.rs:15:9
+   |
+LL |         pub fn default() -> A { //~ ERROR unnecessary visibility qualifier
+   |         ^^^ `pub` not permitted here because it's implied
+
+error[E0603]: struct `A` is private
+  --> $DIR/issue-29161.rs:23:5
+   |
+LL |     a::A::default();
+   |     ^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0449, E0603.
+For more information about an error, try `rustc --explain E0449`.
diff --git a/src/test/compile-fail/issue-29184.rs b/src/test/ui/issue-29184.rs
index 98fe12c1b9d..98fe12c1b9d 100644
--- a/src/test/compile-fail/issue-29184.rs
+++ b/src/test/ui/issue-29184.rs
diff --git a/src/test/ui/issue-29184.stderr b/src/test/ui/issue-29184.stderr
new file mode 100644
index 00000000000..72d7bb8d5f6
--- /dev/null
+++ b/src/test/ui/issue-29184.stderr
@@ -0,0 +1,9 @@
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+  --> $DIR/issue-29184.rs:12:12
+   |
+LL |     let x: typeof(92) = 92; //~ ERROR `typeof` is a reserved keyword
+   |            ^^^^^^^^^^ reserved keyword
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0516`.
diff --git a/src/test/compile-fail/issue-2937.rs b/src/test/ui/issue-2937.rs
index 0d684ec5ae1..0d684ec5ae1 100644
--- a/src/test/compile-fail/issue-2937.rs
+++ b/src/test/ui/issue-2937.rs
diff --git a/src/test/ui/issue-2937.stderr b/src/test/ui/issue-2937.stderr
new file mode 100644
index 00000000000..8c0125c7522
--- /dev/null
+++ b/src/test/ui/issue-2937.stderr
@@ -0,0 +1,9 @@
+error[E0432]: unresolved import `m::f`
+  --> $DIR/issue-2937.rs:11:5
+   |
+LL | use m::f as x; //~ ERROR unresolved import `m::f` [E0432]
+   |     ^^^^^^^^^ no `f` in `m`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-2951.rs b/src/test/ui/issue-2951.rs
index 11ff7ab2476..11ff7ab2476 100644
--- a/src/test/compile-fail/issue-2951.rs
+++ b/src/test/ui/issue-2951.rs
diff --git a/src/test/ui/issue-2951.stderr b/src/test/ui/issue-2951.stderr
new file mode 100644
index 00000000000..8c166807c46
--- /dev/null
+++ b/src/test/ui/issue-2951.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-2951.rs:13:10
+   |
+LL |     xx = y;
+   |          ^ expected type parameter, found a different type parameter
+   |
+   = note: expected type `T`
+              found type `U`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-29857.rs b/src/test/ui/issue-29857.rs
index 661579f52b6..661579f52b6 100644
--- a/src/test/compile-fail/issue-29857.rs
+++ b/src/test/ui/issue-29857.rs
diff --git a/src/test/ui/issue-29857.stderr b/src/test/ui/issue-29857.stderr
new file mode 100644
index 00000000000..d5ba942b19f
--- /dev/null
+++ b/src/test/ui/issue-29857.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-29857.rs:31:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-29861.rs b/src/test/ui/issue-29861.rs
index 79514ad376b..79514ad376b 100644
--- a/src/test/compile-fail/issue-29861.rs
+++ b/src/test/ui/issue-29861.rs
diff --git a/src/test/ui/issue-29861.stderr b/src/test/ui/issue-29861.stderr
new file mode 100644
index 00000000000..27453337b10
--- /dev/null
+++ b/src/test/ui/issue-29861.stderr
@@ -0,0 +1,9 @@
+error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-29861.rs:21:6
+   |
+LL | impl<'a, T: 'a> MakeRef2 for T {
+   |      ^^ unconstrained lifetime parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/compile-fail/issue-2995.rs b/src/test/ui/issue-2995.rs
index d735e184d5c..d735e184d5c 100644
--- a/src/test/compile-fail/issue-2995.rs
+++ b/src/test/ui/issue-2995.rs
diff --git a/src/test/ui/issue-2995.stderr b/src/test/ui/issue-2995.stderr
new file mode 100644
index 00000000000..b52bbbead91
--- /dev/null
+++ b/src/test/ui/issue-2995.stderr
@@ -0,0 +1,11 @@
+error[E0605]: non-primitive cast: `*const isize` as `&isize`
+  --> $DIR/issue-2995.rs:12:22
+   |
+LL |     let _q: &isize = p as &isize; //~ ERROR non-primitive cast
+   |                      ^^^^^^^^^^^
+   |
+   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0605`.
diff --git a/src/test/compile-fail/issue-30079.rs b/src/test/ui/issue-30079.rs
index 04ae8f6d255..04ae8f6d255 100644
--- a/src/test/compile-fail/issue-30079.rs
+++ b/src/test/ui/issue-30079.rs
diff --git a/src/test/ui/issue-30079.stderr b/src/test/ui/issue-30079.stderr
new file mode 100644
index 00000000000..dadaf3db24e
--- /dev/null
+++ b/src/test/ui/issue-30079.stderr
@@ -0,0 +1,31 @@
+warning: private type `m1::Priv` in public interface (error E0446)
+  --> $DIR/issue-30079.rs:16:9
+   |
+LL |         pub fn f(_: Priv) {} //~ WARN private type `m1::Priv` in public interface
+   |         ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: #[warn(private_in_public)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
+
+error[E0446]: private type `m2::Priv` in public interface
+  --> $DIR/issue-30079.rs:28:9
+   |
+LL |     struct Priv;
+   |     - `m2::Priv` declared as private
+LL |     impl ::std::ops::Deref for ::SemiPriv {
+LL |         type Target = Priv; //~ ERROR private type `m2::Priv` in public interface
+   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
+
+error[E0446]: private type `m3::Priv` in public interface
+  --> $DIR/issue-30079.rs:45:9
+   |
+LL |     struct Priv;
+   |     - `m3::Priv` declared as private
+LL |     impl ::SemiPrivTrait for () {
+LL |         type Assoc = Priv; //~ ERROR private type `m3::Priv` in public interface
+   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0446`.
diff --git a/src/test/compile-fail/issue-3008-3.rs b/src/test/ui/issue-3008-3.rs
index 66bfab003e9..66bfab003e9 100644
--- a/src/test/compile-fail/issue-3008-3.rs
+++ b/src/test/ui/issue-3008-3.rs
diff --git a/src/test/ui/issue-3008-3.stderr b/src/test/ui/issue-3008-3.stderr
new file mode 100644
index 00000000000..22c0871fb0c
--- /dev/null
+++ b/src/test/ui/issue-3008-3.stderr
@@ -0,0 +1,13 @@
+error[E0072]: recursive type `E2` has infinite size
+  --> $DIR/issue-3008-3.rs:14:1
+   |
+LL | enum E2<T> { V2(E2<E1>, marker::PhantomData<T>), }
+   | ^^^^^^^^^^      ------ recursive without indirection
+   | |
+   | recursive type has infinite size
+   |
+   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `E2` representable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/compile-fail/issue-3021-b.rs b/src/test/ui/issue-3021-b.rs
index 2b0a24cfdb3..2b0a24cfdb3 100644
--- a/src/test/compile-fail/issue-3021-b.rs
+++ b/src/test/ui/issue-3021-b.rs
diff --git a/src/test/ui/issue-3021-b.stderr b/src/test/ui/issue-3021-b.stderr
new file mode 100644
index 00000000000..dfc80e5ca52
--- /dev/null
+++ b/src/test/ui/issue-3021-b.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3021-b.rs:19:22
+   |
+LL |            self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
+   |                      ^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-3021-c.rs b/src/test/ui/issue-3021-c.rs
index 55975cc8e86..55975cc8e86 100644
--- a/src/test/compile-fail/issue-3021-c.rs
+++ b/src/test/ui/issue-3021-c.rs
diff --git a/src/test/ui/issue-3021-c.stderr b/src/test/ui/issue-3021-c.stderr
new file mode 100644
index 00000000000..4a250e76af3
--- /dev/null
+++ b/src/test/ui/issue-3021-c.stderr
@@ -0,0 +1,25 @@
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-3021-c.rs:14:24
+   |
+LL | fn siphash<T>() {
+   |            - type variable from outer function
+...
+LL |         fn g(&self, x: T) -> T;  //~ ERROR can't use type parameters from outer function
+   |            -           ^ use of type variable from outer function
+   |            |
+   |            help: try using a local type parameter instead: `g<T>`
+
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-3021-c.rs:14:30
+   |
+LL | fn siphash<T>() {
+   |            - type variable from outer function
+...
+LL |         fn g(&self, x: T) -> T;  //~ ERROR can't use type parameters from outer function
+   |            -                 ^ use of type variable from outer function
+   |            |
+   |            help: try using a local type parameter instead: `g<T>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0401`.
diff --git a/src/test/compile-fail/issue-3021-d.rs b/src/test/ui/issue-3021-d.rs
index c23e12e713a..c23e12e713a 100644
--- a/src/test/compile-fail/issue-3021-d.rs
+++ b/src/test/ui/issue-3021-d.rs
diff --git a/src/test/ui/issue-3021-d.stderr b/src/test/ui/issue-3021-d.stderr
new file mode 100644
index 00000000000..ab5ad94a031
--- /dev/null
+++ b/src/test/ui/issue-3021-d.stderr
@@ -0,0 +1,19 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3021-d.rs:31:23
+   |
+LL |             self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
+   |                       ^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3021-d.rs:32:23
+   |
+LL |             self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment
+   |                       ^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-3021.rs b/src/test/ui/issue-3021.rs
index f93a333d2ae..f93a333d2ae 100644
--- a/src/test/compile-fail/issue-3021.rs
+++ b/src/test/ui/issue-3021.rs
diff --git a/src/test/ui/issue-3021.stderr b/src/test/ui/issue-3021.stderr
new file mode 100644
index 00000000000..312b9f3b864
--- /dev/null
+++ b/src/test/ui/issue-3021.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3021.rs:22:22
+   |
+LL |            self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
+   |                      ^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-30225.rs b/src/test/ui/issue-30225.rs
index 7acbbfb8826..7acbbfb8826 100644
--- a/src/test/compile-fail/issue-30225.rs
+++ b/src/test/ui/issue-30225.rs
diff --git a/src/test/ui/issue-30225.stderr b/src/test/ui/issue-30225.stderr
new file mode 100644
index 00000000000..b3bbf233257
--- /dev/null
+++ b/src/test/ui/issue-30225.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-30225.rs:41:9
+   |
+LL |     u = v; // mark $0 and $1 in a subtype relationship
+   |         ^ expected struct `A`, found struct `B`
+   |
+   = note: expected type `A`
+              found type `B`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-30236.rs b/src/test/ui/issue-30236.rs
index 45a5cd09337..45a5cd09337 100644
--- a/src/test/compile-fail/issue-30236.rs
+++ b/src/test/ui/issue-30236.rs
diff --git a/src/test/ui/issue-30236.stderr b/src/test/ui/issue-30236.stderr
new file mode 100644
index 00000000000..3a9f075d480
--- /dev/null
+++ b/src/test/ui/issue-30236.stderr
@@ -0,0 +1,9 @@
+error[E0091]: type parameter `Unused` is unused
+  --> $DIR/issue-30236.rs:12:5
+   |
+LL |     Unused //~ ERROR type parameter `Unused` is unused
+   |     ^^^^^^ unused type parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0091`.
diff --git a/src/test/compile-fail/issue-30240-b.rs b/src/test/ui/issue-30240-b.rs
index cf6935b9ba6..cf6935b9ba6 100644
--- a/src/test/compile-fail/issue-30240-b.rs
+++ b/src/test/ui/issue-30240-b.rs
diff --git a/src/test/ui/issue-30240-b.stderr b/src/test/ui/issue-30240-b.stderr
new file mode 100644
index 00000000000..535d1a92ed9
--- /dev/null
+++ b/src/test/ui/issue-30240-b.stderr
@@ -0,0 +1,14 @@
+error: unreachable pattern
+  --> $DIR/issue-30240-b.rs:22:9
+   |
+LL |         "hello" => {} //~ ERROR unreachable pattern
+   |         ^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-30240-b.rs:11:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-30240.rs b/src/test/ui/issue-30240.rs
index 60fb307d4e1..60fb307d4e1 100644
--- a/src/test/compile-fail/issue-30240.rs
+++ b/src/test/ui/issue-30240.rs
diff --git a/src/test/ui/issue-30240.stderr b/src/test/ui/issue-30240.stderr
new file mode 100644
index 00000000000..9acb53ff911
--- /dev/null
+++ b/src/test/ui/issue-30240.stderr
@@ -0,0 +1,15 @@
+error[E0004]: non-exhaustive patterns: `&_` not covered
+  --> $DIR/issue-30240.rs:12:11
+   |
+LL |     match "world" { //~ ERROR non-exhaustive patterns: `&_`
+   |           ^^^^^^^ pattern `&_` not covered
+
+error[E0004]: non-exhaustive patterns: `&_` not covered
+  --> $DIR/issue-30240.rs:16:11
+   |
+LL |     match "world" { //~ ERROR non-exhaustive patterns: `&_`
+   |           ^^^^^^^ pattern `&_` not covered
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/ui/issue-30355.nll.stderr b/src/test/ui/issue-30355.nll.stderr
new file mode 100644
index 00000000000..e565ad59116
--- /dev/null
+++ b/src/test/ui/issue-30355.nll.stderr
@@ -0,0 +1,22 @@
+error[E0508]: cannot move out of type `[u8]`, a non-copy slice
+  --> $DIR/issue-30355.rs:15:8
+   |
+LL |     &X(*Y)
+   |        ^^ cannot move out of here
+
+error[E0161]: cannot move a value of type X: the size of X cannot be statically determined
+  --> $DIR/issue-30355.rs:15:6
+   |
+LL |     &X(*Y)
+   |      ^^^^^
+
+error[E0161]: cannot move a value of type [u8]: the size of [u8] cannot be statically determined
+  --> $DIR/issue-30355.rs:15:8
+   |
+LL |     &X(*Y)
+   |        ^^
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0161, E0508.
+For more information about an error, try `rustc --explain E0161`.
diff --git a/src/test/compile-fail/issue-30355.rs b/src/test/ui/issue-30355.rs
index ee19d040318..ee19d040318 100644
--- a/src/test/compile-fail/issue-30355.rs
+++ b/src/test/ui/issue-30355.rs
diff --git a/src/test/ui/issue-30355.stderr b/src/test/ui/issue-30355.stderr
new file mode 100644
index 00000000000..7e843688035
--- /dev/null
+++ b/src/test/ui/issue-30355.stderr
@@ -0,0 +1,22 @@
+error[E0161]: cannot move a value of type X: the size of X cannot be statically determined
+  --> $DIR/issue-30355.rs:15:6
+   |
+LL |     &X(*Y)
+   |      ^^^^^
+
+error[E0161]: cannot move a value of type [u8]: the size of [u8] cannot be statically determined
+  --> $DIR/issue-30355.rs:15:8
+   |
+LL |     &X(*Y)
+   |        ^^
+
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-30355.rs:15:8
+   |
+LL |     &X(*Y)
+   |        ^^ cannot move out of borrowed content
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0161, E0507.
+For more information about an error, try `rustc --explain E0161`.
diff --git a/src/test/compile-fail/issue-3038.rs b/src/test/ui/issue-3038.rs
index 1eec62df788..1eec62df788 100644
--- a/src/test/compile-fail/issue-3038.rs
+++ b/src/test/ui/issue-3038.rs
diff --git a/src/test/ui/issue-3038.stderr b/src/test/ui/issue-3038.stderr
new file mode 100644
index 00000000000..17ad9936149
--- /dev/null
+++ b/src/test/ui/issue-3038.stderr
@@ -0,0 +1,21 @@
+error[E0416]: identifier `x` is bound more than once in the same pattern
+  --> $DIR/issue-3038.rs:22:15
+   |
+LL |       f::g(x, x) => { println!("{}", x + x); }
+   |               ^ used in a pattern more than once
+
+error[E0416]: identifier `x` is bound more than once in the same pattern
+  --> $DIR/issue-3038.rs:27:32
+   |
+LL |       h::i(j::l(x, _), k::m(_, x))
+   |                                ^ used in a pattern more than once
+
+error[E0416]: identifier `x` is bound more than once in the same pattern
+  --> $DIR/issue-3038.rs:33:13
+   |
+LL |         (x, x) => { x } //~ ERROR identifier `x` is bound more than once in the same pattern
+   |             ^ used in a pattern more than once
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0416`.
diff --git a/src/test/ui/issue-30438-a.nll.stderr b/src/test/ui/issue-30438-a.nll.stderr
new file mode 100644
index 00000000000..2d27cd55e01
--- /dev/null
+++ b/src/test/ui/issue-30438-a.nll.stderr
@@ -0,0 +1,20 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-30438-a.rs:22:17
+   |
+LL |         return &Test { s: &self.s};
+   |                 ^^^^^^^^^^^^^^^^^^- temporary value only lives until here
+   |                 |
+   |                 temporary value does not live long enough
+   |
+note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 21:5...
+  --> $DIR/issue-30438-a.rs:21:5
+   |
+LL | /     fn index(&self, _: usize) -> &Self::Output {
+LL | |         return &Test { s: &self.s};
+LL | |         //~^ ERROR: borrowed value does not live long enough
+LL | |     }
+   | |_____^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-30438-a.rs b/src/test/ui/issue-30438-a.rs
index 441815de81d..441815de81d 100644
--- a/src/test/compile-fail/issue-30438-a.rs
+++ b/src/test/ui/issue-30438-a.rs
diff --git a/src/test/ui/issue-30438-a.stderr b/src/test/ui/issue-30438-a.stderr
new file mode 100644
index 00000000000..5f4a51a927a
--- /dev/null
+++ b/src/test/ui/issue-30438-a.stderr
@@ -0,0 +1,21 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-30438-a.rs:22:17
+   |
+LL |         return &Test { s: &self.s};
+   |                 ^^^^^^^^^^^^^^^^^^- temporary value only lives until here
+   |                 |
+   |                 temporary value does not live long enough
+   |
+note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 21:5...
+  --> $DIR/issue-30438-a.rs:21:5
+   |
+LL | /     fn index(&self, _: usize) -> &Self::Output {
+LL | |         return &Test { s: &self.s};
+LL | |         //~^ ERROR: borrowed value does not live long enough
+LL | |     }
+   | |_____^
+   = note: consider using a `let` binding to increase its lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-30438-b.rs b/src/test/ui/issue-30438-b.rs
index 981b196c4ae..981b196c4ae 100644
--- a/src/test/compile-fail/issue-30438-b.rs
+++ b/src/test/ui/issue-30438-b.rs
diff --git a/src/test/ui/issue-30438-b.stderr b/src/test/ui/issue-30438-b.stderr
new file mode 100644
index 00000000000..651ff9f2ae1
--- /dev/null
+++ b/src/test/ui/issue-30438-b.stderr
@@ -0,0 +1,21 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-30438-b.rs:23:10
+   |
+LL |         &Test { s: &self.s}
+   |          ^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
+LL |         //~^ ERROR: borrowed value does not live long enough
+LL |     }
+   |     - temporary value only lives until here
+   |
+note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 22:5...
+  --> $DIR/issue-30438-b.rs:22:5
+   |
+LL | /     fn index(&self, _: usize) -> &Self::Output {
+LL | |         &Test { s: &self.s}
+LL | |         //~^ ERROR: borrowed value does not live long enough
+LL | |     }
+   | |_____^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-30438-c.nll.stderr b/src/test/ui/issue-30438-c.nll.stderr
new file mode 100644
index 00000000000..0bfac131e22
--- /dev/null
+++ b/src/test/ui/issue-30438-c.nll.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `x` does not live long enough
+  --> $DIR/issue-30438-c.rs:19:5
+   |
+LL |     &x
+   |     ^^ borrowed value does not live long enough
+LL |     //~^ ERROR: `x` does not live long enough
+LL | }
+   | - borrowed value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'y as defined on the function body at 17:10...
+  --> $DIR/issue-30438-c.rs:17:10
+   |
+LL | fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
+   |          ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-30438-c.rs b/src/test/ui/issue-30438-c.rs
index 2b4d0dc339b..2b4d0dc339b 100644
--- a/src/test/compile-fail/issue-30438-c.rs
+++ b/src/test/ui/issue-30438-c.rs
diff --git a/src/test/ui/issue-30438-c.stderr b/src/test/ui/issue-30438-c.stderr
new file mode 100644
index 00000000000..dc6e1c52be1
--- /dev/null
+++ b/src/test/ui/issue-30438-c.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `x` does not live long enough
+  --> $DIR/issue-30438-c.rs:19:6
+   |
+LL |     &x
+   |      ^ borrowed value does not live long enough
+LL |     //~^ ERROR: `x` does not live long enough
+LL | }
+   | - borrowed value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'y as defined on the function body at 17:10...
+  --> $DIR/issue-30438-c.rs:17:10
+   |
+LL | fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
+   |          ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-30560.rs b/src/test/ui/issue-30560.rs
index 0b1afd75ca9..0b1afd75ca9 100644
--- a/src/test/compile-fail/issue-30560.rs
+++ b/src/test/ui/issue-30560.rs
diff --git a/src/test/ui/issue-30560.stderr b/src/test/ui/issue-30560.stderr
new file mode 100644
index 00000000000..cb38c0dabe0
--- /dev/null
+++ b/src/test/ui/issue-30560.stderr
@@ -0,0 +1,21 @@
+error: items in traits are not importable.
+  --> $DIR/issue-30560.rs:20:5
+   |
+LL | use T::*; //~ ERROR items in traits are not importable
+   |     ^^^^
+
+error[E0432]: unresolved import `Alias`
+  --> $DIR/issue-30560.rs:12:5
+   |
+LL | use Alias::*;
+   |     ^^^^^ Not a module `Alias`
+
+error[E0432]: unresolved import `std::io::Result`
+  --> $DIR/issue-30560.rs:15:14
+   |
+LL | use std::io::Result::*;
+   |              ^^^^^^ Not a module `Result`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-30589.rs b/src/test/ui/issue-30589.rs
index 61721fe58b3..61721fe58b3 100644
--- a/src/test/compile-fail/issue-30589.rs
+++ b/src/test/ui/issue-30589.rs
diff --git a/src/test/ui/issue-30589.stderr b/src/test/ui/issue-30589.stderr
new file mode 100644
index 00000000000..8174af83230
--- /dev/null
+++ b/src/test/ui/issue-30589.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `DecoderError` in this scope
+  --> $DIR/issue-30589.rs:13:23
+   |
+LL | impl fmt::Display for DecoderError { //~ ERROR cannot find type `DecoderError` in this scope
+   |                       ^^^^^^^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-3080.rs b/src/test/ui/issue-3080.rs
index fb16dad3960..fb16dad3960 100644
--- a/src/test/compile-fail/issue-3080.rs
+++ b/src/test/ui/issue-3080.rs
diff --git a/src/test/ui/issue-3080.stderr b/src/test/ui/issue-3080.stderr
new file mode 100644
index 00000000000..3a966e3f315
--- /dev/null
+++ b/src/test/ui/issue-3080.stderr
@@ -0,0 +1,11 @@
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+  --> $DIR/issue-3080.rs:17:5
+   |
+LL |     x(()).with(); //~ ERROR requires unsafe function or block
+   |     ^^^^^^^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/compile-fail/issue-3096-1.rs b/src/test/ui/issue-3096-1.rs
index 62c2639836b..62c2639836b 100644
--- a/src/test/compile-fail/issue-3096-1.rs
+++ b/src/test/ui/issue-3096-1.rs
diff --git a/src/test/ui/issue-3096-1.stderr b/src/test/ui/issue-3096-1.stderr
new file mode 100644
index 00000000000..783e831a2a5
--- /dev/null
+++ b/src/test/ui/issue-3096-1.stderr
@@ -0,0 +1,15 @@
+error[E0004]: non-exhaustive patterns: type () is non-empty
+  --> $DIR/issue-3096-1.rs:12:11
+   |
+LL |     match () { } //~ ERROR non-exhaustive
+   |           ^^
+   |
+help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
+  --> $DIR/issue-3096-1.rs:12:11
+   |
+LL |     match () { } //~ ERROR non-exhaustive
+   |           ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-3096-2.rs b/src/test/ui/issue-3096-2.rs
index 2d1ad9a2692..2d1ad9a2692 100644
--- a/src/test/compile-fail/issue-3096-2.rs
+++ b/src/test/ui/issue-3096-2.rs
diff --git a/src/test/ui/issue-3096-2.stderr b/src/test/ui/issue-3096-2.stderr
new file mode 100644
index 00000000000..6031f25c03d
--- /dev/null
+++ b/src/test/ui/issue-3096-2.stderr
@@ -0,0 +1,15 @@
+error[E0004]: non-exhaustive patterns: type *const bottom is non-empty
+  --> $DIR/issue-3096-2.rs:15:11
+   |
+LL |     match x { } //~ ERROR non-exhaustive patterns
+   |           ^
+   |
+help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
+  --> $DIR/issue-3096-2.rs:15:11
+   |
+LL |     match x { } //~ ERROR non-exhaustive patterns
+   |           ^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-3099-a.rs b/src/test/ui/issue-3099-a.rs
index db60d70ca9b..db60d70ca9b 100644
--- a/src/test/compile-fail/issue-3099-a.rs
+++ b/src/test/ui/issue-3099-a.rs
diff --git a/src/test/ui/issue-3099-a.stderr b/src/test/ui/issue-3099-a.stderr
new file mode 100644
index 00000000000..6a194593c3f
--- /dev/null
+++ b/src/test/ui/issue-3099-a.stderr
@@ -0,0 +1,14 @@
+error[E0428]: the name `a` is defined multiple times
+  --> $DIR/issue-3099-a.rs:13:1
+   |
+LL | enum a { b, c }
+   | ------ previous definition of the type `a` here
+LL | 
+LL | enum a { d, e } //~ ERROR the name `a` is defined multiple times
+   | ^^^^^^ `a` redefined here
+   |
+   = note: `a` must be defined only once in the type namespace of this module
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-3099-b.rs b/src/test/ui/issue-3099-b.rs
index 956d2186752..956d2186752 100644
--- a/src/test/compile-fail/issue-3099-b.rs
+++ b/src/test/ui/issue-3099-b.rs
diff --git a/src/test/ui/issue-3099-b.stderr b/src/test/ui/issue-3099-b.stderr
new file mode 100644
index 00000000000..226d99e3b82
--- /dev/null
+++ b/src/test/ui/issue-3099-b.stderr
@@ -0,0 +1,14 @@
+error[E0428]: the name `a` is defined multiple times
+  --> $DIR/issue-3099-b.rs:13:1
+   |
+LL | pub mod a {}
+   | --------- previous definition of the module `a` here
+LL | 
+LL | pub mod a {} //~ ERROR the name `a` is defined multiple times
+   | ^^^^^^^^^ `a` redefined here
+   |
+   = note: `a` must be defined only once in the type namespace of this module
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-3099.rs b/src/test/ui/issue-3099.rs
index 42766533556..42766533556 100644
--- a/src/test/compile-fail/issue-3099.rs
+++ b/src/test/ui/issue-3099.rs
diff --git a/src/test/ui/issue-3099.stderr b/src/test/ui/issue-3099.stderr
new file mode 100644
index 00000000000..a5f29e7b6c3
--- /dev/null
+++ b/src/test/ui/issue-3099.stderr
@@ -0,0 +1,14 @@
+error[E0428]: the name `a` is defined multiple times
+  --> $DIR/issue-3099.rs:15:1
+   |
+LL | fn a(x: String) -> String {
+   | ------------------------- previous definition of the value `a` here
+...
+LL | fn a(x: String, y: String) -> String { //~ ERROR the name `a` is defined multiple times
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `a` redefined here
+   |
+   = note: `a` must be defined only once in the value namespace of this module
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-31011.rs b/src/test/ui/issue-31011.rs
index 716b0bbe772..716b0bbe772 100644
--- a/src/test/compile-fail/issue-31011.rs
+++ b/src/test/ui/issue-31011.rs
diff --git a/src/test/ui/issue-31011.stderr b/src/test/ui/issue-31011.stderr
new file mode 100644
index 00000000000..c2e7c9876cb
--- /dev/null
+++ b/src/test/ui/issue-31011.stderr
@@ -0,0 +1,12 @@
+error[E0609]: no field `trace` on type `&T`
+  --> $DIR/issue-31011.rs:13:17
+   |
+LL |         if $ctx.trace {
+   |                 ^^^^^
+...
+LL |     log!(context, "entered wrapper");
+   |     --------------------------------- in this macro invocation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/compile-fail/issue-31109.rs b/src/test/ui/issue-31109.rs
index 74121e3a420..74121e3a420 100644
--- a/src/test/compile-fail/issue-31109.rs
+++ b/src/test/ui/issue-31109.rs
diff --git a/src/test/ui/issue-31109.stderr b/src/test/ui/issue-31109.stderr
new file mode 100644
index 00000000000..c66a4f0b175
--- /dev/null
+++ b/src/test/ui/issue-31109.stderr
@@ -0,0 +1,8 @@
+error: could not evaluate float literal (see issue #31407)
+  --> $DIR/issue-31109.rs:14:18
+   |
+LL |     let _: f64 = 1234567890123456789012345678901234567890e-340;
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-31173.rs b/src/test/ui/issue-31173.rs
index fb1e3cc87e8..fb1e3cc87e8 100644
--- a/src/test/compile-fail/issue-31173.rs
+++ b/src/test/ui/issue-31173.rs
diff --git a/src/test/ui/issue-31173.stderr b/src/test/ui/issue-31173.stderr
new file mode 100644
index 00000000000..e2630b5b8ce
--- /dev/null
+++ b/src/test/ui/issue-31173.stderr
@@ -0,0 +1,23 @@
+error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:16:39: 19:6 found_e:_]> as std::iter::Iterator>::Item == &_`
+  --> $DIR/issue-31173.rs:20:10
+   |
+LL |         .cloned()
+   |          ^^^^^^ expected u8, found reference
+   |
+   = note: expected type `u8`
+              found type `&_`
+
+error[E0599]: no method named `collect` found for type `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:16:39: 19:6 found_e:_]>>` in the current scope
+  --> $DIR/issue-31173.rs:24:10
+   |
+LL |         .collect(); //~ ERROR no method named `collect`
+   |          ^^^^^^^
+   |
+   = note: the method `collect` exists but the following trait bounds were not satisfied:
+           `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:16:39: 19:6 found_e:_]>> : std::iter::Iterator`
+           `&mut std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:16:39: 19:6 found_e:_]>> : std::iter::Iterator`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0271, E0599.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/src/test/compile-fail/issue-31212.rs b/src/test/ui/issue-31212.rs
index 8dc58eee5fb..8dc58eee5fb 100644
--- a/src/test/compile-fail/issue-31212.rs
+++ b/src/test/ui/issue-31212.rs
diff --git a/src/test/ui/issue-31212.stderr b/src/test/ui/issue-31212.stderr
new file mode 100644
index 00000000000..17cf2e81236
--- /dev/null
+++ b/src/test/ui/issue-31212.stderr
@@ -0,0 +1,16 @@
+error[E0432]: unresolved import `self::*`
+  --> $DIR/issue-31212.rs:15:13
+   |
+LL |     pub use self::*; //~ ERROR unresolved
+   |             ^^^^^^^ Cannot glob-import a module into itself.
+
+error[E0425]: cannot find function `f` in module `foo`
+  --> $DIR/issue-31212.rs:19:10
+   |
+LL |     foo::f(); //~ ERROR cannot find function `f` in module `foo`
+   |          ^ not found in `foo`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0425, E0432.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-31495.rs b/src/test/ui/issue-31495.rs
index 794b8bb86bb..794b8bb86bb 100644
--- a/src/test/compile-fail/issue-31495.rs
+++ b/src/test/ui/issue-31495.rs
diff --git a/src/test/compile-fail/issue-31511.rs b/src/test/ui/issue-31511.rs
index dd1af2f4448..dd1af2f4448 100644
--- a/src/test/compile-fail/issue-31511.rs
+++ b/src/test/ui/issue-31511.rs
diff --git a/src/test/ui/issue-31511.stderr b/src/test/ui/issue-31511.stderr
new file mode 100644
index 00000000000..7d4c9426da1
--- /dev/null
+++ b/src/test/ui/issue-31511.stderr
@@ -0,0 +1,9 @@
+error[E0607]: cannot cast thin pointer `*const ()` to fat pointer `*const [u8]`
+  --> $DIR/issue-31511.rs:12:5
+   |
+LL |     x as *const [u8];
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0607`.
diff --git a/src/test/ui/issue-3154.nll.stderr b/src/test/ui/issue-3154.nll.stderr
new file mode 100644
index 00000000000..4420f9dcae4
--- /dev/null
+++ b/src/test/ui/issue-3154.nll.stderr
@@ -0,0 +1,23 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-3154.rs:16:15
+   |
+LL |     thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
+   |               ^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-3154.rs:16:5
+   |
+LL |     thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
+   |     ^^^^^
+
+error[E0621]: explicit lifetime required in the type of `x`
+  --> $DIR/issue-3154.rs:16:15
+   |
+LL | fn thing<'a,Q>(x: &Q) -> thing<'a,Q> {
+   |                - consider changing the type of `x` to `&'a Q`
+LL |     thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
+   |               ^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-3154.rs b/src/test/ui/issue-3154.rs
index 519e9d06d1b..519e9d06d1b 100644
--- a/src/test/compile-fail/issue-3154.rs
+++ b/src/test/ui/issue-3154.rs
diff --git a/src/test/ui/issue-3154.stderr b/src/test/ui/issue-3154.stderr
new file mode 100644
index 00000000000..cc0cfd768c4
--- /dev/null
+++ b/src/test/ui/issue-3154.stderr
@@ -0,0 +1,11 @@
+error[E0621]: explicit lifetime required in the type of `x`
+  --> $DIR/issue-3154.rs:16:5
+   |
+LL | fn thing<'a,Q>(x: &Q) -> thing<'a,Q> {
+   |                - consider changing the type of `x` to `&'a Q`
+LL |     thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
+   |     ^^^^^^^^^^^^^ lifetime `'a` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-31561.rs b/src/test/ui/issue-31561.rs
index f8645c4d3a7..f8645c4d3a7 100644
--- a/src/test/compile-fail/issue-31561.rs
+++ b/src/test/ui/issue-31561.rs
diff --git a/src/test/ui/issue-31561.stderr b/src/test/ui/issue-31561.stderr
new file mode 100644
index 00000000000..4608a95459b
--- /dev/null
+++ b/src/test/ui/issue-31561.stderr
@@ -0,0 +1,9 @@
+error[E0005]: refutable pattern in local binding: `Bar` not covered
+  --> $DIR/issue-31561.rs:18:9
+   |
+LL |     let Thing::Foo(y) = Thing::Foo(1);
+   |         ^^^^^^^^^^^^^ pattern `Bar` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0005`.
diff --git a/src/test/compile-fail/issue-31769.rs b/src/test/ui/issue-31769.rs
index 2bd45deeab4..2bd45deeab4 100644
--- a/src/test/compile-fail/issue-31769.rs
+++ b/src/test/ui/issue-31769.rs
diff --git a/src/test/ui/issue-31769.stderr b/src/test/ui/issue-31769.stderr
new file mode 100644
index 00000000000..1f1904e3c2c
--- /dev/null
+++ b/src/test/ui/issue-31769.stderr
@@ -0,0 +1,16 @@
+error[E0518]: attribute should be applied to function or closure
+  --> $DIR/issue-31769.rs:12:5
+   |
+LL |     #[inline] struct Foo;  //~ ERROR attribute should be applied to function or closure
+   |     ^^^^^^^^^ ----------- not a function or closure
+
+error[E0517]: attribute should be applied to struct, enum or union
+  --> $DIR/issue-31769.rs:13:12
+   |
+LL |     #[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct, enum or union
+   |            ^   ----------- not a struct, enum or union
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0517, E0518.
+For more information about an error, try `rustc --explain E0517`.
diff --git a/src/test/compile-fail/issue-31804.rs b/src/test/ui/issue-31804.rs
index cea52b11c5d..cea52b11c5d 100644
--- a/src/test/compile-fail/issue-31804.rs
+++ b/src/test/ui/issue-31804.rs
diff --git a/src/test/ui/issue-31804.stderr b/src/test/ui/issue-31804.stderr
new file mode 100644
index 00000000000..e0ac2f631ba
--- /dev/null
+++ b/src/test/ui/issue-31804.stderr
@@ -0,0 +1,8 @@
+error: expected pattern, found `}`
+  --> $DIR/issue-31804.rs:16:1
+   |
+LL | } //~ ERROR expected pattern, found `}`
+   | ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-31845.rs b/src/test/ui/issue-31845.rs
index 514255e4676..514255e4676 100644
--- a/src/test/compile-fail/issue-31845.rs
+++ b/src/test/ui/issue-31845.rs
diff --git a/src/test/ui/issue-31845.stderr b/src/test/ui/issue-31845.stderr
new file mode 100644
index 00000000000..9fb8f2ead87
--- /dev/null
+++ b/src/test/ui/issue-31845.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find function `g` in this scope
+  --> $DIR/issue-31845.rs:17:12
+   |
+LL |            g(); //~ ERROR cannot find function `g` in this scope
+   |            ^ did you mean `h`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-31910.rs b/src/test/ui/issue-31910.rs
index 7524049c5df..7524049c5df 100644
--- a/src/test/compile-fail/issue-31910.rs
+++ b/src/test/ui/issue-31910.rs
diff --git a/src/test/ui/issue-31910.stderr b/src/test/ui/issue-31910.stderr
new file mode 100644
index 00000000000..da5aa154450
--- /dev/null
+++ b/src/test/ui/issue-31910.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-31910.rs:13:9
+   |
+LL |     X = Trait::Number,
+   |         ^^^^^^^^^^^^^ expected isize, found i32
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-31924-non-snake-ffi.rs b/src/test/ui/issue-31924-non-snake-ffi.rs
index d9ce1159c0e..d9ce1159c0e 100644
--- a/src/test/compile-fail/issue-31924-non-snake-ffi.rs
+++ b/src/test/ui/issue-31924-non-snake-ffi.rs
diff --git a/src/test/ui/issue-31924-non-snake-ffi.stderr b/src/test/ui/issue-31924-non-snake-ffi.stderr
new file mode 100644
index 00000000000..2aaaa1578a5
--- /dev/null
+++ b/src/test/ui/issue-31924-non-snake-ffi.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-31924-non-snake-ffi.rs:18:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-32004.rs b/src/test/ui/issue-32004.rs
index 7e1f4c28d21..7e1f4c28d21 100644
--- a/src/test/compile-fail/issue-32004.rs
+++ b/src/test/ui/issue-32004.rs
diff --git a/src/test/ui/issue-32004.stderr b/src/test/ui/issue-32004.stderr
new file mode 100644
index 00000000000..c409d4bb612
--- /dev/null
+++ b/src/test/ui/issue-32004.stderr
@@ -0,0 +1,17 @@
+error[E0532]: expected unit struct/variant or constant, found tuple variant `Foo::Bar`
+  --> $DIR/issue-32004.rs:20:9
+   |
+LL |         Foo::Bar => {}
+   |         ^^^^^---
+   |              |
+   |              did you mean `Baz`?
+
+error[E0532]: expected tuple struct/variant, found unit struct `S`
+  --> $DIR/issue-32004.rs:26:9
+   |
+LL |         S(()) => {}
+   |         ^ not a tuple struct/variant
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/compile-fail/issue-32086.rs b/src/test/ui/issue-32086.rs
index dd236b76a67..dd236b76a67 100644
--- a/src/test/compile-fail/issue-32086.rs
+++ b/src/test/ui/issue-32086.rs
diff --git a/src/test/ui/issue-32086.stderr b/src/test/ui/issue-32086.stderr
new file mode 100644
index 00000000000..28d21708b21
--- /dev/null
+++ b/src/test/ui/issue-32086.stderr
@@ -0,0 +1,15 @@
+error[E0532]: expected tuple struct/variant, found constant `C`
+  --> $DIR/issue-32086.rs:15:9
+   |
+LL |     let C(a) = S(11); //~ ERROR expected tuple struct/variant, found constant `C`
+   |         ^ did you mean `S`?
+
+error[E0532]: expected tuple struct/variant, found constant `C`
+  --> $DIR/issue-32086.rs:16:9
+   |
+LL |     let C(..) = S(11); //~ ERROR expected tuple struct/variant, found constant `C`
+   |         ^ did you mean `S`?
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/compile-fail/issue-32119.rs b/src/test/ui/issue-32119.rs
index e630a01a593..e630a01a593 100644
--- a/src/test/compile-fail/issue-32119.rs
+++ b/src/test/ui/issue-32119.rs
diff --git a/src/test/ui/issue-32119.stderr b/src/test/ui/issue-32119.stderr
new file mode 100644
index 00000000000..04276ec1ffd
--- /dev/null
+++ b/src/test/ui/issue-32119.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-32119.rs:29:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3214.rs b/src/test/ui/issue-3214.rs
index 9a769c39eca..9a769c39eca 100644
--- a/src/test/compile-fail/issue-3214.rs
+++ b/src/test/ui/issue-3214.rs
diff --git a/src/test/ui/issue-3214.stderr b/src/test/ui/issue-3214.stderr
new file mode 100644
index 00000000000..1298e4a007d
--- /dev/null
+++ b/src/test/ui/issue-3214.stderr
@@ -0,0 +1,21 @@
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-3214.rs:13:12
+   |
+LL | fn foo<T>() {
+   |    --- - type variable from outer function
+   |    |
+   |    try adding a local type parameter in this method instead
+LL |     struct foo {
+LL |         x: T, //~ ERROR can't use type parameters from outer function
+   |            ^ use of type variable from outer function
+
+error[E0244]: wrong number of type arguments: expected 0, found 1
+  --> $DIR/issue-3214.rs:16:22
+   |
+LL |     impl<T> Drop for foo<T> {
+   |                      ^^^^^^ expected no type arguments
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0244, E0401.
+For more information about an error, try `rustc --explain E0244`.
diff --git a/src/test/compile-fail/issue-32201.rs b/src/test/ui/issue-32201.rs
index bf9f8ecbc80..bf9f8ecbc80 100644
--- a/src/test/compile-fail/issue-32201.rs
+++ b/src/test/ui/issue-32201.rs
diff --git a/src/test/ui/issue-32201.stderr b/src/test/ui/issue-32201.stderr
new file mode 100644
index 00000000000..986c2f0890c
--- /dev/null
+++ b/src/test/ui/issue-32201.stderr
@@ -0,0 +1,9 @@
+error[E0617]: can't pass `fn(*const u8) {bar}` to variadic function
+  --> $DIR/issue-32201.rs:19:16
+   |
+LL |         foo(0, bar);
+   |                ^^^ help: cast the value to `fn(*const u8)`: `bar as fn(*const u8)`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0617`.
diff --git a/src/test/compile-fail/issue-32222.rs b/src/test/ui/issue-32222.rs
index b3b34f4b0ef..b3b34f4b0ef 100644
--- a/src/test/compile-fail/issue-32222.rs
+++ b/src/test/ui/issue-32222.rs
diff --git a/src/test/ui/issue-32222.stderr b/src/test/ui/issue-32222.stderr
new file mode 100644
index 00000000000..ba2c5396e4d
--- /dev/null
+++ b/src/test/ui/issue-32222.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-32222.rs:34:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-32323.rs b/src/test/ui/issue-32323.rs
index e5cb8130327..e5cb8130327 100644
--- a/src/test/compile-fail/issue-32323.rs
+++ b/src/test/ui/issue-32323.rs
diff --git a/src/test/ui/issue-32323.stderr b/src/test/ui/issue-32323.stderr
new file mode 100644
index 00000000000..09ac1553b3a
--- /dev/null
+++ b/src/test/ui/issue-32323.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-32323.rs:15:49
+   |
+LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
+   |                                                 ^^ expected associated type, found ()
+   |
+   = note: expected type `<T as Tr<'a>>::Out`
+              found type `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-32655.rs b/src/test/ui/issue-32655.rs
index 25ecd5d0862..25ecd5d0862 100644
--- a/src/test/compile-fail/issue-32655.rs
+++ b/src/test/ui/issue-32655.rs
diff --git a/src/test/ui/issue-32655.stderr b/src/test/ui/issue-32655.stderr
new file mode 100644
index 00000000000..a1323808a91
--- /dev/null
+++ b/src/test/ui/issue-32655.stderr
@@ -0,0 +1,22 @@
+error[E0658]: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644)
+  --> $DIR/issue-32655.rs:16:9
+   |
+LL |         #[derive_Clone] //~ ERROR attributes of the form
+   |         ^^^^^^^^^^^^^^^
+...
+LL | foo!();
+   | ------- in this macro invocation
+   |
+   = help: add #![feature(custom_derive)] to the crate attributes to enable
+
+error[E0658]: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644)
+  --> $DIR/issue-32655.rs:28:5
+   |
+LL |     #[derive_Clone] //~ ERROR attributes of the form
+   |     ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_derive)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/compile-fail/issue-32709.rs b/src/test/ui/issue-32709.rs
index 09538818dcd..09538818dcd 100644
--- a/src/test/compile-fail/issue-32709.rs
+++ b/src/test/ui/issue-32709.rs
diff --git a/src/test/ui/issue-32709.stderr b/src/test/ui/issue-32709.stderr
new file mode 100644
index 00000000000..8da4be2ba2b
--- /dev/null
+++ b/src/test/ui/issue-32709.stderr
@@ -0,0 +1,11 @@
+error[E0277]: the trait bound `(): std::convert::From<{integer}>` is not satisfied
+  --> $DIR/issue-32709.rs:14:5
+   |
+LL |     Err(5)?; //~ ERROR 14:5: 14:12
+   |     ^^^^^^^ the trait `std::convert::From<{integer}>` is not implemented for `()`
+   |
+   = note: required by `std::convert::From::from`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-32782.rs b/src/test/ui/issue-32782.rs
index 696ea0ef547..696ea0ef547 100644
--- a/src/test/compile-fail/issue-32782.rs
+++ b/src/test/ui/issue-32782.rs
diff --git a/src/test/ui/issue-32782.stderr b/src/test/ui/issue-32782.stderr
new file mode 100644
index 00000000000..8b486000a45
--- /dev/null
+++ b/src/test/ui/issue-32782.stderr
@@ -0,0 +1,14 @@
+error[E0658]: allow_internal_unstable side-steps feature gating and stability checks
+  --> $DIR/issue-32782.rs:17:9
+   |
+LL |         #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | foo!();
+   | ------- in this macro invocation
+   |
+   = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/compile-fail/issue-32797.rs b/src/test/ui/issue-32797.rs
index 2c54ed3e857..2c54ed3e857 100644
--- a/src/test/compile-fail/issue-32797.rs
+++ b/src/test/ui/issue-32797.rs
diff --git a/src/test/ui/issue-32797.stderr b/src/test/ui/issue-32797.stderr
new file mode 100644
index 00000000000..8e1430e505d
--- /dev/null
+++ b/src/test/ui/issue-32797.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-32797.rs:24:1
+   |
+LL | pub fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-32829.rs b/src/test/ui/issue-32829.rs
index 9ac70882ca2..9ac70882ca2 100644
--- a/src/test/compile-fail/issue-32829.rs
+++ b/src/test/ui/issue-32829.rs
diff --git a/src/test/ui/issue-32829.stderr b/src/test/ui/issue-32829.stderr
new file mode 100644
index 00000000000..fc7d356411a
--- /dev/null
+++ b/src/test/ui/issue-32829.stderr
@@ -0,0 +1,11 @@
+error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-32829.rs:13:22
+   |
+LL | static S : u64 = { { panic!("foo"); 0 } };
+   |                      ^^^^^^^^^^^^^^
+   |
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-32833.rs b/src/test/ui/issue-32833.rs
index 41383e93603..41383e93603 100644
--- a/src/test/compile-fail/issue-32833.rs
+++ b/src/test/ui/issue-32833.rs
diff --git a/src/test/ui/issue-32833.stderr b/src/test/ui/issue-32833.stderr
new file mode 100644
index 00000000000..11af5d56766
--- /dev/null
+++ b/src/test/ui/issue-32833.stderr
@@ -0,0 +1,9 @@
+error[E0432]: unresolved import `bar::Foo`
+  --> $DIR/issue-32833.rs:11:5
+   |
+LL | use bar::Foo; //~ ERROR unresolved import `bar::Foo` [E0432]
+   |     ^^^^^^^^ no `Foo` in `bar`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-32922.rs b/src/test/ui/issue-32922.rs
index 317a47156c1..317a47156c1 100644
--- a/src/test/compile-fail/issue-32922.rs
+++ b/src/test/ui/issue-32922.rs
diff --git a/src/test/ui/issue-32922.stderr b/src/test/ui/issue-32922.stderr
new file mode 100644
index 00000000000..c1e80b0eb78
--- /dev/null
+++ b/src/test/ui/issue-32922.stderr
@@ -0,0 +1,14 @@
+error: compilation successful
+  --> $DIR/issue-32922.rs:35:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     foo! {};
+LL | |     bar! {};
+LL | |
+LL | |     let mut a = true;
+LL | |     baz!(a);
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-32963.rs b/src/test/ui/issue-32963.rs
index 24db822f89c..24db822f89c 100644
--- a/src/test/compile-fail/issue-32963.rs
+++ b/src/test/ui/issue-32963.rs
diff --git a/src/test/ui/issue-32963.stderr b/src/test/ui/issue-32963.stderr
new file mode 100644
index 00000000000..dff7c9f2b8b
--- /dev/null
+++ b/src/test/ui/issue-32963.stderr
@@ -0,0 +1,22 @@
+error[E0225]: only auto traits can be used as additional traits in a trait object
+  --> $DIR/issue-32963.rs:18:25
+   |
+LL |     size_of_copy::<Misc+Copy>();
+   |                         ^^^^ non-auto additional trait
+
+error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied
+  --> $DIR/issue-32963.rs:18:5
+   |
+LL |     size_of_copy::<Misc+Copy>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`
+   |
+note: required by `size_of_copy`
+  --> $DIR/issue-32963.rs:15:1
+   |
+LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0225, E0277.
+For more information about an error, try `rustc --explain E0225`.
diff --git a/src/test/compile-fail/issue-32995-2.rs b/src/test/ui/issue-32995-2.rs
index 18424fcc9e0..18424fcc9e0 100644
--- a/src/test/compile-fail/issue-32995-2.rs
+++ b/src/test/ui/issue-32995-2.rs
diff --git a/src/test/ui/issue-32995-2.stderr b/src/test/ui/issue-32995-2.stderr
new file mode 100644
index 00000000000..68eda14f81d
--- /dev/null
+++ b/src/test/ui/issue-32995-2.stderr
@@ -0,0 +1,30 @@
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995-2.rs:14:28
+   |
+LL |     { fn f<X: ::std::marker()::Send>() {} }
+   |                            ^^
+   |
+   = note: #[deny(parenthesized_params_in_types_and_modules)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995-2.rs:18:35
+   |
+LL |     { fn f() -> impl ::std::marker()::Send { } }
+   |                                   ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995-2.rs:26:19
+   |
+LL | impl ::std::marker()::Copy for X {}
+   |                   ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/issue-32995.rs b/src/test/ui/issue-32995.rs
index ffbd0c0c22a..ffbd0c0c22a 100644
--- a/src/test/compile-fail/issue-32995.rs
+++ b/src/test/ui/issue-32995.rs
diff --git a/src/test/ui/issue-32995.stderr b/src/test/ui/issue-32995.stderr
new file mode 100644
index 00000000000..f427964135c
--- /dev/null
+++ b/src/test/ui/issue-32995.stderr
@@ -0,0 +1,66 @@
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:14:17
+   |
+LL |     let x: usize() = 1;
+   |                 ^^
+   |
+   = note: #[deny(parenthesized_params_in_types_and_modules)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:18:24
+   |
+LL |     let b: ::std::boxed()::Box<_> = Box::new(1);
+   |                        ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:22:23
+   |
+LL |     let p = ::std::str::()::from_utf8(b"foo").unwrap();
+   |                       ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:26:34
+   |
+LL |     let p = ::std::str::from_utf8::()(b"foo").unwrap();
+   |                                  ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:30:30
+   |
+LL |     let o : Box<::std::marker()::Send> = Box::new(1);
+   |                              ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:34:37
+   |
+LL |     let o : Box<Send + ::std::marker()::Sync> = Box::new(1);
+   |                                     ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: parenthesized parameters may only be used with a trait
+  --> $DIR/issue-32995.rs:40:14
+   |
+LL |     let d : X() = Default::default();
+   |              ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
+
+error: aborting due to 7 previous errors
+
diff --git a/src/test/compile-fail/issue-33241.rs b/src/test/ui/issue-33241.rs
index 6a411b4c59c..6a411b4c59c 100644
--- a/src/test/compile-fail/issue-33241.rs
+++ b/src/test/ui/issue-33241.rs
diff --git a/src/test/ui/issue-33241.stderr b/src/test/ui/issue-33241.stderr
new file mode 100644
index 00000000000..1b6577dc41f
--- /dev/null
+++ b/src/test/ui/issue-33241.stderr
@@ -0,0 +1,11 @@
+error: compilation successful
+  --> $DIR/issue-33241.rs:20:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let t: &(u8, fmt::Debug) = any();
+LL | |     println!("{:?}", &t.1);
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-33293.rs b/src/test/ui/issue-33293.rs
index bed577b8b9d..bed577b8b9d 100644
--- a/src/test/compile-fail/issue-33293.rs
+++ b/src/test/ui/issue-33293.rs
diff --git a/src/test/ui/issue-33293.stderr b/src/test/ui/issue-33293.stderr
new file mode 100644
index 00000000000..e94979b6da4
--- /dev/null
+++ b/src/test/ui/issue-33293.stderr
@@ -0,0 +1,9 @@
+error[E0433]: failed to resolve. Use of undeclared type or module `aaa`
+  --> $DIR/issue-33293.rs:13:9
+   |
+LL |         aaa::bbb(_) => ()
+   |         ^^^ Use of undeclared type or module `aaa`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/compile-fail/issue-3344.rs b/src/test/ui/issue-3344.rs
index 73532cb768a..73532cb768a 100644
--- a/src/test/compile-fail/issue-3344.rs
+++ b/src/test/ui/issue-3344.rs
diff --git a/src/test/ui/issue-3344.stderr b/src/test/ui/issue-3344.stderr
new file mode 100644
index 00000000000..eb6caa7307e
--- /dev/null
+++ b/src/test/ui/issue-3344.stderr
@@ -0,0 +1,11 @@
+error[E0046]: not all trait items implemented, missing: `partial_cmp`
+  --> $DIR/issue-3344.rs:13:1
+   |
+LL | impl PartialOrd for thing { //~ ERROR not all trait items implemented, missing: `partial_cmp`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `partial_cmp` in implementation
+   |
+   = note: `partial_cmp` from trait: `fn(&Self, &Rhs) -> std::option::Option<std::cmp::Ordering>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0046`.
diff --git a/src/test/compile-fail/issue-33464.rs b/src/test/ui/issue-33464.rs
index b7dbaf20eca..b7dbaf20eca 100644
--- a/src/test/compile-fail/issue-33464.rs
+++ b/src/test/ui/issue-33464.rs
diff --git a/src/test/ui/issue-33464.stderr b/src/test/ui/issue-33464.stderr
new file mode 100644
index 00000000000..b70fff01c9e
--- /dev/null
+++ b/src/test/ui/issue-33464.stderr
@@ -0,0 +1,21 @@
+error[E0432]: unresolved import `abc`
+  --> $DIR/issue-33464.rs:13:5
+   |
+LL | use abc::one_el;
+   |     ^^^ Maybe a missing `extern crate abc;`?
+
+error[E0432]: unresolved import `abc`
+  --> $DIR/issue-33464.rs:15:5
+   |
+LL | use abc::{a, bbb, cccccc};
+   |     ^^^ Maybe a missing `extern crate abc;`?
+
+error[E0432]: unresolved import `a_very_long_name`
+  --> $DIR/issue-33464.rs:17:5
+   |
+LL | use a_very_long_name::{el, el2};
+   |     ^^^^^^^^^^^^^^^^ Maybe a missing `extern crate a_very_long_name;`?
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-33504.rs b/src/test/ui/issue-33504.rs
index 1e1994357c7..1e1994357c7 100644
--- a/src/test/compile-fail/issue-33504.rs
+++ b/src/test/ui/issue-33504.rs
diff --git a/src/test/ui/issue-33504.stderr b/src/test/ui/issue-33504.stderr
new file mode 100644
index 00000000000..ecf8076b2b3
--- /dev/null
+++ b/src/test/ui/issue-33504.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-33504.rs:17:13
+   |
+LL |         let Test = 1; //~ ERROR mismatched types
+   |             ^^^^ expected integral variable, found struct `Test`
+   |
+   = note: expected type `{integer}`
+              found type `Test`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-33571.rs b/src/test/ui/issue-33571.rs
index 5dfc41c8f4a..5dfc41c8f4a 100644
--- a/src/test/compile-fail/issue-33571.rs
+++ b/src/test/ui/issue-33571.rs
diff --git a/src/test/ui/issue-33571.stderr b/src/test/ui/issue-33571.stderr
new file mode 100644
index 00000000000..be45f377c1f
--- /dev/null
+++ b/src/test/ui/issue-33571.stderr
@@ -0,0 +1,8 @@
+error: this unsafe trait should be implemented explicitly
+  --> $DIR/issue-33571.rs:12:10
+   |
+LL |          Sync, //~ ERROR this unsafe trait should be implemented explicitly
+   |          ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-33819.nll.stderr b/src/test/ui/issue-33819.nll.stderr
new file mode 100644
index 00000000000..88728207921
--- /dev/null
+++ b/src/test/ui/issue-33819.nll.stderr
@@ -0,0 +1,12 @@
+error[E0596]: cannot borrow immutable item `v` as mutable
+  --> $DIR/issue-33819.rs:13:34
+   |
+LL |         Some(ref v) => { let a = &mut v; },
+   |                                  ^^^^^^
+   |                                  |
+   |                                  cannot borrow as mutable
+   |                                  try removing `&mut` here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/compile-fail/issue-33819.rs b/src/test/ui/issue-33819.rs
index 499e7e54947..499e7e54947 100644
--- a/src/test/compile-fail/issue-33819.rs
+++ b/src/test/ui/issue-33819.rs
diff --git a/src/test/ui/issue-33819.stderr b/src/test/ui/issue-33819.stderr
new file mode 100644
index 00000000000..bb8a542b12b
--- /dev/null
+++ b/src/test/ui/issue-33819.stderr
@@ -0,0 +1,9 @@
+error[E0596]: cannot borrow immutable local variable `v` as mutable
+  --> $DIR/issue-33819.rs:13:39
+   |
+LL |         Some(ref v) => { let a = &mut v; },
+   |                                       ^ cannot borrow mutably
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/compile-fail/issue-34028.rs b/src/test/ui/issue-34028.rs
index 117ab18a115..117ab18a115 100644
--- a/src/test/compile-fail/issue-34028.rs
+++ b/src/test/ui/issue-34028.rs
diff --git a/src/test/ui/issue-34028.stderr b/src/test/ui/issue-34028.stderr
new file mode 100644
index 00000000000..b715fa84f60
--- /dev/null
+++ b/src/test/ui/issue-34028.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-34028.rs:21:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-34171.rs b/src/test/ui/issue-34171.rs
index 30dd34ae9a0..30dd34ae9a0 100644
--- a/src/test/compile-fail/issue-34171.rs
+++ b/src/test/ui/issue-34171.rs
diff --git a/src/test/ui/issue-34171.stderr b/src/test/ui/issue-34171.stderr
new file mode 100644
index 00000000000..cb8cfbd8599
--- /dev/null
+++ b/src/test/ui/issue-34171.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-34171.rs:19:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     apply_null!(#[cfg(all())] fn f() {});
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-34222-1.rs b/src/test/ui/issue-34222-1.rs
index 6c85414860f..6c85414860f 100644
--- a/src/test/compile-fail/issue-34222-1.rs
+++ b/src/test/ui/issue-34222-1.rs
diff --git a/src/test/ui/issue-34222-1.stderr b/src/test/ui/issue-34222-1.stderr
new file mode 100644
index 00000000000..ef68d41da3c
--- /dev/null
+++ b/src/test/ui/issue-34222-1.stderr
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/issue-34222-1.rs:12:5
+   |
+LL |     /// comment //~ ERROR found a documentation comment that doesn't document anything
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/compile-fail/issue-34334.rs b/src/test/ui/issue-34334.rs
index a752a36ade2..a752a36ade2 100644
--- a/src/test/compile-fail/issue-34334.rs
+++ b/src/test/ui/issue-34334.rs
diff --git a/src/test/ui/issue-34334.stderr b/src/test/ui/issue-34334.stderr
new file mode 100644
index 00000000000..240df196ae7
--- /dev/null
+++ b/src/test/ui/issue-34334.stderr
@@ -0,0 +1,10 @@
+error: expected one of `,` or `>`, found `=`
+  --> $DIR/issue-34334.rs:12:29
+   |
+LL |     let sr: Vec<(u32, _, _) = vec![]; //~ ERROR expected one of `,` or `>`, found `=`
+   |         --                  ^ expected one of `,` or `>` here
+   |         |
+   |         while parsing the type for `sr`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-34349.rs b/src/test/ui/issue-34349.rs
index 591753181db..591753181db 100644
--- a/src/test/compile-fail/issue-34349.rs
+++ b/src/test/ui/issue-34349.rs
diff --git a/src/test/ui/issue-34349.stderr b/src/test/ui/issue-34349.stderr
new file mode 100644
index 00000000000..8683962b24d
--- /dev/null
+++ b/src/test/ui/issue-34349.stderr
@@ -0,0 +1,14 @@
+error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut`
+  --> $DIR/issue-34349.rs:26:17
+   |
+LL |     let diary = || { //~ ERROR E0525
+   |                 ^^ this closure implements `FnMut`, not `Fn`
+LL |         farewell.push_str("!!!");
+   |         -------- closure is `FnMut` because it mutates the variable `farewell` here
+...
+LL |     apply(diary);
+   |     ----- the requirement to implement `Fn` derives from here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0525`.
diff --git a/src/test/compile-fail/issue-34373.rs b/src/test/ui/issue-34373.rs
index 4d7238ad76f..4d7238ad76f 100644
--- a/src/test/compile-fail/issue-34373.rs
+++ b/src/test/ui/issue-34373.rs
diff --git a/src/test/ui/issue-34373.stderr b/src/test/ui/issue-34373.stderr
new file mode 100644
index 00000000000..ea80111b5e2
--- /dev/null
+++ b/src/test/ui/issue-34373.stderr
@@ -0,0 +1,16 @@
+error[E0391]: cycle detected when processing `Foo::T`
+  --> $DIR/issue-34373.rs:17:30
+   |
+LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;  //~ ERROR cycle detected
+   |                              ^^^^^^^^^^
+   |
+note: ...which requires processing `DefaultFoo`...
+  --> $DIR/issue-34373.rs:18:19
+   |
+LL | type DefaultFoo = Foo;
+   |                   ^^^
+   = note: ...which again requires processing `Foo::T`, completing the cycle
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/compile-fail/issue-34418.rs b/src/test/ui/issue-34418.rs
index 6bc0add2205..6bc0add2205 100644
--- a/src/test/compile-fail/issue-34418.rs
+++ b/src/test/ui/issue-34418.rs
diff --git a/src/test/ui/issue-34418.stderr b/src/test/ui/issue-34418.stderr
new file mode 100644
index 00000000000..4cb5ec1ae3b
--- /dev/null
+++ b/src/test/ui/issue-34418.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-34418.rs:31:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3477.rs b/src/test/ui/issue-3477.rs
index 0bad7372a12..0bad7372a12 100644
--- a/src/test/compile-fail/issue-3477.rs
+++ b/src/test/ui/issue-3477.rs
diff --git a/src/test/ui/issue-3477.stderr b/src/test/ui/issue-3477.stderr
new file mode 100644
index 00000000000..4207828693a
--- /dev/null
+++ b/src/test/ui/issue-3477.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-3477.rs:12:20
+   |
+LL |     let _p: char = 100;
+   |                    ^^^ expected char, found u8
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-34839.rs b/src/test/ui/issue-34839.rs
index be7e7820020..be7e7820020 100644
--- a/src/test/compile-fail/issue-34839.rs
+++ b/src/test/ui/issue-34839.rs
diff --git a/src/test/ui/issue-34839.stderr b/src/test/ui/issue-34839.stderr
new file mode 100644
index 00000000000..538cc7a581b
--- /dev/null
+++ b/src/test/ui/issue-34839.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-34839.rs:31:1
+   |
+LL | fn main() {}    //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-35075.rs b/src/test/ui/issue-35075.rs
index 9943cfb9bca..9943cfb9bca 100644
--- a/src/test/compile-fail/issue-35075.rs
+++ b/src/test/ui/issue-35075.rs
diff --git a/src/test/ui/issue-35075.stderr b/src/test/ui/issue-35075.stderr
new file mode 100644
index 00000000000..9b2f17f038b
--- /dev/null
+++ b/src/test/ui/issue-35075.stderr
@@ -0,0 +1,21 @@
+error[E0412]: cannot find type `Foo` in this scope
+  --> $DIR/issue-35075.rs:12:12
+   |
+LL |     inner: Foo<T> //~ ERROR cannot find type `Foo` in this scope
+   |            ^^^---
+   |            |
+   |            not found in this scope
+   |            help: you can try using the variant's enum: `Baz`
+
+error[E0412]: cannot find type `Foo` in this scope
+  --> $DIR/issue-35075.rs:16:9
+   |
+LL |     Foo(Foo<T>) //~ ERROR cannot find type `Foo` in this scope
+   |         ^^^---
+   |         |
+   |         not found in this scope
+   |         help: you can try using the variant's enum: `Baz`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-3521-2.rs b/src/test/ui/issue-3521-2.rs
index 1742cb4fb72..1742cb4fb72 100644
--- a/src/test/compile-fail/issue-3521-2.rs
+++ b/src/test/ui/issue-3521-2.rs
diff --git a/src/test/ui/issue-3521-2.stderr b/src/test/ui/issue-3521-2.stderr
new file mode 100644
index 00000000000..07c37fadbba
--- /dev/null
+++ b/src/test/ui/issue-3521-2.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3521-2.rs:14:23
+   |
+LL |     static y: isize = foo + 1;
+   |                       ^^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-3521.rs b/src/test/ui/issue-3521.rs
index 78af11a0b58..78af11a0b58 100644
--- a/src/test/compile-fail/issue-3521.rs
+++ b/src/test/ui/issue-3521.rs
diff --git a/src/test/ui/issue-3521.stderr b/src/test/ui/issue-3521.stderr
new file mode 100644
index 00000000000..f4a1ef5cefa
--- /dev/null
+++ b/src/test/ui/issue-3521.stderr
@@ -0,0 +1,9 @@
+error[E0435]: attempt to use a non-constant value in a constant
+  --> $DIR/issue-3521.rs:16:15
+   |
+LL |         Bar = foo
+   |               ^^^ non-constant value
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0435`.
diff --git a/src/test/compile-fail/issue-35450.rs b/src/test/ui/issue-35450.rs
index 5f54f269c6c..5f54f269c6c 100644
--- a/src/test/compile-fail/issue-35450.rs
+++ b/src/test/ui/issue-35450.rs
diff --git a/src/test/ui/issue-35450.stderr b/src/test/ui/issue-35450.stderr
new file mode 100644
index 00000000000..b8fc7d2054c
--- /dev/null
+++ b/src/test/ui/issue-35450.stderr
@@ -0,0 +1,8 @@
+error: expected expression, found `$`
+  --> $DIR/issue-35450.rs:14:8
+   |
+LL |     m!($t); //~ ERROR expected expression
+   |        ^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-35570.rs b/src/test/ui/issue-35570.rs
index 092bf00ddd6..092bf00ddd6 100644
--- a/src/test/compile-fail/issue-35570.rs
+++ b/src/test/ui/issue-35570.rs
diff --git a/src/test/ui/issue-35570.stderr b/src/test/ui/issue-35570.stderr
new file mode 100644
index 00000000000..349693f29d5
--- /dev/null
+++ b/src/test/ui/issue-35570.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-35570.rs:38:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     takes_lifetime(foo);
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-35668.rs b/src/test/ui/issue-35668.rs
index 17fd77b6df3..17fd77b6df3 100644
--- a/src/test/compile-fail/issue-35668.rs
+++ b/src/test/ui/issue-35668.rs
diff --git a/src/test/ui/issue-35668.stderr b/src/test/ui/issue-35668.stderr
new file mode 100644
index 00000000000..51d6b040240
--- /dev/null
+++ b/src/test/ui/issue-35668.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `*` cannot be applied to type `&T`
+  --> $DIR/issue-35668.rs:12:22
+   |
+LL |     a.iter().map(|a| a*a)
+   |                      ^^^
+   |
+   = note: an implementation of `std::ops::Mul` might be missing for `&T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/compile-fail/issue-35988.rs b/src/test/ui/issue-35988.rs
index 5909322ff1f..5909322ff1f 100644
--- a/src/test/compile-fail/issue-35988.rs
+++ b/src/test/ui/issue-35988.rs
diff --git a/src/test/ui/issue-35988.stderr b/src/test/ui/issue-35988.stderr
new file mode 100644
index 00000000000..35452fcf392
--- /dev/null
+++ b/src/test/ui/issue-35988.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `[std::boxed::Box<E>]` cannot be known at compilation time
+  --> $DIR/issue-35988.rs:12:7
+   |
+LL |     V([Box<E>]),
+   |       ^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `[std::boxed::Box<E>]`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: no field of an enum variant may have a dynamically sized type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-3601.rs b/src/test/ui/issue-3601.rs
index cc69a76e043..cc69a76e043 100644
--- a/src/test/compile-fail/issue-3601.rs
+++ b/src/test/ui/issue-3601.rs
diff --git a/src/test/ui/issue-3601.stderr b/src/test/ui/issue-3601.stderr
new file mode 100644
index 00000000000..6c28ccb2ee8
--- /dev/null
+++ b/src/test/ui/issue-3601.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `_` not covered
+  --> $DIR/issue-3601.rs:40:44
+   |
+LL |         box NodeKind::Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns
+   |                                            ^^^^^^^ pattern `_` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/ui/issue-36082.ast.nll.stderr b/src/test/ui/issue-36082.ast.nll.stderr
new file mode 100644
index 00000000000..cf280bd80b2
--- /dev/null
+++ b/src/test/ui/issue-36082.ast.nll.stderr
@@ -0,0 +1,14 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-36082.rs:23:19
+   |
+LL |     let val: &_ = x.borrow().0;
+   |                   ^^^^^^^^^^  - temporary value only lives until here
+   |                   |
+   |                   temporary value does not live long enough
+...
+LL |     println!("{}", val);
+   |                    --- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-36082.ast.stderr b/src/test/ui/issue-36082.ast.stderr
new file mode 100644
index 00000000000..b79958de5cb
--- /dev/null
+++ b/src/test/ui/issue-36082.ast.stderr
@@ -0,0 +1,16 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-36082.rs:23:19
+   |
+LL |     let val: &_ = x.borrow().0;
+   |                   ^^^^^^^^^^  - temporary value dropped here while still borrowed
+   |                   |
+   |                   temporary value does not live long enough
+...
+LL | }
+   | - temporary value needs to live until here
+   |
+   = note: consider using a `let` binding to increase its lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issue-36082.mir.stderr b/src/test/ui/issue-36082.mir.stderr
new file mode 100644
index 00000000000..cf280bd80b2
--- /dev/null
+++ b/src/test/ui/issue-36082.mir.stderr
@@ -0,0 +1,14 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-36082.rs:23:19
+   |
+LL |     let val: &_ = x.borrow().0;
+   |                   ^^^^^^^^^^  - temporary value only lives until here
+   |                   |
+   |                   temporary value does not live long enough
+...
+LL |     println!("{}", val);
+   |                    --- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-36082.rs b/src/test/ui/issue-36082.rs
index ed6a2f85fbe..ed6a2f85fbe 100644
--- a/src/test/compile-fail/issue-36082.rs
+++ b/src/test/ui/issue-36082.rs
diff --git a/src/test/compile-fail/issue-36116.rs b/src/test/ui/issue-36116.rs
index 3afbfa61984..3afbfa61984 100644
--- a/src/test/compile-fail/issue-36116.rs
+++ b/src/test/ui/issue-36116.rs
diff --git a/src/test/ui/issue-36116.stderr b/src/test/ui/issue-36116.stderr
new file mode 100644
index 00000000000..df69dcb0d92
--- /dev/null
+++ b/src/test/ui/issue-36116.stderr
@@ -0,0 +1,20 @@
+warning: unnecessary path disambiguator
+  --> $DIR/issue-36116.rs:30:50
+   |
+LL |     let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); //~ WARN unnecessary path disambiguator
+   |                                                  ^^ try removing `::`
+
+warning: unnecessary path disambiguator
+  --> $DIR/issue-36116.rs:31:15
+   |
+LL |     let g: Foo::<i32> = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator
+   |               ^^ try removing `::`
+
+error: compilation successful
+  --> $DIR/issue-36116.rs:37:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-36299.rs b/src/test/ui/issue-36299.rs
index 88ac74cb09e..88ac74cb09e 100644
--- a/src/test/compile-fail/issue-36299.rs
+++ b/src/test/ui/issue-36299.rs
diff --git a/src/test/ui/issue-36299.stderr b/src/test/ui/issue-36299.stderr
new file mode 100644
index 00000000000..faa20253b9b
--- /dev/null
+++ b/src/test/ui/issue-36299.stderr
@@ -0,0 +1,19 @@
+error[E0392]: parameter `'a` is never used
+  --> $DIR/issue-36299.rs:11:12
+   |
+LL | struct Foo<'a, A> {}
+   |            ^^ unused type parameter
+   |
+   = help: consider removing `'a` or using a marker such as `std::marker::PhantomData`
+
+error[E0392]: parameter `A` is never used
+  --> $DIR/issue-36299.rs:11:16
+   |
+LL | struct Foo<'a, A> {}
+   |                ^ unused type parameter
+   |
+   = help: consider removing `A` or using a marker such as `std::marker::PhantomData`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/compile-fail/issue-36379.rs b/src/test/ui/issue-36379.rs
index b20765815e0..b20765815e0 100644
--- a/src/test/compile-fail/issue-36379.rs
+++ b/src/test/ui/issue-36379.rs
diff --git a/src/test/ui/issue-36379.stderr b/src/test/ui/issue-36379.stderr
new file mode 100644
index 00000000000..b06591f411e
--- /dev/null
+++ b/src/test/ui/issue-36379.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-36379.rs:16:1
+   |
+LL | fn main() { } //~ ERROR compilation successful
+   | ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-36617.rs b/src/test/ui/issue-36617.rs
index 9f5eeb1a45d..9f5eeb1a45d 100644
--- a/src/test/compile-fail/issue-36617.rs
+++ b/src/test/ui/issue-36617.rs
diff --git a/src/test/ui/issue-36617.stderr b/src/test/ui/issue-36617.stderr
new file mode 100644
index 00000000000..efd58235282
--- /dev/null
+++ b/src/test/ui/issue-36617.stderr
@@ -0,0 +1,8 @@
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-36617.rs:11:1
+   |
+LL | #![derive(Copy)] //~ ERROR `derive` may only be applied to structs, enums and unions
+   | ^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Copy)]`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-36638.rs b/src/test/ui/issue-36638.rs
index 5e43536ef3f..5e43536ef3f 100644
--- a/src/test/compile-fail/issue-36638.rs
+++ b/src/test/ui/issue-36638.rs
diff --git a/src/test/ui/issue-36638.stderr b/src/test/ui/issue-36638.stderr
new file mode 100644
index 00000000000..d111fb469bf
--- /dev/null
+++ b/src/test/ui/issue-36638.stderr
@@ -0,0 +1,14 @@
+error: expected identifier, found keyword `Self`
+  --> $DIR/issue-36638.rs:13:12
+   |
+LL | struct Foo<Self>(Self);
+   |            ^^^^ expected identifier, found keyword
+
+error: expected identifier, found keyword `Self`
+  --> $DIR/issue-36638.rs:16:11
+   |
+LL | trait Bar<Self> {}
+   |           ^^^^ expected identifier, found keyword
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-3668-2.rs b/src/test/ui/issue-3668-2.rs
index fe46877e8d3..fe46877e8d3 100644
--- a/src/test/compile-fail/issue-3668-2.rs
+++ b/src/test/ui/issue-3668-2.rs
diff --git a/src/test/ui/issue-3668-2.stderr b/src/test/ui/issue-3668-2.stderr
new file mode 100644
index 00000000000..e78a2791907
--- /dev/null
+++ b/src/test/ui/issue-3668-2.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3668-2.rs:12:27
+   |
+LL |     static child: isize = x + 1;
+   |                           ^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-3668.rs b/src/test/ui/issue-3668.rs
index 00f64414a9e..00f64414a9e 100644
--- a/src/test/compile-fail/issue-3668.rs
+++ b/src/test/ui/issue-3668.rs
diff --git a/src/test/ui/issue-3668.stderr b/src/test/ui/issue-3668.stderr
new file mode 100644
index 00000000000..73eaf57c955
--- /dev/null
+++ b/src/test/ui/issue-3668.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-3668.rs:18:34
+   |
+LL |        static childVal: Box<P> = self.child.get();
+   |                                  ^^^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-3680.rs b/src/test/ui/issue-3680.rs
index e698e6da529..e698e6da529 100644
--- a/src/test/compile-fail/issue-3680.rs
+++ b/src/test/ui/issue-3680.rs
diff --git a/src/test/ui/issue-3680.stderr b/src/test/ui/issue-3680.stderr
new file mode 100644
index 00000000000..4fea4789dbd
--- /dev/null
+++ b/src/test/ui/issue-3680.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-3680.rs:13:9
+   |
+LL |         Err(_) => ()
+   |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
+   |
+   = note: expected type `std::option::Option<_>`
+              found type `std::result::Result<_, _>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-36839.rs b/src/test/ui/issue-36839.rs
index 3e34b250672..3e34b250672 100644
--- a/src/test/compile-fail/issue-36839.rs
+++ b/src/test/ui/issue-36839.rs
diff --git a/src/test/ui/issue-36839.stderr b/src/test/ui/issue-36839.stderr
new file mode 100644
index 00000000000..dd78668801c
--- /dev/null
+++ b/src/test/ui/issue-36839.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-36839.rs:30:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let _m: &Broken<Assoc=()> = &();
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3702-2.rs b/src/test/ui/issue-3702-2.rs
index 325f05841f4..325f05841f4 100644
--- a/src/test/compile-fail/issue-3702-2.rs
+++ b/src/test/ui/issue-3702-2.rs
diff --git a/src/test/ui/issue-3702-2.stderr b/src/test/ui/issue-3702-2.stderr
new file mode 100644
index 00000000000..9ec400db47f
--- /dev/null
+++ b/src/test/ui/issue-3702-2.stderr
@@ -0,0 +1,20 @@
+error[E0034]: multiple applicable items in scope
+  --> $DIR/issue-3702-2.rs:26:14
+   |
+LL |         self.to_int() + other.to_int() //~ ERROR multiple applicable items in scope
+   |              ^^^^^^ multiple `to_int` found
+   |
+note: candidate #1 is defined in an impl of the trait `ToPrimitive` for the type `isize`
+  --> $DIR/issue-3702-2.rs:12:5
+   |
+LL |     fn to_int(&self) -> isize { 0 }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `Add` for the type `isize`
+  --> $DIR/issue-3702-2.rs:24:5
+   |
+LL |     fn to_int(&self) -> isize { *self }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0034`.
diff --git a/src/test/compile-fail/issue-37026.rs b/src/test/ui/issue-37026.rs
index 95fd5d1222e..95fd5d1222e 100644
--- a/src/test/compile-fail/issue-37026.rs
+++ b/src/test/ui/issue-37026.rs
diff --git a/src/test/ui/issue-37026.stderr b/src/test/ui/issue-37026.stderr
new file mode 100644
index 00000000000..c53ec5b55ce
--- /dev/null
+++ b/src/test/ui/issue-37026.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-37026.rs:16:9
+   |
+LL |     let empty_struct::XEmpty2 = (); //~ ERROR mismatched types
+   |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2`
+   |
+   = note: expected type `()`
+              found type `empty_struct::XEmpty2`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-37026.rs:17:9
+   |
+LL |     let empty_struct::XEmpty6(..) = (); //~ ERROR mismatched types
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6`
+   |
+   = note: expected type `()`
+              found type `empty_struct::XEmpty6`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-37051.rs b/src/test/ui/issue-37051.rs
index ab08e1899a0..ab08e1899a0 100644
--- a/src/test/compile-fail/issue-37051.rs
+++ b/src/test/ui/issue-37051.rs
diff --git a/src/test/ui/issue-37051.stderr b/src/test/ui/issue-37051.stderr
new file mode 100644
index 00000000000..b0404088d4d
--- /dev/null
+++ b/src/test/ui/issue-37051.stderr
@@ -0,0 +1,9 @@
+error: compilation successful
+  --> $DIR/issue-37051.rs:28:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/ui/issue-3707.rs
index ad56b125b08..ad56b125b08 100644
--- a/src/test/compile-fail/issue-3707.rs
+++ b/src/test/ui/issue-3707.rs
diff --git a/src/test/ui/issue-3707.stderr b/src/test/ui/issue-3707.stderr
new file mode 100644
index 00000000000..c6d28fecaf9
--- /dev/null
+++ b/src/test/ui/issue-3707.stderr
@@ -0,0 +1,19 @@
+error[E0599]: no method named `boom` found for type `&Obj` in the current scope
+  --> $DIR/issue-3707.rs:20:14
+   |
+LL |         self.boom(); //~ ERROR no method named `boom` found for type `&Obj` in the current scope
+   |         -----^^^^
+   |         |    |
+   |         |    this is an associated function, not a method
+   |         help: use associated function syntax instead: `&Obj::boom`
+   |
+   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: the candidate is defined in an impl for the type `Obj`
+  --> $DIR/issue-3707.rs:16:5
+   |
+LL |     pub fn boom() -> bool {
+   |     ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-37323.rs b/src/test/ui/issue-37323.rs
index 98806cdd1b9..98806cdd1b9 100644
--- a/src/test/compile-fail/issue-37323.rs
+++ b/src/test/ui/issue-37323.rs
diff --git a/src/test/ui/issue-37323.stderr b/src/test/ui/issue-37323.stderr
new file mode 100644
index 00000000000..a83923a5910
--- /dev/null
+++ b/src/test/ui/issue-37323.stderr
@@ -0,0 +1,20 @@
+error[E0491]: in type `&'a NestedB<'b>`, reference has a longer lifetime than the data it references
+  --> $DIR/issue-37323.rs:19:5
+   |
+LL |     x: &'a NestedB<'b>
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+note: the pointer is valid for the lifetime 'a as defined on the struct at 18:16
+  --> $DIR/issue-37323.rs:18:16
+   |
+LL | struct NestedA<'a, 'b> {
+   |                ^^
+note: but the referenced data is only valid for the lifetime 'b as defined on the struct at 18:20
+  --> $DIR/issue-37323.rs:18:20
+   |
+LL | struct NestedA<'a, 'b> {
+   |                    ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0491`.
diff --git a/src/test/compile-fail/issue-37366.rs b/src/test/ui/issue-37366.rs
index 2a4808fb186..2a4808fb186 100644
--- a/src/test/compile-fail/issue-37366.rs
+++ b/src/test/ui/issue-37366.rs
diff --git a/src/test/ui/issue-37366.stderr b/src/test/ui/issue-37366.stderr
new file mode 100644
index 00000000000..8667feccf99
--- /dev/null
+++ b/src/test/ui/issue-37366.stderr
@@ -0,0 +1,9 @@
+error: compilation successful
+  --> $DIR/issue-37366.rs:25:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-37510.rs b/src/test/ui/issue-37510.rs
index 53c91f323d0..53c91f323d0 100644
--- a/src/test/compile-fail/issue-37510.rs
+++ b/src/test/ui/issue-37510.rs
diff --git a/src/test/ui/issue-37510.stderr b/src/test/ui/issue-37510.stderr
new file mode 100644
index 00000000000..48db0d5e202
--- /dev/null
+++ b/src/test/ui/issue-37510.stderr
@@ -0,0 +1,14 @@
+error: compilation successful
+  --> $DIR/issue-37510.rs:16:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let opt = Some(92);
+LL | |     let mut x = 62;
+LL | |
+...  |
+LL | |     }
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-37515.rs b/src/test/ui/issue-37515.rs
index d5733f98193..d5733f98193 100644
--- a/src/test/compile-fail/issue-37515.rs
+++ b/src/test/ui/issue-37515.rs
diff --git a/src/test/ui/issue-37515.stderr b/src/test/ui/issue-37515.stderr
new file mode 100644
index 00000000000..68e983f23b0
--- /dev/null
+++ b/src/test/ui/issue-37515.stderr
@@ -0,0 +1,22 @@
+warning: type alias is never used: `Z`
+  --> $DIR/issue-37515.rs:14:1
+   |
+LL | type Z = for<'x> Send;
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-37515.rs:12:9
+   |
+LL | #![warn(unused)]
+   |         ^^^^^^
+   = note: #[warn(dead_code)] implied by #[warn(unused)]
+
+error: compilation successful
+  --> $DIR/issue-37515.rs:18:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-37534.rs b/src/test/ui/issue-37534.rs
index 70c8f92de63..70c8f92de63 100644
--- a/src/test/compile-fail/issue-37534.rs
+++ b/src/test/ui/issue-37534.rs
diff --git a/src/test/ui/issue-37534.stderr b/src/test/ui/issue-37534.stderr
new file mode 100644
index 00000000000..c4fc9db31f5
--- /dev/null
+++ b/src/test/ui/issue-37534.stderr
@@ -0,0 +1,28 @@
+error[E0405]: cannot find trait `Hash` in this scope
+  --> $DIR/issue-37534.rs:11:16
+   |
+LL | struct Foo<T: ?Hash> { }
+   |                ^^^^ not found in this scope
+help: possible candidate is found in another module, you can import it into scope
+   |
+LL | use std::hash::Hash;
+   |
+
+warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default. Only `?Sized` is supported
+  --> $DIR/issue-37534.rs:11:12
+   |
+LL | struct Foo<T: ?Hash> { }
+   |            ^
+
+error[E0392]: parameter `T` is never used
+  --> $DIR/issue-37534.rs:11:12
+   |
+LL | struct Foo<T: ?Hash> { }
+   |            ^ unused type parameter
+   |
+   = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0392, E0405.
+For more information about an error, try `rustc --explain E0392`.
diff --git a/src/test/compile-fail/issue-37550.rs b/src/test/ui/issue-37550.rs
index af1f6ef5ed4..af1f6ef5ed4 100644
--- a/src/test/compile-fail/issue-37550.rs
+++ b/src/test/ui/issue-37550.rs
diff --git a/src/test/ui/issue-37550.stderr b/src/test/ui/issue-37550.stderr
new file mode 100644
index 00000000000..7468510de6a
--- /dev/null
+++ b/src/test/ui/issue-37550.stderr
@@ -0,0 +1,35 @@
+error[E0658]: let bindings in constant functions are unstable (see issue #48821)
+  --> $DIR/issue-37550.rs:14:13
+   |
+LL |     let t = true;
+   |             ^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constant functions are unstable (see issue #48821)
+  --> $DIR/issue-37550.rs:14:13
+   |
+LL |     let t = true;
+   |             ^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: let bindings in constant functions are unstable (see issue #48821)
+  --> $DIR/issue-37550.rs:17:13
+   |
+LL |     let x = || t;
+   |             ^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constant functions are unstable (see issue #48821)
+  --> $DIR/issue-37550.rs:17:13
+   |
+LL |     let x = || t;
+   |             ^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/compile-fail/issue-37576.rs b/src/test/ui/issue-37576.rs
index e3c1ada878d..e3c1ada878d 100644
--- a/src/test/compile-fail/issue-37576.rs
+++ b/src/test/ui/issue-37576.rs
diff --git a/src/test/ui/issue-37576.stderr b/src/test/ui/issue-37576.stderr
new file mode 100644
index 00000000000..b663c8b8a28
--- /dev/null
+++ b/src/test/ui/issue-37576.stderr
@@ -0,0 +1,51 @@
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:13:11
+   |
+LL |     while break {}
+   |           ^^^^^ unlabeled `break` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:17:22
+   |
+LL |     while let true = break {}
+   |                      ^^^^^ unlabeled `break` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:21:18
+   |
+LL |     loop { while break {} }
+   |                  ^^^^^ unlabeled `break` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:29:15
+   |
+LL |         while break {}
+   |               ^^^^^ unlabeled `break` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:35:11
+   |
+LL |     while continue {}
+   |           ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:39:22
+   |
+LL |     while let true = continue {}
+   |                      ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:43:18
+   |
+LL |     loop { while continue {} }
+   |                  ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop
+
+error[E0590]: `break` or `continue` with no label in the condition of a `while` loop
+  --> $DIR/issue-37576.rs:51:15
+   |
+LL |         while continue {}
+   |               ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0590`.
diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/ui/issue-3763.rs
index 851f5dfeabe..851f5dfeabe 100644
--- a/src/test/compile-fail/issue-3763.rs
+++ b/src/test/ui/issue-3763.rs
diff --git a/src/test/ui/issue-3763.stderr b/src/test/ui/issue-3763.stderr
new file mode 100644
index 00000000000..0dd7d6819e8
--- /dev/null
+++ b/src/test/ui/issue-3763.stderr
@@ -0,0 +1,34 @@
+error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
+  --> $DIR/issue-3763.rs:25:19
+   |
+LL |     let _woohoo = (&my_struct).priv_field;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
+  --> $DIR/issue-3763.rs:28:19
+   |
+LL |     let _woohoo = (Box::new(my_struct)).priv_field;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0624]: method `happyfun` is private
+  --> $DIR/issue-3763.rs:31:18
+   |
+LL |     (&my_struct).happyfun();               //~ ERROR method `happyfun` is private
+   |                  ^^^^^^^^
+
+error[E0624]: method `happyfun` is private
+  --> $DIR/issue-3763.rs:33:27
+   |
+LL |     (Box::new(my_struct)).happyfun();          //~ ERROR method `happyfun` is private
+   |                           ^^^^^^^^
+
+error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private
+  --> $DIR/issue-3763.rs:34:16
+   |
+LL |     let nope = my_struct.priv_field;
+   |                ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
+
+Some errors occurred: E0616, E0624.
+For more information about an error, try `rustc --explain E0616`.
diff --git a/src/test/compile-fail/issue-37665.rs b/src/test/ui/issue-37665.rs
index 81ed4375e77..81ed4375e77 100644
--- a/src/test/compile-fail/issue-37665.rs
+++ b/src/test/ui/issue-37665.rs
diff --git a/src/test/ui/issue-37665.stderr b/src/test/ui/issue-37665.stderr
new file mode 100644
index 00000000000..cdf9129c002
--- /dev/null
+++ b/src/test/ui/issue-37665.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-37665.rs:20:17
+   |
+LL |     let x: () = 0; //~ ERROR: mismatched types
+   |                 ^ expected (), found integral variable
+   |
+   = note: expected type `()`
+              found type `{integer}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-37887.rs b/src/test/ui/issue-37887.rs
index f120bbbfc9f..f120bbbfc9f 100644
--- a/src/test/compile-fail/issue-37887.rs
+++ b/src/test/ui/issue-37887.rs
diff --git a/src/test/ui/issue-37887.stderr b/src/test/ui/issue-37887.stderr
new file mode 100644
index 00000000000..8448466087d
--- /dev/null
+++ b/src/test/ui/issue-37887.stderr
@@ -0,0 +1,18 @@
+error[E0432]: unresolved import `libc`
+  --> $DIR/issue-37887.rs:13:9
+   |
+LL |     use libc::*; //~ ERROR unresolved import
+   |         ^^^^ Maybe a missing `extern crate libc;`?
+
+error[E0658]: use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)
+  --> $DIR/issue-37887.rs:12:5
+   |
+LL |     extern crate libc; //~ ERROR use of unstable
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(libc)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0432, E0658.
+For more information about an error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-38160.rs b/src/test/ui/issue-38160.rs
index 311d0ceb4d3..311d0ceb4d3 100644
--- a/src/test/compile-fail/issue-38160.rs
+++ b/src/test/ui/issue-38160.rs
diff --git a/src/test/ui/issue-38160.stderr b/src/test/ui/issue-38160.stderr
new file mode 100644
index 00000000000..1277d84a032
--- /dev/null
+++ b/src/test/ui/issue-38160.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-38160.rs:31:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3820.rs b/src/test/ui/issue-3820.rs
index 28de76f18da..28de76f18da 100644
--- a/src/test/compile-fail/issue-3820.rs
+++ b/src/test/ui/issue-3820.rs
diff --git a/src/test/ui/issue-3820.stderr b/src/test/ui/issue-3820.stderr
new file mode 100644
index 00000000000..cdd14e9da7b
--- /dev/null
+++ b/src/test/ui/issue-3820.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `*` cannot be applied to type `Thing`
+  --> $DIR/issue-3820.rs:24:13
+   |
+LL |     let w = u * 3; //~ ERROR binary operation `*` cannot be applied to type `Thing`
+   |             ^^^^^
+   |
+   = note: an implementation of `std::ops::Mul` might be missing for `Thing`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/compile-fail/issue-38293.rs b/src/test/ui/issue-38293.rs
index 1867bafa7e3..1867bafa7e3 100644
--- a/src/test/compile-fail/issue-38293.rs
+++ b/src/test/ui/issue-38293.rs
diff --git a/src/test/ui/issue-38293.stderr b/src/test/ui/issue-38293.stderr
new file mode 100644
index 00000000000..73f5425cfc0
--- /dev/null
+++ b/src/test/ui/issue-38293.stderr
@@ -0,0 +1,20 @@
+error[E0432]: unresolved import `foo::f`
+  --> $DIR/issue-38293.rs:16:14
+   |
+LL | use foo::f::{self}; //~ ERROR unresolved import `foo::f`
+   |              ^^^^ no `f` in `foo`
+
+error[E0423]: expected function, found module `baz`
+  --> $DIR/issue-38293.rs:25:5
+   |
+LL |     baz(); //~ ERROR expected function, found module `baz`
+   |     ^^^ not a function
+help: possible better candidate is found in another module, you can import it into scope
+   |
+LL | use bar::baz;
+   |
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0423, E0432.
+For more information about an error, try `rustc --explain E0423`.
diff --git a/src/test/compile-fail/issue-38381.rs b/src/test/ui/issue-38381.rs
index 6b7dde117df..6b7dde117df 100644
--- a/src/test/compile-fail/issue-38381.rs
+++ b/src/test/ui/issue-38381.rs
diff --git a/src/test/ui/issue-38381.stderr b/src/test/ui/issue-38381.stderr
new file mode 100644
index 00000000000..baa6338a37e
--- /dev/null
+++ b/src/test/ui/issue-38381.stderr
@@ -0,0 +1,10 @@
+error: compilation successful
+  --> $DIR/issue-38381.rs:16:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!();
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-38404.rs b/src/test/ui/issue-38404.rs
index a2b0d0a60c0..a2b0d0a60c0 100644
--- a/src/test/compile-fail/issue-38404.rs
+++ b/src/test/ui/issue-38404.rs
diff --git a/src/test/ui/issue-38404.stderr b/src/test/ui/issue-38404.stderr
new file mode 100644
index 00000000000..ac55be75f5b
--- /dev/null
+++ b/src/test/ui/issue-38404.stderr
@@ -0,0 +1,11 @@
+error[E0038]: the trait `B` cannot be made into an object
+  --> $DIR/issue-38404.rs:13:15
+   |
+LL | trait C<T>: A<B<T, Output=usize>> {}
+   |               ^^^^^^^^^^^^^^^^^^ the trait `B` cannot be made into an object
+   |
+   = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-38412.rs b/src/test/ui/issue-38412.rs
index b4feadbacf7..b4feadbacf7 100644
--- a/src/test/compile-fail/issue-38412.rs
+++ b/src/test/ui/issue-38412.rs
diff --git a/src/test/ui/issue-38412.stderr b/src/test/ui/issue-38412.stderr
new file mode 100644
index 00000000000..96851436d6c
--- /dev/null
+++ b/src/test/ui/issue-38412.stderr
@@ -0,0 +1,9 @@
+error[E0532]: expected tuple struct/variant, found struct `Box`
+  --> $DIR/issue-38412.rs:12:9
+   |
+LL |     let Box(a) = loop { };
+   |         ^^^ constructor is not visible here due to private fields
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/test/compile-fail/issue-38458.rs b/src/test/ui/issue-38458.rs
index 56eb5f874cd..56eb5f874cd 100644
--- a/src/test/compile-fail/issue-38458.rs
+++ b/src/test/ui/issue-38458.rs
diff --git a/src/test/ui/issue-38458.stderr b/src/test/ui/issue-38458.stderr
new file mode 100644
index 00000000000..d870da63d89
--- /dev/null
+++ b/src/test/ui/issue-38458.stderr
@@ -0,0 +1,9 @@
+error[E0572]: return statement outside of function body
+  --> $DIR/issue-38458.rs:12:5
+   |
+LL |     return; //~ ERROR return statement outside of function body
+   |     ^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0572`.
diff --git a/src/test/compile-fail/issue-38604.rs b/src/test/ui/issue-38604.rs
index c1939a7707f..c1939a7707f 100644
--- a/src/test/compile-fail/issue-38604.rs
+++ b/src/test/ui/issue-38604.rs
diff --git a/src/test/ui/issue-38604.stderr b/src/test/ui/issue-38604.stderr
new file mode 100644
index 00000000000..78aee9172f5
--- /dev/null
+++ b/src/test/ui/issue-38604.stderr
@@ -0,0 +1,20 @@
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/issue-38604.rs:24:13
+   |
+LL |     let _f: Box<Foo> = //~ ERROR `Foo` cannot be made into an object
+   |             ^^^^^^^^ the trait `Foo` cannot be made into an object
+   |
+   = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
+
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/issue-38604.rs:25:9
+   |
+LL |         Box::new(()); //~ ERROR `Foo` cannot be made into an object
+   |         ^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
+   |
+   = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
+   = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn Foo>>` for `std::boxed::Box<()>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/src/test/compile-fail/issue-38857.rs b/src/test/ui/issue-38857.rs
index b38b1b9fdc6..b38b1b9fdc6 100644
--- a/src/test/compile-fail/issue-38857.rs
+++ b/src/test/ui/issue-38857.rs
diff --git a/src/test/ui/issue-38857.stderr b/src/test/ui/issue-38857.stderr
new file mode 100644
index 00000000000..985927c25a1
--- /dev/null
+++ b/src/test/ui/issue-38857.stderr
@@ -0,0 +1,16 @@
+error[E0433]: failed to resolve. Could not find `imp` in `sys`
+  --> $DIR/issue-38857.rs:12:23
+   |
+LL |     let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
+   |                       ^^^ Could not find `imp` in `sys`
+
+error[E0603]: module `sys` is private
+  --> $DIR/issue-38857.rs:12:13
+   |
+LL |     let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0433, E0603.
+For more information about an error, try `rustc --explain E0433`.
diff --git a/src/test/compile-fail/issue-38868.rs b/src/test/ui/issue-38868.rs
index c7e1da7094f..c7e1da7094f 100644
--- a/src/test/compile-fail/issue-38868.rs
+++ b/src/test/ui/issue-38868.rs
diff --git a/src/test/ui/issue-38868.stderr b/src/test/ui/issue-38868.stderr
new file mode 100644
index 00000000000..3a8ffe7d5e9
--- /dev/null
+++ b/src/test/ui/issue-38868.stderr
@@ -0,0 +1,21 @@
+error[E0366]: Implementations of Drop cannot be specialized
+  --> $DIR/issue-38868.rs:15:1
+   |
+LL | / impl Drop for List<i32> { //~ ERROR E0366
+LL | |     fn drop(&mut self) {
+LL | |         panic!()
+LL | |     }
+LL | | }
+   | |_^
+   |
+note: Use same sequence of generic type and region parameters that is on the struct/enum definition
+  --> $DIR/issue-38868.rs:11:1
+   |
+LL | / pub struct List<T> {
+LL | |     head: T,
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0366`.
diff --git a/src/test/compile-fail/issue-38919.rs b/src/test/ui/issue-38919.rs
index e6cee4afd59..e6cee4afd59 100644
--- a/src/test/compile-fail/issue-38919.rs
+++ b/src/test/ui/issue-38919.rs
diff --git a/src/test/ui/issue-38919.stderr b/src/test/ui/issue-38919.stderr
new file mode 100644
index 00000000000..b80367d7c6c
--- /dev/null
+++ b/src/test/ui/issue-38919.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no associated item named `Item` found for type `T` in the current scope
+  --> $DIR/issue-38919.rs:12:5
+   |
+LL |     T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope
+   |     ^^^^^^^ associated item not found in `T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-38954.rs b/src/test/ui/issue-38954.rs
index 7f01ed3f820..7f01ed3f820 100644
--- a/src/test/compile-fail/issue-38954.rs
+++ b/src/test/ui/issue-38954.rs
diff --git a/src/test/ui/issue-38954.stderr b/src/test/ui/issue-38954.stderr
new file mode 100644
index 00000000000..f9c380317b4
--- /dev/null
+++ b/src/test/ui/issue-38954.stderr
@@ -0,0 +1,12 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/issue-38954.rs:11:23
+   |
+LL | fn _test(ref _p: str) {}
+   |                       ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `str`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-39211.rs b/src/test/ui/issue-39211.rs
index 96ba1c83997..96ba1c83997 100644
--- a/src/test/compile-fail/issue-39211.rs
+++ b/src/test/ui/issue-39211.rs
diff --git a/src/test/ui/issue-39211.stderr b/src/test/ui/issue-39211.stderr
new file mode 100644
index 00000000000..6859c6caeb0
--- /dev/null
+++ b/src/test/ui/issue-39211.stderr
@@ -0,0 +1,9 @@
+error[E0220]: associated type `Row` not found for `M`
+  --> $DIR/issue-39211.rs:21:17
+   |
+LL |     let a = [3; M::Row::DIM]; //~ ERROR associated type `Row` not found for `M`
+   |                 ^^^^^^^^^^^ associated type `Row` not found
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0220`.
diff --git a/src/test/compile-fail/issue-39362.rs b/src/test/ui/issue-39362.rs
index 9d8abbfc65d..9d8abbfc65d 100644
--- a/src/test/compile-fail/issue-39362.rs
+++ b/src/test/ui/issue-39362.rs
diff --git a/src/test/ui/issue-39362.stderr b/src/test/ui/issue-39362.stderr
new file mode 100644
index 00000000000..3e613553dea
--- /dev/null
+++ b/src/test/ui/issue-39362.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `Bar { bar: C, .. }`, `Bar { bar: D, .. }`, `Bar { bar: E, .. }` and 1 more not covered
+  --> $DIR/issue-39362.rs:20:11
+   |
+LL |     match f {
+   |           ^ patterns `Bar { bar: C, .. }`, `Bar { bar: D, .. }`, `Bar { bar: E, .. }` and 1 more not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-39388.rs b/src/test/ui/issue-39388.rs
index 6da04937408..6da04937408 100644
--- a/src/test/compile-fail/issue-39388.rs
+++ b/src/test/ui/issue-39388.rs
diff --git a/src/test/ui/issue-39388.stderr b/src/test/ui/issue-39388.stderr
new file mode 100644
index 00000000000..a38d38a51ad
--- /dev/null
+++ b/src/test/ui/issue-39388.stderr
@@ -0,0 +1,8 @@
+error: expected one of: `*`, `+`, or `?`
+  --> $DIR/issue-39388.rs:14:22
+   |
+LL |     (($($a:tt)*) = ($($b:tt))*) => { //~ ERROR expected one of: `*`, `+`, or `?`
+   |                      ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-39404.rs b/src/test/ui/issue-39404.rs
index 56bfe27a4ff..56bfe27a4ff 100644
--- a/src/test/compile-fail/issue-39404.rs
+++ b/src/test/ui/issue-39404.rs
diff --git a/src/test/ui/issue-39404.stderr b/src/test/ui/issue-39404.stderr
new file mode 100644
index 00000000000..435a03c2858
--- /dev/null
+++ b/src/test/ui/issue-39404.stderr
@@ -0,0 +1,12 @@
+error: missing fragment specifier
+  --> $DIR/issue-39404.rs:13:19
+   |
+LL | macro_rules! m { ($i) => {} }
+   |                   ^^
+   |
+   = note: #[deny(missing_fragment_specifier)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #40107 <https://github.com/rust-lang/rust/issues/40107>
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-39559-2.rs b/src/test/ui/issue-39559-2.rs
index f01fd1fd8f1..f01fd1fd8f1 100644
--- a/src/test/compile-fail/issue-39559-2.rs
+++ b/src/test/ui/issue-39559-2.rs
diff --git a/src/test/ui/issue-39559-2.stderr b/src/test/ui/issue-39559-2.stderr
new file mode 100644
index 00000000000..91520a7ec08
--- /dev/null
+++ b/src/test/ui/issue-39559-2.stderr
@@ -0,0 +1,30 @@
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-39559-2.rs:24:24
+   |
+LL |     let array: [usize; Dim3::dim()]
+   |                        ^^^^^^^^^^^
+
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-39559-2.rs:27:15
+   |
+LL |         = [0; Dim3::dim()];
+   |               ^^^^^^^^^^^
+
+error[E0080]: could not evaluate repeat length
+  --> $DIR/issue-39559-2.rs:27:15
+   |
+LL |         = [0; Dim3::dim()];
+   |               ^^^^^^^^^^^ calling non-const fn `<Dim3 as Dim>::dim`
+
+error[E0080]: could not evaluate constant expression
+  --> $DIR/issue-39559-2.rs:24:16
+   |
+LL |     let array: [usize; Dim3::dim()]
+   |                ^^^^^^^^-----------^
+   |                        |
+   |                        calling non-const fn `<Dim3 as Dim>::dim`
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0015, E0080.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-39559.rs b/src/test/ui/issue-39559.rs
index 2da21fb14bd..2da21fb14bd 100644
--- a/src/test/compile-fail/issue-39559.rs
+++ b/src/test/ui/issue-39559.rs
diff --git a/src/test/ui/issue-39559.stderr b/src/test/ui/issue-39559.stderr
new file mode 100644
index 00000000000..2ce6dfdbe44
--- /dev/null
+++ b/src/test/ui/issue-39559.stderr
@@ -0,0 +1,13 @@
+error[E0599]: no function or associated item named `dim` found for type `D` in the current scope
+  --> $DIR/issue-39559.rs:24:18
+   |
+LL |     entries: [T; D::dim()],
+   |                  ^^^^^^ function or associated item not found in `D`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+   = note: the following trait defines an item `dim`, perhaps you need to implement it:
+           candidate #1: `Dim`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-39616.rs b/src/test/ui/issue-39616.rs
index 13b4c0896e7..13b4c0896e7 100644
--- a/src/test/compile-fail/issue-39616.rs
+++ b/src/test/ui/issue-39616.rs
diff --git a/src/test/ui/issue-39616.stderr b/src/test/ui/issue-39616.stderr
new file mode 100644
index 00000000000..eebf47afb54
--- /dev/null
+++ b/src/test/ui/issue-39616.stderr
@@ -0,0 +1,14 @@
+error: expected type, found `0`
+  --> $DIR/issue-39616.rs:11:12
+   |
+LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0`
+   |            ^
+
+error: expected one of `)`, `,`, `->`, `where`, or `{`, found `]`
+  --> $DIR/issue-39616.rs:11:16
+   |
+LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0`
+   |                ^ expected one of `)`, `,`, `->`, `where`, or `{` here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-39687.rs b/src/test/ui/issue-39687.rs
index 404465e6a0f..404465e6a0f 100644
--- a/src/test/compile-fail/issue-39687.rs
+++ b/src/test/ui/issue-39687.rs
diff --git a/src/test/ui/issue-39687.stderr b/src/test/ui/issue-39687.stderr
new file mode 100644
index 00000000000..9f8d0910d87
--- /dev/null
+++ b/src/test/ui/issue-39687.stderr
@@ -0,0 +1,9 @@
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/issue-39687.rs:14:16
+   |
+LL |     <fn() as Fn()>::call;
+   |                ^^ associated type not allowed here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0229`.
diff --git a/src/test/compile-fail/issue-3973.rs b/src/test/ui/issue-3973.rs
index 67a934fccce..67a934fccce 100644
--- a/src/test/compile-fail/issue-3973.rs
+++ b/src/test/ui/issue-3973.rs
diff --git a/src/test/ui/issue-3973.stderr b/src/test/ui/issue-3973.stderr
new file mode 100644
index 00000000000..9be07614ec1
--- /dev/null
+++ b/src/test/ui/issue-3973.stderr
@@ -0,0 +1,22 @@
+error[E0407]: method `new` is not a member of trait `ToString_`
+  --> $DIR/issue-3973.rs:21:5
+   |
+LL | /     fn new(x: f64, y: f64) -> Point {
+LL | |     //~^ ERROR method `new` is not a member of trait `ToString_`
+LL | |         Point { x: x, y: y }
+LL | |     }
+   | |_____^ not a member of trait `ToString_`
+
+error[E0599]: no function or associated item named `new` found for type `Point` in the current scope
+  --> $DIR/issue-3973.rs:32:13
+   |
+LL | struct Point {
+   | ------------ function or associated item `new` not found for this
+...
+LL |     let p = Point::new(0.0, 0.0);
+   |             ^^^^^^^^^^ function or associated item not found in `Point`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0407, E0599.
+For more information about an error, try `rustc --explain E0407`.
diff --git a/src/test/compile-fail/issue-39848.rs b/src/test/ui/issue-39848.rs
index d5ca009d310..d5ca009d310 100644
--- a/src/test/compile-fail/issue-39848.rs
+++ b/src/test/ui/issue-39848.rs
diff --git a/src/test/ui/issue-39848.stderr b/src/test/ui/issue-39848.stderr
new file mode 100644
index 00000000000..9ca39dbaa34
--- /dev/null
+++ b/src/test/ui/issue-39848.stderr
@@ -0,0 +1,13 @@
+error: expected `{`, found `foo`
+  --> $DIR/issue-39848.rs:18:19
+   |
+LL |         if $tgt.has_$field() {}
+   |         --                 - help: try placing this code inside a block: `{ foo(); }`
+   |         |
+   |         this `if` statement has a condition, but no block
+...
+LL |     get_opt!(bar, foo);
+   |                   ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-3993.rs b/src/test/ui/issue-3993.rs
index fae5eb51272..fae5eb51272 100644
--- a/src/test/compile-fail/issue-3993.rs
+++ b/src/test/ui/issue-3993.rs
diff --git a/src/test/ui/issue-3993.stderr b/src/test/ui/issue-3993.stderr
new file mode 100644
index 00000000000..4b569f2dea9
--- /dev/null
+++ b/src/test/ui/issue-3993.stderr
@@ -0,0 +1,9 @@
+error[E0603]: function `fly` is private
+  --> $DIR/issue-3993.rs:11:5
+   |
+LL | use zoo::fly; //~ ERROR: function `fly` is private
+   |     ^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/src/test/compile-fail/issue-39970.rs b/src/test/ui/issue-39970.rs
index 65ea1baa4a1..65ea1baa4a1 100644
--- a/src/test/compile-fail/issue-39970.rs
+++ b/src/test/ui/issue-39970.rs
diff --git a/src/test/ui/issue-39970.stderr b/src/test/ui/issue-39970.stderr
new file mode 100644
index 00000000000..397d7b8e650
--- /dev/null
+++ b/src/test/ui/issue-39970.stderr
@@ -0,0 +1,18 @@
+error[E0271]: type mismatch resolving `for<'a> <() as Array<'a>>::Element == ()`
+  --> $DIR/issue-39970.rs:29:5
+   |
+LL |     <() as Visit>::visit();
+   |     ^^^^^^^^^^^^^^^^^^^^ expected &(), found ()
+   |
+   = note: expected type `&()`
+              found type `()`
+   = note: required because of the requirements on the impl of `Visit` for `()`
+note: required by `Visit::visit`
+  --> $DIR/issue-39970.rs:16:5
+   |
+LL |     fn visit() {}
+   |     ^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0271`.
diff --git a/src/test/compile-fail/issue-39974.rs b/src/test/ui/issue-39974.rs
index 6f6b775a2a3..6f6b775a2a3 100644
--- a/src/test/compile-fail/issue-39974.rs
+++ b/src/test/ui/issue-39974.rs
diff --git a/src/test/ui/issue-39974.stderr b/src/test/ui/issue-39974.stderr
new file mode 100644
index 00000000000..ddd149ccba8
--- /dev/null
+++ b/src/test/ui/issue-39974.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-39974.rs:14:19
+   |
+LL |     f: [[f64; 2]; LENGTH],
+   |                   ^^^^^^ expected usize, found f64
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-40000.rs b/src/test/ui/issue-40000.rs
index 7daf4bcbaa4..7daf4bcbaa4 100644
--- a/src/test/compile-fail/issue-40000.rs
+++ b/src/test/ui/issue-40000.rs
diff --git a/src/test/ui/issue-40000.stderr b/src/test/ui/issue-40000.stderr
new file mode 100644
index 00000000000..26e52a7ecdb
--- /dev/null
+++ b/src/test/ui/issue-40000.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-40000.rs:16:9
+   |
+LL |     foo(bar); //~ ERROR mismatched types
+   |         ^^^ expected concrete lifetime, found bound lifetime parameter
+   |
+   = note: expected type `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>`
+              found type `std::boxed::Box<dyn std::ops::Fn(_)>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-40288-2.nll.stderr b/src/test/ui/issue-40288-2.nll.stderr
new file mode 100644
index 00000000000..fcff5c6a8ed
--- /dev/null
+++ b/src/test/ui/issue-40288-2.nll.stderr
@@ -0,0 +1,55 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:17:20
+   |
+LL |         slice[0] = y;
+   |                    ^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:16:20
+   |
+LL |         let slice: &mut [_] = &mut out;
+   |                    ^^^^^^^^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:14:19
+   |
+LL |     let mut out = [x];
+   |                   ^^^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:32:20
+   |
+LL |         dst.head = y;
+   |                    ^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:31:18
+   |
+LL |         let dst: &mut Struct<_, [()]> = &mut out;
+   |                  ^^^^^^^^^^^^^^^^^^^^
+
+warning: not reporting region error due to nll
+  --> $DIR/issue-40288-2.rs:29:19
+   |
+LL |     let mut out = Struct { head: x, _tail: [()] };
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0621]: explicit lifetime required in the type of `y`
+  --> $DIR/issue-40288-2.rs:14:9
+   |
+LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
+   |                                                      - consider changing the type of `y` to `&'a T`
+LL |     let mut out = [x];
+   |         ^^^^^^^ lifetime `'a` required
+
+error[E0621]: explicit lifetime required in the type of `y`
+  --> $DIR/issue-40288-2.rs:29:9
+   |
+LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
+   |                                                       - consider changing the type of `y` to `&'a T`
+LL |     let mut out = Struct { head: x, _tail: [()] };
+   |         ^^^^^^^ lifetime `'a` required
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/compile-fail/issue-40288-2.rs b/src/test/ui/issue-40288-2.rs
index e16a7ecf6b9..e16a7ecf6b9 100644
--- a/src/test/compile-fail/issue-40288-2.rs
+++ b/src/test/ui/issue-40288-2.rs
diff --git a/src/test/ui/issue-40288-2.stderr b/src/test/ui/issue-40288-2.stderr
new file mode 100644
index 00000000000..d2313ef89a7
--- /dev/null
+++ b/src/test/ui/issue-40288-2.stderr
@@ -0,0 +1,21 @@
+error[E0621]: explicit lifetime required in the type of `y`
+  --> $DIR/issue-40288-2.rs:19:5
+   |
+LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
+   |                                                      - consider changing the type of `y` to `&'a T`
+...
+LL |     out[0]
+   |     ^^^^^^ lifetime `'a` required
+
+error[E0621]: explicit lifetime required in the type of `y`
+  --> $DIR/issue-40288-2.rs:34:5
+   |
+LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
+   |                                                       - consider changing the type of `y` to `&'a T`
+...
+LL |     out.head
+   |     ^^^^^^^^ lifetime `'a` required
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/ui/issue-40288.nll.stderr b/src/test/ui/issue-40288.nll.stderr
new file mode 100644
index 00000000000..bd4efa10f3d
--- /dev/null
+++ b/src/test/ui/issue-40288.nll.stderr
@@ -0,0 +1,15 @@
+error[E0506]: cannot assign to `*refr` because it is borrowed
+  --> $DIR/issue-40288.rs:26:5
+   |
+LL |     save_ref(&*refr, &mut out);
+   |              ------ borrow of `*refr` occurs here
+...
+LL |     *refr = 3; //~ ERROR cannot assign to `*refr` because it is borrowed
+   |     ^^^^^^^^^ assignment to borrowed `*refr` occurs here
+...
+LL |     println!("{:?}", out[0]);
+   |                      ------ borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/src/test/compile-fail/issue-40288.rs b/src/test/ui/issue-40288.rs
index b5418e85bec..b5418e85bec 100644
--- a/src/test/compile-fail/issue-40288.rs
+++ b/src/test/ui/issue-40288.rs
diff --git a/src/test/ui/issue-40288.stderr b/src/test/ui/issue-40288.stderr
new file mode 100644
index 00000000000..e69c3bc83a6
--- /dev/null
+++ b/src/test/ui/issue-40288.stderr
@@ -0,0 +1,12 @@
+error[E0506]: cannot assign to `*refr` because it is borrowed
+  --> $DIR/issue-40288.rs:26:5
+   |
+LL |     save_ref(&*refr, &mut out);
+   |               ----- borrow of `*refr` occurs here
+...
+LL |     *refr = 3; //~ ERROR cannot assign to `*refr` because it is borrowed
+   |     ^^^^^^^^^ assignment to borrowed `*refr` occurs here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/src/test/compile-fail/issue-40350.rs b/src/test/ui/issue-40350.rs
index 39249ee4718..39249ee4718 100644
--- a/src/test/compile-fail/issue-40350.rs
+++ b/src/test/ui/issue-40350.rs
diff --git a/src/test/ui/issue-40350.stderr b/src/test/ui/issue-40350.stderr
new file mode 100644
index 00000000000..ad85bf2a778
--- /dev/null
+++ b/src/test/ui/issue-40350.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-40350.rs:22:1
+   |
+LL | fn main() {}
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-40510-1.nll.stderr b/src/test/ui/issue-40510-1.nll.stderr
new file mode 100644
index 00000000000..73a8d58290d
--- /dev/null
+++ b/src/test/ui/issue-40510-1.nll.stderr
@@ -0,0 +1,17 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-40510-1.rs:18:9
+   |
+LL |        || {
+   |   _____-
+   |  |_____|
+   | ||
+LL | ||         &mut x
+   | ||         ^^^^^^ free region requires that `'1` must outlive `'2`
+LL | ||     };
+   | ||     -
+   | ||_____|
+   | |______lifetime `'1` represents the closure body
+   |        lifetime `'2` appears in return type
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-40510-1.rs b/src/test/ui/issue-40510-1.rs
index 142092ff41e..142092ff41e 100644
--- a/src/test/compile-fail/issue-40510-1.rs
+++ b/src/test/ui/issue-40510-1.rs
diff --git a/src/test/ui/issue-40510-1.stderr b/src/test/ui/issue-40510-1.stderr
new file mode 100644
index 00000000000..1f5a41fce96
--- /dev/null
+++ b/src/test/ui/issue-40510-1.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-40510-1.rs:23:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-40510-2.rs b/src/test/ui/issue-40510-2.rs
index 0fe56584822..0fe56584822 100644
--- a/src/test/compile-fail/issue-40510-2.rs
+++ b/src/test/ui/issue-40510-2.rs
diff --git a/src/test/ui/issue-40510-2.stderr b/src/test/ui/issue-40510-2.stderr
new file mode 100644
index 00000000000..03998af50c2
--- /dev/null
+++ b/src/test/ui/issue-40510-2.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-40510-2.rs:23:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-40510-3.nll.stderr b/src/test/ui/issue-40510-3.nll.stderr
new file mode 100644
index 00000000000..4133c69f031
--- /dev/null
+++ b/src/test/ui/issue-40510-3.nll.stderr
@@ -0,0 +1,20 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-40510-3.rs:18:9
+   |
+LL |         || {
+   |    _____-
+   |   |_____|
+   |  ||
+LL |  ||         || {
+   |  ||_________^
+LL | |||             x.push(())
+LL | |||         }
+   | |||_________^ free region requires that `'1` must outlive `'2`
+LL |  ||     };
+   |  ||     -
+   |  ||_____|
+   |  |______lifetime `'1` represents the closure body
+   |         lifetime `'2` appears in return type
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-40510-3.rs b/src/test/ui/issue-40510-3.rs
index afa8f15ee57..afa8f15ee57 100644
--- a/src/test/compile-fail/issue-40510-3.rs
+++ b/src/test/ui/issue-40510-3.rs
diff --git a/src/test/ui/issue-40510-3.stderr b/src/test/ui/issue-40510-3.stderr
new file mode 100644
index 00000000000..c77b5cc8303
--- /dev/null
+++ b/src/test/ui/issue-40510-3.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-40510-3.rs:25:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-40510-4.rs b/src/test/ui/issue-40510-4.rs
index a39c500225b..a39c500225b 100644
--- a/src/test/compile-fail/issue-40510-4.rs
+++ b/src/test/ui/issue-40510-4.rs
diff --git a/src/test/ui/issue-40510-4.stderr b/src/test/ui/issue-40510-4.stderr
new file mode 100644
index 00000000000..1f3cd00fb48
--- /dev/null
+++ b/src/test/ui/issue-40510-4.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-40510-4.rs:25:1
+   |
+LL | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-40610.rs b/src/test/ui/issue-40610.rs
index aec20b4ad87..aec20b4ad87 100644
--- a/src/test/compile-fail/issue-40610.rs
+++ b/src/test/ui/issue-40610.rs
diff --git a/src/test/ui/issue-40610.stderr b/src/test/ui/issue-40610.stderr
new file mode 100644
index 00000000000..faf1a4d1c38
--- /dev/null
+++ b/src/test/ui/issue-40610.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `+` cannot be applied to type `()`
+  --> $DIR/issue-40610.rs:14:5
+   |
+LL |     () + f(&[1.0]);
+   |     ^^^^^^^^^^^^^^
+   |
+   = note: an implementation of `std::ops::Add` might be missing for `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/compile-fail/issue-40749.rs b/src/test/ui/issue-40749.rs
index 261ed49d10c..261ed49d10c 100644
--- a/src/test/compile-fail/issue-40749.rs
+++ b/src/test/ui/issue-40749.rs
diff --git a/src/test/ui/issue-40749.stderr b/src/test/ui/issue-40749.stderr
new file mode 100644
index 00000000000..b76d469d116
--- /dev/null
+++ b/src/test/ui/issue-40749.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-40749.rs:12:9
+   |
+LL |     [0; ..10];
+   |         ^^^^ expected usize, found struct `std::ops::RangeTo`
+   |
+   = note: expected type `usize`
+              found type `std::ops::RangeTo<{integer}>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-40845.rs b/src/test/ui/issue-40845.rs
index c5604a0427b..c5604a0427b 100644
--- a/src/test/compile-fail/issue-40845.rs
+++ b/src/test/ui/issue-40845.rs
diff --git a/src/test/ui/issue-40845.stderr b/src/test/ui/issue-40845.stderr
new file mode 100644
index 00000000000..2e8f008a52d
--- /dev/null
+++ b/src/test/ui/issue-40845.stderr
@@ -0,0 +1,14 @@
+error: cannot find macro `m!` in this scope
+  --> $DIR/issue-40845.rs:14:10
+   |
+LL | impl S { m!(); } //~ ERROR cannot find macro `m!` in this scope
+   |          ^
+
+error: cannot find macro `m!` in this scope
+  --> $DIR/issue-40845.rs:11:11
+   |
+LL | trait T { m!(); } //~ ERROR cannot find macro `m!` in this scope
+   |           ^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-40861.rs b/src/test/ui/issue-40861.rs
index 75d58c58538..75d58c58538 100644
--- a/src/test/compile-fail/issue-40861.rs
+++ b/src/test/ui/issue-40861.rs
diff --git a/src/test/ui/issue-40861.stderr b/src/test/ui/issue-40861.stderr
new file mode 100644
index 00000000000..dbde40fb25e
--- /dev/null
+++ b/src/test/ui/issue-40861.stderr
@@ -0,0 +1,11 @@
+error[E0608]: cannot index into a value of type `()`
+  --> $DIR/issue-40861.rs:14:5
+   |
+LL |     ()[f(&[1.0])];
+   |     ^^^^^^^^^^^^^
+   |
+   = help: to access tuple elements, use tuple indexing syntax (e.g. `tuple.0`)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0608`.
diff --git a/src/test/ui/issue-41139.nll.stderr b/src/test/ui/issue-41139.nll.stderr
new file mode 100644
index 00000000000..3f79c66252a
--- /dev/null
+++ b/src/test/ui/issue-41139.nll.stderr
@@ -0,0 +1,9 @@
+error[E0161]: cannot move a value of type dyn Trait: the size of dyn Trait cannot be statically determined
+  --> $DIR/issue-41139.rs:16:23
+   |
+LL |     let t : &Trait = &get_function()();
+   |                       ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0161`.
diff --git a/src/test/compile-fail/issue-41139.rs b/src/test/ui/issue-41139.rs
index 0509a4387ba..0509a4387ba 100644
--- a/src/test/compile-fail/issue-41139.rs
+++ b/src/test/ui/issue-41139.rs
diff --git a/src/test/ui/issue-41139.stderr b/src/test/ui/issue-41139.stderr
new file mode 100644
index 00000000000..9d0e19df3f2
--- /dev/null
+++ b/src/test/ui/issue-41139.stderr
@@ -0,0 +1,9 @@
+error[E0161]: cannot move a value of type (dyn Trait + 'static): the size of (dyn Trait + 'static) cannot be statically determined
+  --> $DIR/issue-41139.rs:16:23
+   |
+LL |     let t : &Trait = &get_function()();
+   |                       ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0161`.
diff --git a/src/test/compile-fail/issue-41229-ref-str.rs b/src/test/ui/issue-41229-ref-str.rs
index 5d7546e1bc4..5d7546e1bc4 100644
--- a/src/test/compile-fail/issue-41229-ref-str.rs
+++ b/src/test/ui/issue-41229-ref-str.rs
diff --git a/src/test/ui/issue-41229-ref-str.stderr b/src/test/ui/issue-41229-ref-str.stderr
new file mode 100644
index 00000000000..889da66a4e8
--- /dev/null
+++ b/src/test/ui/issue-41229-ref-str.stderr
@@ -0,0 +1,12 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/issue-41229-ref-str.rs:11:28
+   |
+LL | pub fn example(ref s: str) {}
+   |                            ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `str`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-41255.rs b/src/test/ui/issue-41255.rs
index 29912de37eb..29912de37eb 100644
--- a/src/test/compile-fail/issue-41255.rs
+++ b/src/test/ui/issue-41255.rs
diff --git a/src/test/ui/issue-41255.stderr b/src/test/ui/issue-41255.stderr
new file mode 100644
index 00000000000..03100b6db76
--- /dev/null
+++ b/src/test/ui/issue-41255.stderr
@@ -0,0 +1,88 @@
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:20:9
+   |
+LL |         5.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |         ^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-41255.rs:15:11
+   |
+LL | #![forbid(illegal_floating_point_literal_pattern)]
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:22:9
+   |
+LL |         5.0f32 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |         ^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:24:10
+   |
+LL |         -5.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |          ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:26:9
+   |
+LL |         1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |         ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:26:16
+   |
+LL |         1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |                ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:30:9
+   |
+LL |         39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |         ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:30:18
+   |
+LL |         39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns
+   |                  ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:39:10
+   |
+LL |         (3.14, 1) => {}, //~ ERROR floating-point types cannot be used
+   |          ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-41255.rs:46:18
+   |
+LL |         Foo { x: 2.0 } => {}, //~ ERROR floating-point types cannot be used
+   |                  ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: aborting due to 9 previous errors
+
diff --git a/src/test/compile-fail/issue-41394.rs b/src/test/ui/issue-41394.rs
index 89f11edaec8..89f11edaec8 100644
--- a/src/test/compile-fail/issue-41394.rs
+++ b/src/test/ui/issue-41394.rs
diff --git a/src/test/ui/issue-41394.stderr b/src/test/ui/issue-41394.stderr
new file mode 100644
index 00000000000..9e4afb3b28a
--- /dev/null
+++ b/src/test/ui/issue-41394.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `+` cannot be applied to type `&str`
+  --> $DIR/issue-41394.rs:12:9
+   |
+LL |     A = "" + 1
+   |         ^^^^^^
+   |
+   = note: an implementation of `std::ops::Add` might be missing for `&str`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/ui/issue-41726.nll.stderr b/src/test/ui/issue-41726.nll.stderr
new file mode 100644
index 00000000000..feeb63e1ebb
--- /dev/null
+++ b/src/test/ui/issue-41726.nll.stderr
@@ -0,0 +1,9 @@
+error[E0596]: cannot borrow immutable item as mutable
+  --> $DIR/issue-41726.rs:15:9
+   |
+LL |         things[src.as_str()].sort(); //~ ERROR cannot borrow immutable
+   |         ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/compile-fail/issue-41726.rs b/src/test/ui/issue-41726.rs
index c8cd9209bce..c8cd9209bce 100644
--- a/src/test/compile-fail/issue-41726.rs
+++ b/src/test/ui/issue-41726.rs
diff --git a/src/test/ui/issue-41726.stderr b/src/test/ui/issue-41726.stderr
new file mode 100644
index 00000000000..172309537bf
--- /dev/null
+++ b/src/test/ui/issue-41726.stderr
@@ -0,0 +1,9 @@
+error[E0596]: cannot borrow immutable indexed content as mutable
+  --> $DIR/issue-41726.rs:15:9
+   |
+LL |         things[src.as_str()].sort(); //~ ERROR cannot borrow immutable
+   |         ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/compile-fail/issue-41742.rs b/src/test/ui/issue-41742.rs
index 067531e036a..067531e036a 100644
--- a/src/test/compile-fail/issue-41742.rs
+++ b/src/test/ui/issue-41742.rs
diff --git a/src/test/ui/issue-41742.stderr b/src/test/ui/issue-41742.stderr
new file mode 100644
index 00000000000..314b44f603a
--- /dev/null
+++ b/src/test/ui/issue-41742.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-41742.rs:34:7
+   |
+LL |     H["?"].f(); //~ ERROR mismatched types
+   |       ^^^ expected u32, found reference
+   |
+   = note: expected type `u32`
+              found type `&'static str`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-41776.rs b/src/test/ui/issue-41776.rs
index 5f108e0a1ed..5f108e0a1ed 100644
--- a/src/test/compile-fail/issue-41776.rs
+++ b/src/test/ui/issue-41776.rs
diff --git a/src/test/ui/issue-41776.stderr b/src/test/ui/issue-41776.stderr
new file mode 100644
index 00000000000..9742f091f04
--- /dev/null
+++ b/src/test/ui/issue-41776.stderr
@@ -0,0 +1,8 @@
+error: argument must be a string literal
+  --> $DIR/issue-41776.rs:12:14
+   |
+LL |     include!(line!()); //~ ERROR argument must be a string literal
+   |              ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-41880.rs b/src/test/ui/issue-41880.rs
index 23a2b78a769..23a2b78a769 100644
--- a/src/test/compile-fail/issue-41880.rs
+++ b/src/test/ui/issue-41880.rs
diff --git a/src/test/ui/issue-41880.stderr b/src/test/ui/issue-41880.stderr
new file mode 100644
index 00000000000..fa9fdbd8194
--- /dev/null
+++ b/src/test/ui/issue-41880.stderr
@@ -0,0 +1,12 @@
+error[E0599]: no method named `iter` found for type `Iterate<{integer}, [closure@$DIR/issue-41880.rs:36:24: 36:31]>` in the current scope
+  --> $DIR/issue-41880.rs:37:24
+   |
+LL | pub struct Iterate<T, F> {
+   | ------------------------ method `iter` not found for this
+...
+LL |     println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
+   |                        ^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-41974.rs b/src/test/ui/issue-41974.rs
index 5c9077783c7..5c9077783c7 100644
--- a/src/test/compile-fail/issue-41974.rs
+++ b/src/test/ui/issue-41974.rs
diff --git a/src/test/ui/issue-41974.stderr b/src/test/ui/issue-41974.stderr
new file mode 100644
index 00000000000..eca40ed4355
--- /dev/null
+++ b/src/test/ui/issue-41974.stderr
@@ -0,0 +1,29 @@
+error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `std::boxed::Box<_>`:
+  --> $DIR/issue-41974.rs:17:1
+   |
+LL | impl<T> Drop for T where T: A { //~ ERROR E0119
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: conflicting implementation in crate `alloc`:
+           - impl<T> std::ops::Drop for std::boxed::Box<T>
+             where T: ?Sized;
+   = note: downstream crates may implement trait `A` for type `std::boxed::Box<_>`
+
+error[E0120]: the Drop trait may only be implemented on structures
+  --> $DIR/issue-41974.rs:17:18
+   |
+LL | impl<T> Drop for T where T: A { //~ ERROR E0119
+   |                  ^ implementing Drop requires a struct
+
+error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`)
+  --> $DIR/issue-41974.rs:17:1
+   |
+LL | impl<T> Drop for T where T: A { //~ ERROR E0119
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
+   |
+   = note: only traits defined in the current crate can be implemented for a type parameter
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0119, E0120, E0210.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/src/test/compile-fail/issue-41998.rs b/src/test/ui/issue-41998.rs
index 406aadcd212..406aadcd212 100644
--- a/src/test/compile-fail/issue-41998.rs
+++ b/src/test/ui/issue-41998.rs
diff --git a/src/test/ui/issue-41998.stderr b/src/test/ui/issue-41998.stderr
new file mode 100644
index 00000000000..e757c7f3a44
--- /dev/null
+++ b/src/test/ui/issue-41998.stderr
@@ -0,0 +1,14 @@
+error: compilation successful
+  --> $DIR/issue-41998.rs:14:1
+   |
+LL | / fn main() { //~ ERROR compilation successful
+LL | |     if ('x' as char) < ('y' as char) {
+LL | |         print!("x");
+LL | |     } else {
+LL | |         print!("y");
+LL | |     }
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-4201.rs b/src/test/ui/issue-4201.rs
index b1f668d9c5e..b1f668d9c5e 100644
--- a/src/test/compile-fail/issue-4201.rs
+++ b/src/test/ui/issue-4201.rs
diff --git a/src/test/ui/issue-4201.stderr b/src/test/ui/issue-4201.stderr
new file mode 100644
index 00000000000..40de077ce76
--- /dev/null
+++ b/src/test/ui/issue-4201.stderr
@@ -0,0 +1,19 @@
+error[E0317]: if may be missing an else clause
+  --> $DIR/issue-4201.rs:14:12
+   |
+LL |       } else if false {
+   |  ____________^
+LL | | //~^ ERROR if may be missing an else clause
+LL | | //~| expected type `()`
+LL | | //~| found type `{integer}`
+LL | | //~| expected (), found integral variable
+LL | |         1
+LL | |     };
+   | |_____^ expected (), found integral variable
+   |
+   = note: expected type `()`
+              found type `{integer}`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0317`.
diff --git a/src/test/compile-fail/issue-42312.rs b/src/test/ui/issue-42312.rs
index f7705297dfd..f7705297dfd 100644
--- a/src/test/compile-fail/issue-42312.rs
+++ b/src/test/ui/issue-42312.rs
diff --git a/src/test/ui/issue-42312.stderr b/src/test/ui/issue-42312.stderr
new file mode 100644
index 00000000000..ae6496c037a
--- /dev/null
+++ b/src/test/ui/issue-42312.stderr
@@ -0,0 +1,22 @@
+error[E0277]: the size for values of type `<Self as std::ops::Deref>::Target` cannot be known at compilation time
+  --> $DIR/issue-42312.rs:14:29
+   |
+LL |     fn baz(_: Self::Target) where Self: Deref {}
+   |                             ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `<Self as std::ops::Deref>::Target`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = help: consider adding a `where <Self as std::ops::Deref>::Target: std::marker::Sized` bound
+
+error[E0277]: the size for values of type `(dyn std::string::ToString + 'static)` cannot be known at compilation time
+  --> $DIR/issue-42312.rs:18:23
+   |
+LL | pub fn f(_: ToString) {}
+   |                       ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::string::ToString + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/issue-42344.nll.stderr b/src/test/ui/issue-42344.nll.stderr
new file mode 100644
index 00000000000..02f6ffe1734
--- /dev/null
+++ b/src/test/ui/issue-42344.nll.stderr
@@ -0,0 +1,9 @@
+error[E0596]: cannot borrow immutable item `*TAB[..]` as mutable
+  --> $DIR/issue-42344.rs:14:5
+   |
+LL |     TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389]
+   |     ^^^^^^ cannot borrow as mutable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/compile-fail/issue-42344.rs b/src/test/ui/issue-42344.rs
index 2f11ff402be..2f11ff402be 100644
--- a/src/test/compile-fail/issue-42344.rs
+++ b/src/test/ui/issue-42344.rs
diff --git a/src/test/ui/issue-42344.stderr b/src/test/ui/issue-42344.stderr
new file mode 100644
index 00000000000..92bbe70d9ce
--- /dev/null
+++ b/src/test/ui/issue-42344.stderr
@@ -0,0 +1,9 @@
+error[E0389]: cannot borrow data mutably in a `&` reference
+  --> $DIR/issue-42344.rs:14:5
+   |
+LL |     TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389]
+   |     ^^^^^^ assignment into an immutable reference
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0389`.
diff --git a/src/test/compile-fail/issue-4265.rs b/src/test/ui/issue-4265.rs
index 62db68dcbb2..62db68dcbb2 100644
--- a/src/test/compile-fail/issue-4265.rs
+++ b/src/test/ui/issue-4265.rs
diff --git a/src/test/ui/issue-4265.stderr b/src/test/ui/issue-4265.stderr
new file mode 100644
index 00000000000..8f22c6757c2
--- /dev/null
+++ b/src/test/ui/issue-4265.stderr
@@ -0,0 +1,15 @@
+error[E0201]: duplicate definitions with name `bar`:
+  --> $DIR/issue-4265.rs:20:5
+   |
+LL | /     fn bar() {
+LL | |         Foo { baz: 0 }.bar();
+LL | |     }
+   | |_____- previous definition of `bar` here
+LL | 
+LL | /     fn bar() { //~ ERROR duplicate definitions
+LL | |     }
+   | |_____^ duplicate definition
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0201`.
diff --git a/src/test/compile-fail/issue-42755.rs b/src/test/ui/issue-42755.rs
index 7547c4a17be..7547c4a17be 100644
--- a/src/test/compile-fail/issue-42755.rs
+++ b/src/test/ui/issue-42755.rs
diff --git a/src/test/ui/issue-42755.stderr b/src/test/ui/issue-42755.stderr
new file mode 100644
index 00000000000..91439061996
--- /dev/null
+++ b/src/test/ui/issue-42755.stderr
@@ -0,0 +1,13 @@
+error: repetition matches empty token tree
+  --> $DIR/issue-42755.rs:14:7
+   |
+LL |     ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
+   |       ^^^^^^^^
+
+error[E0601]: `main` function not found in crate `issue_42755`
+   |
+   = note: consider adding a `main` function to `$DIR/issue-42755.rs`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/src/test/ui/issue-42796.nll.stderr b/src/test/ui/issue-42796.nll.stderr
new file mode 100644
index 00000000000..fda7cf9ae8e
--- /dev/null
+++ b/src/test/ui/issue-42796.nll.stderr
@@ -0,0 +1,14 @@
+error[E0382]: borrow of moved value: `s`
+  --> $DIR/issue-42796.rs:28:20
+   |
+LL |     let mut s_copy = s;
+   |                      - value moved here
+...
+LL |     println!("{}", s); //~ ERROR use of moved value
+   |                    ^ value borrowed here after move
+   |
+   = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-42796.rs b/src/test/ui/issue-42796.rs
index b07c23c3fc7..b07c23c3fc7 100644
--- a/src/test/compile-fail/issue-42796.rs
+++ b/src/test/ui/issue-42796.rs
diff --git a/src/test/ui/issue-42796.stderr b/src/test/ui/issue-42796.stderr
new file mode 100644
index 00000000000..9c2481b2f90
--- /dev/null
+++ b/src/test/ui/issue-42796.stderr
@@ -0,0 +1,14 @@
+error[E0382]: use of moved value: `s`
+  --> $DIR/issue-42796.rs:28:20
+   |
+LL |     let mut s_copy = s;
+   |         ---------- value moved here
+...
+LL |     println!("{}", s); //~ ERROR use of moved value
+   |                    ^ value used here after move
+   |
+   = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/compile-fail/issue-42880.rs b/src/test/ui/issue-42880.rs
index ebb1ec425d1..ebb1ec425d1 100644
--- a/src/test/compile-fail/issue-42880.rs
+++ b/src/test/ui/issue-42880.rs
diff --git a/src/test/ui/issue-42880.stderr b/src/test/ui/issue-42880.stderr
new file mode 100644
index 00000000000..cf1c3022a22
--- /dev/null
+++ b/src/test/ui/issue-42880.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope
+  --> $DIR/issue-42880.rs:14:15
+   |
+LL |     let f = |&Value::String(_)| (); //~ ERROR no associated item named
+   |               ^^^^^^^^^^^^^^^^ associated item not found in `std::string::String`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-43023.rs b/src/test/ui/issue-43023.rs
index 6a5f7a1136a..6a5f7a1136a 100644
--- a/src/test/compile-fail/issue-43023.rs
+++ b/src/test/ui/issue-43023.rs
diff --git a/src/test/ui/issue-43023.stderr b/src/test/ui/issue-43023.stderr
new file mode 100644
index 00000000000..2aa1efa9ca8
--- /dev/null
+++ b/src/test/ui/issue-43023.stderr
@@ -0,0 +1,20 @@
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43023.rs:14:5
+   |
+LL |     #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
+   |     ^^^^^^^^^^^^^^^^
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43023.rs:21:5
+   |
+LL |     #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
+   |     ^^^^^^^^^^^^^^^^
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43023.rs:26:5
+   |
+LL |     #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/issue-43105.rs b/src/test/ui/issue-43105.rs
index 8a0471135af..8a0471135af 100644
--- a/src/test/compile-fail/issue-43105.rs
+++ b/src/test/ui/issue-43105.rs
diff --git a/src/test/ui/issue-43105.stderr b/src/test/ui/issue-43105.stderr
new file mode 100644
index 00000000000..18da9310503
--- /dev/null
+++ b/src/test/ui/issue-43105.stderr
@@ -0,0 +1,19 @@
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-43105.rs:13:17
+   |
+LL | const NUM: u8 = xyz();
+   |                 ^^^^^
+
+error[E0080]: could not evaluate constant pattern
+  --> $DIR/issue-43105.rs:18:9
+   |
+LL | const NUM: u8 = xyz();
+   |                 ----- calling non-const fn `xyz`
+...
+LL |         NUM => unimplemented!(),
+   |         ^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0015, E0080.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-43162.rs b/src/test/ui/issue-43162.rs
index b236283f757..b236283f757 100644
--- a/src/test/compile-fail/issue-43162.rs
+++ b/src/test/ui/issue-43162.rs
diff --git a/src/test/ui/issue-43162.stderr b/src/test/ui/issue-43162.stderr
new file mode 100644
index 00000000000..4b3b4638f26
--- /dev/null
+++ b/src/test/ui/issue-43162.stderr
@@ -0,0 +1,30 @@
+error[E0268]: `break` outside of loop
+  --> $DIR/issue-43162.rs:13:5
+   |
+LL |     break true; //~ ERROR E0268
+   |     ^^^^^^^^^^ cannot break outside of a loop
+
+error[E0268]: `break` outside of loop
+  --> $DIR/issue-43162.rs:17:5
+   |
+LL |     break {}; //~ ERROR E0268
+   |     ^^^^^^^^ cannot break outside of a loop
+
+error[E0308]: mismatched types
+  --> $DIR/issue-43162.rs:11:18
+   |
+LL |   fn foo() -> bool {
+   |  __________________^
+LL | |     //~^ ERROR E0308
+LL | |     break true; //~ ERROR E0268
+   | |               - help: consider removing this semicolon
+LL | | }
+   | |_^ expected bool, found ()
+   |
+   = note: expected type `bool`
+              found type `()`
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0268, E0308.
+For more information about an error, try `rustc --explain E0268`.
diff --git a/src/test/compile-fail/issue-4321.rs b/src/test/ui/issue-4321.rs
index d589680b0ec..d589680b0ec 100644
--- a/src/test/compile-fail/issue-4321.rs
+++ b/src/test/ui/issue-4321.rs
diff --git a/src/test/ui/issue-4321.stderr b/src/test/ui/issue-4321.stderr
new file mode 100644
index 00000000000..db52cd557f1
--- /dev/null
+++ b/src/test/ui/issue-4321.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `(true, false)` not covered
+  --> $DIR/issue-4321.rs:13:31
+   |
+LL |     println!("foo {:}", match tup { //~ ERROR non-exhaustive patterns: `(true, false)` not covered
+   |                               ^^^ pattern `(true, false)` not covered
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/compile-fail/issue-43250.rs b/src/test/ui/issue-43250.rs
index e1d34f339dc..e1d34f339dc 100644
--- a/src/test/compile-fail/issue-43250.rs
+++ b/src/test/ui/issue-43250.rs
diff --git a/src/test/ui/issue-43250.stderr b/src/test/ui/issue-43250.stderr
new file mode 100644
index 00000000000..a05d4d41cc7
--- /dev/null
+++ b/src/test/ui/issue-43250.stderr
@@ -0,0 +1,14 @@
+error: arbitrary expressions aren't allowed in patterns
+  --> $DIR/issue-43250.rs:19:8
+   |
+LL |     m!(y);
+   |        ^
+
+error: arbitrary expressions aren't allowed in patterns
+  --> $DIR/issue-43250.rs:21:8
+   |
+LL |     m!(C);
+   |        ^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-43355.rs b/src/test/ui/issue-43355.rs
index d793a78799a..d793a78799a 100644
--- a/src/test/compile-fail/issue-43355.rs
+++ b/src/test/ui/issue-43355.rs
diff --git a/src/test/ui/issue-43355.stderr b/src/test/ui/issue-43355.stderr
new file mode 100644
index 00000000000..dbcf1b52b89
--- /dev/null
+++ b/src/test/ui/issue-43355.stderr
@@ -0,0 +1,16 @@
+error: conflicting implementations of trait `Trait1<std::boxed::Box<_>>` for type `A`: (E0119)
+  --> $DIR/issue-43355.rs:23:1
+   |
+LL | impl<X, T> Trait1<X> for T where T: Trait2<X> {
+   | --------------------------------------------- first implementation here
+...
+LL | impl<X> Trait1<Box<X>> for A {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A`
+   |
+   = note: #[deny(incoherent_fundamental_impls)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #46205 <https://github.com/rust-lang/rust/issues/46205>
+   = note: downstream crates may implement trait `Trait2<std::boxed::Box<_>>` for type `A`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-43424.rs b/src/test/ui/issue-43424.rs
index 431fc8a5aa2..431fc8a5aa2 100644
--- a/src/test/compile-fail/issue-43424.rs
+++ b/src/test/ui/issue-43424.rs
diff --git a/src/test/ui/issue-43424.stderr b/src/test/ui/issue-43424.stderr
new file mode 100644
index 00000000000..3a9a3164703
--- /dev/null
+++ b/src/test/ui/issue-43424.stderr
@@ -0,0 +1,8 @@
+error: unexpected generic arguments in path
+  --> $DIR/issue-43424.rs:20:4
+   |
+LL | m!(inline<u8>); //~ ERROR: unexpected generic arguments in path
+   |    ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-43431.rs b/src/test/ui/issue-43431.rs
index 1e6366e068a..1e6366e068a 100644
--- a/src/test/compile-fail/issue-43431.rs
+++ b/src/test/ui/issue-43431.rs
diff --git a/src/test/ui/issue-43431.stderr b/src/test/ui/issue-43431.stderr
new file mode 100644
index 00000000000..3eb8fac6c0f
--- /dev/null
+++ b/src/test/ui/issue-43431.stderr
@@ -0,0 +1,9 @@
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/issue-43431.rs:19:27
+   |
+LL |         <Self as Fn(A) -> B>::call(self, (a,))
+   |                           ^ associated type not allowed here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0229`.
diff --git a/src/test/compile-fail/issue-4366-2.rs b/src/test/ui/issue-4366-2.rs
index 33abc196a6b..33abc196a6b 100644
--- a/src/test/compile-fail/issue-4366-2.rs
+++ b/src/test/ui/issue-4366-2.rs
diff --git a/src/test/ui/issue-4366-2.stderr b/src/test/ui/issue-4366-2.stderr
new file mode 100644
index 00000000000..1c9a9eb25c3
--- /dev/null
+++ b/src/test/ui/issue-4366-2.stderr
@@ -0,0 +1,26 @@
+error[E0412]: cannot find type `bar` in this scope
+  --> $DIR/issue-4366-2.rs:25:21
+   |
+LL |         fn sub() -> bar { 1 }
+   |                     ^^^ not found in this scope
+help: possible candidate is found in another module, you can import it into scope
+   |
+LL |         use a::b::bar;
+   |
+
+error[E0423]: expected function, found module `foo`
+  --> $DIR/issue-4366-2.rs:35:5
+   |
+LL |     foo(); //~ ERROR expected function, found module `foo`
+   |     ^^^ not a function
+help: possible better candidates are found in other modules, you can import them into scope
+   |
+LL | use foo::foo;
+   |
+LL | use m1::foo;
+   |
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0412, E0423.
+For more information about an error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-4366.rs b/src/test/ui/issue-4366.rs
index 47fd426592c..47fd426592c 100644
--- a/src/test/compile-fail/issue-4366.rs
+++ b/src/test/ui/issue-4366.rs
diff --git a/src/test/ui/issue-4366.stderr b/src/test/ui/issue-4366.stderr
new file mode 100644
index 00000000000..e78aec9d0e8
--- /dev/null
+++ b/src/test/ui/issue-4366.stderr
@@ -0,0 +1,15 @@
+error[E0425]: cannot find function `foo` in this scope
+  --> $DIR/issue-4366.rs:28:29
+   |
+LL |         fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
+   |                             ^^^ not found in this scope
+help: possible candidates are found in other modules, you can import them into scope
+   |
+LL |         use foo::foo;
+   |
+LL |         use m1::foo;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-43733.rs b/src/test/ui/issue-43733.rs
index 7b1364ff41c..7b1364ff41c 100644
--- a/src/test/compile-fail/issue-43733.rs
+++ b/src/test/ui/issue-43733.rs
diff --git a/src/test/ui/issue-43733.stderr b/src/test/ui/issue-43733.stderr
new file mode 100644
index 00000000000..5f91d3d2266
--- /dev/null
+++ b/src/test/ui/issue-43733.stderr
@@ -0,0 +1,19 @@
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+  --> $DIR/issue-43733.rs:30:5
+   |
+LL |     __KEY.get() //~ ERROR call to unsafe function is unsafe
+   |     ^^^^^^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+  --> $DIR/issue-43733.rs:34:5
+   |
+LL |     std::thread::LocalKey::new(__getit, Default::default);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/compile-fail/issue-43784-associated-type.rs b/src/test/ui/issue-43784-associated-type.rs
index 94b5c0034a7..94b5c0034a7 100644
--- a/src/test/compile-fail/issue-43784-associated-type.rs
+++ b/src/test/ui/issue-43784-associated-type.rs
diff --git a/src/test/ui/issue-43784-associated-type.stderr b/src/test/ui/issue-43784-associated-type.stderr
new file mode 100644
index 00000000000..798d8c66016
--- /dev/null
+++ b/src/test/ui/issue-43784-associated-type.stderr
@@ -0,0 +1,16 @@
+error[E0601]: `main` function not found in crate `issue_43784_associated_type`
+   |
+   = note: consider adding a `main` function to `$DIR/issue-43784-associated-type.rs`
+
+error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
+  --> $DIR/issue-43784-associated-type.rs:23:9
+   |
+LL | impl<T> Complete for T { //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied
+   |         ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
+   |
+   = help: consider adding a `where T: std::marker::Copy` bound
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0277, E0601.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-43784-supertrait.rs b/src/test/ui/issue-43784-supertrait.rs
index e70df113da3..e70df113da3 100644
--- a/src/test/compile-fail/issue-43784-supertrait.rs
+++ b/src/test/ui/issue-43784-supertrait.rs
diff --git a/src/test/ui/issue-43784-supertrait.stderr b/src/test/ui/issue-43784-supertrait.stderr
new file mode 100644
index 00000000000..8646b315abd
--- /dev/null
+++ b/src/test/ui/issue-43784-supertrait.stderr
@@ -0,0 +1,16 @@
+error[E0601]: `main` function not found in crate `issue_43784_supertrait`
+   |
+   = note: consider adding a `main` function to `$DIR/issue-43784-supertrait.rs`
+
+error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
+  --> $DIR/issue-43784-supertrait.rs:18:9
+   |
+LL | impl<T> Complete for T {} //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied
+   |         ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
+   |
+   = help: consider adding a `where T: std::marker::Copy` bound
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0277, E0601.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-43925.rs b/src/test/ui/issue-43925.rs
index 8ad57647290..8ad57647290 100644
--- a/src/test/compile-fail/issue-43925.rs
+++ b/src/test/ui/issue-43925.rs
diff --git a/src/test/ui/issue-43925.stderr b/src/test/ui/issue-43925.stderr
new file mode 100644
index 00000000000..995289aec01
--- /dev/null
+++ b/src/test/ui/issue-43925.stderr
@@ -0,0 +1,8 @@
+error: invalid argument for `cfg(..)`
+  --> $DIR/issue-43925.rs:13:24
+   |
+LL | #[link(name="foo", cfg("rlib"))] //~ ERROR invalid argument for `cfg(..)`
+   |                        ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-43926.rs b/src/test/ui/issue-43926.rs
index 5d510b643a3..5d510b643a3 100644
--- a/src/test/compile-fail/issue-43926.rs
+++ b/src/test/ui/issue-43926.rs
diff --git a/src/test/ui/issue-43926.stderr b/src/test/ui/issue-43926.stderr
new file mode 100644
index 00000000000..9719a87b31b
--- /dev/null
+++ b/src/test/ui/issue-43926.stderr
@@ -0,0 +1,8 @@
+error: `cfg()` must have an argument
+  --> $DIR/issue-43926.rs:11:1
+   |
+LL | #[link(name="foo", cfg())] //~ ERROR `cfg()` must have an argument
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-43988.rs b/src/test/ui/issue-43988.rs
index 6361af76482..6361af76482 100644
--- a/src/test/compile-fail/issue-43988.rs
+++ b/src/test/ui/issue-43988.rs
diff --git a/src/test/ui/issue-43988.stderr b/src/test/ui/issue-43988.stderr
new file mode 100644
index 00000000000..7237851f778
--- /dev/null
+++ b/src/test/ui/issue-43988.stderr
@@ -0,0 +1,79 @@
+warning: `repr` attribute must have a hint
+  --> $DIR/issue-43988.rs:34:5
+   |
+LL |     #[repr]
+   |     ^^^^^^^ needs a hint
+   |
+   = note: #[warn(bad_repr)] on by default
+   = help: valid hints include `#[repr(C)]`, `#[repr(packed)]`, `#[repr(rust)]` and `#[repr(transparent)]`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html>
+
+warning: `repr` attribute must have a hint
+  --> $DIR/issue-43988.rs:46:14
+   |
+LL |     let _z = #[repr] 1;
+   |              ^^^^^^^ needs a hint
+   |
+   = help: valid hints include `#[repr(C)]`, `#[repr(packed)]`, `#[repr(rust)]` and `#[repr(transparent)]`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html>
+
+error[E0518]: attribute should be applied to function or closure
+  --> $DIR/issue-43988.rs:15:5
+   |
+LL |     #[inline]
+   |     ^^^^^^^^^
+LL |     let _a = 4;
+   |     ----------- not a function or closure
+
+error[E0518]: attribute should be applied to function or closure
+  --> $DIR/issue-43988.rs:20:5
+   |
+LL |     #[inline(XYZ)]
+   |     ^^^^^^^^^^^^^^
+LL |     let _b = 4;
+   |     ----------- not a function or closure
+
+error[E0517]: attribute should not be applied to a statement
+  --> $DIR/issue-43988.rs:24:5
+   |
+LL |     #[repr(nothing)]
+   |     ^^^^^^^^^^^^^^^^
+LL |     let _x = 0;
+   |     ----------- not a struct, enum or union
+
+error[E0517]: attribute should not be applied to an expression
+  --> $DIR/issue-43988.rs:28:5
+   |
+LL |       #[repr(something_not_real)]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | /     loop {
+LL | |         ()
+LL | |     };
+   | |_____- not defining a struct, enum or union
+
+error[E0517]: attribute should not be applied to a statement
+  --> $DIR/issue-43988.rs:34:5
+   |
+LL |     #[repr]
+   |     ^^^^^^^
+LL |     let _y = "123";
+   |     --------------- not a struct, enum or union
+
+error[E0518]: attribute should be applied to function or closure
+  --> $DIR/issue-43988.rs:42:5
+   |
+LL |     #[inline(ABC)]
+   |     ^^^^^^^^^^^^^^
+LL |     foo();
+   |     ----- not a function or closure
+
+error[E0517]: attribute should not be applied to an expression
+  --> $DIR/issue-43988.rs:46:14
+   |
+LL |     let _z = #[repr] 1;
+   |              ^^^^^^^ - not defining a struct, enum or union
+
+error: aborting due to 7 previous errors
+
+Some errors occurred: E0517, E0518.
+For more information about an error, try `rustc --explain E0517`.
diff --git a/src/test/compile-fail/issue-44021.rs b/src/test/ui/issue-44021.rs
index b6ec21b94c7..b6ec21b94c7 100644
--- a/src/test/compile-fail/issue-44021.rs
+++ b/src/test/ui/issue-44021.rs
diff --git a/src/test/ui/issue-44021.stderr b/src/test/ui/issue-44021.stderr
new file mode 100644
index 00000000000..2c74531cf24
--- /dev/null
+++ b/src/test/ui/issue-44021.stderr
@@ -0,0 +1,8 @@
+error: expected one of `:`, `@`, or `|`, found `}`
+  --> $DIR/issue-44021.rs:13:18
+   |
+LL |     fn f() {|x, y} //~ ERROR expected one of `:`, `@`, or `|`, found `}`
+   |                  ^ expected one of `:`, `@`, or `|` here
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-44239.rs b/src/test/ui/issue-44239.rs
index 131c6526642..131c6526642 100644
--- a/src/test/compile-fail/issue-44239.rs
+++ b/src/test/ui/issue-44239.rs
diff --git a/src/test/ui/issue-44239.stderr b/src/test/ui/issue-44239.stderr
new file mode 100644
index 00000000000..43d4968a89f
--- /dev/null
+++ b/src/test/ui/issue-44239.stderr
@@ -0,0 +1,9 @@
+error[E0435]: attempt to use a non-constant value in a constant
+  --> $DIR/issue-44239.rs:16:26
+   |
+LL |         const N: usize = n;
+   |                          ^ non-constant value
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0435`.
diff --git a/src/test/compile-fail/issue-44373.rs b/src/test/ui/issue-44373.rs
index d744ad11c5c..d744ad11c5c 100644
--- a/src/test/compile-fail/issue-44373.rs
+++ b/src/test/ui/issue-44373.rs
diff --git a/src/test/ui/issue-44373.stderr b/src/test/ui/issue-44373.stderr
new file mode 100644
index 00000000000..17a634ba747
--- /dev/null
+++ b/src/test/ui/issue-44373.stderr
@@ -0,0 +1,13 @@
+error[E0597]: borrowed value does not live long enough
+  --> $DIR/issue-44373.rs:15:42
+   |
+LL |     let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR borrowed value does not live long enough
+   |                                          ^^^^^^ temporary value does not live long enough
+LL | }
+   | - temporary value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-44415.rs b/src/test/ui/issue-44415.rs
index ecaf326b050..5d295510844 100644
--- a/src/test/compile-fail/issue-44415.rs
+++ b/src/test/ui/issue-44415.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: cycle detected when computing layout of
+//~^^^^^^^^^^ ERROR cycle detected when computing layout of
 
 #![feature(const_fn)]
 #![feature(core_intrinsics)]
diff --git a/src/test/ui/issue-44415.stderr b/src/test/ui/issue-44415.stderr
new file mode 100644
index 00000000000..ac2072c513e
--- /dev/null
+++ b/src/test/ui/issue-44415.stderr
@@ -0,0 +1,18 @@
+error[E0391]: cycle detected when computing layout of `Foo`
+   |
+note: ...which requires normalizing `ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: [u8; _] }`...
+note: ...which requires const-evaluating `Foo::bytes::{{constant}}`...
+  --> $DIR/issue-44415.rs:19:26
+   |
+LL |     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which again requires computing layout of `Foo`, completing the cycle
+note: cycle used when const-evaluating `Foo::bytes::{{constant}}`
+  --> $DIR/issue-44415.rs:19:26
+   |
+LL |     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/compile-fail/issue-45087-unreachable-unsafe.rs b/src/test/ui/issue-45087-unreachable-unsafe.rs
index 5af0bf6be56..5af0bf6be56 100644
--- a/src/test/compile-fail/issue-45087-unreachable-unsafe.rs
+++ b/src/test/ui/issue-45087-unreachable-unsafe.rs
diff --git a/src/test/ui/issue-45087-unreachable-unsafe.stderr b/src/test/ui/issue-45087-unreachable-unsafe.stderr
new file mode 100644
index 00000000000..8a967838bc3
--- /dev/null
+++ b/src/test/ui/issue-45087-unreachable-unsafe.stderr
@@ -0,0 +1,11 @@
+error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
+  --> $DIR/issue-45087-unreachable-unsafe.rs:13:5
+   |
+LL |     *(1 as *mut u32) = 42;
+   |     ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
+   |
+   = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/compile-fail/issue-4517.rs b/src/test/ui/issue-4517.rs
index fbd8972cbfa..fbd8972cbfa 100644
--- a/src/test/compile-fail/issue-4517.rs
+++ b/src/test/ui/issue-4517.rs
diff --git a/src/test/ui/issue-4517.stderr b/src/test/ui/issue-4517.stderr
new file mode 100644
index 00000000000..ca96c396fd0
--- /dev/null
+++ b/src/test/ui/issue-4517.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-4517.rs:15:9
+   |
+LL |     bar(foo);
+   |         ^^^ expected usize, found array of 4 elements
+   |
+   = note: expected type `usize`
+              found type `[u8; 4]`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-45199.ast.nll.stderr b/src/test/ui/issue-45199.ast.nll.stderr
new file mode 100644
index 00000000000..ce39776252b
--- /dev/null
+++ b/src/test/ui/issue-45199.ast.nll.stderr
@@ -0,0 +1,36 @@
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:19:5
+   |
+LL |     let b: Box<isize>;
+   |         - consider changing this to `mut b`
+LL |     //[mir]~^ NOTE consider changing this to `mut b`
+LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
+   |     - first assignment to `b`
+LL |                         //[mir]~^ NOTE first assignment
+LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:29:5
+   |
+LL |     let b = Box::new(1);    //[ast]~ NOTE first assignment
+   |         -
+   |         |
+   |         first assignment to `b`
+   |         consider changing this to `mut b`
+...
+LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign to immutable argument `b`
+  --> $DIR/issue-45199.rs:37:5
+   |
+LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
+   |              - consider changing this to `mut b`
+LL |                                 //[mir]~^ NOTE consider changing this to `mut b`
+LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign to immutable argument
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0384`.
diff --git a/src/test/ui/issue-45199.ast.stderr b/src/test/ui/issue-45199.ast.stderr
new file mode 100644
index 00000000000..ff8f78b5116
--- /dev/null
+++ b/src/test/ui/issue-45199.ast.stderr
@@ -0,0 +1,30 @@
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:19:5
+   |
+LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
+   |     --------------- first assignment to `b`
+LL |                         //[mir]~^ NOTE first assignment
+LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:29:5
+   |
+LL |     let b = Box::new(1);    //[ast]~ NOTE first assignment
+   |         - first assignment to `b`
+...
+LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:37:5
+   |
+LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
+   |              - first assignment to `b`
+LL |                                 //[mir]~^ NOTE consider changing this to `mut b`
+LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0384`.
diff --git a/src/test/ui/issue-45199.mir.stderr b/src/test/ui/issue-45199.mir.stderr
new file mode 100644
index 00000000000..ce39776252b
--- /dev/null
+++ b/src/test/ui/issue-45199.mir.stderr
@@ -0,0 +1,36 @@
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:19:5
+   |
+LL |     let b: Box<isize>;
+   |         - consider changing this to `mut b`
+LL |     //[mir]~^ NOTE consider changing this to `mut b`
+LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
+   |     - first assignment to `b`
+LL |                         //[mir]~^ NOTE first assignment
+LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `b`
+  --> $DIR/issue-45199.rs:29:5
+   |
+LL |     let b = Box::new(1);    //[ast]~ NOTE first assignment
+   |         -
+   |         |
+   |         first assignment to `b`
+   |         consider changing this to `mut b`
+...
+LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign to immutable argument `b`
+  --> $DIR/issue-45199.rs:37:5
+   |
+LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
+   |              - consider changing this to `mut b`
+LL |                                 //[mir]~^ NOTE consider changing this to `mut b`
+LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
+   |     ^ cannot assign to immutable argument
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0384`.
diff --git a/src/test/compile-fail/issue-45199.rs b/src/test/ui/issue-45199.rs
index 61e19ffc0d2..61e19ffc0d2 100644
--- a/src/test/compile-fail/issue-45199.rs
+++ b/src/test/ui/issue-45199.rs
diff --git a/src/test/compile-fail/issue-45729-unsafe-in-generator.rs b/src/test/ui/issue-45729-unsafe-in-generator.rs
index b42ced07583..b42ced07583 100644
--- a/src/test/compile-fail/issue-45729-unsafe-in-generator.rs
+++ b/src/test/ui/issue-45729-unsafe-in-generator.rs
diff --git a/src/test/ui/issue-45729-unsafe-in-generator.stderr b/src/test/ui/issue-45729-unsafe-in-generator.stderr
new file mode 100644
index 00000000000..3fad5209fd5
--- /dev/null
+++ b/src/test/ui/issue-45729-unsafe-in-generator.stderr
@@ -0,0 +1,11 @@
+error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
+  --> $DIR/issue-45729-unsafe-in-generator.rs:15:9
+   |
+LL |         *(1 as *mut u32) = 42;
+   |         ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
+   |
+   = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/compile-fail/issue-45801.rs b/src/test/ui/issue-45801.rs
index 7823a7d6ba8..7823a7d6ba8 100644
--- a/src/test/compile-fail/issue-45801.rs
+++ b/src/test/ui/issue-45801.rs
diff --git a/src/test/ui/issue-45801.stderr b/src/test/ui/issue-45801.stderr
new file mode 100644
index 00000000000..91c14be8833
--- /dev/null
+++ b/src/test/ui/issue-45801.stderr
@@ -0,0 +1,12 @@
+error[E0277]: the trait bound `Params: Plugin<i32>` is not satisfied
+  --> $DIR/issue-45801.rs:31:9
+   |
+LL |     req.get_ref::<Params>();
+   |         ^^^^^^^ the trait `Plugin<i32>` is not implemented for `Params`
+   |
+   = help: the following implementations were found:
+             <Params as Plugin<Foo>>
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-45965.rs b/src/test/ui/issue-45965.rs
index 0b82f2b32ff..0b82f2b32ff 100644
--- a/src/test/compile-fail/issue-45965.rs
+++ b/src/test/ui/issue-45965.rs
diff --git a/src/test/ui/issue-45965.stderr b/src/test/ui/issue-45965.stderr
new file mode 100644
index 00000000000..2b3870feef3
--- /dev/null
+++ b/src/test/ui/issue-45965.stderr
@@ -0,0 +1,9 @@
+error[E0618]: expected function, found `{float}`
+  --> $DIR/issue-45965.rs:12:30
+   |
+LL |     let a = |r: f64| if r != 0.0(r != 0.0) { 1.0 } else { 0.0 };
+   |                              ^^^^^^^^^^^^^ not a function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/ui/issue-46023.ast.nll.stderr b/src/test/ui/issue-46023.ast.nll.stderr
new file mode 100644
index 00000000000..2fc2924c2ec
--- /dev/null
+++ b/src/test/ui/issue-46023.ast.nll.stderr
@@ -0,0 +1,9 @@
+error[E0594]: cannot assign to immutable item `x`
+  --> $DIR/issue-46023.rs:18:9
+   |
+LL |         x = 1;
+   |         ^^^^^ cannot assign
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.
diff --git a/src/test/ui/issue-46023.ast.stderr b/src/test/ui/issue-46023.ast.stderr
new file mode 100644
index 00000000000..42fe73d88e6
--- /dev/null
+++ b/src/test/ui/issue-46023.ast.stderr
@@ -0,0 +1,12 @@
+error[E0594]: cannot assign to captured outer variable in an `FnMut` closure
+  --> $DIR/issue-46023.rs:18:9
+   |
+LL |     let x = 0;
+   |         - help: consider making `x` mutable: `mut x`
+...
+LL |         x = 1;
+   |         ^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.
diff --git a/src/test/ui/issue-46023.mir.stderr b/src/test/ui/issue-46023.mir.stderr
new file mode 100644
index 00000000000..2fc2924c2ec
--- /dev/null
+++ b/src/test/ui/issue-46023.mir.stderr
@@ -0,0 +1,9 @@
+error[E0594]: cannot assign to immutable item `x`
+  --> $DIR/issue-46023.rs:18:9
+   |
+LL |         x = 1;
+   |         ^^^^^ cannot assign
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.
diff --git a/src/test/compile-fail/issue-46023.rs b/src/test/ui/issue-46023.rs
index d51d92570fd..d51d92570fd 100644
--- a/src/test/compile-fail/issue-46023.rs
+++ b/src/test/ui/issue-46023.rs
diff --git a/src/test/compile-fail/issue-46036.rs b/src/test/ui/issue-46036.rs
index b5cdded4d30..b5cdded4d30 100644
--- a/src/test/compile-fail/issue-46036.rs
+++ b/src/test/ui/issue-46036.rs
diff --git a/src/test/ui/issue-46036.stderr b/src/test/ui/issue-46036.stderr
new file mode 100644
index 00000000000..e0df49f5823
--- /dev/null
+++ b/src/test/ui/issue-46036.stderr
@@ -0,0 +1,14 @@
+error[E0597]: `a` does not live long enough
+  --> $DIR/issue-46036.rs:19:24
+   |
+LL |     let foo = Foo { x: &a }; //~ ERROR E0597
+   |                        ^^ borrowed value does not live long enough
+LL |     loop { }
+LL | }
+   | - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/compile-fail/issue-46311.rs b/src/test/ui/issue-46311.rs
index 82f55f2c142..82f55f2c142 100644
--- a/src/test/compile-fail/issue-46311.rs
+++ b/src/test/ui/issue-46311.rs
diff --git a/src/test/ui/issue-46311.stderr b/src/test/ui/issue-46311.stderr
new file mode 100644
index 00000000000..790399c75ee
--- /dev/null
+++ b/src/test/ui/issue-46311.stderr
@@ -0,0 +1,8 @@
+error: invalid label name `'break`
+  --> $DIR/issue-46311.rs:12:5
+   |
+LL |     'break: loop { //~ ERROR invalid label name `'break`
+   |     ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-46438.rs b/src/test/ui/issue-46438.rs
index d84b5813385..d84b5813385 100644
--- a/src/test/compile-fail/issue-46438.rs
+++ b/src/test/ui/issue-46438.rs
diff --git a/src/test/ui/issue-46438.stderr b/src/test/ui/issue-46438.stderr
new file mode 100644
index 00000000000..b0d6229d24b
--- /dev/null
+++ b/src/test/ui/issue-46438.stderr
@@ -0,0 +1,8 @@
+error: expected a trait, found type
+  --> $DIR/issue-46438.rs:21:4
+   |
+LL | m!(&'static u8); //~ ERROR expected a trait, found type
+   |    ^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issue-46604.ast.nll.stderr b/src/test/ui/issue-46604.ast.nll.stderr
new file mode 100644
index 00000000000..b947bec6397
--- /dev/null
+++ b/src/test/ui/issue-46604.ast.nll.stderr
@@ -0,0 +1,16 @@
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/issue-46604.rs:14:25
+   |
+LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017
+   |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
+
+error[E0594]: cannot assign to immutable item `buf[..]`
+  --> $DIR/issue-46604.rs:20:5
+   |
+LL |     buf[0]=2;                                   //[ast]~ ERROR E0389
+   |     ^^^^^^^^ cannot assign
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0017, E0594.
+For more information about an error, try `rustc --explain E0017`.
diff --git a/src/test/ui/issue-46604.ast.stderr b/src/test/ui/issue-46604.ast.stderr
new file mode 100644
index 00000000000..713ba476a1c
--- /dev/null
+++ b/src/test/ui/issue-46604.ast.stderr
@@ -0,0 +1,16 @@
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/issue-46604.rs:14:25
+   |
+LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017
+   |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
+
+error[E0389]: cannot assign to data in a `&` reference
+  --> $DIR/issue-46604.rs:20:5
+   |
+LL |     buf[0]=2;                                   //[ast]~ ERROR E0389
+   |     ^^^^^^^^ assignment into an immutable reference
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0017, E0389.
+For more information about an error, try `rustc --explain E0017`.
diff --git a/src/test/ui/issue-46604.mir.stderr b/src/test/ui/issue-46604.mir.stderr
new file mode 100644
index 00000000000..b947bec6397
--- /dev/null
+++ b/src/test/ui/issue-46604.mir.stderr
@@ -0,0 +1,16 @@
+error[E0017]: references in statics may only refer to immutable values
+  --> $DIR/issue-46604.rs:14:25
+   |
+LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017
+   |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
+
+error[E0594]: cannot assign to immutable item `buf[..]`
+  --> $DIR/issue-46604.rs:20:5
+   |
+LL |     buf[0]=2;                                   //[ast]~ ERROR E0389
+   |     ^^^^^^^^ cannot assign
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0017, E0594.
+For more information about an error, try `rustc --explain E0017`.
diff --git a/src/test/compile-fail/issue-46604.rs b/src/test/ui/issue-46604.rs
index dc14eca1e67..dc14eca1e67 100644
--- a/src/test/compile-fail/issue-46604.rs
+++ b/src/test/ui/issue-46604.rs
diff --git a/src/test/compile-fail/issue-46771.rs b/src/test/ui/issue-46771.rs
index f8bcd8861f3..f8bcd8861f3 100644
--- a/src/test/compile-fail/issue-46771.rs
+++ b/src/test/ui/issue-46771.rs
diff --git a/src/test/ui/issue-46771.stderr b/src/test/ui/issue-46771.stderr
new file mode 100644
index 00000000000..0d57d61e9ff
--- /dev/null
+++ b/src/test/ui/issue-46771.stderr
@@ -0,0 +1,11 @@
+error[E0618]: expected function, found `main::Foo`
+  --> $DIR/issue-46771.rs:13:23
+   |
+LL |     struct Foo;
+   |     ----------- `main::Foo` defined here
+LL |     (1 .. 2).find(|_| Foo(0) == 0); //~ ERROR expected function, found `main::Foo`
+   |                       ^^^^^^ not a function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/compile-fail/issue-46843.rs b/src/test/ui/issue-46843.rs
index d88b4e568b0..d88b4e568b0 100644
--- a/src/test/compile-fail/issue-46843.rs
+++ b/src/test/ui/issue-46843.rs
diff --git a/src/test/ui/issue-46843.stderr b/src/test/ui/issue-46843.stderr
new file mode 100644
index 00000000000..9b752f41f59
--- /dev/null
+++ b/src/test/ui/issue-46843.stderr
@@ -0,0 +1,16 @@
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-46843.rs:17:26
+   |
+LL | pub const Q: i32 = match non_const() { //~ ERROR E0015
+   |                          ^^^^^^^^^^^
+
+error[E0019]: constant contains unimplemented expression type
+  --> $DIR/issue-46843.rs:18:5
+   |
+LL |     Thing::This => 1, //~ ERROR unimplemented expression type
+   |     ^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0015, E0019.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/src/test/compile-fail/issue-47309.rs b/src/test/ui/issue-47309.rs
index 1b9ff36f714..1b9ff36f714 100644
--- a/src/test/compile-fail/issue-47309.rs
+++ b/src/test/ui/issue-47309.rs
diff --git a/src/test/compile-fail/issue-4736.rs b/src/test/ui/issue-4736.rs
index 19803079d02..19803079d02 100644
--- a/src/test/compile-fail/issue-4736.rs
+++ b/src/test/ui/issue-4736.rs
diff --git a/src/test/ui/issue-4736.stderr b/src/test/ui/issue-4736.stderr
new file mode 100644
index 00000000000..6c0acc0b63f
--- /dev/null
+++ b/src/test/ui/issue-4736.stderr
@@ -0,0 +1,9 @@
+error[E0560]: struct `NonCopyable` has no field named `p`
+  --> $DIR/issue-4736.rs:14:26
+   |
+LL |     let z = NonCopyable{ p: () }; //~ ERROR struct `NonCopyable` has no field named `p`
+   |                          ^ field does not exist - did you mean `0`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0560`.
diff --git a/src/test/compile-fail/issue-47412.rs b/src/test/ui/issue-47412.rs
index 683ef876f4e..683ef876f4e 100644
--- a/src/test/compile-fail/issue-47412.rs
+++ b/src/test/ui/issue-47412.rs
diff --git a/src/test/ui/issue-47412.stderr b/src/test/ui/issue-47412.stderr
new file mode 100644
index 00000000000..6ca404003a5
--- /dev/null
+++ b/src/test/ui/issue-47412.stderr
@@ -0,0 +1,19 @@
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/issue-47412.rs:21:5
+   |
+LL |     match u.void {}
+   |     ^^^^^^^^^^^^^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
+  --> $DIR/issue-47412.rs:27:5
+   |
+LL |     match *ptr {}
+   |     ^^^^^^^^^^^^^ dereference of raw pointer
+   |
+   = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/compile-fail/issue-47715.rs b/src/test/ui/issue-47715.rs
index b6b720f088a..b6b720f088a 100644
--- a/src/test/compile-fail/issue-47715.rs
+++ b/src/test/ui/issue-47715.rs
diff --git a/src/test/ui/issue-47715.stderr b/src/test/ui/issue-47715.stderr
new file mode 100644
index 00000000000..29b6afe7d07
--- /dev/null
+++ b/src/test/ui/issue-47715.stderr
@@ -0,0 +1,27 @@
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+  --> $DIR/issue-47715.rs:19:37
+   |
+LL | struct Container<T: Iterable<Item = impl Foo>> {
+   |                                     ^^^^^^^^
+
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+  --> $DIR/issue-47715.rs:24:30
+   |
+LL | enum Enum<T: Iterable<Item = impl Foo>> {
+   |                              ^^^^^^^^
+
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+  --> $DIR/issue-47715.rs:29:32
+   |
+LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
+   |                                ^^^^^^^^
+
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+  --> $DIR/issue-47715.rs:34:30
+   |
+LL | type Type<T: Iterable<Item = impl Foo>> = T;
+   |                              ^^^^^^^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0562`.
diff --git a/src/test/compile-fail/issue-48131.rs b/src/test/ui/issue-48131.rs
index 9eb567a5d3e..9eb567a5d3e 100644
--- a/src/test/compile-fail/issue-48131.rs
+++ b/src/test/ui/issue-48131.rs
diff --git a/src/test/ui/issue-48131.stderr b/src/test/ui/issue-48131.stderr
new file mode 100644
index 00000000000..d0ba1a1c37d
--- /dev/null
+++ b/src/test/ui/issue-48131.stderr
@@ -0,0 +1,20 @@
+error: unnecessary `unsafe` block
+  --> $DIR/issue-48131.rs:18:9
+   |
+LL |         unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe`
+   |         ^^^^^^ unnecessary `unsafe` block
+   |
+note: lint level defined here
+  --> $DIR/issue-48131.rs:13:9
+   |
+LL | #![deny(unused_unsafe)] //~ NOTE
+   |         ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/issue-48131.rs:29:13
+   |
+LL |             unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe`
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-48838.rs b/src/test/ui/issue-48838.rs
index ab52a32869f..ab52a32869f 100644
--- a/src/test/compile-fail/issue-48838.rs
+++ b/src/test/ui/issue-48838.rs
diff --git a/src/test/ui/issue-48838.stderr b/src/test/ui/issue-48838.stderr
new file mode 100644
index 00000000000..2c7e682a982
--- /dev/null
+++ b/src/test/ui/issue-48838.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-48838.rs:12:14
+   |
+LL |     Square = |x| x, //~ ERROR mismatched types
+   |              ^^^^^ expected isize, found closure
+   |
+   = note: expected type `isize`
+              found type `[closure@$DIR/issue-48838.rs:12:14: 12:19]`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-4968.rs b/src/test/ui/issue-4968.rs
index 77588e5c221..77588e5c221 100644
--- a/src/test/compile-fail/issue-4968.rs
+++ b/src/test/ui/issue-4968.rs
diff --git a/src/test/ui/issue-4968.stderr b/src/test/ui/issue-4968.stderr
new file mode 100644
index 00000000000..a9d58eda6e8
--- /dev/null
+++ b/src/test/ui/issue-4968.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-4968.rs:15:16
+   |
+LL |     match 42 { A => () }
+   |                ^ expected integral variable, found tuple
+   |
+   = note: expected type `{integer}`
+              found type `(isize, isize)`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-4972.rs b/src/test/ui/issue-4972.rs
index f384dba7c9e..f384dba7c9e 100644
--- a/src/test/compile-fail/issue-4972.rs
+++ b/src/test/ui/issue-4972.rs
diff --git a/src/test/ui/issue-4972.stderr b/src/test/ui/issue-4972.stderr
new file mode 100644
index 00000000000..e9c1bdb6f86
--- /dev/null
+++ b/src/test/ui/issue-4972.stderr
@@ -0,0 +1,9 @@
+error[E0033]: type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced
+  --> $DIR/issue-4972.rs:24:25
+   |
+LL |         TraitWrapper::A(box ref map) => map, //~ ERROR cannot be dereferenced
+   |                         ^^^^^^^^^^^ type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0033`.
diff --git a/src/test/compile-fail/issue-50471.rs b/src/test/ui/issue-50471.rs
index ce2947144af..ce2947144af 100644
--- a/src/test/compile-fail/issue-50471.rs
+++ b/src/test/ui/issue-50471.rs
diff --git a/src/test/compile-fail/issue-50600.rs b/src/test/ui/issue-50600.rs
index 6169a7770bf..6169a7770bf 100644
--- a/src/test/compile-fail/issue-50600.rs
+++ b/src/test/ui/issue-50600.rs
diff --git a/src/test/ui/issue-50600.stderr b/src/test/ui/issue-50600.stderr
new file mode 100644
index 00000000000..a72dbace248
--- /dev/null
+++ b/src/test/ui/issue-50600.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-50600.rs:12:13
+   |
+LL |     fn([u8; |x: u8| {}]), //~ ERROR mismatched types
+   |             ^^^^^^^^^^ expected usize, found closure
+   |
+   = note: expected type `usize`
+              found type `[closure@$DIR/issue-50600.rs:12:13: 12:23]`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-5062.rs b/src/test/ui/issue-5062.rs
index ebfa4975d4d..ebfa4975d4d 100644
--- a/src/test/compile-fail/issue-5062.rs
+++ b/src/test/ui/issue-5062.rs
diff --git a/src/test/ui/issue-5062.stderr b/src/test/ui/issue-5062.stderr
new file mode 100644
index 00000000000..988c5c137b4
--- /dev/null
+++ b/src/test/ui/issue-5062.stderr
@@ -0,0 +1,9 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-5062.rs:11:29
+   |
+LL | fn main() { format!("{:?}", None); }
+   |                             ^^^^ cannot infer type for `T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-5067.rs b/src/test/ui/issue-5067.rs
index 267362f902d..267362f902d 100644
--- a/src/test/compile-fail/issue-5067.rs
+++ b/src/test/ui/issue-5067.rs
diff --git a/src/test/ui/issue-5067.stderr b/src/test/ui/issue-5067.stderr
new file mode 100644
index 00000000000..2ea3ea5204c
--- /dev/null
+++ b/src/test/ui/issue-5067.stderr
@@ -0,0 +1,62 @@
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:14:8
+   |
+LL |     ( $()* ) => {};
+   |        ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:16:8
+   |
+LL |     ( $()+ ) => {};
+   |        ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:22:9
+   |
+LL |     ( [$()*] ) => {};
+   |         ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:24:9
+   |
+LL |     ( [$()+] ) => {};
+   |         ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:30:8
+   |
+LL |     ( $($()* $(),* $(a)* $(a),* )* ) => {};
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:32:8
+   |
+LL |     ( $($()* $(),* $(a)* $(a),* )+ ) => {};
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:38:12
+   |
+LL |     ( $(a $()+)* ) => {};
+   |            ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:40:12
+   |
+LL |     ( $(a $()*)+ ) => {};
+   |            ^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:48:18
+   |
+LL |     (a $e1:expr $($(, a $e2:expr)*)*) => ([$e1 $($(, $e2)*)*]);
+   |                  ^^^^^^^^^^^^^^^^^^
+
+error: repetition matches empty token tree
+  --> $DIR/issue-5067.rs:60:8
+   |
+LL |     ( $()* ) => {}
+   |        ^^
+
+error: aborting due to 10 previous errors
+
diff --git a/src/test/compile-fail/issue-50688.rs b/src/test/ui/issue-50688.rs
index ff45cf639de..ff45cf639de 100644
--- a/src/test/compile-fail/issue-50688.rs
+++ b/src/test/ui/issue-50688.rs
diff --git a/src/test/ui/issue-50688.stderr b/src/test/ui/issue-50688.stderr
new file mode 100644
index 00000000000..094b0e1ec89
--- /dev/null
+++ b/src/test/ui/issue-50688.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-50688.rs:12:9
+   |
+LL |     [1; || {}]; //~ ERROR mismatched types
+   |         ^^^^^ expected usize, found closure
+   |
+   = note: expected type `usize`
+              found type `[closure@$DIR/issue-50688.rs:12:9: 12:14]`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-5099.rs b/src/test/ui/issue-5099.rs
index 1bb6f34b8e9..1bb6f34b8e9 100644
--- a/src/test/compile-fail/issue-5099.rs
+++ b/src/test/ui/issue-5099.rs
diff --git a/src/test/ui/issue-5099.stderr b/src/test/ui/issue-5099.stderr
new file mode 100644
index 00000000000..26a26f731cf
--- /dev/null
+++ b/src/test/ui/issue-5099.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `this` in this scope
+  --> $DIR/issue-5099.rs:12:31
+   |
+LL | trait B < A > { fn a() -> A { this.a } } //~ ERROR cannot find value `this` in this scope
+   |                               ^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-5100.rs b/src/test/ui/issue-5100.rs
index 9ef780aac8e..9ef780aac8e 100644
--- a/src/test/compile-fail/issue-5100.rs
+++ b/src/test/ui/issue-5100.rs
diff --git a/src/test/ui/issue-5100.stderr b/src/test/ui/issue-5100.stderr
new file mode 100644
index 00000000000..6f5a84966bf
--- /dev/null
+++ b/src/test/ui/issue-5100.stderr
@@ -0,0 +1,63 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:18:9
+   |
+LL |         A::B => (),
+   |         ^^^^ expected tuple, found enum `A`
+   |
+   = note: expected type `(bool, bool)`
+              found type `A`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:27:9
+   |
+LL |         (true, false, false) => ()
+   |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
+   |
+   = note: expected type `(bool, bool)`
+              found type `(_, _, _)`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:35:9
+   |
+LL |         (true, false, false) => ()
+   |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
+   |
+   = note: expected type `(bool, bool)`
+              found type `(_, _, _)`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:43:9
+   |
+LL |         box (true, false) => ()
+   |         ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box`
+   |
+   = note: expected type `(bool, bool)`
+              found type `std::boxed::Box<_>`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:50:9
+   |
+LL |         &(true, false) => ()
+   |         ^^^^^^^^^^^^^^ expected tuple, found reference
+   |
+   = note: expected type `(bool, bool)`
+              found type `&_`
+
+error[E0618]: expected function, found `(char, char)`
+  --> $DIR/issue-5100.rs:58:14
+   |
+LL |       let v = [('a', 'b')   //~ ERROR expected function, found `(char, char)`
+   |  ______________^
+LL | |              ('c', 'd'),
+   | |_______________________^ not a function
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5100.rs:65:19
+   |
+LL |     let x: char = true; //~  ERROR mismatched types
+   |                   ^^^^ expected char, found bool
+
+error: aborting due to 7 previous errors
+
+Some errors occurred: E0308, E0618.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-5153.rs b/src/test/ui/issue-5153.rs
index 9b49886961d..9b49886961d 100644
--- a/src/test/compile-fail/issue-5153.rs
+++ b/src/test/ui/issue-5153.rs
diff --git a/src/test/ui/issue-5153.stderr b/src/test/ui/issue-5153.stderr
new file mode 100644
index 00000000000..6f8dce109e1
--- /dev/null
+++ b/src/test/ui/issue-5153.stderr
@@ -0,0 +1,13 @@
+error[E0599]: no method named `foo` found for type `&dyn Foo` in the current scope
+  --> $DIR/issue-5153.rs:20:23
+   |
+LL |     (&5isize as &Foo).foo();
+   |                       ^^^
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+   = note: the following trait defines an item `foo`, perhaps you need to implement it:
+           candidate #1: `Foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-5216.rs b/src/test/ui/issue-5216.rs
index 81424577d49..81424577d49 100644
--- a/src/test/compile-fail/issue-5216.rs
+++ b/src/test/ui/issue-5216.rs
diff --git a/src/test/ui/issue-5216.stderr b/src/test/ui/issue-5216.stderr
new file mode 100644
index 00000000000..7ea329749a0
--- /dev/null
+++ b/src/test/ui/issue-5216.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-5216.rs:13:21
+   |
+LL | pub static C: S = S(f); //~ ERROR mismatched types
+   |                     ^ expected struct `std::boxed::Box`, found fn item
+   |
+   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+              found type `fn() {f}`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-5216.rs:18:19
+   |
+LL | pub static D: T = g; //~ ERROR mismatched types
+   |                   ^ expected struct `std::boxed::Box`, found fn item
+   |
+   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+              found type `fn() {g}`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-52213.nll.stderr b/src/test/ui/issue-52213.nll.stderr
new file mode 100644
index 00000000000..c288cf9ed82
--- /dev/null
+++ b/src/test/ui/issue-52213.nll.stderr
@@ -0,0 +1,14 @@
+warning: not reporting region error due to nll
+  --> $DIR/issue-52213.rs:12:11
+   |
+LL |     match (&t,) { //~ ERROR cannot infer an appropriate lifetime
+   |           ^^^^^
+
+error: unsatisfied lifetime constraints
+  --> $DIR/issue-52213.rs:13:11
+   |
+LL |         ((u,),) => u,
+   |           ^ free region requires that `'a` must outlive `'b`
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-52213.rs b/src/test/ui/issue-52213.rs
index 810379c63d3..810379c63d3 100644
--- a/src/test/compile-fail/issue-52213.rs
+++ b/src/test/ui/issue-52213.rs
diff --git a/src/test/ui/issue-52213.stderr b/src/test/ui/issue-52213.stderr
new file mode 100644
index 00000000000..3c650881d7b
--- /dev/null
+++ b/src/test/ui/issue-52213.stderr
@@ -0,0 +1,28 @@
+error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
+  --> $DIR/issue-52213.rs:12:11
+   |
+LL |     match (&t,) { //~ ERROR cannot infer an appropriate lifetime
+   |           ^^^^^
+   |
+note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 11:23...
+  --> $DIR/issue-52213.rs:11:23
+   |
+LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
+   |                       ^^
+   = note: ...so that the types are compatible:
+           expected (&&(T,),)
+              found (&&'a (T,),)
+note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 11:27...
+  --> $DIR/issue-52213.rs:11:27
+   |
+LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
+   |                           ^^
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/issue-52213.rs:13:20
+   |
+LL |         ((u,),) => u,
+   |                    ^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/compile-fail/issue-5358-1.rs b/src/test/ui/issue-5358-1.rs
index d8aad54fd3e..d8aad54fd3e 100644
--- a/src/test/compile-fail/issue-5358-1.rs
+++ b/src/test/ui/issue-5358-1.rs
diff --git a/src/test/ui/issue-5358-1.stderr b/src/test/ui/issue-5358-1.stderr
new file mode 100644
index 00000000000..abaea462fcc
--- /dev/null
+++ b/src/test/ui/issue-5358-1.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-5358-1.rs:16:9
+   |
+LL |         Either::Right(_) => {}
+   |         ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either`
+   |
+   = note: expected type `S`
+              found type `Either<_, _>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-5439.rs b/src/test/ui/issue-5439.rs
index 4e618f3d858..4e618f3d858 100644
--- a/src/test/compile-fail/issue-5439.rs
+++ b/src/test/ui/issue-5439.rs
diff --git a/src/test/ui/issue-5439.stderr b/src/test/ui/issue-5439.stderr
new file mode 100644
index 00000000000..87e20f3a03d
--- /dev/null
+++ b/src/test/ui/issue-5439.stderr
@@ -0,0 +1,11 @@
+error[E0560]: struct `Foo` has no field named `nonexistent`
+  --> $DIR/issue-5439.rs:23:26
+   |
+LL |         return box Foo { nonexistent: self, foo: i }; //~ ERROR: no field named
+   |                          ^^^^^^^^^^^ `Foo` does not have this field
+   |
+   = note: available fields are: `foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0560`.
diff --git a/src/test/compile-fail/issue-5883.rs b/src/test/ui/issue-5883.rs
index a91f5d281dd..a91f5d281dd 100644
--- a/src/test/compile-fail/issue-5883.rs
+++ b/src/test/ui/issue-5883.rs
diff --git a/src/test/ui/issue-5883.stderr b/src/test/ui/issue-5883.stderr
new file mode 100644
index 00000000000..43ce3697d83
--- /dev/null
+++ b/src/test/ui/issue-5883.stderr
@@ -0,0 +1,24 @@
+error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
+  --> $DIR/issue-5883.rs:17:15
+   |
+LL | fn new_struct(r: A+'static)
+   |               ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: all local variables must have a statically known size
+
+error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
+  --> $DIR/issue-5883.rs:18:8
+   |
+LL |     -> Struct { //~^ ERROR the size for values of type
+   |        ^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: within `Struct`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)`
+   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
+   = note: required because it appears within the type `Struct`
+   = note: the return type of a function must have a statically known size
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-5927.rs b/src/test/ui/issue-5927.rs
index bb802f353af..bb802f353af 100644
--- a/src/test/compile-fail/issue-5927.rs
+++ b/src/test/ui/issue-5927.rs
diff --git a/src/test/ui/issue-5927.stderr b/src/test/ui/issue-5927.stderr
new file mode 100644
index 00000000000..f8b9b15678d
--- /dev/null
+++ b/src/test/ui/issue-5927.stderr
@@ -0,0 +1,16 @@
+error[E0531]: cannot find tuple struct/variant `x` in this scope
+  --> $DIR/issue-5927.rs:14:9
+   |
+LL |         x(1) => x(1) //~ ERROR cannot find tuple struct/variant `x` in this scope
+   |         ^ not found in this scope
+
+error[E0425]: cannot find function `x` in this scope
+  --> $DIR/issue-5927.rs:14:17
+   |
+LL |         x(1) => x(1) //~ ERROR cannot find tuple struct/variant `x` in this scope
+   |                 ^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0425, E0531.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/src/test/compile-fail/issue-5997-enum.rs b/src/test/ui/issue-5997-enum.rs
index 463fdaa1069..463fdaa1069 100644
--- a/src/test/compile-fail/issue-5997-enum.rs
+++ b/src/test/ui/issue-5997-enum.rs
diff --git a/src/test/ui/issue-5997-enum.stderr b/src/test/ui/issue-5997-enum.stderr
new file mode 100644
index 00000000000..9f26f653ebd
--- /dev/null
+++ b/src/test/ui/issue-5997-enum.stderr
@@ -0,0 +1,13 @@
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-5997-enum.rs:12:16
+   |
+LL | fn f<Z>() -> bool {
+   |    - - type variable from outer function
+   |    |
+   |    try adding a local type parameter in this method instead
+LL |     enum E { V(Z) }
+   |                ^ use of type variable from outer function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0401`.
diff --git a/src/test/compile-fail/issue-5997-struct.rs b/src/test/ui/issue-5997-struct.rs
index af9e66b770b..af9e66b770b 100644
--- a/src/test/compile-fail/issue-5997-struct.rs
+++ b/src/test/ui/issue-5997-struct.rs
diff --git a/src/test/ui/issue-5997-struct.stderr b/src/test/ui/issue-5997-struct.stderr
new file mode 100644
index 00000000000..fd6d67bd128
--- /dev/null
+++ b/src/test/ui/issue-5997-struct.stderr
@@ -0,0 +1,13 @@
+error[E0401]: can't use type parameters from outer function
+  --> $DIR/issue-5997-struct.rs:12:14
+   |
+LL | fn f<T>() -> bool {
+   |    - - type variable from outer function
+   |    |
+   |    try adding a local type parameter in this method instead
+LL |     struct S(T); //~ ERROR can't use type parameters from outer function
+   |              ^ use of type variable from outer function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0401`.
diff --git a/src/test/compile-fail/issue-6458-2.rs b/src/test/ui/issue-6458-2.rs
index 87cf2b3f740..87cf2b3f740 100644
--- a/src/test/compile-fail/issue-6458-2.rs
+++ b/src/test/ui/issue-6458-2.rs
diff --git a/src/test/ui/issue-6458-2.stderr b/src/test/ui/issue-6458-2.stderr
new file mode 100644
index 00000000000..e192c2c3be3
--- /dev/null
+++ b/src/test/ui/issue-6458-2.stderr
@@ -0,0 +1,9 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-6458-2.rs:13:21
+   |
+LL |     format!("{:?}", None);
+   |                     ^^^^ cannot infer type for `T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/compile-fail/issue-6596-1.rs b/src/test/ui/issue-6596-1.rs
index e988f404c3c..ce8a3a80e1f 100644
--- a/src/test/compile-fail/issue-6596-1.rs
+++ b/src/test/ui/issue-6596-1.rs
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: unknown macro variable `nonexistent`
 
 macro_rules! e {
     ($inp:ident) => (
         $nonexistent
+        //~^ ERROR unknown macro variable `nonexistent`
     );
 }
 
diff --git a/src/test/ui/issue-6596-1.stderr b/src/test/ui/issue-6596-1.stderr
new file mode 100644
index 00000000000..b7055ab19d0
--- /dev/null
+++ b/src/test/ui/issue-6596-1.stderr
@@ -0,0 +1,11 @@
+error: unknown macro variable `nonexistent`
+  --> $DIR/issue-6596-1.rs:14:9
+   |
+LL |         $nonexistent
+   |         ^^^^^^^^^^^^ unknown macro variable
+...
+LL |     e!(foo);
+   |     -------- in this macro invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-6596-2.rs b/src/test/ui/issue-6596-2.rs
index 0158ad4ba4e..3e18de6178a 100644
--- a/src/test/compile-fail/issue-6596-2.rs
+++ b/src/test/ui/issue-6596-2.rs
@@ -10,11 +10,11 @@
 
 #![feature(macro_rules)]
 
-// error-pattern: unknown macro variable `nonexistent`
-
 macro_rules! g {
     ($inp:ident) => (
         { $inp $nonexistent }
+        //~^ ERROR unknown macro variable `nonexistent`
+        //~| ERROR expected one of
     );
 }
 
diff --git a/src/test/ui/issue-6596-2.stderr b/src/test/ui/issue-6596-2.stderr
new file mode 100644
index 00000000000..f2ed17f35e6
--- /dev/null
+++ b/src/test/ui/issue-6596-2.stderr
@@ -0,0 +1,20 @@
+error: unknown macro variable `nonexistent`
+  --> $DIR/issue-6596-2.rs:15:16
+   |
+LL |         { $inp $nonexistent }
+   |                ^^^^^^^^^^^^ unknown macro variable
+...
+LL |     g!(foo);
+   |     -------- in this macro invocation
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `nonexistent`
+  --> $DIR/issue-6596-2.rs:15:16
+   |
+LL |         { $inp $nonexistent }
+   |                ^^^^^^^^^^^^ expected one of 8 possible tokens here
+...
+LL |     g!(foo);
+   |     -------- in this macro invocation
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-6642.rs b/src/test/ui/issue-6642.rs
index 1fe10ba7a27..1fe10ba7a27 100644
--- a/src/test/compile-fail/issue-6642.rs
+++ b/src/test/ui/issue-6642.rs
diff --git a/src/test/ui/issue-6642.stderr b/src/test/ui/issue-6642.stderr
new file mode 100644
index 00000000000..1762af52eb0
--- /dev/null
+++ b/src/test/ui/issue-6642.stderr
@@ -0,0 +1,11 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/issue-6642.rs:15:13
+   |
+LL |             self.m() //~ ERROR can't capture dynamic environment in a fn item
+   |             ^^^^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0434`.
diff --git a/src/test/compile-fail/issue-6738.rs b/src/test/ui/issue-6738.rs
index 447d0e061ee..447d0e061ee 100644
--- a/src/test/compile-fail/issue-6738.rs
+++ b/src/test/ui/issue-6738.rs
diff --git a/src/test/ui/issue-6738.stderr b/src/test/ui/issue-6738.stderr
new file mode 100644
index 00000000000..8c0aff9d9ab
--- /dev/null
+++ b/src/test/ui/issue-6738.stderr
@@ -0,0 +1,13 @@
+error[E0368]: binary assignment operation `+=` cannot be applied to type `T`
+  --> $DIR/issue-6738.rs:16:9
+   |
+LL |         self.x += v.x;
+   |         ------^^^^^^^
+   |         |
+   |         cannot use `+=` on type `T`
+   |
+   = note: `T` might need a bound for `std::ops::AddAssign`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0368`.
diff --git a/src/test/ui/issue-6801.nll.stderr b/src/test/ui/issue-6801.nll.stderr
new file mode 100644
index 00000000000..5436397c68e
--- /dev/null
+++ b/src/test/ui/issue-6801.nll.stderr
@@ -0,0 +1,14 @@
+error[E0505]: cannot move out of `x` because it is borrowed
+  --> $DIR/issue-6801.rs:29:13
+   |
+LL |       let sq =  || { *x * *x };
+   |                 -------------- borrow of `x` occurs here
+LL | 
+LL |       twice(x); //~ ERROR: cannot move out of
+   |             ^ move out of `x` occurs here
+LL |       invoke(sq);
+   |              -- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/src/test/compile-fail/issue-6801.rs b/src/test/ui/issue-6801.rs
index 792d27c179b..792d27c179b 100644
--- a/src/test/compile-fail/issue-6801.rs
+++ b/src/test/ui/issue-6801.rs
diff --git a/src/test/ui/issue-6801.stderr b/src/test/ui/issue-6801.stderr
new file mode 100644
index 00000000000..8a1c669f0b2
--- /dev/null
+++ b/src/test/ui/issue-6801.stderr
@@ -0,0 +1,12 @@
+error[E0505]: cannot move out of `x` because it is borrowed
+  --> $DIR/issue-6801.rs:29:13
+   |
+LL |       let sq =  || { *x * *x };
+   |                 -- borrow of `x` occurs here
+LL | 
+LL |       twice(x); //~ ERROR: cannot move out of
+   |             ^ move out of `x` occurs here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/src/test/compile-fail/issue-6804.rs b/src/test/ui/issue-6804.rs
index fffa27ab842..fffa27ab842 100644
--- a/src/test/compile-fail/issue-6804.rs
+++ b/src/test/ui/issue-6804.rs
diff --git a/src/test/ui/issue-6804.stderr b/src/test/ui/issue-6804.stderr
new file mode 100644
index 00000000000..45eefbfaf8e
--- /dev/null
+++ b/src/test/ui/issue-6804.stderr
@@ -0,0 +1,25 @@
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-6804.rs:21:9
+   |
+LL |         NAN => {}, //~ ERROR floating-point types cannot be used
+   |         ^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-6804.rs:14:9
+   |
+LL | #![deny(illegal_floating_point_literal_pattern)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: floating-point types cannot be used in patterns
+  --> $DIR/issue-6804.rs:27:10
+   |
+LL |         [NAN, _] => {}, //~ ERROR floating-point types cannot be used
+   |          ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/issue-6936.rs b/src/test/ui/issue-6936.rs
index 8eb16edcbd3..8eb16edcbd3 100644
--- a/src/test/compile-fail/issue-6936.rs
+++ b/src/test/ui/issue-6936.rs
diff --git a/src/test/ui/issue-6936.stderr b/src/test/ui/issue-6936.stderr
new file mode 100644
index 00000000000..48fcbf40622
--- /dev/null
+++ b/src/test/ui/issue-6936.stderr
@@ -0,0 +1,43 @@
+error[E0428]: the name `Foo` is defined multiple times
+  --> $DIR/issue-6936.rs:15:5
+   |
+LL |     type Foo = ::T;
+   |     --------------- previous definition of the type `Foo` here
+LL |     mod Foo {} //~ ERROR the name `Foo` is defined multiple times
+   |     ^^^^^^^ `Foo` redefined here
+   |
+   = note: `Foo` must be defined only once in the type namespace of this module
+
+error[E0428]: the name `Foo` is defined multiple times
+  --> $DIR/issue-6936.rs:20:5
+   |
+LL |     type Foo = ::T;
+   |     --------------- previous definition of the type `Foo` here
+LL |     struct Foo; //~ ERROR the name `Foo` is defined multiple times
+   |     ^^^^^^^^^^^ `Foo` redefined here
+   |
+   = note: `Foo` must be defined only once in the type namespace of this module
+
+error[E0428]: the name `Foo` is defined multiple times
+  --> $DIR/issue-6936.rs:25:5
+   |
+LL |     type Foo = ::T;
+   |     --------------- previous definition of the type `Foo` here
+LL |     enum Foo {} //~ ERROR the name `Foo` is defined multiple times
+   |     ^^^^^^^^ `Foo` redefined here
+   |
+   = note: `Foo` must be defined only once in the type namespace of this module
+
+error[E0428]: the name `Bar` is defined multiple times
+  --> $DIR/issue-6936.rs:35:5
+   |
+LL |     type Bar<T> = T;
+   |     ---------------- previous definition of the type `Bar` here
+LL |     mod Bar {} //~ ERROR the name `Bar` is defined multiple times
+   |     ^^^^^^^ `Bar` redefined here
+   |
+   = note: `Bar` must be defined only once in the type namespace of this module
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/ui/issue-7013.rs
index 0c19780bcb4..0c19780bcb4 100644
--- a/src/test/compile-fail/issue-7013.rs
+++ b/src/test/ui/issue-7013.rs
diff --git a/src/test/ui/issue-7013.stderr b/src/test/ui/issue-7013.stderr
new file mode 100644
index 00000000000..fec6e06a699
--- /dev/null
+++ b/src/test/ui/issue-7013.stderr
@@ -0,0 +1,14 @@
+error[E0277]: `std::rc::Rc<std::cell::RefCell<A>>` cannot be sent between threads safely
+  --> $DIR/issue-7013.rs:36:19
+   |
+LL |     let a = A {v: box B{v: None} as Box<Foo+Send>};
+   |                   ^^^^^^^^^^^^^^ `std::rc::Rc<std::cell::RefCell<A>>` cannot be sent between threads safely
+   |
+   = help: within `B`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::RefCell<A>>`
+   = note: required because it appears within the type `std::option::Option<std::rc::Rc<std::cell::RefCell<A>>>`
+   = note: required because it appears within the type `B`
+   = note: required for the cast to the object type `dyn Foo + std::marker::Send`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/compile-fail/issue-7044.rs b/src/test/ui/issue-7044.rs
index 9b72c249356..9b72c249356 100644
--- a/src/test/compile-fail/issue-7044.rs
+++ b/src/test/ui/issue-7044.rs
diff --git a/src/test/ui/issue-7044.stderr b/src/test/ui/issue-7044.stderr
new file mode 100644
index 00000000000..02707b2d21e
--- /dev/null
+++ b/src/test/ui/issue-7044.stderr
@@ -0,0 +1,13 @@
+error[E0428]: the name `X` is defined multiple times
+  --> $DIR/issue-7044.rs:12:1
+   |
+LL | static X: isize = 0;
+   | -------------------- previous definition of the value `X` here
+LL | struct X; //~ ERROR the name `X` is defined multiple times
+   | ^^^^^^^^^ `X` redefined here
+   |
+   = note: `X` must be defined only once in the value namespace of this module
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/compile-fail/issue-7061.rs b/src/test/ui/issue-7061.rs
index b99f5b707ee..b99f5b707ee 100644
--- a/src/test/compile-fail/issue-7061.rs
+++ b/src/test/ui/issue-7061.rs
diff --git a/src/test/ui/issue-7061.stderr b/src/test/ui/issue-7061.stderr
new file mode 100644
index 00000000000..4f142ba95bc
--- /dev/null
+++ b/src/test/ui/issue-7061.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-7061.rs:14:46
+   |
+LL |     fn foo(&'a mut self) -> Box<BarStruct> { self }
+   |                             --------------   ^^^^ expected struct `std::boxed::Box`, found mutable reference
+   |                             |
+   |                             expected `std::boxed::Box<BarStruct>` because of return type
+   |
+   = note: expected type `std::boxed::Box<BarStruct>`
+              found type `&'a mut BarStruct`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-7092.rs b/src/test/ui/issue-7092.rs
index 26e1597b1db..26e1597b1db 100644
--- a/src/test/compile-fail/issue-7092.rs
+++ b/src/test/ui/issue-7092.rs
diff --git a/src/test/ui/issue-7092.stderr b/src/test/ui/issue-7092.stderr
new file mode 100644
index 00000000000..3c816098289
--- /dev/null
+++ b/src/test/ui/issue-7092.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-7092.rs:16:9
+   |
+LL |         Some(field) =>
+   |         ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option`
+   |
+   = note: expected type `Whatever`
+              found type `std::option::Option<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-7246.rs b/src/test/ui/issue-7246.rs
index 7e8d431bf19..7e8d431bf19 100644
--- a/src/test/compile-fail/issue-7246.rs
+++ b/src/test/ui/issue-7246.rs
diff --git a/src/test/ui/issue-7246.stderr b/src/test/ui/issue-7246.stderr
new file mode 100644
index 00000000000..75c716e5a04
--- /dev/null
+++ b/src/test/ui/issue-7246.stderr
@@ -0,0 +1,14 @@
+error: unreachable statement
+  --> $DIR/issue-7246.rs:17:5
+   |
+LL |     if *ptr::null() {}; //~ ERROR unreachable
+   |     ^^^^^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-7246.rs:11:9
+   |
+LL | #![deny(unreachable_code)]
+   |         ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-7364.rs b/src/test/ui/issue-7364.rs
index 801a1301ad7..801a1301ad7 100644
--- a/src/test/compile-fail/issue-7364.rs
+++ b/src/test/ui/issue-7364.rs
diff --git a/src/test/ui/issue-7364.stderr b/src/test/ui/issue-7364.stderr
new file mode 100644
index 00000000000..b0d732bdb6f
--- /dev/null
+++ b/src/test/ui/issue-7364.stderr
@@ -0,0 +1,21 @@
+error[E0010]: allocations are not allowed in statics
+  --> $DIR/issue-7364.rs:16:37
+   |
+LL | static boxed: Box<RefCell<isize>> = box RefCell::new(0);
+   |                                     ^^^^^^^^^^^^^^^^^^^ allocation not allowed in statics
+
+error[E0277]: `std::cell::RefCell<isize>` cannot be shared between threads safely
+  --> $DIR/issue-7364.rs:16:1
+   |
+LL | static boxed: Box<RefCell<isize>> = box RefCell::new(0);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell<isize>` cannot be shared between threads safely
+   |
+   = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<isize>`
+   = note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<std::cell::RefCell<isize>>`
+   = note: required because it appears within the type `std::boxed::Box<std::cell::RefCell<isize>>`
+   = note: shared static variables must have a type that implements `Sync`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0010, E0277.
+For more information about an error, try `rustc --explain E0010`.
diff --git a/src/test/compile-fail/issue-7607-1.rs b/src/test/ui/issue-7607-1.rs
index 9bcdd690187..9bcdd690187 100644
--- a/src/test/compile-fail/issue-7607-1.rs
+++ b/src/test/ui/issue-7607-1.rs
diff --git a/src/test/ui/issue-7607-1.stderr b/src/test/ui/issue-7607-1.stderr
new file mode 100644
index 00000000000..bebf1c1ae98
--- /dev/null
+++ b/src/test/ui/issue-7607-1.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `Fo` in this scope
+  --> $DIR/issue-7607-1.rs:15:6
+   |
+LL | impl Fo { //~ ERROR cannot find type `Fo` in this scope
+   |      ^^ did you mean `Fn`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-7867.rs b/src/test/ui/issue-7867.rs
index 016df6cb6ef..016df6cb6ef 100644
--- a/src/test/compile-fail/issue-7867.rs
+++ b/src/test/ui/issue-7867.rs
diff --git a/src/test/ui/issue-7867.stderr b/src/test/ui/issue-7867.stderr
new file mode 100644
index 00000000000..03ab54d112f
--- /dev/null
+++ b/src/test/ui/issue-7867.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-7867.rs:17:9
+   |
+LL |         A::B => (),
+   |         ^^^^ expected tuple, found enum `A`
+   |
+   = note: expected type `(bool, bool)`
+              found type `A`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-7950.rs b/src/test/ui/issue-7950.rs
index dd3a48cb155..dd3a48cb155 100644
--- a/src/test/compile-fail/issue-7950.rs
+++ b/src/test/ui/issue-7950.rs
diff --git a/src/test/ui/issue-7950.stderr b/src/test/ui/issue-7950.stderr
new file mode 100644
index 00000000000..750127981b1
--- /dev/null
+++ b/src/test/ui/issue-7950.stderr
@@ -0,0 +1,12 @@
+error[E0599]: no function or associated item named `bar` found for type `Foo` in the current scope
+  --> $DIR/issue-7950.rs:16:5
+   |
+LL | struct Foo;
+   | ----------- function or associated item `bar` not found for this
+...
+LL |     Foo::bar();
+   |     ^^^^^^^^ function or associated item not found in `Foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/compile-fail/issue-7970a.rs b/src/test/ui/issue-7970a.rs
index b97c3037770..b97c3037770 100644
--- a/src/test/compile-fail/issue-7970a.rs
+++ b/src/test/ui/issue-7970a.rs
diff --git a/src/test/ui/issue-7970a.stderr b/src/test/ui/issue-7970a.stderr
new file mode 100644
index 00000000000..7ad95717185
--- /dev/null
+++ b/src/test/ui/issue-7970a.stderr
@@ -0,0 +1,8 @@
+error: unexpected end of macro invocation
+  --> $DIR/issue-7970a.rs:16:5
+   |
+LL |     one_arg_macro!();
+   |     ^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-7970b.rs b/src/test/ui/issue-7970b.rs
index 0cff90f281b..0cff90f281b 100644
--- a/src/test/compile-fail/issue-7970b.rs
+++ b/src/test/ui/issue-7970b.rs
diff --git a/src/test/ui/issue-7970b.stderr b/src/test/ui/issue-7970b.stderr
new file mode 100644
index 00000000000..b2feb677863
--- /dev/null
+++ b/src/test/ui/issue-7970b.stderr
@@ -0,0 +1,8 @@
+error: unexpected end of macro invocation
+  --> $DIR/issue-7970b.rs:13:1
+   |
+LL | macro_rules! test {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-8153.rs b/src/test/ui/issue-8153.rs
index 457918b54d4..457918b54d4 100644
--- a/src/test/compile-fail/issue-8153.rs
+++ b/src/test/ui/issue-8153.rs
diff --git a/src/test/ui/issue-8153.stderr b/src/test/ui/issue-8153.stderr
new file mode 100644
index 00000000000..03fb89f8ccc
--- /dev/null
+++ b/src/test/ui/issue-8153.stderr
@@ -0,0 +1,11 @@
+error[E0201]: duplicate definitions with name `bar`:
+  --> $DIR/issue-8153.rs:21:5
+   |
+LL |     fn bar(&self) -> isize {1}
+   |     -------------------------- previous definition of `bar` here
+LL |     fn bar(&self) -> isize {2} //~ ERROR duplicate definitions
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0201`.
diff --git a/src/test/compile-fail/issue-8208.rs b/src/test/ui/issue-8208.rs
index 670b6bd46e7..670b6bd46e7 100644
--- a/src/test/compile-fail/issue-8208.rs
+++ b/src/test/ui/issue-8208.rs
diff --git a/src/test/ui/issue-8208.stderr b/src/test/ui/issue-8208.stderr
new file mode 100644
index 00000000000..73a9a6a51be
--- /dev/null
+++ b/src/test/ui/issue-8208.stderr
@@ -0,0 +1,21 @@
+error[E0432]: unresolved import `self::*`
+  --> $DIR/issue-8208.rs:11:5
+   |
+LL | use self::*; //~ ERROR: unresolved import `self::*` [E0432]
+   |     ^^^^^^^ Cannot glob-import a module into itself.
+
+error[E0432]: unresolved import `foo::*`
+  --> $DIR/issue-8208.rs:15:9
+   |
+LL |     use foo::*; //~ ERROR: unresolved import `foo::*` [E0432]
+   |         ^^^^^^ Cannot glob-import a module into itself.
+
+error[E0432]: unresolved import `super::bar::*`
+  --> $DIR/issue-8208.rs:19:13
+   |
+LL |         use super::bar::*;
+   |             ^^^^^^^^^^^^^ Cannot glob-import a module into itself.
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/compile-fail/issue-8460-const.rs b/src/test/ui/issue-8460-const.rs
index b0d6cb5df87..b0d6cb5df87 100644
--- a/src/test/compile-fail/issue-8460-const.rs
+++ b/src/test/ui/issue-8460-const.rs
diff --git a/src/test/ui/issue-8460-const.stderr b/src/test/ui/issue-8460-const.stderr
new file mode 100644
index 00000000000..db35cde7569
--- /dev/null
+++ b/src/test/ui/issue-8460-const.stderr
@@ -0,0 +1,248 @@
+error: attempt to divide with overflow
+  --> $DIR/issue-8460-const.rs:17:36
+   |
+LL |     assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-8460-const.rs:11:9
+   |
+LL | #![deny(const_err)]
+   |         ^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:17:36
+   |
+LL |     assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^^^ attempt to divide with overflow
+
+error: attempt to divide with overflow
+  --> $DIR/issue-8460-const.rs:20:36
+   |
+LL |     assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:20:36
+   |
+LL |     assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^ attempt to divide with overflow
+
+error: attempt to divide with overflow
+  --> $DIR/issue-8460-const.rs:23:36
+   |
+LL |     assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:23:36
+   |
+LL |     assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
+
+error: attempt to divide with overflow
+  --> $DIR/issue-8460-const.rs:26:36
+   |
+LL |     assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:26:36
+   |
+LL |     assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
+
+error: attempt to divide with overflow
+  --> $DIR/issue-8460-const.rs:29:36
+   |
+LL |     assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:29:36
+   |
+LL |     assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
+
+error: attempt to divide by zero
+  --> $DIR/issue-8460-const.rs:32:36
+   |
+LL |     assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err());
+   |                                    ^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:32:36
+   |
+LL |     assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err());
+   |                                    ^^^^^^^^^^ attempt to divide by zero
+
+error: attempt to divide by zero
+  --> $DIR/issue-8460-const.rs:35:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err());
+   |                                    ^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:35:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err());
+   |                                    ^^^^^^^ attempt to divide by zero
+
+error: attempt to divide by zero
+  --> $DIR/issue-8460-const.rs:38:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:38:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to divide by zero
+
+error: attempt to divide by zero
+  --> $DIR/issue-8460-const.rs:41:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:41:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to divide by zero
+
+error: attempt to divide by zero
+  --> $DIR/issue-8460-const.rs:44:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:44:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to divide by zero
+
+error: attempt to calculate the remainder with overflow
+  --> $DIR/issue-8460-const.rs:47:36
+   |
+LL |     assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:47:36
+   |
+LL |     assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
+
+error: attempt to calculate the remainder with overflow
+  --> $DIR/issue-8460-const.rs:50:36
+   |
+LL |     assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:50:36
+   |
+LL |     assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^ attempt to calculate the remainder with overflow
+
+error: attempt to calculate the remainder with overflow
+  --> $DIR/issue-8460-const.rs:53:36
+   |
+LL |     assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:53:36
+   |
+LL |     assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
+
+error: attempt to calculate the remainder with overflow
+  --> $DIR/issue-8460-const.rs:56:36
+   |
+LL |     assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:56:36
+   |
+LL |     assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
+
+error: attempt to calculate the remainder with overflow
+  --> $DIR/issue-8460-const.rs:59:36
+   |
+LL |     assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:59:36
+   |
+LL |     assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err());
+   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
+
+error: attempt to calculate the remainder with a divisor of zero
+  --> $DIR/issue-8460-const.rs:62:36
+   |
+LL |     assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err());
+   |                                    ^^^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:62:36
+   |
+LL |     assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err());
+   |                                    ^^^^^^^^^^ attempt to calculate the remainder with a divisor of zero
+
+error: attempt to calculate the remainder with a divisor of zero
+  --> $DIR/issue-8460-const.rs:65:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err());
+   |                                    ^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:65:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err());
+   |                                    ^^^^^^^ attempt to calculate the remainder with a divisor of zero
+
+error: attempt to calculate the remainder with a divisor of zero
+  --> $DIR/issue-8460-const.rs:68:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:68:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
+
+error: attempt to calculate the remainder with a divisor of zero
+  --> $DIR/issue-8460-const.rs:71:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:71:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
+
+error: attempt to calculate the remainder with a divisor of zero
+  --> $DIR/issue-8460-const.rs:74:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err());
+   |                                    ^^^^^^^^
+
+error: this expression will panic at runtime
+  --> $DIR/issue-8460-const.rs:74:36
+   |
+LL |     assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err());
+   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
+
+error: aborting due to 40 previous errors
+
diff --git a/src/test/compile-fail/issue-8640.rs b/src/test/ui/issue-8640.rs
index c4ca3acf080..c4ca3acf080 100644
--- a/src/test/compile-fail/issue-8640.rs
+++ b/src/test/ui/issue-8640.rs
diff --git a/src/test/ui/issue-8640.stderr b/src/test/ui/issue-8640.stderr
new file mode 100644
index 00000000000..68fdea6e228
--- /dev/null
+++ b/src/test/ui/issue-8640.stderr
@@ -0,0 +1,17 @@
+error[E0255]: the name `bar` is defined multiple times
+  --> $DIR/issue-8640.rs:15:5
+   |
+LL |     use baz::bar;
+   |         -------- previous import of the module `bar` here
+LL |     mod bar {}
+   |     ^^^^^^^ `bar` redefined here
+   |
+   = note: `bar` must be defined only once in the type namespace of this module
+help: You can use `as` to change the binding name of the import
+   |
+LL |     use baz::bar as other_bar;
+   |         ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0255`.
diff --git a/src/test/compile-fail/issue-8727.rs b/src/test/ui/issue-8727.rs
index 18b7948c46c..fc88a2c81b4 100644
--- a/src/test/compile-fail/issue-8727.rs
+++ b/src/test/ui/issue-8727.rs
@@ -8,14 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:reached the recursion limit while instantiating `generic::<std::option::Option<
-
 // Verify the compiler fails with an error on infinite function
 // recursions.
 
 fn generic<T>() {
     generic::<Option<T>>();
 }
+//~^^^ ERROR reached the recursion limit while instantiating `generic::<std::option::Option<
+//~| WARN function cannot return without recurring
+
 
 
 fn main () {
diff --git a/src/test/ui/issue-8727.stderr b/src/test/ui/issue-8727.stderr
new file mode 100644
index 00000000000..28fb71bcc17
--- /dev/null
+++ b/src/test/ui/issue-8727.stderr
@@ -0,0 +1,21 @@
+warning: function cannot return without recurring
+  --> $DIR/issue-8727.rs:14:1
+   |
+LL | fn generic<T>() {
+   | ^^^^^^^^^^^^^^^ cannot return without recurring
+LL |     generic::<Option<T>>();
+   |     ---------------------- recursive call site
+   |
+   = note: #[warn(unconditional_recursion)] on by default
+   = help: a `loop` may express intention better if this is on purpose
+
+error: reached the recursion limit while instantiating `generic::<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<i32>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+  --> $DIR/issue-8727.rs:14:1
+   |
+LL | / fn generic<T>() {
+LL | |     generic::<Option<T>>();
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/issue-8761.rs b/src/test/ui/issue-8761.rs
index f8424ea64ef..f8424ea64ef 100644
--- a/src/test/compile-fail/issue-8761.rs
+++ b/src/test/ui/issue-8761.rs
diff --git a/src/test/ui/issue-8761.stderr b/src/test/ui/issue-8761.stderr
new file mode 100644
index 00000000000..b8144df3835
--- /dev/null
+++ b/src/test/ui/issue-8761.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-8761.rs:12:9
+   |
+LL |     A = 1i64,
+   |         ^^^^ expected isize, found i64
+
+error[E0308]: mismatched types
+  --> $DIR/issue-8761.rs:15:9
+   |
+LL |     B = 2u8
+   |         ^^^ expected isize, found u8
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-8767.rs b/src/test/ui/issue-8767.rs
index 926cae788aa..926cae788aa 100644
--- a/src/test/compile-fail/issue-8767.rs
+++ b/src/test/ui/issue-8767.rs
diff --git a/src/test/ui/issue-8767.stderr b/src/test/ui/issue-8767.stderr
new file mode 100644
index 00000000000..d03e20ba270
--- /dev/null
+++ b/src/test/ui/issue-8767.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `B` in this scope
+  --> $DIR/issue-8767.rs:11:6
+   |
+LL | impl B { //~ ERROR cannot find type `B` in this scope
+   |      ^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/compile-fail/issue-9575.rs b/src/test/ui/issue-9575.rs
index 9295eeb1779..9295eeb1779 100644
--- a/src/test/compile-fail/issue-9575.rs
+++ b/src/test/ui/issue-9575.rs
diff --git a/src/test/ui/issue-9575.stderr b/src/test/ui/issue-9575.stderr
new file mode 100644
index 00000000000..d52669777bd
--- /dev/null
+++ b/src/test/ui/issue-9575.stderr
@@ -0,0 +1,12 @@
+error[E0308]: start function has wrong type
+  --> $DIR/issue-9575.rs:14:1
+   |
+LL | fn start(argc: isize, argv: *const *const u8, crate_map: *const u8) -> isize {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
+   |
+   = note: expected type `fn(isize, *const *const u8) -> isize`
+              found type `fn(isize, *const *const u8, *const u8) -> isize`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/compile-fail/issue-9725.rs b/src/test/ui/issue-9725.rs
index f53122d19c1..f53122d19c1 100644
--- a/src/test/compile-fail/issue-9725.rs
+++ b/src/test/ui/issue-9725.rs
diff --git a/src/test/ui/issue-9725.stderr b/src/test/ui/issue-9725.stderr
new file mode 100644
index 00000000000..1d7fdad82a0
--- /dev/null
+++ b/src/test/ui/issue-9725.stderr
@@ -0,0 +1,18 @@
+error[E0416]: identifier `foo` is bound more than once in the same pattern
+  --> $DIR/issue-9725.rs:14:18
+   |
+LL |     let A { foo, foo } = A { foo: 3 };
+   |                  ^^^ used in a pattern more than once
+
+error[E0025]: field `foo` bound multiple times in the pattern
+  --> $DIR/issue-9725.rs:14:18
+   |
+LL |     let A { foo, foo } = A { foo: 3 };
+   |             ---  ^^^ multiple uses of `foo` in pattern
+   |             |
+   |             first use of `foo`
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0025, E0416.
+For more information about an error, try `rustc --explain E0025`.
diff --git a/src/test/compile-fail/issue-9814.rs b/src/test/ui/issue-9814.rs
index 226734b84d6..226734b84d6 100644
--- a/src/test/compile-fail/issue-9814.rs
+++ b/src/test/ui/issue-9814.rs
diff --git a/src/test/ui/issue-9814.stderr b/src/test/ui/issue-9814.stderr
new file mode 100644
index 00000000000..2e85bd46fe6
--- /dev/null
+++ b/src/test/ui/issue-9814.stderr
@@ -0,0 +1,9 @@
+error[E0614]: type `Foo` cannot be dereferenced
+  --> $DIR/issue-9814.rs:17:13
+   |
+LL |     let _ = *Foo::Bar(2); //~ ERROR type `Foo` cannot be dereferenced
+   |             ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0614`.
diff --git a/src/test/compile-fail/issue-pr29383.rs b/src/test/ui/issue-pr29383.rs
index b60c537e1e6..b60c537e1e6 100644
--- a/src/test/compile-fail/issue-pr29383.rs
+++ b/src/test/ui/issue-pr29383.rs
diff --git a/src/test/ui/issue-pr29383.stderr b/src/test/ui/issue-pr29383.stderr
new file mode 100644
index 00000000000..9b8956da7a2
--- /dev/null
+++ b/src/test/ui/issue-pr29383.stderr
@@ -0,0 +1,15 @@
+error[E0532]: expected tuple struct/variant, found unit variant `E::A`
+  --> $DIR/issue-pr29383.rs:19:14
+   |
+LL |         Some(E::A(..)) => {} //~ ERROR expected tuple struct/variant, found unit variant `E::A`
+   |              ^^^^ not a tuple struct/variant
+
+error[E0532]: expected tuple struct/variant, found unit variant `E::B`
+  --> $DIR/issue-pr29383.rs:20:14
+   |
+LL |         Some(E::B(..)) => {} //~ ERROR expected tuple struct/variant, found unit variant `E::B`
+   |              ^^^^ not a tuple struct/variant
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0532`.
diff --git a/src/tools/clippy b/src/tools/clippy
-Subproject 5e085e43104f6748a9717bb78de8b634712638b
+Subproject 3246a1f5c0ecd85e53f9d2564305a3f7f063064
diff --git a/src/tools/miri b/src/tools/miri
-Subproject 5b7bb32b0e46d195b80c4da09b560ac7fc92015
+Subproject 911aedf736992e907d11cb494167f41f28d0236