about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-29 21:55:59 +0000
committerbors <bors@rust-lang.org>2019-05-29 21:55:59 +0000
commit413790186c65e782e2c0183e933686f7bf35e158 (patch)
treef21577d7e36bcdacd546f0163aa3bbc4490a6758
parent37d001e4deb206ed954fde5d91690221e8306fc3 (diff)
parent83660b62734c4f966c536b60864bb51fac696f6c (diff)
downloadrust-413790186c65e782e2c0183e933686f7bf35e158.tar.gz
rust-413790186c65e782e2c0183e933686f7bf35e158.zip
Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centril
Warn on bare_trait_objects by default

The `bare_trait_objects` lint is set to `warn` by default.
Most ui tests have been updated to use `dyn` to avoid creating noise in stderr files.

r? @Centril

cc #54910
-rw-r--r--src/librustc/lint/builtin.rs2
-rw-r--r--src/libstd/error.rs18
-rw-r--r--src/libstd/fs.rs2
-rw-r--r--src/test/compile-fail/issue-23595-1.rs2
-rw-r--r--src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs2
-rw-r--r--src/test/run-pass/alignment-gep-tup-like-1.rs4
-rw-r--r--src/test/run-pass/associated-types/associated-types-doubleendediterator-object.rs2
-rw-r--r--src/test/run-pass/associated-types/associated-types-eq-obj.rs2
-rw-r--r--src/test/run-pass/associated-types/associated-types-projection-in-object-type.rs6
-rw-r--r--src/test/run-pass/autoref-autoderef/autoderef-method-on-trait.rs2
-rw-r--r--src/test/run-pass/borrowck/borrowck-trait-lifetime.rs4
-rw-r--r--src/test/run-pass/cast-rfc0401-vtable-kinds.rs10
-rw-r--r--src/test/run-pass/cast-rfc0401.rs4
-rw-r--r--src/test/run-pass/close-over-big-then-small-data.rs4
-rw-r--r--src/test/run-pass/codegen-object-shim.rs2
-rw-r--r--src/test/run-pass/coerce/coerce-expect-unsized.rs18
-rw-r--r--src/test/run-pass/consts/const-trait-to-trait.rs8
-rw-r--r--src/test/run-pass/deriving/deriving-show.rs2
-rw-r--r--src/test/run-pass/drop/drop-struct-as-object.rs2
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-coerce-custom.rs2
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-coerce-rc.rs8
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-coercions.rs12
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-field-align.rs8
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-index.rs6
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-raw.rs12
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-trait-tuple.rs22
-rw-r--r--src/test/run-pass/dynamically-sized-types/dst-trait.rs22
-rw-r--r--src/test/run-pass/extern/extern-types-trait-impl.rs2
-rw-r--r--src/test/run-pass/fat-ptr-cast.rs2
-rw-r--r--src/test/run-pass/functions-closures/closure-expected-type/issue-38714.rs2
-rw-r--r--src/test/run-pass/generics/generic-object.rs2
-rw-r--r--src/test/run-pass/hashmap-memory.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-binder-levels-in-object-types.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-fn-like-trait-object.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-parse.rs4
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-precedence-of-plus.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-resolve-lifetime.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs2
-rw-r--r--src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-passed-to-closure.rs2
-rw-r--r--src/test/run-pass/ifmt.rs2
-rw-r--r--src/test/run-pass/issues/issue-10802.rs8
-rw-r--r--src/test/run-pass/issues/issue-11205.rs36
-rw-r--r--src/test/run-pass/issues/issue-11267.rs2
-rw-r--r--src/test/run-pass/issues/issue-11677.rs4
-rw-r--r--src/test/run-pass/issues/issue-11709.rs2
-rw-r--r--src/test/run-pass/issues/issue-12744.rs2
-rw-r--r--src/test/run-pass/issues/issue-13507-2.rs2
-rw-r--r--src/test/run-pass/issues/issue-13808.rs2
-rw-r--r--src/test/run-pass/issues/issue-14399.rs2
-rw-r--r--src/test/run-pass/issues/issue-14589.rs6
-rw-r--r--src/test/run-pass/issues/issue-14821.rs8
-rw-r--r--src/test/run-pass/issues/issue-14919.rs2
-rw-r--r--src/test/run-pass/issues/issue-14958.rs12
-rw-r--r--src/test/run-pass/issues/issue-15155.rs8
-rw-r--r--src/test/run-pass/issues/issue-15763.rs8
-rw-r--r--src/test/run-pass/issues/issue-16739.rs6
-rw-r--r--src/test/run-pass/issues/issue-16922.rs2
-rw-r--r--src/test/run-pass/issues/issue-17322.rs4
-rw-r--r--src/test/run-pass/issues/issue-17351.rs2
-rw-r--r--src/test/run-pass/issues/issue-17771.rs6
-rw-r--r--src/test/run-pass/issues/issue-17897.rs2
-rw-r--r--src/test/run-pass/issues/issue-20055-box-trait.rs2
-rw-r--r--src/test/run-pass/issues/issue-20575.rs2
-rw-r--r--src/test/run-pass/issues/issue-20676.rs2
-rw-r--r--src/test/run-pass/issues/issue-20953.rs4
-rw-r--r--src/test/run-pass/issues/issue-21058.rs2
-rw-r--r--src/test/run-pass/issues/issue-21361.rs4
-rw-r--r--src/test/run-pass/issues/issue-21655.rs2
-rw-r--r--src/test/run-pass/issues/issue-2190-1.rs4
-rw-r--r--src/test/run-pass/issues/issue-22346.rs2
-rw-r--r--src/test/run-pass/issues/issue-2288.rs4
-rw-r--r--src/test/run-pass/issues/issue-23261.rs4
-rw-r--r--src/test/run-pass/issues/issue-23485.rs2
-rw-r--r--src/test/run-pass/issues/issue-24010.rs2
-rw-r--r--src/test/run-pass/issues/issue-24086.rs4
-rw-r--r--src/test/run-pass/issues/issue-25339.rs2
-rw-r--r--src/test/run-pass/issues/issue-25515.rs2
-rw-r--r--src/test/run-pass/issues/issue-25549-multiple-drop.rs2
-rw-r--r--src/test/run-pass/issues/issue-25757.rs2
-rw-r--r--src/test/run-pass/issues/issue-26641.rs2
-rw-r--r--src/test/run-pass/issues/issue-26709.rs2
-rw-r--r--src/test/run-pass/issues/issue-26802.rs2
-rw-r--r--src/test/run-pass/issues/issue-26805.rs2
-rw-r--r--src/test/run-pass/issues/issue-26905.rs2
-rw-r--r--src/test/run-pass/issues/issue-27268.rs2
-rw-r--r--src/test/run-pass/issues/issue-2734.rs4
-rw-r--r--src/test/run-pass/issues/issue-2735.rs4
-rw-r--r--src/test/run-pass/issues/issue-27890.rs4
-rw-r--r--src/test/run-pass/issues/issue-2935.rs2
-rw-r--r--src/test/run-pass/issues/issue-3052.rs2
-rw-r--r--src/test/run-pass/issues/issue-30530.rs4
-rw-r--r--src/test/run-pass/issues/issue-30615.rs2
-rw-r--r--src/test/run-pass/issues/issue-32389.rs2
-rw-r--r--src/test/run-pass/issues/issue-33387.rs8
-rw-r--r--src/test/run-pass/issues/issue-33461.rs2
-rw-r--r--src/test/run-pass/issues/issue-34503.rs2
-rw-r--r--src/test/run-pass/issues/issue-35815.rs2
-rw-r--r--src/test/run-pass/issues/issue-36260.rs2
-rw-r--r--src/test/run-pass/issues/issue-36786-resolve-call.rs2
-rw-r--r--src/test/run-pass/issues/issue-3702.rs2
-rw-r--r--src/test/run-pass/issues/issue-3794.rs4
-rw-r--r--src/test/run-pass/issues/issue-39292.rs2
-rw-r--r--src/test/run-pass/issues/issue-39823.rs8
-rw-r--r--src/test/run-pass/issues/issue-41053.rs4
-rw-r--r--src/test/run-pass/issues/issue-41744.rs2
-rw-r--r--src/test/run-pass/issues/issue-42210.rs4
-rw-r--r--src/test/run-pass/issues/issue-43132.rs2
-rw-r--r--src/test/run-pass/issues/issue-4333.rs2
-rw-r--r--src/test/run-pass/issues/issue-47638.rs4
-rw-r--r--src/test/run-pass/issues/issue-5008-borrowed-traitobject-method-call.rs4
-rw-r--r--src/test/run-pass/issues/issue-5192.rs6
-rw-r--r--src/test/run-pass/issues/issue-5666.rs2
-rw-r--r--src/test/run-pass/issues/issue-5708.rs10
-rw-r--r--src/test/run-pass/issues/issue-5988.rs2
-rw-r--r--src/test/run-pass/issues/issue-6128.rs2
-rw-r--r--src/test/run-pass/issues/issue-6157.rs4
-rw-r--r--src/test/run-pass/issues/issue-6318.rs4
-rw-r--r--src/test/run-pass/issues/issue-7563.rs2
-rw-r--r--src/test/run-pass/issues/issue-7911.rs12
-rw-r--r--src/test/run-pass/issues/issue-8248.rs4
-rw-r--r--src/test/run-pass/issues/issue-8249.rs4
-rw-r--r--src/test/run-pass/issues/issue-9129.rs4
-rw-r--r--src/test/run-pass/issues/issue-9394-inherited-trait-calls.rs2
-rw-r--r--src/test/run-pass/issues/issue-9951.rs10
-rw-r--r--src/test/run-pass/last-use-in-cap-clause.rs2
-rw-r--r--src/test/run-pass/macros/colorful-write-macros.rs4
-rw-r--r--src/test/run-pass/macros/type-macros-simple.rs2
-rw-r--r--src/test/run-pass/methods/method-argument-inference-associated-type.rs4
-rw-r--r--src/test/run-pass/mir/mir_codegen_calls.rs8
-rw-r--r--src/test/run-pass/mir/mir_codegen_critical_edge.rs2
-rw-r--r--src/test/run-pass/mir/mir_coercions.rs10
-rw-r--r--src/test/run-pass/mir/mir_raw_fat_ptr.rs6
-rw-r--r--src/test/run-pass/new-box.rs6
-rw-r--r--src/test/run-pass/newlambdas-ret-infer.rs2
-rw-r--r--src/test/run-pass/newlambdas-ret-infer2.rs2
-rw-r--r--src/test/run-pass/object-lifetime-default-default-to-static.rs12
-rw-r--r--src/test/run-pass/object-lifetime-default-from-rptr-box.rs10
-rw-r--r--src/test/run-pass/object-lifetime-default-from-rptr-mut.rs12
-rw-r--r--src/test/run-pass/object-lifetime-default-from-rptr.rs16
-rw-r--r--src/test/run-pass/object-method-numbering.rs2
-rw-r--r--src/test/run-pass/objects-coerce-freeze-borrored.rs6
-rw-r--r--src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs8
-rw-r--r--src/test/run-pass/objects-owned-object-owned-method.rs2
-rw-r--r--src/test/run-pass/overloaded/overloaded-calls-object-one-arg.rs2
-rw-r--r--src/test/run-pass/overloaded/overloaded-calls-object-two-args.rs2
-rw-r--r--src/test/run-pass/overloaded/overloaded-calls-object-zero-args.rs2
-rw-r--r--src/test/run-pass/panics/panic-safe.rs2
-rw-r--r--src/test/run-pass/privacy/privacy-ns.rs12
-rw-r--r--src/test/run-pass/raw-fat-ptr.rs4
-rw-r--r--src/test/run-pass/regions/regions-bound-lists-feature-gate.rs2
-rw-r--r--src/test/run-pass/regions/regions-close-over-type-parameter-successfully.rs4
-rw-r--r--src/test/run-pass/regions/regions-copy-closure.rs4
-rw-r--r--src/test/run-pass/regions/regions-debruijn-of-object.rs4
-rw-r--r--src/test/run-pass/regions/regions-early-bound-trait-param.rs18
-rw-r--r--src/test/run-pass/regions/regions-fn-subtyping-2.rs4
-rw-r--r--src/test/run-pass/regions/regions-fn-subtyping.rs8
-rw-r--r--src/test/run-pass/regions/regions-infer-region-in-fn-but-not-type.rs2
-rw-r--r--src/test/run-pass/regions/regions-lifetime-nonfree-late-bound.rs8
-rw-r--r--src/test/run-pass/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs2
-rw-r--r--src/test/run-pass/regions/regions-static-closure.rs4
-rw-r--r--src/test/run-pass/regions/regions-trait-object-1.rs4
-rw-r--r--src/test/run-pass/string-box-error.rs8
-rw-r--r--src/test/run-pass/structs-enums/class-cast-to-trait-cross-crate-2.rs4
-rw-r--r--src/test/run-pass/structs-enums/class-cast-to-trait-multiple-types.rs2
-rw-r--r--src/test/run-pass/structs-enums/class-cast-to-trait.rs2
-rw-r--r--src/test/run-pass/structs-enums/class-separate-impl.rs4
-rw-r--r--src/test/run-pass/structs-enums/enum-null-pointer-opt.rs6
-rw-r--r--src/test/run-pass/structs-enums/object-lifetime-default-from-ref-struct.rs22
-rw-r--r--src/test/run-pass/structs-enums/object-lifetime-default-from-rptr-struct.rs10
-rw-r--r--src/test/run-pass/traits/auto-traits.rs2
-rw-r--r--src/test/run-pass/traits/impl-inherent-prefer-over-trait.rs4
-rw-r--r--src/test/run-pass/traits/infer-from-object-trait-issue-26952.rs2
-rw-r--r--src/test/run-pass/traits/kindck-owned-trait-contains-1.rs4
-rw-r--r--src/test/run-pass/traits/object-one-type-two-traits.rs10
-rw-r--r--src/test/run-pass/traits/parameterized-trait-with-bounds.rs10
-rw-r--r--src/test/run-pass/traits/trait-bounds-basic.rs8
-rw-r--r--src/test/run-pass/traits/trait-bounds-in-arc.rs22
-rw-r--r--src/test/run-pass/traits/trait-bounds-on-structs-and-enums.rs4
-rw-r--r--src/test/run-pass/traits/trait-coercion-generic.rs4
-rw-r--r--src/test/run-pass/traits/trait-coercion.rs6
-rw-r--r--src/test/run-pass/traits/trait-impl-2.rs2
-rw-r--r--src/test/run-pass/traits/trait-impl.rs6
-rw-r--r--src/test/run-pass/traits/trait-inheritance-cast-without-call-to-supertrait.rs4
-rw-r--r--src/test/run-pass/traits/trait-inheritance-cast.rs4
-rw-r--r--src/test/run-pass/traits/trait-object-exclusion.rs2
-rw-r--r--src/test/run-pass/traits/trait-object-generics.rs4
-rw-r--r--src/test/run-pass/traits/trait-object-lifetime-first.rs4
-rw-r--r--src/test/run-pass/traits/trait-object-with-lifetime-bound.rs4
-rw-r--r--src/test/run-pass/traits/trait-region-pointer-simple.rs2
-rw-r--r--src/test/run-pass/traits/traits-impl-object-overlap-issue-23853.rs2
-rw-r--r--src/test/run-pass/traits/traits-issue-26339.rs2
-rw-r--r--src/test/run-pass/traits/traits-repeated-supertrait.rs2
-rw-r--r--src/test/run-pass/traits/ufcs-trait-object.rs2
-rw-r--r--src/test/run-pass/trivial_casts.rs14
-rw-r--r--src/test/run-pass/type-id-higher-rank-2.rs6
-rw-r--r--src/test/run-pass/type-id-higher-rank.rs18
-rw-r--r--src/test/run-pass/type-infer-generalize-ty-var.rs8
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn-mut.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-boxed.rs4
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-extern-fn-hr.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-infer-recursive-fn.rs8
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-manual-impl.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-monomorphization.rs2
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-prelude.rs4
-rw-r--r--src/test/run-pass/unboxed-closures/unboxed-closures-sugar-object.rs2
-rw-r--r--src/test/run-pass/unique/unique-object-move.rs2
-rw-r--r--src/test/run-pass/unsized2.rs16
-rw-r--r--src/test/run-pass/wf-bound-region-in-object-type.rs2
-rw-r--r--src/test/ui/anonymous-higher-ranked-lifetime.rs8
-rw-r--r--src/test/ui/anonymous-higher-ranked-lifetime.stderr32
-rw-r--r--src/test/ui/associated-const/associated-const-in-trait.rs2
-rw-r--r--src/test/ui/associated-const/associated-const-in-trait.stderr4
-rw-r--r--src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.rs2
-rw-r--r--src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr10
-rw-r--r--src/test/ui/associated-types/associated-types-eq-3.rs2
-rw-r--r--src/test/ui/associated-types/associated-types-incomplete-object.rs8
-rw-r--r--src/test/ui/associated-types/associated-types-incomplete-object.stderr12
-rw-r--r--src/test/ui/associated-types/associated-types-overridden-binding-2.rs2
-rw-r--r--src/test/ui/associated-types/associated-types-overridden-binding-2.stderr6
-rw-r--r--src/test/ui/associated-types/associated-types-overridden-binding.rs2
-rw-r--r--src/test/ui/associated-types/bound-lifetime-constrained.object.stderr12
-rw-r--r--src/test/ui/associated-types/bound-lifetime-constrained.rs4
-rw-r--r--src/test/ui/associated-types/bound-lifetime-in-binding-only.angle.stderr6
-rw-r--r--src/test/ui/associated-types/bound-lifetime-in-binding-only.paren.stderr6
-rw-r--r--src/test/ui/associated-types/bound-lifetime-in-binding-only.rs4
-rw-r--r--src/test/ui/associated-types/bound-lifetime-in-return-only.rs4
-rw-r--r--src/test/ui/async-await/async-with-closure.rs2
-rw-r--r--src/test/ui/async-await/issues/issue-53249.rs2
-rw-r--r--src/test/ui/async-await/issues/issue-54974.rs2
-rw-r--r--src/test/ui/bad/bad-sized.rs2
-rw-r--r--src/test/ui/bad/bad-sized.stderr26
-rw-r--r--src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs2
-rw-r--r--src/test/ui/borrowck/borrowck-consume-upcast-box.rs4
-rw-r--r--src/test/ui/borrowck/borrowck-consume-upcast-box.stderr2
-rw-r--r--src/test/ui/borrowck/borrowck-escaping-closure-error-2.rs2
-rw-r--r--src/test/ui/borrowck/borrowck-in-static.rs2
-rw-r--r--src/test/ui/borrowck/borrowck-object-lifetime.rs8
-rw-r--r--src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs2
-rw-r--r--src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr2
-rw-r--r--src/test/ui/borrowck/regions-escape-unboxed-closure.rs2
-rw-r--r--src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr2
-rw-r--r--src/test/ui/borrowck/two-phase-nonrecv-autoref.rs6
-rw-r--r--src/test/ui/bounds-lifetime.rs2
-rw-r--r--src/test/ui/bounds-lifetime.stderr6
-rw-r--r--src/test/ui/cast/cast-to-unsized-trait-object-suggestion.rs4
-rw-r--r--src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr12
-rw-r--r--src/test/ui/casts-differing-anon.rs2
-rw-r--r--src/test/ui/class-cast-to-trait.rs2
-rw-r--r--src/test/ui/closure_context/issue-26046-fn-mut.rs2
-rw-r--r--src/test/ui/closure_context/issue-26046-fn-once.rs2
-rw-r--r--src/test/ui/closures/closure-immutable-outer-variable.fixed2
-rw-r--r--src/test/ui/closures/closure-immutable-outer-variable.rs2
-rw-r--r--src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs4
-rw-r--r--src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr10
-rw-r--r--src/test/ui/codemap_tests/two_files_data.rs2
-rw-r--r--src/test/ui/coercion/coerce-expect-unsized-ascribed.rs16
-rw-r--r--src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr14
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr2
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr2
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs2
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr12
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr12
-rw-r--r--src/test/ui/coherence/coherence-impl-trait-for-trait.rs8
-rw-r--r--src/test/ui/confuse-field-and-method/issue-2392.rs8
-rw-r--r--src/test/ui/confuse-field-and-method/issue-32128.rs2
-rw-r--r--src/test/ui/consts/const-eval/const_transmute.rs2
-rw-r--r--src/test/ui/consts/const-eval/issue-53401.rs2
-rw-r--r--src/test/ui/consts/const-eval/ub-upvars.rs2
-rw-r--r--src/test/ui/consts/const-eval/ub-upvars.stderr2
-rw-r--r--src/test/ui/consts/const-eval/union-ub-fat-ptr.rs10
-rw-r--r--src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr16
-rw-r--r--src/test/ui/consts/const-unsized.rs4
-rw-r--r--src/test/ui/consts/const-unsized.stderr8
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr4
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_fn.rs2
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_fn.stderr4
-rw-r--r--src/test/ui/cross/cross-borrow-trait.rs8
-rw-r--r--src/test/ui/cross/cross-borrow-trait.stderr12
-rw-r--r--src/test/ui/custom-test-frameworks-simple.rs2
-rw-r--r--src/test/ui/cycle-trait/cycle-trait-default-type-trait.rs2
-rw-r--r--src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr10
-rw-r--r--src/test/ui/destructure-trait-ref.rs19
-rw-r--r--src/test/ui/destructure-trait-ref.stderr18
-rw-r--r--src/test/ui/did_you_mean/E0178.rs2
-rw-r--r--src/test/ui/did_you_mean/E0178.stderr8
-rw-r--r--src/test/ui/did_you_mean/bad-assoc-ty.rs2
-rw-r--r--src/test/ui/did_you_mean/bad-assoc-ty.stderr8
-rw-r--r--src/test/ui/did_you_mean/issue-40006.rs2
-rw-r--r--src/test/ui/did_you_mean/issue-40006.stderr10
-rw-r--r--src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs2
-rw-r--r--src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr6
-rw-r--r--src/test/ui/dropck/dropck_trait_cycle_checked.rs16
-rw-r--r--src/test/ui/dropck/dropck_trait_cycle_checked.stderr24
-rw-r--r--src/test/ui/dst/dst-bad-assign-2.rs4
-rw-r--r--src/test/ui/dst/dst-bad-assign-3.rs4
-rw-r--r--src/test/ui/dst/dst-bad-assign.rs4
-rw-r--r--src/test/ui/dst/dst-bad-coerce1.rs4
-rw-r--r--src/test/ui/dst/dst-bad-coerce1.stderr12
-rw-r--r--src/test/ui/dst/dst-bad-coerce2.rs4
-rw-r--r--src/test/ui/dst/dst-bad-coerce2.stderr12
-rw-r--r--src/test/ui/dst/dst-bad-coerce3.rs4
-rw-r--r--src/test/ui/dst/dst-bad-coerce3.stderr8
-rw-r--r--src/test/ui/dst/dst-bad-coercions.rs8
-rw-r--r--src/test/ui/dst/dst-bad-coercions.stderr36
-rw-r--r--src/test/ui/dst/dst-index.rs4
-rw-r--r--src/test/ui/dst/dst-object-from-unsized-type.rs8
-rw-r--r--src/test/ui/dst/dst-object-from-unsized-type.stderr24
-rw-r--r--src/test/ui/elide-errors-on-mismatched-tuple.rs2
-rw-r--r--src/test/ui/error-codes/E0033-teach.rs2
-rw-r--r--src/test/ui/error-codes/E0033-teach.stderr10
-rw-r--r--src/test/ui/error-codes/E0033.rs2
-rw-r--r--src/test/ui/error-codes/E0033.stderr10
-rw-r--r--src/test/ui/error-codes/E0038.rs2
-rw-r--r--src/test/ui/error-codes/E0038.stderr4
-rw-r--r--src/test/ui/error-codes/E0120.rs2
-rw-r--r--src/test/ui/error-codes/E0120.stderr4
-rw-r--r--src/test/ui/error-codes/E0191.rs2
-rw-r--r--src/test/ui/error-codes/E0191.stderr4
-rw-r--r--src/test/ui/error-codes/E0220.rs4
-rw-r--r--src/test/ui/error-codes/E0220.stderr10
-rw-r--r--src/test/ui/error-codes/E0393.rs2
-rw-r--r--src/test/ui/error-codes/E0393.stderr6
-rw-r--r--src/test/ui/error-codes/E0478.rs2
-rw-r--r--src/test/ui/error-codes/E0478.stderr4
-rw-r--r--src/test/ui/error-codes/E0719.rs4
-rw-r--r--src/test/ui/error-codes/E0719.stderr10
-rw-r--r--src/test/ui/fat-ptr-cast.rs2
-rw-r--r--src/test/ui/fat-ptr-cast.stderr6
-rw-r--r--src/test/ui/feature-gates/feature-gate-trivial_bounds.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsized_locals.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsized_locals.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr6
-rw-r--r--src/test/ui/fn/fn-trait-formatting.rs6
-rw-r--r--src/test/ui/fn/fn-trait-formatting.stderr12
-rw-r--r--src/test/ui/higher-lifetime-bounds.rs4
-rw-r--r--src/test/ui/higher-lifetime-bounds.stderr12
-rw-r--r--src/test/ui/imports/extern-crate-used.rs8
-rw-r--r--src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs4
-rw-r--r--src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr6
-rw-r--r--src/test/ui/issues/issue-10291.nll.stderr2
-rw-r--r--src/test/ui/issues/issue-10291.rs2
-rw-r--r--src/test/ui/issues/issue-10291.stderr8
-rw-r--r--src/test/ui/issues/issue-10902.rs8
-rw-r--r--src/test/ui/issues/issue-11374.rs6
-rw-r--r--src/test/ui/issues/issue-11515.rs4
-rw-r--r--src/test/ui/issues/issue-11612.rs4
-rw-r--r--src/test/ui/issues/issue-12470.rs4
-rw-r--r--src/test/ui/issues/issue-13033.rs4
-rw-r--r--src/test/ui/issues/issue-13033.stderr12
-rw-r--r--src/test/ui/issues/issue-13352.rs2
-rw-r--r--src/test/ui/issues/issue-13853-2.rs2
-rw-r--r--src/test/ui/issues/issue-13853-2.stderr6
-rw-r--r--src/test/ui/issues/issue-14285.rs4
-rw-r--r--src/test/ui/issues/issue-14285.stderr4
-rw-r--r--src/test/ui/issues/issue-14366.rs2
-rw-r--r--src/test/ui/issues/issue-14366.stderr2
-rw-r--r--src/test/ui/issues/issue-14901.rs4
-rw-r--r--src/test/ui/issues/issue-14959.rs12
-rw-r--r--src/test/ui/issues/issue-16668.rs2
-rw-r--r--src/test/ui/issues/issue-16922.rs4
-rw-r--r--src/test/ui/issues/issue-16922.stderr4
-rw-r--r--src/test/ui/issues/issue-16994.rs2
-rw-r--r--src/test/ui/issues/issue-17441.rs4
-rw-r--r--src/test/ui/issues/issue-17441.stderr12
-rw-r--r--src/test/ui/issues/issue-17959.rs2
-rw-r--r--src/test/ui/issues/issue-18107.rs2
-rw-r--r--src/test/ui/issues/issue-18107.stderr4
-rw-r--r--src/test/ui/issues/issue-18188.rs2
-rw-r--r--src/test/ui/issues/issue-18446-2.rs2
-rw-r--r--src/test/ui/issues/issue-18446.rs4
-rw-r--r--src/test/ui/issues/issue-18783.rs6
-rw-r--r--src/test/ui/issues/issue-18819.rs2
-rw-r--r--src/test/ui/issues/issue-18819.stderr4
-rw-r--r--src/test/ui/issues/issue-18919.rs2
-rw-r--r--src/test/ui/issues/issue-18937.rs2
-rw-r--r--src/test/ui/issues/issue-18959.rs4
-rw-r--r--src/test/ui/issues/issue-18959.stderr4
-rw-r--r--src/test/ui/issues/issue-18988.rs2
-rw-r--r--src/test/ui/issues/issue-19380.rs2
-rw-r--r--src/test/ui/issues/issue-19380.stderr4
-rw-r--r--src/test/ui/issues/issue-19404.rs8
-rw-r--r--src/test/ui/issues/issue-19482.rs2
-rw-r--r--src/test/ui/issues/issue-19482.stderr4
-rw-r--r--src/test/ui/issues/issue-19538.rs2
-rw-r--r--src/test/ui/issues/issue-19538.stderr10
-rw-r--r--src/test/ui/issues/issue-20396.rs2
-rw-r--r--src/test/ui/issues/issue-20605.rs2
-rw-r--r--src/test/ui/issues/issue-20692.rs2
-rw-r--r--src/test/ui/issues/issue-20692.stderr4
-rw-r--r--src/test/ui/issues/issue-20831-debruijn.rs6
-rw-r--r--src/test/ui/issues/issue-20831-debruijn.stderr12
-rw-r--r--src/test/ui/issues/issue-20939.rs2
-rw-r--r--src/test/ui/issues/issue-20939.stderr4
-rw-r--r--src/test/ui/issues/issue-21363.rs2
-rw-r--r--src/test/ui/issues/issue-21950.rs2
-rw-r--r--src/test/ui/issues/issue-21950.stderr10
-rw-r--r--src/test/ui/issues/issue-22034.rs4
-rw-r--r--src/test/ui/issues/issue-22034.stderr2
-rw-r--r--src/test/ui/issues/issue-22289.rs2
-rw-r--r--src/test/ui/issues/issue-22289.stderr4
-rw-r--r--src/test/ui/issues/issue-22312.rs2
-rw-r--r--src/test/ui/issues/issue-22312.stderr4
-rw-r--r--src/test/ui/issues/issue-22370.rs2
-rw-r--r--src/test/ui/issues/issue-22370.stderr6
-rw-r--r--src/test/ui/issues/issue-22434.rs2
-rw-r--r--src/test/ui/issues/issue-22434.stderr4
-rw-r--r--src/test/ui/issues/issue-22560.rs2
-rw-r--r--src/test/ui/issues/issue-22560.stderr18
-rw-r--r--src/test/ui/issues/issue-22781.rs2
-rw-r--r--src/test/ui/issues/issue-22872.rs2
-rw-r--r--src/test/ui/issues/issue-22872.stderr6
-rw-r--r--src/test/ui/issues/issue-23024.rs4
-rw-r--r--src/test/ui/issues/issue-23024.stderr16
-rw-r--r--src/test/ui/issues/issue-23041.rs2
-rw-r--r--src/test/ui/issues/issue-23046.rs2
-rw-r--r--src/test/ui/issues/issue-23281.rs2
-rw-r--r--src/test/ui/issues/issue-23281.stderr4
-rw-r--r--src/test/ui/issues/issue-24446.rs2
-rw-r--r--src/test/ui/issues/issue-24446.stderr4
-rw-r--r--src/test/ui/issues/issue-25180.rs2
-rw-r--r--src/test/ui/issues/issue-26056.rs2
-rw-r--r--src/test/ui/issues/issue-26056.stderr4
-rw-r--r--src/test/ui/issues/issue-26638.rs2
-rw-r--r--src/test/ui/issues/issue-26638.stderr6
-rw-r--r--src/test/ui/issues/issue-26905.rs2
-rw-r--r--src/test/ui/issues/issue-27105.rs2
-rw-r--r--src/test/ui/issues/issue-28279.rs4
-rw-r--r--src/test/ui/issues/issue-28576.rs2
-rw-r--r--src/test/ui/issues/issue-28576.stderr2
-rw-r--r--src/test/ui/issues/issue-2904.rs2
-rw-r--r--src/test/ui/issues/issue-32963.rs2
-rw-r--r--src/test/ui/issues/issue-32963.stderr20
-rw-r--r--src/test/ui/issues/issue-32995.rs4
-rw-r--r--src/test/ui/issues/issue-32995.stderr12
-rw-r--r--src/test/ui/issues/issue-33140-traitobject-crate.rs158
-rw-r--r--src/test/ui/issues/issue-33140-traitobject-crate.stderr26
-rw-r--r--src/test/ui/issues/issue-33140.rs12
-rw-r--r--src/test/ui/issues/issue-33241.rs2
-rw-r--r--src/test/ui/issues/issue-3424.rs2
-rw-r--r--src/test/ui/issues/issue-35139.rs6
-rw-r--r--src/test/ui/issues/issue-35546.rs4
-rw-r--r--src/test/ui/issues/issue-35570.rs2
-rw-r--r--src/test/ui/issues/issue-35976.rs4
-rw-r--r--src/test/ui/issues/issue-3609.rs2
-rw-r--r--src/test/ui/issues/issue-36839.rs2
-rw-r--r--src/test/ui/issues/issue-3702-2.rs4
-rw-r--r--src/test/ui/issues/issue-37515.rs2
-rw-r--r--src/test/ui/issues/issue-37515.stderr4
-rw-r--r--src/test/ui/issues/issue-38404.rs2
-rw-r--r--src/test/ui/issues/issue-38404.stderr4
-rw-r--r--src/test/ui/issues/issue-38604.rs2
-rw-r--r--src/test/ui/issues/issue-38604.stderr4
-rw-r--r--src/test/ui/issues/issue-40000.rs4
-rw-r--r--src/test/ui/issues/issue-41139.rs4
-rw-r--r--src/test/ui/issues/issue-41139.stderr6
-rw-r--r--src/test/ui/issues/issue-42312.rs2
-rw-r--r--src/test/ui/issues/issue-42312.stderr6
-rw-r--r--src/test/ui/issues/issue-4335.rs2
-rw-r--r--src/test/ui/issues/issue-4335.stderr2
-rw-r--r--src/test/ui/issues/issue-45730.rs2
-rw-r--r--src/test/ui/issues/issue-4972.rs4
-rw-r--r--src/test/ui/issues/issue-50761.rs2
-rw-r--r--src/test/ui/issues/issue-50781.rs2
-rw-r--r--src/test/ui/issues/issue-5153.rs2
-rw-r--r--src/test/ui/issues/issue-5153.stderr6
-rw-r--r--src/test/ui/issues/issue-5216.rs4
-rw-r--r--src/test/ui/issues/issue-53419.rs2
-rw-r--r--src/test/ui/issues/issue-54582.rs2
-rw-r--r--src/test/ui/issues/issue-55796.rs4
-rw-r--r--src/test/ui/issues/issue-5883.rs4
-rw-r--r--src/test/ui/issues/issue-5883.stderr2
-rw-r--r--src/test/ui/issues/issue-60989.rs2
-rw-r--r--src/test/ui/issues/issue-60989.stderr4
-rw-r--r--src/test/ui/issues/issue-7013.rs4
-rw-r--r--src/test/ui/issues/issue-7013.stderr2
-rw-r--r--src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs4
-rw-r--r--src/test/ui/issues/issue-8398.rs2
-rw-r--r--src/test/ui/issues/issue-9719.rs12
-rw-r--r--src/test/ui/kindck/kindck-copy.rs12
-rw-r--r--src/test/ui/kindck/kindck-copy.stderr12
-rw-r--r--src/test/ui/kindck/kindck-impl-type-params.nll.stderr24
-rw-r--r--src/test/ui/kindck/kindck-impl-type-params.rs10
-rw-r--r--src/test/ui/kindck/kindck-impl-type-params.stderr26
-rw-r--r--src/test/ui/kindck/kindck-inherited-copy-bound.rs2
-rw-r--r--src/test/ui/kindck/kindck-inherited-copy-bound.stderr6
-rw-r--r--src/test/ui/kindck/kindck-send-object.rs8
-rw-r--r--src/test/ui/kindck/kindck-send-object.stderr8
-rw-r--r--src/test/ui/kindck/kindck-send-object1.nll.stderr8
-rw-r--r--src/test/ui/kindck/kindck-send-object1.rs10
-rw-r--r--src/test/ui/kindck/kindck-send-object1.stderr12
-rw-r--r--src/test/ui/kindck/kindck-send-object2.rs8
-rw-r--r--src/test/ui/kindck/kindck-send-object2.stderr8
-rw-r--r--src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr4
-rw-r--r--src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs16
-rw-r--r--src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr4
-rw-r--r--src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs2
-rw-r--r--src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr4
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr12
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs2
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr4
-rw-r--r--src/test/ui/lint/lint-ctypes.rs2
-rw-r--r--src/test/ui/lint/lint-ctypes.stderr4
-rw-r--r--src/test/ui/lint/lint-dead-code-3.rs2
-rw-r--r--src/test/ui/lint/lint-stability-2.rs4
-rw-r--r--src/test/ui/lint/lint-stability-deprecated.rs6
-rw-r--r--src/test/ui/lint/lint-stability.rs6
-rw-r--r--src/test/ui/lint/lint-unconditional-recursion.rs4
-rw-r--r--src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs2
-rw-r--r--src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr6
-rw-r--r--src/test/ui/lub-glb/old-lub-glb-object.rs10
-rw-r--r--src/test/ui/map-types.rs4
-rw-r--r--src/test/ui/map-types.stderr6
-rw-r--r--src/test/ui/methods/method-call-lifetime-args-lint-fail.rs4
-rw-r--r--src/test/ui/mismatched_types/cast-rfc0401.rs10
-rw-r--r--src/test/ui/mismatched_types/cast-rfc0401.stderr8
-rw-r--r--src/test/ui/mismatched_types/issue-19109.rs4
-rw-r--r--src/test/ui/mismatched_types/issue-19109.stderr8
-rw-r--r--src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs6
-rw-r--r--src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs2
-rw-r--r--src/test/ui/nll/issue-52663-trait-object.rs2
-rw-r--r--src/test/ui/nll/issue-52663-trait-object.stderr4
-rw-r--r--src/test/ui/nll/issue-53570.rs4
-rw-r--r--src/test/ui/object-does-not-impl-trait.rs2
-rw-r--r--src/test/ui/object-does-not-impl-trait.stderr6
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-ambiguous.rs12
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr14
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-elision.rs10
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-elision.stderr8
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs8
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.rs6
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-mybox.rs10
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr12
-rw-r--r--src/test/ui/object-pointer-types.rs6
-rw-r--r--src/test/ui/object-safety/object-safety-associated-consts.rs2
-rw-r--r--src/test/ui/object-safety/object-safety-associated-consts.stderr4
-rw-r--r--src/test/ui/object-safety/object-safety-by-value-self-use.rs2
-rw-r--r--src/test/ui/object-safety/object-safety-by-value-self.rs18
-rw-r--r--src/test/ui/object-safety/object-safety-generics.rs12
-rw-r--r--src/test/ui/object-safety/object-safety-generics.stderr8
-rw-r--r--src/test/ui/object-safety/object-safety-issue-22040.rs6
-rw-r--r--src/test/ui/object-safety/object-safety-issue-22040.stderr4
-rw-r--r--src/test/ui/object-safety/object-safety-mentions-Self.rs10
-rw-r--r--src/test/ui/object-safety/object-safety-mentions-Self.stderr8
-rw-r--r--src/test/ui/object-safety/object-safety-no-static.rs2
-rw-r--r--src/test/ui/object-safety/object-safety-no-static.stderr4
-rw-r--r--src/test/ui/object-safety/object-safety-phantom-fn.rs4
-rw-r--r--src/test/ui/object-safety/object-safety-sized-2.rs2
-rw-r--r--src/test/ui/object-safety/object-safety-sized-2.stderr4
-rw-r--r--src/test/ui/object-safety/object-safety-sized.rs2
-rw-r--r--src/test/ui/object-safety/object-safety-sized.stderr4
-rw-r--r--src/test/ui/object-safety/object-safety-supertrait-mentions-Self.rs4
-rw-r--r--src/test/ui/object-safety/object-safety-supertrait-mentions-Self.stderr4
-rw-r--r--src/test/ui/parser/bounds-obj-parens.rs2
-rw-r--r--src/test/ui/parser/trailing-plus-in-bounds.rs1
-rw-r--r--src/test/ui/parser/trait-object-bad-parens.rs1
-rw-r--r--src/test/ui/parser/trait-object-bad-parens.stderr8
-rw-r--r--src/test/ui/parser/trait-object-lifetime-parens.rs2
-rw-r--r--src/test/ui/parser/trait-object-lifetime-parens.stderr10
-rw-r--r--src/test/ui/parser/trait-object-polytrait-priority.rs2
-rw-r--r--src/test/ui/parser/trait-object-polytrait-priority.stderr2
-rw-r--r--src/test/ui/parser/trait-object-trait-parens.rs3
-rw-r--r--src/test/ui/parser/trait-object-trait-parens.stderr24
-rw-r--r--src/test/ui/privacy/private-in-public-non-principal-2.rs2
-rw-r--r--src/test/ui/privacy/private-in-public-non-principal.rs2
-rw-r--r--src/test/ui/privacy/private-in-public-non-principal.stderr4
-rw-r--r--src/test/ui/privacy/private-inferred-type.rs6
-rw-r--r--src/test/ui/regions/region-borrow-params-issue-29793-small.rs30
-rw-r--r--src/test/ui/regions/region-bounds-on-objects-and-type-parameters.rs16
-rw-r--r--src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr10
-rw-r--r--src/test/ui/regions/region-object-lifetime-2.nll.stderr2
-rw-r--r--src/test/ui/regions/region-object-lifetime-2.rs2
-rw-r--r--src/test/ui/regions/region-object-lifetime-2.stderr4
-rw-r--r--src/test/ui/regions/region-object-lifetime-4.nll.stderr2
-rw-r--r--src/test/ui/regions/region-object-lifetime-4.rs2
-rw-r--r--src/test/ui/regions/region-object-lifetime-4.stderr4
-rw-r--r--src/test/ui/regions/region-object-lifetime-5.rs2
-rw-r--r--src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr12
-rw-r--r--src/test/ui/regions/region-object-lifetime-in-coercion.rs12
-rw-r--r--src/test/ui/regions/region-object-lifetime-in-coercion.stderr16
-rw-r--r--src/test/ui/regions/regions-close-associated-type-into-object.rs16
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-2.nll.stderr10
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-2.rs6
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-2.stderr6
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-4.nll.stderr14
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-4.rs6
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-4.stderr6
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr4
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-1.rs12
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-1.stderr32
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr6
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-multiple.rs12
-rw-r--r--src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr12
-rw-r--r--src/test/ui/regions/regions-close-param-into-object.rs8
-rw-r--r--src/test/ui/regions/regions-close-param-into-object.stderr8
-rw-r--r--src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs2
-rw-r--r--src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr6
-rw-r--r--src/test/ui/regions/regions-infer-at-fn-not-param.rs6
-rw-r--r--src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.rs2
-rw-r--r--src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.rs2
-rw-r--r--src/test/ui/regions/regions-infer-not-param.rs4
-rw-r--r--src/test/ui/regions/regions-name-undeclared.rs6
-rw-r--r--src/test/ui/regions/regions-nested-fns.nll.stderr8
-rw-r--r--src/test/ui/regions/regions-nested-fns.rs4
-rw-r--r--src/test/ui/regions/regions-nested-fns.stderr24
-rw-r--r--src/test/ui/regions/regions-proc-bound-capture.rs4
-rw-r--r--src/test/ui/regions/regions-proc-bound-capture.stderr2
-rw-r--r--src/test/ui/regions/regions-steal-closure.rs4
-rw-r--r--src/test/ui/regions/regions-trait-1.rs4
-rw-r--r--src/test/ui/regions/regions-trait-object-subtyping.nll.stderr4
-rw-r--r--src/test/ui/regions/regions-trait-object-subtyping.rs8
-rw-r--r--src/test/ui/regions/regions-trait-object-subtyping.stderr12
-rw-r--r--src/test/ui/regions/regions-trait-variance.rs4
-rw-r--r--src/test/ui/regions/regions-wf-trait-object.rs2
-rw-r--r--src/test/ui/regions/regions-wf-trait-object.stderr4
-rw-r--r--src/test/ui/resolve/issue-23305.rs2
-rw-r--r--src/test/ui/resolve/issue-23305.stderr10
-rw-r--r--src/test/ui/resolve/issue-33876.rs2
-rw-r--r--src/test/ui/resolve/issue-33876.stderr6
-rw-r--r--src/test/ui/resolve/issue-3907-2.rs2
-rw-r--r--src/test/ui/resolve/issue-3907.rs2
-rw-r--r--src/test/ui/resolve/issue-5035-2.rs2
-rw-r--r--src/test/ui/resolve/issue-5035.rs2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/self-structs.rs2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/self-structs.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs4
-rw-r--r--src/test/ui/rfc1623.rs2
-rw-r--r--src/test/ui/save-analysis/issue-59134-0.rs2
-rw-r--r--src/test/ui/self/arbitrary-self-types-not-object-safe.rs4
-rw-r--r--src/test/ui/self/arbitrary-self-types-not-object-safe.stderr6
-rw-r--r--src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs8
-rw-r--r--src/test/ui/self/explicit-self-objects-uniq.rs2
-rw-r--r--src/test/ui/self/object-safety-sized-self-by-value-self.rs2
-rw-r--r--src/test/ui/self/object-safety-sized-self-generic-method.rs2
-rw-r--r--src/test/ui/self/object-safety-sized-self-return-Self.rs2
-rw-r--r--src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs8
-rw-r--r--src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr2
-rw-r--r--src/test/ui/span/borrowck-object-mutability.rs8
-rw-r--r--src/test/ui/span/borrowck-object-mutability.stderr6
-rw-r--r--src/test/ui/span/dropck-object-cycle.rs8
-rw-r--r--src/test/ui/span/issue-25199.rs2
-rw-r--r--src/test/ui/span/issue-26656.rs2
-rw-r--r--src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs2
-rw-r--r--src/test/ui/span/regions-close-over-type-parameter-2.rs4
-rw-r--r--src/test/ui/span/send-is-not-static-ensures-scoping.rs2
-rw-r--r--src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs2
-rw-r--r--src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr18
-rw-r--r--src/test/ui/traits/trait-alias/trait-alias-bounds.rs2
-rw-r--r--src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs4
-rw-r--r--src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr20
-rw-r--r--src/test/ui/traits/trait-bounds-not-on-bare-trait.rs1
-rw-r--r--src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr8
-rw-r--r--src/test/ui/traits/trait-bounds-sugar.rs8
-rw-r--r--src/test/ui/traits/trait-coercion-generic-bad.rs2
-rw-r--r--src/test/ui/traits/trait-coercion-generic-bad.stderr6
-rw-r--r--src/test/ui/traits/trait-coercion-generic-regions.rs2
-rw-r--r--src/test/ui/traits/trait-coercion-generic-regions.stderr2
-rw-r--r--src/test/ui/traits/trait-impl-1.rs2
-rw-r--r--src/test/ui/traits/trait-item-privacy.rs6
-rw-r--r--src/test/ui/traits/trait-object-auto-dedup-in-impl.rs8
-rw-r--r--src/test/ui/traits/trait-object-macro-matcher.rs7
-rw-r--r--src/test/ui/traits/trait-object-macro-matcher.stderr10
-rw-r--r--src/test/ui/traits/trait-object-safety.rs2
-rw-r--r--src/test/ui/traits/trait-object-safety.stderr10
-rw-r--r--src/test/ui/traits/trait-object-vs-lifetime-2.rs2
-rw-r--r--src/test/ui/traits/trait-object-vs-lifetime-2.stderr4
-rw-r--r--src/test/ui/traits/trait-object-vs-lifetime.rs4
-rw-r--r--src/test/ui/traits/trait-object-vs-lifetime.stderr14
-rw-r--r--src/test/ui/traits/trait-test-2.rs2
-rw-r--r--src/test/ui/traits/trait-test-2.stderr6
-rw-r--r--src/test/ui/traits/traits-repeated-supertrait-ambig.rs2
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs4
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr6
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent.rs4
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr6
-rw-r--r--src/test/ui/trivial_casts.rs28
-rw-r--r--src/test/ui/trivial_casts.stderr28
-rw-r--r--src/test/ui/type/type-arg-out-of-scope.rs2
-rw-r--r--src/test/ui/type/type-arg-out-of-scope.stderr12
-rw-r--r--src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs2
-rw-r--r--src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr10
-rw-r--r--src/test/ui/type/type-parameter-defaults-referencing-Self.rs2
-rw-r--r--src/test/ui/type/type-parameter-defaults-referencing-Self.stderr6
-rw-r--r--src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs2
-rw-r--r--src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr4
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs8
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-default.rs6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr4
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs34
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.rs10
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs2
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-region.rs6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-region.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs2
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr6
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs2
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr12
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs2
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr12
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs4
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr8
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.rs6
-rw-r--r--src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs2
-rw-r--r--src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr12
-rw-r--r--src/test/ui/unique-object-noncopyable.rs2
-rw-r--r--src/test/ui/unsized/unsized-enum2.rs16
-rw-r--r--src/test/ui/unsized/unsized-enum2.stderr16
-rw-r--r--src/test/ui/use/use-after-move-implicity-coerced-object.rs4
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-object.nll.stderr4
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-object.rs8
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-object.stderr8
-rw-r--r--src/test/ui/variance/variance-covariant-arg-object.nll.stderr4
-rw-r--r--src/test/ui/variance/variance-covariant-arg-object.rs8
-rw-r--r--src/test/ui/variance/variance-covariant-arg-object.stderr8
-rw-r--r--src/test/ui/variance/variance-invariant-arg-object.nll.stderr4
-rw-r--r--src/test/ui/variance/variance-invariant-arg-object.rs8
-rw-r--r--src/test/ui/variance/variance-invariant-arg-object.stderr8
-rw-r--r--src/test/ui/variance/variance-object-types.rs2
-rw-r--r--src/test/ui/variance/variance-object-types.stderr2
-rw-r--r--src/test/ui/variance/variance-trait-object-bound.rs2
-rw-r--r--src/test/ui/variance/variance-trait-object-bound.stderr2
-rw-r--r--src/test/ui/variance/variance-types-bounds.rs4
-rw-r--r--src/test/ui/variance/variance-types-bounds.stderr4
-rw-r--r--src/test/ui/wf/wf-in-obj-type-static.rs2
-rw-r--r--src/test/ui/wf/wf-in-obj-type-static.stderr8
-rw-r--r--src/test/ui/wf/wf-in-obj-type-trait.rs2
-rw-r--r--src/test/ui/wf/wf-in-obj-type-trait.stderr4
-rw-r--r--src/test/ui/wf/wf-object-safe.rs2
-rw-r--r--src/test/ui/wf/wf-object-safe.stderr4
-rw-r--r--src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs2
-rw-r--r--src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr8
-rw-r--r--src/test/ui/where-clauses/where-lifetime-resolution.rs6
-rw-r--r--src/test/ui/where-clauses/where-lifetime-resolution.stderr18
752 files changed, 2178 insertions, 2132 deletions
diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs
index 69d865f53d4..f7af51e4752 100644
--- a/src/librustc/lint/builtin.rs
+++ b/src/librustc/lint/builtin.rs
@@ -255,7 +255,7 @@ declare_lint! {
 
 declare_lint! {
     pub BARE_TRAIT_OBJECTS,
-    Allow,
+    Warn,
     "suggest using `dyn Trait` for trait objects"
 }
 
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index aeb822fa99e..c8978a94fcd 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -94,7 +94,7 @@ pub trait Error: Debug + Display {
     ///         "I'm the superhero of errors"
     ///     }
     ///
-    ///     fn cause(&self) -> Option<&Error> {
+    ///     fn cause(&self) -> Option<&dyn Error> {
     ///         Some(&self.side)
     ///     }
     /// }
@@ -244,7 +244,7 @@ impl<'a, E: Error + 'a> From<E> for Box<dyn Error + 'a> {
     ///
     /// let an_error = AnError;
     /// assert!(0 == mem::size_of_val(&an_error));
-    /// let a_boxed_error = Box::<Error>::from(an_error);
+    /// let a_boxed_error = Box::<dyn Error>::from(an_error);
     /// assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
     /// ```
     fn from(err: E) -> Box<dyn Error + 'a> {
@@ -287,7 +287,7 @@ impl<'a, E: Error + Send + Sync + 'a> From<E> for Box<dyn Error + Send + Sync +
     ///
     /// let an_error = AnError;
     /// assert!(0 == mem::size_of_val(&an_error));
-    /// let a_boxed_error = Box::<Error + Send + Sync>::from(an_error);
+    /// let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
     /// assert!(
     ///     mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
     /// ```
@@ -309,7 +309,7 @@ impl From<String> for Box<dyn Error + Send + Sync> {
     /// use std::mem;
     ///
     /// let a_string_error = "a string error".to_string();
-    /// let a_boxed_error = Box::<Error + Send + Sync>::from(a_string_error);
+    /// let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
     /// assert!(
     ///     mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
     /// ```
@@ -344,7 +344,7 @@ impl From<String> for Box<dyn Error> {
     /// use std::mem;
     ///
     /// let a_string_error = "a string error".to_string();
-    /// let a_boxed_error = Box::<Error>::from(a_string_error);
+    /// let a_boxed_error = Box::<dyn Error>::from(a_string_error);
     /// assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
     /// ```
     fn from(str_err: String) -> Box<dyn Error> {
@@ -367,7 +367,7 @@ impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> {
     /// use std::mem;
     ///
     /// let a_str_error = "a str error";
-    /// let a_boxed_error = Box::<Error + Send + Sync>::from(a_str_error);
+    /// let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_str_error);
     /// assert!(
     ///     mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
     /// ```
@@ -389,7 +389,7 @@ impl From<&str> for Box<dyn Error> {
     /// use std::mem;
     ///
     /// let a_str_error = "a str error";
-    /// let a_boxed_error = Box::<Error>::from(a_str_error);
+    /// let a_boxed_error = Box::<dyn Error>::from(a_str_error);
     /// assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
     /// ```
     fn from(err: &str) -> Box<dyn Error> {
@@ -412,7 +412,7 @@ impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Send + Sync + 'a> {
     /// use std::borrow::Cow;
     ///
     /// let a_cow_str_error = Cow::from("a str error");
-    /// let a_boxed_error = Box::<Error + Send + Sync>::from(a_cow_str_error);
+    /// let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
     /// assert!(
     ///     mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
     /// ```
@@ -436,7 +436,7 @@ impl<'a> From<Cow<'a, str>> for Box<dyn Error> {
     /// use std::borrow::Cow;
     ///
     /// let a_cow_str_error = Cow::from("a str error");
-    /// let a_boxed_error = Box::<Error>::from(a_cow_str_error);
+    /// let a_boxed_error = Box::<dyn Error>::from(a_cow_str_error);
     /// assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
     /// ```
     fn from(err: Cow<'a, str>) -> Box<dyn Error> {
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 616b5eb836f..d41b3a3a123 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -1976,7 +1976,7 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
 /// use std::path::Path;
 ///
 /// // one possible implementation of walking a directory only visiting files
-/// fn visit_dirs(dir: &Path, cb: &Fn(&DirEntry)) -> io::Result<()> {
+/// fn visit_dirs(dir: &Path, cb: &dyn Fn(&DirEntry)) -> io::Result<()> {
 ///     if dir.is_dir() {
 ///         for entry in fs::read_dir(dir)? {
 ///             let entry = entry?;
diff --git a/src/test/compile-fail/issue-23595-1.rs b/src/test/compile-fail/issue-23595-1.rs
index b8a0c4846ab..2912c4ead7a 100644
--- a/src/test/compile-fail/issue-23595-1.rs
+++ b/src/test/compile-fail/issue-23595-1.rs
@@ -5,7 +5,7 @@ use std::ops::{Index};
 trait Hierarchy {
     type Value;
     type ChildKey;
-    type Children = Index<Self::ChildKey, Output=Hierarchy>;
+    type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
     //~^ ERROR: the value of the associated types `Value` (from the trait `Hierarchy`), `ChildKey`
 
     fn data(&self) -> Option<(Self::Value, Self::Children)>;
diff --git a/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs b/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
index 659de9cf6d5..2e2a77b92ca 100644
--- a/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
+++ b/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
@@ -62,7 +62,7 @@ fn make_x() -> P<Expr> {
 /// Iterate over exprs of depth up to `depth`. The goal is to explore all "interesting"
 /// combinations of expression nesting. For example, we explore combinations using `if`, but not
 /// `while` or `match`, since those should print and parse in much the same way as `if`.
-fn iter_exprs(depth: usize, f: &mut FnMut(P<Expr>)) {
+fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
     if depth == 0 {
         f(make_x());
         return;
diff --git a/src/test/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs
index badd095d0ae..7e6ee60e519 100644
--- a/src/test/run-pass/alignment-gep-tup-like-1.rs
+++ b/src/test/run-pass/alignment-gep-tup-like-1.rs
@@ -22,11 +22,11 @@ impl<A:Clone> Invokable<A> for Invoker<A> {
     }
 }
 
-fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>+'static> {
+fn f<A:Clone + 'static>(a: A, b: u16) -> Box<dyn Invokable<A>+'static> {
     box Invoker {
         a: a,
         b: b,
-    } as (Box<Invokable<A>+'static>)
+    } as (Box<dyn Invokable<A>+'static>)
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/associated-types/associated-types-doubleendediterator-object.rs b/src/test/run-pass/associated-types/associated-types-doubleendediterator-object.rs
index 5f86888aef0..96ba2ee3b62 100644
--- a/src/test/run-pass/associated-types/associated-types-doubleendediterator-object.rs
+++ b/src/test/run-pass/associated-types/associated-types-doubleendediterator-object.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![feature(box_syntax)]
 
-fn pairwise_sub(mut t: Box<DoubleEndedIterator<Item=isize>>) -> isize {
+fn pairwise_sub(mut t: Box<dyn DoubleEndedIterator<Item=isize>>) -> isize {
     let mut result = 0;
     loop {
         let front = t.next();
diff --git a/src/test/run-pass/associated-types/associated-types-eq-obj.rs b/src/test/run-pass/associated-types/associated-types-eq-obj.rs
index 0f3dfe338a3..c202c376c5f 100644
--- a/src/test/run-pass/associated-types/associated-types-eq-obj.rs
+++ b/src/test/run-pass/associated-types/associated-types-eq-obj.rs
@@ -15,7 +15,7 @@ impl Foo for char {
     fn boo(&self) -> Bar { Bar }
 }
 
-fn baz(x: &Foo<A=Bar>) -> Bar {
+fn baz(x: &dyn Foo<A=Bar>) -> Bar {
     x.boo()
 }
 
diff --git a/src/test/run-pass/associated-types/associated-types-projection-in-object-type.rs b/src/test/run-pass/associated-types/associated-types-projection-in-object-type.rs
index 0dc32f2fd94..eec95a141f5 100644
--- a/src/test/run-pass/associated-types/associated-types-projection-in-object-type.rs
+++ b/src/test/run-pass/associated-types/associated-types-projection-in-object-type.rs
@@ -19,7 +19,7 @@ pub trait Subscriber {
 
 pub trait Publisher<'a> {
     type Output;
-    fn subscribe(&mut self, _: Box<Subscriber<Input=Self::Output> + 'a>);
+    fn subscribe(&mut self, _: Box<dyn Subscriber<Input=Self::Output> + 'a>);
 }
 
 pub trait Processor<'a> : Subscriber + Publisher<'a> { }
@@ -27,12 +27,12 @@ pub trait Processor<'a> : Subscriber + Publisher<'a> { }
 impl<'a, P> Processor<'a> for P where P : Subscriber + Publisher<'a> { }
 
 struct MyStruct<'a> {
-    sub: Box<Subscriber<Input=u64> + 'a>
+    sub: Box<dyn Subscriber<Input=u64> + 'a>
 }
 
 impl<'a> Publisher<'a> for MyStruct<'a> {
     type Output = u64;
-    fn subscribe(&mut self, t : Box<Subscriber<Input=u64> + 'a>) {
+    fn subscribe(&mut self, t : Box<dyn Subscriber<Input=u64> + 'a>) {
         self.sub = t;
     }
 }
diff --git a/src/test/run-pass/autoref-autoderef/autoderef-method-on-trait.rs b/src/test/run-pass/autoref-autoderef/autoderef-method-on-trait.rs
index 0a54db7f5cd..fadb0784e75 100644
--- a/src/test/run-pass/autoref-autoderef/autoderef-method-on-trait.rs
+++ b/src/test/run-pass/autoref-autoderef/autoderef-method-on-trait.rs
@@ -11,6 +11,6 @@ impl double for usize {
 }
 
 pub fn main() {
-    let x: Box<_> = box (box 3usize as Box<double>);
+    let x: Box<_> = box (box 3usize as Box<dyn double>);
     assert_eq!(x.double(), 6);
 }
diff --git a/src/test/run-pass/borrowck/borrowck-trait-lifetime.rs b/src/test/run-pass/borrowck/borrowck-trait-lifetime.rs
index 9721b08233e..8a6dfe76d60 100644
--- a/src/test/run-pass/borrowck/borrowck-trait-lifetime.rs
+++ b/src/test/run-pass/borrowck/borrowck-trait-lifetime.rs
@@ -12,7 +12,7 @@ use std::marker;
 fn main() {
     trait T { fn foo(&self) {} }
 
-    fn f<'a, V: T>(v: &'a V) -> &'a T {
-        v as &'a T
+    fn f<'a, V: T>(v: &'a V) -> &'a dyn T {
+        v as &'a dyn T
     }
 }
diff --git a/src/test/run-pass/cast-rfc0401-vtable-kinds.rs b/src/test/run-pass/cast-rfc0401-vtable-kinds.rs
index e53ab791922..a27dd9eef52 100644
--- a/src/test/run-pass/cast-rfc0401-vtable-kinds.rs
+++ b/src/test/run-pass/cast-rfc0401-vtable-kinds.rs
@@ -15,9 +15,9 @@ impl<T> Foo<T> for () {}
 impl Foo<u32> for u32 { fn foo(&self, _: u32) -> u32 { self+43 } }
 impl Bar for () {}
 
-unsafe fn round_trip_and_call<'a>(t: *const (Foo<u32>+'a)) -> u32 {
-    let foo_e : *const Foo<u16> = t as *const _;
-    let r_1 = foo_e as *mut Foo<u32>;
+unsafe fn round_trip_and_call<'a>(t: *const (dyn Foo<u32>+'a)) -> u32 {
+    let foo_e : *const dyn Foo<u16> = t as *const _;
+    let r_1 = foo_e as *mut dyn Foo<u32>;
 
     (&*r_1).foo(0)
 }
@@ -38,8 +38,8 @@ fn tuple_i32_to_u32<T:?Sized>(u: *const (i32, T)) -> *const (u32, T) {
 
 fn main() {
     let x = 4u32;
-    let y : &Foo<u32> = &x;
-    let fl = unsafe { round_trip_and_call(y as *const Foo<u32>) };
+    let y : &dyn Foo<u32> = &x;
+    let fl = unsafe { round_trip_and_call(y as *const dyn Foo<u32>) };
     assert_eq!(fl, (43+4));
 
     let s = FooS([0,1,2]);
diff --git a/src/test/run-pass/cast-rfc0401.rs b/src/test/run-pass/cast-rfc0401.rs
index 324860e53e1..017b63c7374 100644
--- a/src/test/run-pass/cast-rfc0401.rs
+++ b/src/test/run-pass/cast-rfc0401.rs
@@ -25,8 +25,8 @@ fn main()
     // coercion-cast
     let mut it = vec![137].into_iter();
     let itr: &mut vec::IntoIter<u32> = &mut it;
-    assert_eq!((itr as &mut Iterator<Item=u32>).next(), Some(137));
-    assert_eq!((itr as &mut Iterator<Item=u32>).next(), None);
+    assert_eq!((itr as &mut dyn Iterator<Item=u32>).next(), Some(137));
+    assert_eq!((itr as &mut dyn Iterator<Item=u32>).next(), None);
 
     assert_eq!(Some(4u32) as Option<u32>, Some(4u32));
     assert_eq!((1u32,2u32) as (u32,u32), (1,2));
diff --git a/src/test/run-pass/close-over-big-then-small-data.rs b/src/test/run-pass/close-over-big-then-small-data.rs
index 2ae0b6c7d3d..0eead0194ef 100644
--- a/src/test/run-pass/close-over-big-then-small-data.rs
+++ b/src/test/run-pass/close-over-big-then-small-data.rs
@@ -24,11 +24,11 @@ impl<A:Clone> Invokable<A> for Invoker<A> {
     }
 }
 
-fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>+'static> {
+fn f<A:Clone + 'static>(a: A, b: u16) -> Box<dyn Invokable<A>+'static> {
     box Invoker {
         a: a,
         b: b,
-    } as (Box<Invokable<A>+'static>)
+    } as (Box<dyn Invokable<A>+'static>)
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/codegen-object-shim.rs b/src/test/run-pass/codegen-object-shim.rs
index 4e2d7ac6086..26f53a9c182 100644
--- a/src/test/run-pass/codegen-object-shim.rs
+++ b/src/test/run-pass/codegen-object-shim.rs
@@ -1,4 +1,4 @@
 fn main() {
-    assert_eq!((ToString::to_string as fn(&(ToString+'static)) -> String)(&"foo"),
+    assert_eq!((ToString::to_string as fn(&(dyn ToString+'static)) -> String)(&"foo"),
         String::from("foo"));
 }
diff --git a/src/test/run-pass/coerce/coerce-expect-unsized.rs b/src/test/run-pass/coerce/coerce-expect-unsized.rs
index a7e80afbf76..b44aa6ab377 100644
--- a/src/test/run-pass/coerce/coerce-expect-unsized.rs
+++ b/src/test/run-pass/coerce/coerce-expect-unsized.rs
@@ -12,16 +12,16 @@ pub fn main() {
     let _: Box<[isize]> = Box::new({ [1, 2, 3] });
     let _: Box<[isize]> = Box::new(if true { [1, 2, 3] } else { [1, 3, 4] });
     let _: Box<[isize]> = Box::new(match true { true => [1, 2, 3], false => [1, 3, 4] });
-    let _: Box<Fn(isize) -> _> = Box::new({ |x| (x as u8) });
-    let _: Box<Debug> = Box::new(if true { false } else { true });
-    let _: Box<Debug> = Box::new(match true { true => 'a', false => 'b' });
+    let _: Box<dyn Fn(isize) -> _> = Box::new({ |x| (x as u8) });
+    let _: Box<dyn Debug> = Box::new(if true { false } else { true });
+    let _: Box<dyn Debug> = Box::new(match true { true => 'a', false => 'b' });
 
     let _: &[isize] = &{ [1, 2, 3] };
     let _: &[isize] = &if true { [1, 2, 3] } else { [1, 3, 4] };
     let _: &[isize] = &match true { true => [1, 2, 3], false => [1, 3, 4] };
-    let _: &Fn(isize) -> _ = &{ |x| (x as u8) };
-    let _: &Debug = &if true { false } else { true };
-    let _: &Debug = &match true { true => 'a', false => 'b' };
+    let _: &dyn Fn(isize) -> _ = &{ |x| (x as u8) };
+    let _: &dyn Debug = &if true { false } else { true };
+    let _: &dyn Debug = &match true { true => 'a', false => 'b' };
 
     let _: &str = &{ String::new() };
     let _: &str = &if true { String::from("...") } else { 5.to_string() };
@@ -31,12 +31,12 @@ pub fn main() {
     };
 
     let _: Box<[isize]> = Box::new([1, 2, 3]);
-    let _: Box<Fn(isize) -> _> = Box::new(|x| (x as u8));
+    let _: Box<dyn Fn(isize) -> _> = Box::new(|x| (x as u8));
 
     let _: Rc<RefCell<[isize]>> = Rc::new(RefCell::new([1, 2, 3]));
-    let _: Rc<RefCell<FnMut(isize) -> _>> = Rc::new(RefCell::new(|x| (x as u8)));
+    let _: Rc<RefCell<dyn FnMut(isize) -> _>> = Rc::new(RefCell::new(|x| (x as u8)));
 
-    let _: Vec<Box<Fn(isize) -> _>> = vec![
+    let _: Vec<Box<dyn Fn(isize) -> _>> = vec![
         Box::new(|x| (x as u8)),
         Box::new(|x| (x as i16 as u8)),
     ];
diff --git a/src/test/run-pass/consts/const-trait-to-trait.rs b/src/test/run-pass/consts/const-trait-to-trait.rs
index a324d73a3a9..12a2999d79d 100644
--- a/src/test/run-pass/consts/const-trait-to-trait.rs
+++ b/src/test/run-pass/consts/const-trait-to-trait.rs
@@ -8,7 +8,7 @@ struct Bar;
 impl Trait for Bar {}
 
 fn main() {
-    let x: &[&Trait] = &[{ &Bar }];
+    let x: &[&dyn Trait] = &[{ &Bar }];
 }
 
 // Issue #25748 - the cast causes an &Encoding -> &Encoding coercion:
@@ -16,9 +16,9 @@ pub struct UTF8Encoding;
 pub const UTF_8: &'static UTF8Encoding = &UTF8Encoding;
 pub trait Encoding {}
 impl Encoding for UTF8Encoding {}
-pub fn f() -> &'static Encoding { UTF_8 as &'static Encoding }
+pub fn f() -> &'static dyn Encoding { UTF_8 as &'static dyn Encoding }
 
 // Root of the problem: &Trait -> &Trait coercions:
-const FOO: &'static Trait = &Bar;
-const BAR: &'static Trait = FOO;
+const FOO: &'static dyn Trait = &Bar;
+const BAR: &'static dyn Trait = FOO;
 fn foo() { let _x = BAR; }
diff --git a/src/test/run-pass/deriving/deriving-show.rs b/src/test/run-pass/deriving/deriving-show.rs
index 98c1f3ac027..eb3a8948fc8 100644
--- a/src/test/run-pass/deriving/deriving-show.rs
+++ b/src/test/run-pass/deriving/deriving-show.rs
@@ -17,7 +17,7 @@ enum Enum {
 }
 
 #[derive(Debug)]
-struct Pointers(*const Send, *mut Sync);
+struct Pointers(*const dyn Send, *mut dyn Sync);
 
 macro_rules! t {
     ($x:expr, $expected:expr) => {
diff --git a/src/test/run-pass/drop/drop-struct-as-object.rs b/src/test/run-pass/drop/drop-struct-as-object.rs
index 307b3f1d6dc..1bc3b4c157c 100644
--- a/src/test/run-pass/drop/drop-struct-as-object.rs
+++ b/src/test/run-pass/drop/drop-struct-as-object.rs
@@ -30,7 +30,7 @@ impl Drop for Cat {
 pub fn main() {
     {
         let x = box Cat {name: 22};
-        let nyan: Box<Dummy> = x as Box<Dummy>;
+        let nyan: Box<dyn Dummy> = x as Box<dyn Dummy>;
     }
     unsafe {
         assert_eq!(value, 22);
diff --git a/src/test/run-pass/dynamically-sized-types/dst-coerce-custom.rs b/src/test/run-pass/dynamically-sized-types/dst-coerce-custom.rs
index 35927bde027..24d83eb5343 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-coerce-custom.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-coerce-custom.rs
@@ -36,7 +36,7 @@ fn main() {
 
     // Trait objects.
     let a: Bar<i32> = Bar { x: &42 };
-    let b: Bar<Baz> = a;
+    let b: Bar<dyn Baz> = a;
     unsafe {
         assert_eq!((*b.x).get(), 42);
     }
diff --git a/src/test/run-pass/dynamically-sized-types/dst-coerce-rc.rs b/src/test/run-pass/dynamically-sized-types/dst-coerce-rc.rs
index bbd0b1f8be1..683fa6850fd 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-coerce-rc.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-coerce-rc.rs
@@ -26,17 +26,17 @@ fn main() {
     assert_eq!(b[2], 3);
 
     let a: Rc<i32> = Rc::new(42);
-    let b: Rc<Baz> = a.clone();
+    let b: Rc<dyn Baz> = a.clone();
     assert_eq!(b.get(), 42);
 
     let c: Weak<i32> = Rc::downgrade(&a);
-    let d: Weak<Baz> = c.clone();
+    let d: Weak<dyn Baz> = c.clone();
 
     let _c = b.clone();
 
     let a: Rc<RefCell<i32>> = Rc::new(RefCell::new(42));
-    let b: Rc<RefCell<Baz>> = a.clone();
+    let b: Rc<RefCell<dyn Baz>> = a.clone();
     assert_eq!(b.borrow().get(), 42);
     // FIXME
-    let c: Weak<RefCell<Baz>> = Rc::downgrade(&a) as Weak<_>;
+    let c: Weak<RefCell<dyn Baz>> = Rc::downgrade(&a) as Weak<_>;
 }
diff --git a/src/test/run-pass/dynamically-sized-types/dst-coercions.rs b/src/test/run-pass/dynamically-sized-types/dst-coercions.rs
index 06c2892b69e..66688e93fb8 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-coercions.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-coercions.rs
@@ -9,20 +9,20 @@ trait T { fn dummy(&self) { } }
 impl T for S {}
 
 pub fn main() {
-    let x: &T = &S;
+    let x: &dyn T = &S;
     // Test we can convert from &-ptr to *-ptr of trait objects
-    let x: *const T = &S;
+    let x: *const dyn T = &S;
 
     // Test we can convert from &-ptr to *-ptr of struct pointer (not DST)
     let x: *const S = &S;
 
     // As above, but mut
-    let x: &mut T = &mut S;
-    let x: *mut T = &mut S;
+    let x: &mut dyn T = &mut S;
+    let x: *mut dyn T = &mut S;
 
     let x: *mut S = &mut S;
 
     // Test we can change the mutability from mut to const.
-    let x: &T = &mut S;
-    let x: *const T = &mut S;
+    let x: &dyn T = &mut S;
+    let x: *const dyn T = &mut S;
 }
diff --git a/src/test/run-pass/dynamically-sized-types/dst-field-align.rs b/src/test/run-pass/dynamically-sized-types/dst-field-align.rs
index 9c81f5652d1..6c338e99912 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-field-align.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-field-align.rs
@@ -26,7 +26,7 @@ fn main() {
     // Test that zero-offset works properly
     let b : Baz<usize> = Baz { a: 7 };
     assert_eq!(b.a.get(), 7);
-    let b : &Baz<Bar> = &b;
+    let b : &Baz<dyn Bar> = &b;
     assert_eq!(b.a.get(), 7);
 
     // Test that the field is aligned properly
@@ -34,7 +34,7 @@ fn main() {
     assert_eq!(f.b.get(), 11);
     let ptr1 : *const u8 = &f.b as *const _ as *const u8;
 
-    let f : &Foo<Bar> = &f;
+    let f : &Foo<dyn Bar> = &f;
     let ptr2 : *const u8 = &f.b as *const _ as *const u8;
     assert_eq!(f.b.get(), 11);
 
@@ -44,13 +44,13 @@ fn main() {
     // Test that nested DSTs work properly
     let f : Foo<Foo<usize>> = Foo { a: 0, b: Foo { a: 1, b: 17 }};
     assert_eq!(f.b.b.get(), 17);
-    let f : &Foo<Foo<Bar>> = &f;
+    let f : &Foo<Foo<dyn Bar>> = &f;
     assert_eq!(f.b.b.get(), 17);
 
     // Test that get the pointer via destructuring works
 
     let f : Foo<usize> = Foo { a: 0, b: 11 };
-    let f : &Foo<Bar> = &f;
+    let f : &Foo<dyn Bar> = &f;
     let &Foo { a: _, b: ref bar } = f;
     assert_eq!(bar.get(), 11);
 
diff --git a/src/test/run-pass/dynamically-sized-types/dst-index.rs b/src/test/run-pass/dynamically-sized-types/dst-index.rs
index 0728599f323..980d99a6d6c 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-index.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-index.rs
@@ -19,11 +19,11 @@ impl Index<usize> for S {
 struct T;
 
 impl Index<usize> for T {
-    type Output = Debug + 'static;
+    type Output = dyn Debug + 'static;
 
-    fn index<'a>(&'a self, idx: usize) -> &'a (Debug + 'static) {
+    fn index<'a>(&'a self, idx: usize) -> &'a (dyn Debug + 'static) {
         static X: usize = 42;
-        &X as &(Debug + 'static)
+        &X as &(dyn Debug + 'static)
     }
 }
 
diff --git a/src/test/run-pass/dynamically-sized-types/dst-raw.rs b/src/test/run-pass/dynamically-sized-types/dst-raw.rs
index 949adbbefce..0893b02e74e 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-raw.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-raw.rs
@@ -24,7 +24,7 @@ struct Foo<T: ?Sized> {
 pub fn main() {
     // raw trait object
     let x = A { f: 42 };
-    let z: *const Trait = &x;
+    let z: *const dyn Trait = &x;
     let r = unsafe {
         (&*z).foo()
     };
@@ -32,7 +32,7 @@ pub fn main() {
 
     // raw DST struct
     let p = Foo {f: A { f: 42 }};
-    let o: *const Foo<Trait> = &p;
+    let o: *const Foo<dyn Trait> = &p;
     let r = unsafe {
         (&*o).f.foo()
     };
@@ -40,7 +40,7 @@ pub fn main() {
 
     // raw DST tuple
     let p = (A { f: 42 },);
-    let o: *const (Trait,) = &p;
+    let o: *const (dyn Trait,) = &p;
     let r = unsafe {
         (&*o).0.foo()
     };
@@ -84,21 +84,21 @@ pub fn main() {
 
     // all of the above with *mut
     let mut x = A { f: 42 };
-    let z: *mut Trait = &mut x;
+    let z: *mut dyn Trait = &mut x;
     let r = unsafe {
         (&*z).foo()
     };
     assert_eq!(r, 42);
 
     let mut p = Foo {f: A { f: 42 }};
-    let o: *mut Foo<Trait> = &mut p;
+    let o: *mut Foo<dyn Trait> = &mut p;
     let r = unsafe {
         (&*o).f.foo()
     };
     assert_eq!(r, 42);
 
     let mut p = (A { f: 42 },);
-    let o: *mut (Trait,) = &mut p;
+    let o: *mut (dyn Trait,) = &mut p;
     let r = unsafe {
         (&*o).0.foo()
     };
diff --git a/src/test/run-pass/dynamically-sized-types/dst-trait-tuple.rs b/src/test/run-pass/dynamically-sized-types/dst-trait-tuple.rs
index ca88605ee3a..70bcc3de07d 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-trait-tuple.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-trait-tuple.rs
@@ -38,7 +38,7 @@ impl ToBar for Bar1 {
 }
 
 // x is a fat pointer
-fn foo(x: &Fat<ToBar>) {
+fn foo(x: &Fat<dyn ToBar>) {
     assert_eq!(x.0, 5);
     assert_eq!(x.1, "some str");
     assert_eq!(x.2.to_bar(), Bar);
@@ -49,12 +49,12 @@ fn foo(x: &Fat<ToBar>) {
     assert_eq!(y.to_val(), 42);
 }
 
-fn bar(x: &ToBar) {
+fn bar(x: &dyn ToBar) {
     assert_eq!(x.to_bar(), Bar);
     assert_eq!(x.to_val(), 42);
 }
 
-fn baz(x: &Fat<Fat<ToBar>>) {
+fn baz(x: &Fat<Fat<dyn ToBar>>) {
     assert_eq!(x.0, 5);
     assert_eq!(x.1, "some str");
     assert_eq!((x.2).0, 8);
@@ -73,20 +73,20 @@ pub fn main() {
     foo(&f1);
     let f2 = &f1;
     foo(f2);
-    let f3: &Fat<ToBar> = f2;
+    let f3: &Fat<dyn ToBar> = f2;
     foo(f3);
-    let f4: &Fat<ToBar> = &f1;
+    let f4: &Fat<dyn ToBar> = &f1;
     foo(f4);
-    let f5: &Fat<ToBar> = &(5, "some str", Bar1 {f :42});
+    let f5: &Fat<dyn ToBar> = &(5, "some str", Bar1 {f :42});
     foo(f5);
 
     // Zero size object.
-    let f6: &Fat<ToBar> = &(5, "some str", Bar);
+    let f6: &Fat<dyn ToBar> = &(5, "some str", Bar);
     assert_eq!(f6.2.to_bar(), Bar);
 
     // &*
     //
-    let f7: Box<ToBar> = Box::new(Bar1 {f :42});
+    let f7: Box<dyn ToBar> = Box::new(Bar1 {f :42});
     bar(&*f7);
 
     // Deep nesting
@@ -94,10 +94,10 @@ pub fn main() {
     baz(&f1);
     let f2 = &f1;
     baz(f2);
-    let f3: &Fat<Fat<ToBar>> = f2;
+    let f3: &Fat<Fat<dyn ToBar>> = f2;
     baz(f3);
-    let f4: &Fat<Fat<ToBar>> = &f1;
+    let f4: &Fat<Fat<dyn ToBar>> = &f1;
     baz(f4);
-    let f5: &Fat<Fat<ToBar>> = &(5, "some str", (8, "deep str", Bar1 {f :42}));
+    let f5: &Fat<Fat<dyn ToBar>> = &(5, "some str", (8, "deep str", Bar1 {f :42}));
     baz(f5);
 }
diff --git a/src/test/run-pass/dynamically-sized-types/dst-trait.rs b/src/test/run-pass/dynamically-sized-types/dst-trait.rs
index 9a9bd12d50f..ec6bc72192d 100644
--- a/src/test/run-pass/dynamically-sized-types/dst-trait.rs
+++ b/src/test/run-pass/dynamically-sized-types/dst-trait.rs
@@ -38,7 +38,7 @@ impl ToBar for Bar1 {
 }
 
 // x is a fat pointer
-fn foo(x: &Fat<ToBar>) {
+fn foo(x: &Fat<dyn ToBar>) {
     assert_eq!(x.f1, 5);
     assert_eq!(x.f2, "some str");
     assert_eq!(x.ptr.to_bar(), Bar);
@@ -49,12 +49,12 @@ fn foo(x: &Fat<ToBar>) {
     assert_eq!(y.to_val(), 42);
 }
 
-fn bar(x: &ToBar) {
+fn bar(x: &dyn ToBar) {
     assert_eq!(x.to_bar(), Bar);
     assert_eq!(x.to_val(), 42);
 }
 
-fn baz(x: &Fat<Fat<ToBar>>) {
+fn baz(x: &Fat<Fat<dyn ToBar>>) {
     assert_eq!(x.f1, 5);
     assert_eq!(x.f2, "some str");
     assert_eq!(x.ptr.f1, 8);
@@ -73,20 +73,20 @@ pub fn main() {
     foo(&f1);
     let f2 = &f1;
     foo(f2);
-    let f3: &Fat<ToBar> = f2;
+    let f3: &Fat<dyn ToBar> = f2;
     foo(f3);
-    let f4: &Fat<ToBar> = &f1;
+    let f4: &Fat<dyn ToBar> = &f1;
     foo(f4);
-    let f5: &Fat<ToBar> = &Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
+    let f5: &Fat<dyn ToBar> = &Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
     foo(f5);
 
     // Zero size object.
-    let f6: &Fat<ToBar> = &Fat { f1: 5, f2: "some str", ptr: Bar };
+    let f6: &Fat<dyn ToBar> = &Fat { f1: 5, f2: "some str", ptr: Bar };
     assert_eq!(f6.ptr.to_bar(), Bar);
 
     // &*
     //
-    let f7: Box<ToBar> = Box::new(Bar1 {f :42});
+    let f7: Box<dyn ToBar> = Box::new(Bar1 {f :42});
     bar(&*f7);
 
     // Deep nesting
@@ -95,11 +95,11 @@ pub fn main() {
     baz(&f1);
     let f2 = &f1;
     baz(f2);
-    let f3: &Fat<Fat<ToBar>> = f2;
+    let f3: &Fat<Fat<dyn ToBar>> = f2;
     baz(f3);
-    let f4: &Fat<Fat<ToBar>> = &f1;
+    let f4: &Fat<Fat<dyn ToBar>> = &f1;
     baz(f4);
-    let f5: &Fat<Fat<ToBar>> =
+    let f5: &Fat<Fat<dyn ToBar>> =
         &Fat { f1: 5, f2: "some str", ptr: Fat { f1: 8, f2: "deep str", ptr: Bar1 {f :42}} };
     baz(f5);
 }
diff --git a/src/test/run-pass/extern/extern-types-trait-impl.rs b/src/test/run-pass/extern/extern-types-trait-impl.rs
index ac4c70a71ce..6cce6c723c5 100644
--- a/src/test/run-pass/extern/extern-types-trait-impl.rs
+++ b/src/test/run-pass/extern/extern-types-trait-impl.rs
@@ -18,7 +18,7 @@ impl Foo for A {
 
 fn assert_foo<T: ?Sized + Foo>() { }
 
-fn use_foo<T: ?Sized + Foo>(x: &Foo) {
+fn use_foo<T: ?Sized + Foo>(x: &dyn Foo) {
     x.foo();
 }
 
diff --git a/src/test/run-pass/fat-ptr-cast.rs b/src/test/run-pass/fat-ptr-cast.rs
index 367b57d5ea0..1943abe9e14 100644
--- a/src/test/run-pass/fat-ptr-cast.rs
+++ b/src/test/run-pass/fat-ptr-cast.rs
@@ -25,7 +25,7 @@ fn main() {
     assert_eq!(a as usize, b as *const () as usize);
 
     // And conversion to a void pointer/address for trait objects too.
-    let a: *mut Foo = &mut Bar;
+    let a: *mut dyn Foo = &mut Bar;
     let b = a as *mut ();
     let c = a as *const () as usize;
     let d = unsafe {
diff --git a/src/test/run-pass/functions-closures/closure-expected-type/issue-38714.rs b/src/test/run-pass/functions-closures/closure-expected-type/issue-38714.rs
index 96b7a66d075..e97785b5cac 100644
--- a/src/test/run-pass/functions-closures/closure-expected-type/issue-38714.rs
+++ b/src/test/run-pass/functions-closures/closure-expected-type/issue-38714.rs
@@ -5,7 +5,7 @@ struct UsizeRef<'a> {
     a: &'a usize
 }
 
-type RefTo = Box<for<'r> Fn(&'r Vec<usize>) -> UsizeRef<'r>>;
+type RefTo = Box<dyn for<'r> Fn(&'r Vec<usize>) -> UsizeRef<'r>>;
 
 fn ref_to<'a>(vec: &'a Vec<usize>) -> UsizeRef<'a> {
     UsizeRef{ a: &vec[0]}
diff --git a/src/test/run-pass/generics/generic-object.rs b/src/test/run-pass/generics/generic-object.rs
index 054425989c3..870ff980ec6 100644
--- a/src/test/run-pass/generics/generic-object.rs
+++ b/src/test/run-pass/generics/generic-object.rs
@@ -17,6 +17,6 @@ impl Foo<isize> for S {
 
 pub fn main() {
     let x = box S { x: 1 };
-    let y = x as Box<Foo<isize>>;
+    let y = x as Box<dyn Foo<isize>>;
     assert_eq!(y.get(), 1);
 }
diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs
index 364661e565e..987a3e414f5 100644
--- a/src/test/run-pass/hashmap-memory.rs
+++ b/src/test/run-pass/hashmap-memory.rs
@@ -19,7 +19,7 @@ mod map_reduce {
     use std::str;
     use std::thread;
 
-    pub type putter<'a> = Box<FnMut(String, String) + 'a>;
+    pub type putter<'a> = Box<dyn FnMut(String, String) + 'a>;
 
     pub type mapper = extern fn(String, putter);
 
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-binder-levels-in-object-types.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-binder-levels-in-object-types.rs
index 1591d616cac..cc766c0605c 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-binder-levels-in-object-types.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-binder-levels-in-object-types.rs
@@ -19,7 +19,7 @@ struct Tcx<'tcx> {
 impl<'tcx> Typer<'tcx> for Tcx<'tcx> {
 }
 
-fn g<'tcx>(typer: &Typer<'tcx>) {
+fn g<'tcx>(typer: &dyn Typer<'tcx>) {
 }
 
 fn check_static_type<'x>(tcx: &Tcx<'x>) {
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs
index 09152970fdc..8431226a3ec 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs
@@ -7,7 +7,7 @@ trait Typer<'tcx> {
     fn dummy(&self) { }
 }
 
-fn g<F>(_: F) where F: FnOnce(&Typer) {}
+fn g<F>(_: F) where F: FnOnce(&dyn Typer) {}
 
 fn h() {
     g(|typer| typer.dummy())
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-fn-like-trait-object.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-fn-like-trait-object.rs
index 7ef8ea046b8..ff84ad9d298 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-fn-like-trait-object.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-fn-like-trait-object.rs
@@ -6,7 +6,7 @@ trait FnLike<A,R> {
     fn call(&self, arg: A) -> R;
 }
 
-type FnObject<'b> = for<'a> FnLike<&'a isize, &'a isize> + 'b;
+type FnObject<'b> = dyn for<'a> FnLike<&'a isize, &'a isize> + 'b;
 
 struct Identity;
 
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-parse.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-parse.rs
index 3fb0b3290eb..1fab9758c5c 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-parse.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-parse.rs
@@ -24,8 +24,8 @@ fn foo01<T: for<'a> Get<&'a i32, &'a i32>>(t: T)
 
 // Parse HRTB with explicit `for` in various sorts of types:
 
-fn foo10(t: Box<for<'a> Get<i32, i32>>) { }
-fn foo11(t: Box<for<'a> Fn(i32) -> i32>) { }
+fn foo10(t: Box<dyn for<'a> Get<i32, i32>>) { }
+fn foo11(t: Box<dyn for<'a> Fn(i32) -> i32>) { }
 
 fn foo20(t: for<'a> fn(i32) -> i32) { }
 fn foo21(t: for<'a> unsafe fn(i32) -> i32) { }
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-precedence-of-plus.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-precedence-of-plus.rs
index 5fda4b826e0..6834c392d4e 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-precedence-of-plus.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-precedence-of-plus.rs
@@ -6,7 +6,7 @@
 // 'static` and not `Fn(isize) -> (isize + 'static)`. The latter would
 // cause a compilation error. Issue #18772.
 
-fn adder(y: isize) -> Box<Fn(isize) -> isize + 'static> {
+fn adder(y: isize) -> Box<dyn Fn(isize) -> isize + 'static> {
     Box::new(move |x| y + x)
 }
 
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-resolve-lifetime.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-resolve-lifetime.rs
index 917f6f96118..b97fdf4df50 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-resolve-lifetime.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-resolve-lifetime.rs
@@ -8,7 +8,7 @@ trait FnLike<A,R> {
     fn call(&self, arg: A) -> R;
 }
 
-type FnObject<'b> = for<'a> FnLike<&'a isize, &'a isize> + 'b;
+type FnObject<'b> = dyn for<'a> FnLike<&'a isize, &'a isize> + 'b;
 
 fn main() {
 }
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs
index 0ed8f7ee52a..d8c726cdd71 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs
@@ -5,7 +5,7 @@ trait FnLike<A,R> {
     fn call(&self, arg: A) -> R;
 }
 
-type FnObject<'b> = for<'a> FnLike<(&'a i32,), &'a i32> + 'b;
+type FnObject<'b> = dyn for<'a> FnLike<(&'a i32,), &'a i32> + 'b;
 
 struct Identity;
 
diff --git a/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-passed-to-closure.rs b/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-passed-to-closure.rs
index 4cb9242f0ed..41ebb3f5a14 100644
--- a/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-passed-to-closure.rs
+++ b/src/test/run-pass/higher-rank-trait-bounds/hrtb-trait-object-passed-to-closure.rs
@@ -17,7 +17,7 @@ struct NoAnn<'ast> {
 impl<'ast> PrinterSupport<'ast> for NoAnn<'ast> {
 }
 
-fn foo<'ast, G>(f: Option<&'ast usize>, g: G) where G: FnOnce(&PrinterSupport) {
+fn foo<'ast, G>(f: Option<&'ast usize>, g: G) where G: FnOnce(&dyn PrinterSupport) {
     let annotation = NoAnn { f: f };
     g(&annotation)
 }
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs
index 8c17b01e2bd..6660f393f7d 100644
--- a/src/test/run-pass/ifmt.rs
+++ b/src/test/run-pass/ifmt.rs
@@ -93,7 +93,7 @@ pub fn main() {
     t!(format!("{:#4}", C), "☃123");
     t!(format!("{:b}", D), "aa☃bb");
 
-    let a: &fmt::Debug = &1;
+    let a: &dyn fmt::Debug = &1;
     t!(format!("{:?}", a), "1");
 
 
diff --git a/src/test/run-pass/issues/issue-10802.rs b/src/test/run-pass/issues/issue-10802.rs
index 8872eae6f8b..f1d6b37a684 100644
--- a/src/test/run-pass/issues/issue-10802.rs
+++ b/src/test/run-pass/issues/issue-10802.rs
@@ -24,9 +24,9 @@ trait MyTrait { fn dummy(&self) { } }
 impl MyTrait for Box<DroppableStruct> {}
 impl MyTrait for Box<DroppableEnum> {}
 
-struct Whatever { w: Box<MyTrait+'static> }
+struct Whatever { w: Box<dyn MyTrait+'static> }
 impl  Whatever {
-    fn new(w: Box<MyTrait+'static>) -> Whatever {
+    fn new(w: Box<dyn MyTrait+'static>) -> Whatever {
         Whatever { w: w }
     }
 }
@@ -34,13 +34,13 @@ impl  Whatever {
 fn main() {
     {
         let f: Box<_> = box DroppableStruct;
-        let _a = Whatever::new(box f as Box<MyTrait>);
+        let _a = Whatever::new(box f as Box<dyn MyTrait>);
     }
     assert!(unsafe { DROPPED });
     unsafe { DROPPED = false; }
     {
         let f: Box<_> = box DroppableEnum::DroppableVariant1;
-        let _a = Whatever::new(box f as Box<MyTrait>);
+        let _a = Whatever::new(box f as Box<dyn MyTrait>);
     }
     assert!(unsafe { DROPPED });
 }
diff --git a/src/test/run-pass/issues/issue-11205.rs b/src/test/run-pass/issues/issue-11205.rs
index b628bf60196..ce0951eafdd 100644
--- a/src/test/run-pass/issues/issue-11205.rs
+++ b/src/test/run-pass/issues/issue-11205.rs
@@ -5,44 +5,44 @@
 
 trait Foo { fn dummy(&self) { } }
 impl Foo for isize {}
-fn foo(_: [&Foo; 2]) {}
-fn foos(_: &[&Foo]) {}
+fn foo(_: [&dyn Foo; 2]) {}
+fn foos(_: &[&dyn Foo]) {}
 fn foog<T>(_: &[T], _: &[T]) {}
 
-fn bar(_: [Box<Foo>; 2]) {}
-fn bars(_: &[Box<Foo+'static>]) {}
+fn bar(_: [Box<dyn Foo>; 2]) {}
+fn bars(_: &[Box<dyn Foo+'static>]) {}
 
 fn main() {
-    let x: [&Foo; 2] = [&1, &2];
+    let x: [&dyn Foo; 2] = [&1, &2];
     foo(x);
     foo([&1, &2]);
 
     let r = &1;
-    let x: [&Foo; 2] = [r; 2];
+    let x: [&dyn Foo; 2] = [r; 2];
     foo(x);
     foo([&1; 2]);
 
-    let x: &[&Foo] = &[&1, &2];
+    let x: &[&dyn Foo] = &[&1, &2];
     foos(x);
     foos(&[&1, &2]);
 
-    let x: &[&Foo] = &[&1, &2];
+    let x: &[&dyn Foo] = &[&1, &2];
     let r = &1;
     foog(x, &[r]);
 
-    let x: [Box<Foo>; 2] = [Box::new(1), Box::new(2)];
+    let x: [Box<dyn Foo>; 2] = [Box::new(1), Box::new(2)];
     bar(x);
     bar([Box::new(1), Box::new(2)]);
 
-    let x: &[Box<Foo+'static>] = &[Box::new(1), Box::new(2)];
+    let x: &[Box<dyn Foo+'static>] = &[Box::new(1), Box::new(2)];
     bars(x);
     bars(&[Box::new(1), Box::new(2)]);
 
-    let x: &[Box<Foo+'static>] = &[Box::new(1), Box::new(2)];
+    let x: &[Box<dyn Foo+'static>] = &[Box::new(1), Box::new(2)];
     foog(x, &[Box::new(1)]);
 
     struct T<'a> {
-        t: [&'a (Foo+'a); 2]
+        t: [&'a (dyn Foo+'a); 2]
     }
     let _n = T {
         t: [&1, &2]
@@ -51,34 +51,34 @@ fn main() {
     let _n = T {
         t: [r; 2]
     };
-    let x: [&Foo; 2] = [&1, &2];
+    let x: [&dyn Foo; 2] = [&1, &2];
     let _n = T {
         t: x
     };
 
     struct F<'b> {
-        t: &'b [&'b (Foo+'b)]
+        t: &'b [&'b (dyn Foo+'b)]
     }
     let _n = F {
         t: &[&1, &2]
     };
     let r = &1;
-    let r: [&Foo; 2] = [r; 2];
+    let r: [&dyn Foo; 2] = [r; 2];
     let _n = F {
         t: &r
     };
-    let x: [&Foo; 2] = [&1, &2];
+    let x: [&dyn Foo; 2] = [&1, &2];
     let _n = F {
         t: &x
     };
 
     struct M<'a> {
-        t: &'a [Box<Foo+'static>]
+        t: &'a [Box<dyn Foo+'static>]
     }
     let _n = M {
         t: &[Box::new(1), Box::new(2)]
     };
-    let x: [Box<Foo>; 2] = [Box::new(1), Box::new(2)];
+    let x: [Box<dyn Foo>; 2] = [Box::new(1), Box::new(2)];
     let _n = M {
         t: &x
     };
diff --git a/src/test/run-pass/issues/issue-11267.rs b/src/test/run-pass/issues/issue-11267.rs
index 1aaeaa62ad0..848ed6ac7a8 100644
--- a/src/test/run-pass/issues/issue-11267.rs
+++ b/src/test/run-pass/issues/issue-11267.rs
@@ -10,7 +10,7 @@ impl T<isize> for Empty {
     fn next(&mut self) -> Option<isize> { None }
 }
 
-fn do_something_with(a : &mut T<isize>) {
+fn do_something_with(a : &mut dyn T<isize>) {
     println!("{:?}", a.next())
 }
 
diff --git a/src/test/run-pass/issues/issue-11677.rs b/src/test/run-pass/issues/issue-11677.rs
index 5dabecc48f9..be18c736f14 100644
--- a/src/test/run-pass/issues/issue-11677.rs
+++ b/src/test/run-pass/issues/issue-11677.rs
@@ -11,8 +11,8 @@ trait X<T> {
     fn dummy(&self) -> T { panic!() }
 }
 
-struct S<T> {f: Box<X<T>+'static>,
-             g: Box<X<T>+'static>}
+struct S<T> {f: Box<dyn X<T>+'static>,
+             g: Box<dyn X<T>+'static>}
 
 struct F;
 impl X<isize> for F {
diff --git a/src/test/run-pass/issues/issue-11709.rs b/src/test/run-pass/issues/issue-11709.rs
index f191a203f03..cb5e3dff3b3 100644
--- a/src/test/run-pass/issues/issue-11709.rs
+++ b/src/test/run-pass/issues/issue-11709.rs
@@ -9,7 +9,7 @@
 
 struct S {x:()}
 
-fn test(slot: &mut Option<Box<FnMut() -> Box<FnMut()>>>) -> () {
+fn test(slot: &mut Option<Box<dyn FnMut() -> Box<dyn FnMut()>>>) -> () {
   let a = slot.take();
   let _a = match a {
     // `{let .. a(); }` would break
diff --git a/src/test/run-pass/issues/issue-12744.rs b/src/test/run-pass/issues/issue-12744.rs
index d02620ee1a4..e2756ec970c 100644
--- a/src/test/run-pass/issues/issue-12744.rs
+++ b/src/test/run-pass/issues/issue-12744.rs
@@ -1,5 +1,5 @@
 // run-pass
 fn main() {
-    fn test() -> Box<std::any::Any + 'static> { Box::new(1) }
+    fn test() -> Box<dyn std::any::Any + 'static> { Box::new(1) }
     println!("{:?}", test())
 }
diff --git a/src/test/run-pass/issues/issue-13507-2.rs b/src/test/run-pass/issues/issue-13507-2.rs
index ce920a3ccab..63f3589c6cc 100644
--- a/src/test/run-pass/issues/issue-13507-2.rs
+++ b/src/test/run-pass/issues/issue-13507-2.rs
@@ -23,7 +23,7 @@ pub fn type_ids() -> Vec<TypeId> {
         TypeId::of::<FooFnPtr>(),
         TypeId::of::<FooNil>(),
         TypeId::of::<FooTuple>(),
-        TypeId::of::<FooTrait>(),
+        TypeId::of::<dyn FooTrait>(),
         TypeId::of::<FooStruct>(),
         TypeId::of::<FooEnum>()
     ]
diff --git a/src/test/run-pass/issues/issue-13808.rs b/src/test/run-pass/issues/issue-13808.rs
index d1b94c71864..9f9db067bf4 100644
--- a/src/test/run-pass/issues/issue-13808.rs
+++ b/src/test/run-pass/issues/issue-13808.rs
@@ -4,7 +4,7 @@
 // pretty-expanded FIXME #23616
 
 struct Foo<'a> {
-    listener: Box<FnMut() + 'a>,
+    listener: Box<dyn FnMut() + 'a>,
 }
 
 impl<'a> Foo<'a> {
diff --git a/src/test/run-pass/issues/issue-14399.rs b/src/test/run-pass/issues/issue-14399.rs
index 1b57856e955..6bf8a589959 100644
--- a/src/test/run-pass/issues/issue-14399.rs
+++ b/src/test/run-pass/issues/issue-14399.rs
@@ -16,5 +16,5 @@ impl A for B1 {}
 
 fn main() {
     let v: Box<_> = box B1;
-    let _c: Box<A> = v.clone();
+    let _c: Box<dyn A> = v.clone();
 }
diff --git a/src/test/run-pass/issues/issue-14589.rs b/src/test/run-pass/issues/issue-14589.rs
index d495602dff7..5d8aab2ce74 100644
--- a/src/test/run-pass/issues/issue-14589.rs
+++ b/src/test/run-pass/issues/issue-14589.rs
@@ -5,9 +5,9 @@
 // pretty-expanded FIXME #23616
 
 fn main() {
-    send::<Box<Foo>>(Box::new(Output(0)));
-    Test::<Box<Foo>>::foo(Box::new(Output(0)));
-    Test::<Box<Foo>>::new().send(Box::new(Output(0)));
+    send::<Box<dyn Foo>>(Box::new(Output(0)));
+    Test::<Box<dyn Foo>>::foo(Box::new(Output(0)));
+    Test::<Box<dyn Foo>>::new().send(Box::new(Output(0)));
 }
 
 fn send<T>(_: T) {}
diff --git a/src/test/run-pass/issues/issue-14821.rs b/src/test/run-pass/issues/issue-14821.rs
index 5ac0d0df0d7..00b2e3607fc 100644
--- a/src/test/run-pass/issues/issue-14821.rs
+++ b/src/test/run-pass/issues/issue-14821.rs
@@ -6,16 +6,16 @@ struct Meow;
 impl SomeTrait for Meow {}
 
 struct Foo<'a> {
-    x: &'a SomeTrait,
-    y: &'a SomeTrait,
+    x: &'a dyn SomeTrait,
+    y: &'a dyn SomeTrait,
 }
 
 impl<'a> Foo<'a> {
-    pub fn new<'b>(x: &'b SomeTrait, y: &'b SomeTrait) -> Foo<'b> { Foo { x: x, y: y } }
+    pub fn new<'b>(x: &'b dyn SomeTrait, y: &'b dyn SomeTrait) -> Foo<'b> { Foo { x: x, y: y } }
 }
 
 fn main() {
     let r = Meow;
     let s = Meow;
-    let q = Foo::new(&r as &SomeTrait, &s as &SomeTrait);
+    let q = Foo::new(&r as &dyn SomeTrait, &s as &dyn SomeTrait);
 }
diff --git a/src/test/run-pass/issues/issue-14919.rs b/src/test/run-pass/issues/issue-14919.rs
index c6ccb7575bb..94361543354 100644
--- a/src/test/run-pass/issues/issue-14919.rs
+++ b/src/test/run-pass/issues/issue-14919.rs
@@ -9,7 +9,7 @@ trait Matcher {
 
 struct CharPredMatcher<'a, 'b> {
     str: &'a str,
-    pred: Box<FnMut(char) -> bool + 'b>,
+    pred: Box<dyn FnMut(char) -> bool + 'b>,
 }
 
 impl<'a, 'b> Matcher for CharPredMatcher<'a, 'b> {
diff --git a/src/test/run-pass/issues/issue-14958.rs b/src/test/run-pass/issues/issue-14958.rs
index 17f7f159fd2..a12564ca9c0 100644
--- a/src/test/run-pass/issues/issue-14958.rs
+++ b/src/test/run-pass/issues/issue-14958.rs
@@ -7,17 +7,17 @@ trait Foo { fn dummy(&self) { }}
 
 struct Bar;
 
-impl<'a> std::ops::Fn<(&'a (Foo+'a),)> for Bar {
-    extern "rust-call" fn call(&self, _: (&'a Foo,)) {}
+impl<'a> std::ops::Fn<(&'a (dyn Foo+'a),)> for Bar {
+    extern "rust-call" fn call(&self, _: (&'a dyn Foo,)) {}
 }
 
-impl<'a> std::ops::FnMut<(&'a (Foo+'a),)> for Bar {
-    extern "rust-call" fn call_mut(&mut self, a: (&'a Foo,)) { self.call(a) }
+impl<'a> std::ops::FnMut<(&'a (dyn Foo+'a),)> for Bar {
+    extern "rust-call" fn call_mut(&mut self, a: (&'a dyn Foo,)) { self.call(a) }
 }
 
-impl<'a> std::ops::FnOnce<(&'a (Foo+'a),)> for Bar {
+impl<'a> std::ops::FnOnce<(&'a (dyn Foo+'a),)> for Bar {
     type Output = ();
-    extern "rust-call" fn call_once(self, a: (&'a Foo,)) { self.call(a) }
+    extern "rust-call" fn call_once(self, a: (&'a dyn Foo,)) { self.call(a) }
 }
 
 struct Baz;
diff --git a/src/test/run-pass/issues/issue-15155.rs b/src/test/run-pass/issues/issue-15155.rs
index 3e513a3d5ec..7b137b4af56 100644
--- a/src/test/run-pass/issues/issue-15155.rs
+++ b/src/test/run-pass/issues/issue-15155.rs
@@ -4,18 +4,18 @@ trait IndirectTraitWithSend: TraitWithSend {}
 
 // Check struct instantiation (Box<TraitWithSend> will only have Send if TraitWithSend has Send)
 #[allow(dead_code)]
-struct Blah { x: Box<TraitWithSend> }
+struct Blah { x: Box<dyn TraitWithSend> }
 impl TraitWithSend for Blah {}
 
 // Struct instantiation 2-levels deep
 #[allow(dead_code)]
-struct IndirectBlah { x: Box<IndirectTraitWithSend> }
+struct IndirectBlah { x: Box<dyn IndirectTraitWithSend> }
 impl TraitWithSend for IndirectBlah {}
 impl IndirectTraitWithSend for IndirectBlah {}
 
 fn test_trait<T: Send + ?Sized>() { println!("got here!") }
 
 fn main() {
-    test_trait::<TraitWithSend>();
-    test_trait::<IndirectTraitWithSend>();
+    test_trait::<dyn TraitWithSend>();
+    test_trait::<dyn IndirectTraitWithSend>();
 }
diff --git a/src/test/run-pass/issues/issue-15763.rs b/src/test/run-pass/issues/issue-15763.rs
index 4438d1f2cec..9ceffff2e38 100644
--- a/src/test/run-pass/issues/issue-15763.rs
+++ b/src/test/run-pass/issues/issue-15763.rs
@@ -78,12 +78,12 @@ fn main() {
     assert_eq!(cc().unwrap(), 3);
     assert_eq!(dd().unwrap(), 3);
 
-    let i = box 32isize as Box<A>;
+    let i = box 32isize as Box<dyn A>;
     assert_eq!(i.aaa(), 3);
-    let i = box 32isize as Box<A>;
+    let i = box 32isize as Box<dyn A>;
     assert_eq!(i.bbb(), 3);
-    let i = box 32isize as Box<A>;
+    let i = box 32isize as Box<dyn A>;
     assert_eq!(i.ccc().unwrap(), 3);
-    let i = box 32isize as Box<A>;
+    let i = box 32isize as Box<dyn A>;
     assert_eq!(i.ddd().unwrap(), 3);
 }
diff --git a/src/test/run-pass/issues/issue-16739.rs b/src/test/run-pass/issues/issue-16739.rs
index 6868eae6ea4..54ad8fd076e 100644
--- a/src/test/run-pass/issues/issue-16739.rs
+++ b/src/test/run-pass/issues/issue-16739.rs
@@ -39,12 +39,12 @@ impl FnOnce<(u32,u32)> for Foo {
 }
 
 fn main() {
-    let mut f = box Foo { foo: 42 } as Box<FnMut() -> u32>;
+    let mut f = box Foo { foo: 42 } as Box<dyn FnMut() -> u32>;
     assert_eq!(f.call_mut(()), 42);
 
-    let mut f = box Foo { foo: 40 } as Box<FnMut(u32) -> u32>;
+    let mut f = box Foo { foo: 40 } as Box<dyn FnMut(u32) -> u32>;
     assert_eq!(f.call_mut((2,)), 42);
 
-    let mut f = box Foo { foo: 40 } as Box<FnMut(u32, u32) -> u32>;
+    let mut f = box Foo { foo: 40 } as Box<dyn FnMut(u32, u32) -> u32>;
     assert_eq!(f.call_mut((1, 1)), 42);
 }
diff --git a/src/test/run-pass/issues/issue-16922.rs b/src/test/run-pass/issues/issue-16922.rs
index 82a3943e9ef..c3c6ff30488 100644
--- a/src/test/run-pass/issues/issue-16922.rs
+++ b/src/test/run-pass/issues/issue-16922.rs
@@ -7,5 +7,5 @@ fn foo(_: &u8) {
 }
 
 fn main() {
-    let _ = &foo as &Any;
+    let _ = &foo as &dyn Any;
 }
diff --git a/src/test/run-pass/issues/issue-17322.rs b/src/test/run-pass/issues/issue-17322.rs
index 79b6a5ae533..20a8d136124 100644
--- a/src/test/run-pass/issues/issue-17322.rs
+++ b/src/test/run-pass/issues/issue-17322.rs
@@ -5,11 +5,11 @@
 
 use std::io::{self, Write};
 
-fn f(wr: &mut Write) {
+fn f(wr: &mut dyn Write) {
     wr.write_all(b"hello").ok().expect("failed");
 }
 
 fn main() {
-    let mut wr = box io::stdout() as Box<Write>;
+    let mut wr = box io::stdout() as Box<dyn Write>;
     f(&mut wr);
 }
diff --git a/src/test/run-pass/issues/issue-17351.rs b/src/test/run-pass/issues/issue-17351.rs
index f51f0b3ca01..62f6bcf15e3 100644
--- a/src/test/run-pass/issues/issue-17351.rs
+++ b/src/test/run-pass/issues/issue-17351.rs
@@ -6,5 +6,5 @@ impl Str for str {}
 impl<'a, S: ?Sized> Str for &'a S where S: Str {}
 
 fn main() {
-    let _: &Str = &"x";
+    let _: &dyn Str = &"x";
 }
diff --git a/src/test/run-pass/issues/issue-17771.rs b/src/test/run-pass/issues/issue-17771.rs
index 7eea5ce6589..2f6464668c2 100644
--- a/src/test/run-pass/issues/issue-17771.rs
+++ b/src/test/run-pass/issues/issue-17771.rs
@@ -4,13 +4,13 @@
 
 trait Aaa { fn dummy(&self) { } }
 
-impl<'a> Aaa for &'a mut (Aaa + 'a) {}
+impl<'a> Aaa for &'a mut (dyn Aaa + 'a) {}
 
 struct Bar<'a> {
-    writer: &'a mut (Aaa + 'a),
+    writer: &'a mut (dyn Aaa + 'a),
 }
 
-fn baz(_: &mut Aaa) {
+fn baz(_: &mut dyn Aaa) {
 }
 
 fn foo<'a>(mut bar: Bar<'a>) {
diff --git a/src/test/run-pass/issues/issue-17897.rs b/src/test/run-pass/issues/issue-17897.rs
index 291bd3f1718..6873c7ccb7f 100644
--- a/src/test/run-pass/issues/issue-17897.rs
+++ b/src/test/run-pass/issues/issue-17897.rs
@@ -1,5 +1,5 @@
 // run-pass
-fn action(mut cb: Box<FnMut(usize) -> usize>) -> usize {
+fn action(mut cb: Box<dyn FnMut(usize) -> usize>) -> usize {
     cb(1)
 }
 
diff --git a/src/test/run-pass/issues/issue-20055-box-trait.rs b/src/test/run-pass/issues/issue-20055-box-trait.rs
index cb7b5a638fc..772cd9d7eda 100644
--- a/src/test/run-pass/issues/issue-20055-box-trait.rs
+++ b/src/test/run-pass/issues/issue-20055-box-trait.rs
@@ -22,7 +22,7 @@ pub fn foo(box_1: fn () -> Box<[i8; 1]>,
            box_4: fn () -> Box<[i8; 4]>,
             ) {
     println!("Hello World 1");
-    let _: Box<Boo> = match 3 {
+    let _: Box<dyn Boo> = match 3 {
         1 => box_1(),
         2 => box_2(),
         3 => box_3(),
diff --git a/src/test/run-pass/issues/issue-20575.rs b/src/test/run-pass/issues/issue-20575.rs
index 95273edcf7e..0ca67d9dc71 100644
--- a/src/test/run-pass/issues/issue-20575.rs
+++ b/src/test/run-pass/issues/issue-20575.rs
@@ -4,7 +4,7 @@
 // pretty-expanded FIXME #23616
 
 fn main() {
-    let functions: [Box<Fn() -> Option<()>>; 1] = [Box::new(|| None)];
+    let functions: [Box<dyn Fn() -> Option<()>>; 1] = [Box::new(|| None)];
 
     let _: Option<Vec<()>> = functions.iter().map(|f| (*f)()).collect();
 }
diff --git a/src/test/run-pass/issues/issue-20676.rs b/src/test/run-pass/issues/issue-20676.rs
index 27bbff09a00..2bc5034960a 100644
--- a/src/test/run-pass/issues/issue-20676.rs
+++ b/src/test/run-pass/issues/issue-20676.rs
@@ -7,6 +7,6 @@
 use std::fmt;
 
 fn main() {
-    let a: &fmt::Debug = &1;
+    let a: &dyn fmt::Debug = &1;
     format!("{:?}", a);
 }
diff --git a/src/test/run-pass/issues/issue-20953.rs b/src/test/run-pass/issues/issue-20953.rs
index f5c743d0d82..4ec7e3195eb 100644
--- a/src/test/run-pass/issues/issue-20953.rs
+++ b/src/test/run-pass/issues/issue-20953.rs
@@ -2,11 +2,11 @@
 #![allow(unused_mut)]
 #![allow(unused_variables)]
 fn main() {
-    let mut shrinker: Box<Iterator<Item=i32>> = Box::new(vec![1].into_iter());
+    let mut shrinker: Box<dyn Iterator<Item=i32>> = Box::new(vec![1].into_iter());
     println!("{:?}", shrinker.next());
     for v in shrinker { assert!(false); }
 
-    let mut shrinker: &mut Iterator<Item=i32> = &mut vec![1].into_iter();
+    let mut shrinker: &mut dyn Iterator<Item=i32> = &mut vec![1].into_iter();
     println!("{:?}", shrinker.next());
     for v in shrinker { assert!(false); }
 }
diff --git a/src/test/run-pass/issues/issue-21058.rs b/src/test/run-pass/issues/issue-21058.rs
index e0cf26f7034..0483e62fd21 100644
--- a/src/test/run-pass/issues/issue-21058.rs
+++ b/src/test/run-pass/issues/issue-21058.rs
@@ -13,7 +13,7 @@ fn main() {
         // str
         std::intrinsics::type_name::<str>(),
         // Trait
-        std::intrinsics::type_name::<Send>(),
+        std::intrinsics::type_name::<dyn Send>(),
         // Newtype
         std::intrinsics::type_name::<NT>(),
         // DST
diff --git a/src/test/run-pass/issues/issue-21361.rs b/src/test/run-pass/issues/issue-21361.rs
index 5297a4a7b29..c970e77abb7 100644
--- a/src/test/run-pass/issues/issue-21361.rs
+++ b/src/test/run-pass/issues/issue-21361.rs
@@ -2,10 +2,10 @@
 
 fn main() {
     let v = vec![1, 2, 3];
-    let boxed: Box<Iterator<Item=i32>> = Box::new(v.into_iter());
+    let boxed: Box<dyn Iterator<Item=i32>> = Box::new(v.into_iter());
     assert_eq!(boxed.max(), Some(3));
 
     let v = vec![1, 2, 3];
-    let boxed: &mut Iterator<Item=i32> = &mut v.into_iter();
+    let boxed: &mut dyn Iterator<Item=i32> = &mut v.into_iter();
     assert_eq!(boxed.max(), Some(3));
 }
diff --git a/src/test/run-pass/issues/issue-21655.rs b/src/test/run-pass/issues/issue-21655.rs
index cddd48349f9..d1cd4ec7b8a 100644
--- a/src/test/run-pass/issues/issue-21655.rs
+++ b/src/test/run-pass/issues/issue-21655.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-fn test(it: &mut Iterator<Item=i32>) {
+fn test(it: &mut dyn Iterator<Item=i32>) {
     for x in it {
         assert_eq!(x, 1)
     }
diff --git a/src/test/run-pass/issues/issue-2190-1.rs b/src/test/run-pass/issues/issue-2190-1.rs
index 34a80ab0051..e67a924b9ee 100644
--- a/src/test/run-pass/issues/issue-2190-1.rs
+++ b/src/test/run-pass/issues/issue-2190-1.rs
@@ -9,11 +9,11 @@ use std::thread::Builder;
 
 static generations: usize = 1024+256+128+49;
 
-fn spawn(mut f: Box<FnMut() + 'static + Send>) {
+fn spawn(mut f: Box<dyn FnMut() + 'static + Send>) {
     Builder::new().stack_size(32 * 1024).spawn(move|| f());
 }
 
-fn child_no(x: usize) -> Box<FnMut() + 'static + Send> {
+fn child_no(x: usize) -> Box<dyn FnMut() + 'static + Send> {
     Box::new(move|| {
         if x < generations {
             spawn(child_no(x+1));
diff --git a/src/test/run-pass/issues/issue-22346.rs b/src/test/run-pass/issues/issue-22346.rs
index b728911e541..5f6d9dcc9ae 100644
--- a/src/test/run-pass/issues/issue-22346.rs
+++ b/src/test/run-pass/issues/issue-22346.rs
@@ -3,7 +3,7 @@
 // pretty-expanded FIXME #23616
 
 // This used to cause an ICE because the retslot for the "return" had the wrong type
-fn testcase<'a>() -> Box<Iterator<Item=usize> + 'a> {
+fn testcase<'a>() -> Box<dyn Iterator<Item=usize> + 'a> {
     return Box::new((0..3).map(|i| { return i; }));
 }
 
diff --git a/src/test/run-pass/issues/issue-2288.rs b/src/test/run-pass/issues/issue-2288.rs
index 963e7e62c7f..c74e53fca60 100644
--- a/src/test/run-pass/issues/issue-2288.rs
+++ b/src/test/run-pass/issues/issue-2288.rs
@@ -23,13 +23,13 @@ fn foo<A>(b: A) -> foo<A> {
     }
 }
 
-fn f<A>(x: Box<clam<A>>, a: A) {
+fn f<A>(x: Box<dyn clam<A>>, a: A) {
   x.chowder(a);
 }
 
 pub fn main() {
 
   let c = foo(42);
-  let d: Box<clam<isize>> = box c as Box<clam<isize>>;
+  let d: Box<dyn clam<isize>> = box c as Box<dyn clam<isize>>;
   f(d, c.x);
 }
diff --git a/src/test/run-pass/issues/issue-23261.rs b/src/test/run-pass/issues/issue-23261.rs
index 0b34653a345..e21f86351ee 100644
--- a/src/test/run-pass/issues/issue-23261.rs
+++ b/src/test/run-pass/issues/issue-23261.rs
@@ -41,7 +41,7 @@ fn check_both(val: &Foo<[u8]>) {
     }
 }
 
-fn check_trait_obj(val: &Foo<Get>) {
+fn check_trait_obj(val: &Foo<dyn Get>) {
     match *val {
         Foo { a, ref inner } => {
             assert_eq!(a, 32);
@@ -56,6 +56,6 @@ fn main() {
     check_dst_val(foo);
     check_both(foo);
 
-    let foo: &Foo<Get> = &Foo { a: 32, inner: 32 };
+    let foo: &Foo<dyn Get> = &Foo { a: 32, inner: 32 };
     check_trait_obj(foo);
 }
diff --git a/src/test/run-pass/issues/issue-23485.rs b/src/test/run-pass/issues/issue-23485.rs
index a55846f40df..1dd3d9293bc 100644
--- a/src/test/run-pass/issues/issue-23485.rs
+++ b/src/test/run-pass/issues/issue-23485.rs
@@ -45,6 +45,6 @@ impl Iterator for Counter {
 }
 
 fn main() {
-    let mut x: Box<Iterator<Item=Token>> = Box::new(Counter { value: 22 });
+    let mut x: Box<dyn Iterator<Item=Token>> = Box::new(Counter { value: 22 });
     assert_eq!(x.next().unwrap().value, 22);
 }
diff --git a/src/test/run-pass/issues/issue-24010.rs b/src/test/run-pass/issues/issue-24010.rs
index 1f68d47d97b..264e1ee22cd 100644
--- a/src/test/run-pass/issues/issue-24010.rs
+++ b/src/test/run-pass/issues/issue-24010.rs
@@ -2,7 +2,7 @@ trait Foo: Fn(i32) -> i32 + Send {}
 
 impl<T: ?Sized + Fn(i32) -> i32 + Send> Foo for T {}
 
-fn wants_foo(f: Box<Foo>) -> i32 {
+fn wants_foo(f: Box<dyn Foo>) -> i32 {
     f(42)
 }
 
diff --git a/src/test/run-pass/issues/issue-24086.rs b/src/test/run-pass/issues/issue-24086.rs
index 86fa5a6f368..54622afbcfc 100644
--- a/src/test/run-pass/issues/issue-24086.rs
+++ b/src/test/run-pass/issues/issue-24086.rs
@@ -7,8 +7,8 @@ pub struct Registry<'a> {
 }
 
 pub struct Listener<'a> {
-    pub announce: Option<Box<FnMut(&mut Registry) + 'a>>,
-    pub remove: Option<Box<FnMut(&mut Registry) + 'a>>,
+    pub announce: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
+    pub remove: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
 }
 
 impl<'a> Drop for Registry<'a> {
diff --git a/src/test/run-pass/issues/issue-25339.rs b/src/test/run-pass/issues/issue-25339.rs
index 602f458e4cf..6f8ec700951 100644
--- a/src/test/run-pass/issues/issue-25339.rs
+++ b/src/test/run-pass/issues/issue-25339.rs
@@ -12,7 +12,7 @@ pub trait Routing<I> {
 
 pub trait ToRouting {
     type Input;
-    type Routing : ?Sized = Routing<Self::Input, Output=()>;
+    type Routing : ?Sized = dyn Routing<Self::Input, Output=()>;
     fn to_routing(self) -> Self::Routing;
 }
 
diff --git a/src/test/run-pass/issues/issue-25515.rs b/src/test/run-pass/issues/issue-25515.rs
index 75af16d8dda..e7b9ea3acfc 100644
--- a/src/test/run-pass/issues/issue-25515.rs
+++ b/src/test/run-pass/issues/issue-25515.rs
@@ -13,7 +13,7 @@ fn main() {
     let mut drops = 0;
 
     {
-        let _: Rc<Send> = Rc::new(Foo(&mut drops));
+        let _: Rc<dyn Send> = Rc::new(Foo(&mut drops));
     }
 
     assert_eq!(1, drops);
diff --git a/src/test/run-pass/issues/issue-25549-multiple-drop.rs b/src/test/run-pass/issues/issue-25549-multiple-drop.rs
index db9261f6ef4..25a2da707dc 100644
--- a/src/test/run-pass/issues/issue-25549-multiple-drop.rs
+++ b/src/test/run-pass/issues/issue-25549-multiple-drop.rs
@@ -25,7 +25,7 @@ fn main() {
 
     drops = 0;
     {
-        let y = &Holder(Foo(&mut drops)) as &Holder<Trait>;
+        let y = &Holder(Foo(&mut drops)) as &Holder<dyn Trait>;
         // this used to cause an extra drop of the Foo instance
         let x = &y.0;
     }
diff --git a/src/test/run-pass/issues/issue-25757.rs b/src/test/run-pass/issues/issue-25757.rs
index caade6defdd..ec1864d7deb 100644
--- a/src/test/run-pass/issues/issue-25757.rs
+++ b/src/test/run-pass/issues/issue-25757.rs
@@ -9,7 +9,7 @@ impl Foo {
     }
 }
 
-const FUNC: &'static Fn(&mut Foo) -> () = &Foo::x;
+const FUNC: &'static dyn Fn(&mut Foo) -> () = &Foo::x;
 
 fn main() {
     let mut foo = Foo { a: 137 };
diff --git a/src/test/run-pass/issues/issue-26641.rs b/src/test/run-pass/issues/issue-26641.rs
index 297b1d689a6..4b6f2c2b3bc 100644
--- a/src/test/run-pass/issues/issue-26641.rs
+++ b/src/test/run-pass/issues/issue-26641.rs
@@ -1,5 +1,5 @@
 // run-pass
-struct Parser<'a>(Box<FnMut(Parser) + 'a>);
+struct Parser<'a>(Box<dyn FnMut(Parser) + 'a>);
 
 fn main() {
     let _x = Parser(Box::new(|_|{}));
diff --git a/src/test/run-pass/issues/issue-26709.rs b/src/test/run-pass/issues/issue-26709.rs
index 84cd2137367..281ae13399d 100644
--- a/src/test/run-pass/issues/issue-26709.rs
+++ b/src/test/run-pass/issues/issue-26709.rs
@@ -11,7 +11,7 @@ fn main() {
     let mut x = 0;
     {
         let wrapper = Box::new(Wrapper(&mut x, 123));
-        let _: Box<Wrapper<Send>> = wrapper;
+        let _: Box<Wrapper<dyn Send>> = wrapper;
     }
     assert_eq!(432, x)
 }
diff --git a/src/test/run-pass/issues/issue-26802.rs b/src/test/run-pass/issues/issue-26802.rs
index c4aa70d5022..307a6716098 100644
--- a/src/test/run-pass/issues/issue-26802.rs
+++ b/src/test/run-pass/issues/issue-26802.rs
@@ -5,7 +5,7 @@ trait Foo<'a> {
 
 pub struct FooBar;
 impl Foo<'static> for FooBar {}
-fn test(foobar: FooBar) -> Box<Foo<'static>> {
+fn test(foobar: FooBar) -> Box<dyn Foo<'static>> {
     Box::new(foobar)
 }
 
diff --git a/src/test/run-pass/issues/issue-26805.rs b/src/test/run-pass/issues/issue-26805.rs
index 950d98315d0..bcf8a673191 100644
--- a/src/test/run-pass/issues/issue-26805.rs
+++ b/src/test/run-pass/issues/issue-26805.rs
@@ -2,5 +2,5 @@
 struct NonOrd;
 
 fn main() {
-    let _: Box<Iterator<Item = _>> = Box::new(vec![NonOrd].into_iter());
+    let _: Box<dyn Iterator<Item = _>> = Box::new(vec![NonOrd].into_iter());
 }
diff --git a/src/test/run-pass/issues/issue-26905.rs b/src/test/run-pass/issues/issue-26905.rs
index 2f500d1c0d1..2d5827f476b 100644
--- a/src/test/run-pass/issues/issue-26905.rs
+++ b/src/test/run-pass/issues/issue-26905.rs
@@ -17,5 +17,5 @@ fn main() {
     let data = [1, 2, 3];
     let iter = data.iter();
     let x = MyRc { _ptr: &iter, _boo: PhantomData };
-    let _y: MyRc<Iterator<Item=&u32>> = x;
+    let _y: MyRc<dyn Iterator<Item=&u32>> = x;
 }
diff --git a/src/test/run-pass/issues/issue-27268.rs b/src/test/run-pass/issues/issue-27268.rs
index fccea452fbc..161e2d4d204 100644
--- a/src/test/run-pass/issues/issue-27268.rs
+++ b/src/test/run-pass/issues/issue-27268.rs
@@ -1,4 +1,4 @@
 // run-pass
 fn main() {
-    const _C: &'static Fn() = &||{};
+    const _C: &'static dyn Fn() = &||{};
 }
diff --git a/src/test/run-pass/issues/issue-2734.rs b/src/test/run-pass/issues/issue-2734.rs
index fcb224e2d04..d449f6449aa 100644
--- a/src/test/run-pass/issues/issue-2734.rs
+++ b/src/test/run-pass/issues/issue-2734.rs
@@ -11,8 +11,8 @@ trait hax {
 }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax+'static> {
-    box x as Box<hax+'static>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
+    box x as Box<dyn hax+'static>
 }
 
 fn deadcode() {
diff --git a/src/test/run-pass/issues/issue-2735.rs b/src/test/run-pass/issues/issue-2735.rs
index c48bedf14f7..794c7d4edaa 100644
--- a/src/test/run-pass/issues/issue-2735.rs
+++ b/src/test/run-pass/issues/issue-2735.rs
@@ -11,8 +11,8 @@ trait hax {
 }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax+'static> {
-    box x as Box<hax+'static>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
+    box x as Box<dyn hax+'static>
 }
 
 fn deadcode() {
diff --git a/src/test/run-pass/issues/issue-27890.rs b/src/test/run-pass/issues/issue-27890.rs
index 0f6a932e4b8..9f85473380f 100644
--- a/src/test/run-pass/issues/issue-27890.rs
+++ b/src/test/run-pass/issues/issue-27890.rs
@@ -1,6 +1,6 @@
 // run-pass
-static PLUS_ONE: &'static (Fn(i32) -> i32 + Sync) = (&|x: i32| { x + 1 })
-    as &'static (Fn(i32) -> i32 + Sync);
+static PLUS_ONE: &'static (dyn Fn(i32) -> i32 + Sync) = (&|x: i32| { x + 1 })
+    as &'static (dyn Fn(i32) -> i32 + Sync);
 
 fn main() {
     assert_eq!(PLUS_ONE(2), 3);
diff --git a/src/test/run-pass/issues/issue-2935.rs b/src/test/run-pass/issues/issue-2935.rs
index 58ade32b250..11641ca7380 100644
--- a/src/test/run-pass/issues/issue-2935.rs
+++ b/src/test/run-pass/issues/issue-2935.rs
@@ -20,7 +20,7 @@ pub fn main() {
   //   let y = box ({a: 4});
   //    let z = box ({a: 4} as it);
   //    let z = box ({a: true} as it);
-    let z: Box<_> = box (box true as Box<it>);
+    let z: Box<_> = box (box true as Box<dyn it>);
     //  x.f();
     // y.f();
     // (*z).f();
diff --git a/src/test/run-pass/issues/issue-3052.rs b/src/test/run-pass/issues/issue-3052.rs
index 927102981e7..ee2456da3e2 100644
--- a/src/test/run-pass/issues/issue-3052.rs
+++ b/src/test/run-pass/issues/issue-3052.rs
@@ -2,7 +2,7 @@
 #![allow(dead_code)]
 // pretty-expanded FIXME #23616
 
-type Connection = Box<FnMut(Vec<u8>) + 'static>;
+type Connection = Box<dyn FnMut(Vec<u8>) + 'static>;
 
 fn f() -> Option<Connection> {
     let mock_connection: Connection = Box::new(|_| {});
diff --git a/src/test/run-pass/issues/issue-30530.rs b/src/test/run-pass/issues/issue-30530.rs
index 0ae270200a6..e837fc81721 100644
--- a/src/test/run-pass/issues/issue-30530.rs
+++ b/src/test/run-pass/issues/issue-30530.rs
@@ -8,7 +8,7 @@
 pub enum Handler {
     Default,
     #[allow(dead_code)]
-    Custom(*mut Box<Fn()>),
+    Custom(*mut Box<dyn Fn()>),
 }
 
 fn main() {
@@ -16,7 +16,7 @@ fn main() {
 }
 
 #[inline(never)]
-pub fn take(h: Handler, f: Box<Fn()>) -> Box<Fn()> {
+pub fn take(h: Handler, f: Box<dyn Fn()>) -> Box<dyn Fn()> {
     unsafe {
         match h {
             Handler::Custom(ptr) => *Box::from_raw(ptr),
diff --git a/src/test/run-pass/issues/issue-30615.rs b/src/test/run-pass/issues/issue-30615.rs
index 236a181fc1d..c718449d84e 100644
--- a/src/test/run-pass/issues/issue-30615.rs
+++ b/src/test/run-pass/issues/issue-30615.rs
@@ -1,5 +1,5 @@
 // run-pass
 fn main() {
-    &0u8 as *const u8 as *const PartialEq<u8>;
+    &0u8 as *const u8 as *const dyn PartialEq<u8>;
     &[0u8] as *const [u8; 1] as *const [u8];
 }
diff --git a/src/test/run-pass/issues/issue-32389.rs b/src/test/run-pass/issues/issue-32389.rs
index 6824c66cb37..cc94cc819d6 100644
--- a/src/test/run-pass/issues/issue-32389.rs
+++ b/src/test/run-pass/issues/issue-32389.rs
@@ -2,7 +2,7 @@
 fn foo<T>() -> T { loop {} }
 
 fn test() {
-    let ref mut a: &mut FnMut((i8,), i16) = foo();
+    let ref mut a: &mut dyn FnMut((i8,), i16) = foo();
     a((0,), 0);
 }
 
diff --git a/src/test/run-pass/issues/issue-33387.rs b/src/test/run-pass/issues/issue-33387.rs
index 792ff95200a..499fa7c1f27 100644
--- a/src/test/run-pass/issues/issue-33387.rs
+++ b/src/test/run-pass/issues/issue-33387.rs
@@ -15,18 +15,18 @@ impl Foo for [u8; 2] {
 
 struct Bar<T: ?Sized>(T);
 
-fn unsize_fat_ptr<'a>(x: &'a Bar<Foo + Send + 'a>) -> &'a Bar<Foo + 'a> {
+fn unsize_fat_ptr<'a>(x: &'a Bar<dyn Foo + Send + 'a>) -> &'a Bar<dyn Foo + 'a> {
     x
 }
 
-fn unsize_nested_fat_ptr(x: Arc<Foo + Send>) -> Arc<Foo> {
+fn unsize_nested_fat_ptr(x: Arc<dyn Foo + Send>) -> Arc<dyn Foo> {
     x
 }
 
 fn main() {
-    let x: Box<Bar<Foo + Send>> = Box::new(Bar([1,2]));
+    let x: Box<Bar<dyn Foo + Send>> = Box::new(Bar([1,2]));
     assert_eq!(unsize_fat_ptr(&*x).0.get(), [1, 2]);
 
-    let x: Arc<Foo + Send> = Arc::new([3, 4]);
+    let x: Arc<dyn Foo + Send> = Arc::new([3, 4]);
     assert_eq!(unsize_nested_fat_ptr(x).get(), [3, 4]);
 }
diff --git a/src/test/run-pass/issues/issue-33461.rs b/src/test/run-pass/issues/issue-33461.rs
index 9c6c5bfe78c..4e01d4d3061 100644
--- a/src/test/run-pass/issues/issue-33461.rs
+++ b/src/test/run-pass/issues/issue-33461.rs
@@ -24,5 +24,5 @@ impl<P: TheTrait> Shape<P> for TheType<P::TheAssociatedType> {
 
 fn main() {
     let ball = TheType { t: PhantomData };
-    let handle: &Shape<()> = &ball;
+    let handle: &dyn Shape<()> = &ball;
 }
diff --git a/src/test/run-pass/issues/issue-34503.rs b/src/test/run-pass/issues/issue-34503.rs
index 1fb4b8759bd..26e7358408f 100644
--- a/src/test/run-pass/issues/issue-34503.rs
+++ b/src/test/run-pass/issues/issue-34503.rs
@@ -7,5 +7,5 @@ fn main() {
         where Option<T>: Ord { *x < *x }
     }
     impl Foo<X> for () {}
-    let _ = &() as &Foo<X>;
+    let _ = &() as &dyn Foo<X>;
 }
diff --git a/src/test/run-pass/issues/issue-35815.rs b/src/test/run-pass/issues/issue-35815.rs
index 70e0ed9f7ce..05fd1b15d43 100644
--- a/src/test/run-pass/issues/issue-35815.rs
+++ b/src/test/run-pass/issues/issue-35815.rs
@@ -10,6 +10,6 @@ struct Foo<T: ?Sized> {
 
 fn main() {
     let foo: &Foo<i32> = &Foo { a: 1, b: false, c: 2i32 };
-    let foo_unsized: &Foo<Send> = foo;
+    let foo_unsized: &Foo<dyn Send> = foo;
     assert_eq!(mem::size_of_val(foo), mem::size_of_val(foo_unsized));
 }
diff --git a/src/test/run-pass/issues/issue-36260.rs b/src/test/run-pass/issues/issue-36260.rs
index 728dd5ec8d0..d96dc80ea71 100644
--- a/src/test/run-pass/issues/issue-36260.rs
+++ b/src/test/run-pass/issues/issue-36260.rs
@@ -2,7 +2,7 @@
 // Make sure this compiles without getting a linker error because of missing
 // drop-glue because the collector missed adding drop-glue for the closure:
 
-fn create_fn() -> Box<Fn()> {
+fn create_fn() -> Box<dyn Fn()> {
     let text = String::new();
 
     Box::new(move || { let _ = &text; })
diff --git a/src/test/run-pass/issues/issue-36786-resolve-call.rs b/src/test/run-pass/issues/issue-36786-resolve-call.rs
index 38461db544f..e5341ba7dbe 100644
--- a/src/test/run-pass/issues/issue-36786-resolve-call.rs
+++ b/src/test/run-pass/issues/issue-36786-resolve-call.rs
@@ -3,6 +3,6 @@
 // correctly
 
 fn main() {
-    let x : Vec<Box<Fn()>> = vec![Box::new(|| ())];
+    let x : Vec<Box<dyn Fn()>> = vec![Box::new(|| ())];
     x[0]()
 }
diff --git a/src/test/run-pass/issues/issue-3702.rs b/src/test/run-pass/issues/issue-3702.rs
index 1420dff063c..f48d549b3eb 100644
--- a/src/test/run-pass/issues/issue-3702.rs
+++ b/src/test/run-pass/issues/issue-3702.rs
@@ -6,7 +6,7 @@ pub fn main() {
     fn to_string(&self) -> String;
   }
 
-  fn to_string(t: Box<Text>) {
+  fn to_string(t: Box<dyn Text>) {
     println!("{}", (*t).to_string());
   }
 
diff --git a/src/test/run-pass/issues/issue-3794.rs b/src/test/run-pass/issues/issue-3794.rs
index d6af65f787d..408d8d866d8 100644
--- a/src/test/run-pass/issues/issue-3794.rs
+++ b/src/test/run-pass/issues/issue-3794.rs
@@ -16,7 +16,7 @@ impl T for S {
     }
 }
 
-fn print_t(t: &T) {
+fn print_t(t: &dyn T) {
     t.print();
 }
 
@@ -27,6 +27,6 @@ fn print_s(s: &S) {
 pub fn main() {
     let s: Box<S> = box S { s: 5 };
     print_s(&*s);
-    let t: Box<T> = s as Box<T>;
+    let t: Box<dyn T> = s as Box<dyn T>;
     print_t(&*t);
 }
diff --git a/src/test/run-pass/issues/issue-39292.rs b/src/test/run-pass/issues/issue-39292.rs
index 0b8139dd795..968cf08916f 100644
--- a/src/test/run-pass/issues/issue-39292.rs
+++ b/src/test/run-pass/issues/issue-39292.rs
@@ -13,5 +13,5 @@ trait Bar: for<'a> Foo<&'a ()> { }
 impl Bar for () {}
 
 fn main() {
-    (&() as &Bar).print(); // Segfault
+    (&() as &dyn Bar).print(); // Segfault
 }
diff --git a/src/test/run-pass/issues/issue-39823.rs b/src/test/run-pass/issues/issue-39823.rs
index 0dfa8a75c4f..148cf527e7c 100644
--- a/src/test/run-pass/issues/issue-39823.rs
+++ b/src/test/run-pass/issues/issue-39823.rs
@@ -11,15 +11,15 @@ struct LocalC(u32);
 struct LocalG<T>(T);
 
 fn main() {
-    let virtual_localc : &Fn(_) -> LocalC = &LocalC;
+    let virtual_localc : &dyn Fn(_) -> LocalC = &LocalC;
     assert_eq!(virtual_localc(1), LocalC(1));
 
-    let virtual_localg : &Fn(_) -> LocalG<u32> = &LocalG;
+    let virtual_localg : &dyn Fn(_) -> LocalG<u32> = &LocalG;
     assert_eq!(virtual_localg(1), LocalG(1));
 
-    let virtual_remotec : &Fn(_) -> RemoteC = &RemoteC;
+    let virtual_remotec : &dyn Fn(_) -> RemoteC = &RemoteC;
     assert_eq!(virtual_remotec(1), RemoteC(1));
 
-    let virtual_remoteg : &Fn(_) -> RemoteG<u32> = &RemoteG;
+    let virtual_remoteg : &dyn Fn(_) -> RemoteG<u32> = &RemoteG;
     assert_eq!(virtual_remoteg(1), RemoteG(1));
 }
diff --git a/src/test/run-pass/issues/issue-41053.rs b/src/test/run-pass/issues/issue-41053.rs
index cd7a0a22623..967edfd4415 100644
--- a/src/test/run-pass/issues/issue-41053.rs
+++ b/src/test/run-pass/issues/issue-41053.rs
@@ -6,8 +6,8 @@ pub trait Trait { fn foo(&self) {} }
 pub struct Foo;
 
 impl Iterator for Foo {
-    type Item = Box<Trait>;
-    fn next(&mut self) -> Option<Box<Trait>> {
+    type Item = Box<dyn Trait>;
+    fn next(&mut self) -> Option<Box<dyn Trait>> {
         extern crate issue_41053;
         impl ::Trait for issue_41053::Test {
             fn foo(&self) {}
diff --git a/src/test/run-pass/issues/issue-41744.rs b/src/test/run-pass/issues/issue-41744.rs
index edc4354b253..dcdd1c21ee5 100644
--- a/src/test/run-pass/issues/issue-41744.rs
+++ b/src/test/run-pass/issues/issue-41744.rs
@@ -3,5 +3,5 @@ trait Tc {}
 impl Tc for bool {}
 
 fn main() {
-    let _: &[&Tc] = &[&true];
+    let _: &[&dyn Tc] = &[&true];
 }
diff --git a/src/test/run-pass/issues/issue-42210.rs b/src/test/run-pass/issues/issue-42210.rs
index cf4a698f516..318e3099f98 100644
--- a/src/test/run-pass/issues/issue-42210.rs
+++ b/src/test/run-pass/issues/issue-42210.rs
@@ -12,9 +12,9 @@ struct Bar;
 trait Baz {
 }
 
-impl Foo for (Bar, Baz) { }
+impl Foo for (Bar, dyn Baz) { }
 
 
 fn main() {
-    <(Bar, Baz) as Foo>::foo()
+    <(Bar, dyn Baz) as Foo>::foo()
 }
diff --git a/src/test/run-pass/issues/issue-43132.rs b/src/test/run-pass/issues/issue-43132.rs
index 726a86142f6..c886f4b0a2d 100644
--- a/src/test/run-pass/issues/issue-43132.rs
+++ b/src/test/run-pass/issues/issue-43132.rs
@@ -6,7 +6,7 @@ fn main() {
 
 fn foo() {
     let b = mk::<
-        Forward<(Box<Future<Error = u32>>,)>,
+        Forward<(Box<dyn Future<Error = u32>>,)>,
     >();
     b.map_err(|_| ()).join();
 }
diff --git a/src/test/run-pass/issues/issue-4333.rs b/src/test/run-pass/issues/issue-4333.rs
index ae9f4c8bdb5..3df319b683f 100644
--- a/src/test/run-pass/issues/issue-4333.rs
+++ b/src/test/run-pass/issues/issue-4333.rs
@@ -5,6 +5,6 @@
 use std::io;
 
 pub fn main() {
-    let stdout = &mut io::stdout() as &mut io::Write;
+    let stdout = &mut io::stdout() as &mut dyn io::Write;
     stdout.write(b"Hello!");
 }
diff --git a/src/test/run-pass/issues/issue-47638.rs b/src/test/run-pass/issues/issue-47638.rs
index 357364ee612..a1ed3c36544 100644
--- a/src/test/run-pass/issues/issue-47638.rs
+++ b/src/test/run-pass/issues/issue-47638.rs
@@ -1,10 +1,10 @@
 // run-pass
 #![allow(unused_variables)]
-fn id<'c, 'b>(f: &'c &'b Fn(&i32)) -> &'c &'b Fn(&'static i32) {
+fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) {
     f
 }
 
 fn main() {
-    let f: &Fn(&i32) = &|x| {};
+    let f: &dyn Fn(&i32) = &|x| {};
     id(&f);
 }
diff --git a/src/test/run-pass/issues/issue-5008-borrowed-traitobject-method-call.rs b/src/test/run-pass/issues/issue-5008-borrowed-traitobject-method-call.rs
index 457fca3fedf..fc869ae4fec 100644
--- a/src/test/run-pass/issues/issue-5008-borrowed-traitobject-method-call.rs
+++ b/src/test/run-pass/issues/issue-5008-borrowed-traitobject-method-call.rs
@@ -23,12 +23,12 @@ impl Debuggable for Thing {
     fn debug_name(&self) -> String { self.name.clone() }
 }
 
-fn print_name(x: &Debuggable)
+fn print_name(x: &dyn Debuggable)
 {
     println!("debug_name = {}", x.debug_name());
 }
 
 pub fn main() {
     let thing = Thing::new();
-    print_name(&thing as &Debuggable);
+    print_name(&thing as &dyn Debuggable);
 }
diff --git a/src/test/run-pass/issues/issue-5192.rs b/src/test/run-pass/issues/issue-5192.rs
index 74d8d861a7d..5a83d1c2ff9 100644
--- a/src/test/run-pass/issues/issue-5192.rs
+++ b/src/test/run-pass/issues/issue-5192.rs
@@ -24,12 +24,12 @@ impl EventLoop for UvEventLoop {
 }
 
 pub struct Scheduler {
-    event_loop: Box<EventLoop+'static>,
+    event_loop: Box<dyn EventLoop+'static>,
 }
 
 impl Scheduler {
 
-    pub fn new(event_loop: Box<EventLoop+'static>) -> Scheduler {
+    pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler {
         Scheduler {
             event_loop: event_loop,
         }
@@ -37,5 +37,5 @@ impl Scheduler {
 }
 
 pub fn main() {
-    let _sched = Scheduler::new(box UvEventLoop::new() as Box<EventLoop>);
+    let _sched = Scheduler::new(box UvEventLoop::new() as Box<dyn EventLoop>);
 }
diff --git a/src/test/run-pass/issues/issue-5666.rs b/src/test/run-pass/issues/issue-5666.rs
index bf919ed5b10..aa513277830 100644
--- a/src/test/run-pass/issues/issue-5666.rs
+++ b/src/test/run-pass/issues/issue-5666.rs
@@ -19,7 +19,7 @@ impl Barks for Dog {
 pub fn main() {
     let snoopy = box Dog{name: "snoopy".to_string()};
     let bubbles = box Dog{name: "bubbles".to_string()};
-    let barker = [snoopy as Box<Barks>, bubbles as Box<Barks>];
+    let barker = [snoopy as Box<dyn Barks>, bubbles as Box<dyn Barks>];
 
     for pup in &barker {
         println!("{}", pup.bark());
diff --git a/src/test/run-pass/issues/issue-5708.rs b/src/test/run-pass/issues/issue-5708.rs
index d3a2858873c..6fe9943d368 100644
--- a/src/test/run-pass/issues/issue-5708.rs
+++ b/src/test/run-pass/issues/issue-5708.rs
@@ -21,11 +21,11 @@ impl Inner for isize {
 }
 
 struct Outer<'a> {
-    inner: &'a (Inner+'a)
+    inner: &'a (dyn Inner+'a)
 }
 
 impl<'a> Outer<'a> {
-    fn new(inner: &Inner) -> Outer {
+    fn new(inner: &dyn Inner) -> Outer {
         Outer {
             inner: inner
         }
@@ -34,7 +34,7 @@ impl<'a> Outer<'a> {
 
 pub fn main() {
     let inner: isize = 5;
-    let outer = Outer::new(&inner as &Inner);
+    let outer = Outer::new(&inner as &dyn Inner);
     outer.inner.print();
 }
 
@@ -45,11 +45,11 @@ pub trait MyTrait<T> {
 }
 
 pub struct MyContainer<'a, T:'a> {
-    foos: Vec<&'a (MyTrait<T>+'a)> ,
+    foos: Vec<&'a (dyn MyTrait<T>+'a)> ,
 }
 
 impl<'a, T> MyContainer<'a, T> {
-    pub fn add (&mut self, foo: &'a MyTrait<T>) {
+    pub fn add (&mut self, foo: &'a dyn MyTrait<T>) {
         self.foos.push(foo);
     }
 }
diff --git a/src/test/run-pass/issues/issue-5988.rs b/src/test/run-pass/issues/issue-5988.rs
index db77ca4375f..303fb4fbc94 100644
--- a/src/test/run-pass/issues/issue-5988.rs
+++ b/src/test/run-pass/issues/issue-5988.rs
@@ -19,6 +19,6 @@ impl T for A {
 
 fn main() {
     let a = A;
-    let br = &a as &B;
+    let br = &a as &dyn B;
     br.f();
 }
diff --git a/src/test/run-pass/issues/issue-6128.rs b/src/test/run-pass/issues/issue-6128.rs
index f23a317c6ba..8859fbe6afb 100644
--- a/src/test/run-pass/issues/issue-6128.rs
+++ b/src/test/run-pass/issues/issue-6128.rs
@@ -20,5 +20,5 @@ impl<E> Graph<isize, E> for HashMap<isize, isize> {
 
 pub fn main() {
     let g : Box<HashMap<isize,isize>> = box HashMap::new();
-    let _g2 : Box<Graph<isize,isize>> = g as Box<Graph<isize,isize>>;
+    let _g2 : Box<dyn Graph<isize,isize>> = g as Box<dyn Graph<isize,isize>>;
 }
diff --git a/src/test/run-pass/issues/issue-6157.rs b/src/test/run-pass/issues/issue-6157.rs
index 354797cb2a7..b7a44ed8623 100644
--- a/src/test/run-pass/issues/issue-6157.rs
+++ b/src/test/run-pass/issues/issue-6157.rs
@@ -9,7 +9,7 @@ impl<F> OpInt for F where F: FnMut(isize, isize) -> isize {
     }
 }
 
-fn squarei<'a>(x: isize, op: &'a mut OpInt) -> isize { op.call(x, x) }
+fn squarei<'a>(x: isize, op: &'a mut dyn OpInt) -> isize { op.call(x, x) }
 
 fn muli(x:isize, y:isize) -> isize { x * y }
 
@@ -17,7 +17,7 @@ pub fn main() {
     let mut f = |x, y| muli(x, y);
     {
         let g = &mut f;
-        let h = g as &mut OpInt;
+        let h = g as &mut dyn OpInt;
         squarei(3, h);
     }
 }
diff --git a/src/test/run-pass/issues/issue-6318.rs b/src/test/run-pass/issues/issue-6318.rs
index d416048265f..d8bd83f0dc6 100644
--- a/src/test/run-pass/issues/issue-6318.rs
+++ b/src/test/run-pass/issues/issue-6318.rs
@@ -4,7 +4,7 @@
 #![feature(box_syntax)]
 
 pub enum Thing {
-    A(Box<Foo+'static>)
+    A(Box<dyn Foo+'static>)
 }
 
 pub trait Foo {
@@ -16,7 +16,7 @@ pub struct Struct;
 impl Foo for Struct {}
 
 pub fn main() {
-    match Thing::A(box Struct as Box<Foo+'static>) {
+    match Thing::A(box Struct as Box<dyn Foo + 'static>) {
         Thing::A(_a) => 0,
     };
 }
diff --git a/src/test/run-pass/issues/issue-7563.rs b/src/test/run-pass/issues/issue-7563.rs
index 820fffd1056..c62405554b4 100644
--- a/src/test/run-pass/issues/issue-7563.rs
+++ b/src/test/run-pass/issues/issue-7563.rs
@@ -16,7 +16,7 @@ struct B<'a> { b: isize, pa: &'a A }
     }
 
 impl<'a> B<'a> {
-    fn get_pa(&self) -> &'a IDummy { self.pa as &'a IDummy }
+    fn get_pa(&self) -> &'a dyn IDummy { self.pa as &'a dyn IDummy }
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/issues/issue-7911.rs b/src/test/run-pass/issues/issue-7911.rs
index cb7e009d074..de833324bd2 100644
--- a/src/test/run-pass/issues/issue-7911.rs
+++ b/src/test/run-pass/issues/issue-7911.rs
@@ -12,18 +12,18 @@ struct Foo { bar: Bar }
 impl FooBar for Bar {}
 
 trait Test {
-    fn get_immut(&self) -> &FooBar;
-    fn get_mut(&mut self) -> &mut FooBar;
+    fn get_immut(&self) -> &dyn FooBar;
+    fn get_mut(&mut self) -> &mut dyn FooBar;
 }
 
 macro_rules! generate_test { ($type_:path, $slf:ident, $field:expr) => (
     impl Test for $type_ {
-        fn get_immut(&$slf) -> &FooBar {
-            &$field as &FooBar
+        fn get_immut(&$slf) -> &dyn FooBar {
+            &$field as &dyn FooBar
         }
 
-        fn get_mut(&mut $slf) -> &mut FooBar {
-            &mut $field as &mut FooBar
+        fn get_mut(&mut $slf) -> &mut dyn FooBar {
+            &mut $field as &mut dyn FooBar
         }
     }
 )}
diff --git a/src/test/run-pass/issues/issue-8248.rs b/src/test/run-pass/issues/issue-8248.rs
index 239c432e457..31a305c31be 100644
--- a/src/test/run-pass/issues/issue-8248.rs
+++ b/src/test/run-pass/issues/issue-8248.rs
@@ -7,9 +7,9 @@ trait A {
 struct B;
 impl A for B {}
 
-fn foo(_: &mut A) {}
+fn foo(_: &mut dyn A) {}
 
 pub fn main() {
     let mut b = B;
-    foo(&mut b as &mut A);
+    foo(&mut b as &mut dyn A);
 }
diff --git a/src/test/run-pass/issues/issue-8249.rs b/src/test/run-pass/issues/issue-8249.rs
index db49f354a39..d09dff3a697 100644
--- a/src/test/run-pass/issues/issue-8249.rs
+++ b/src/test/run-pass/issues/issue-8249.rs
@@ -9,10 +9,10 @@ struct B;
 impl A for B {}
 
 struct C<'a> {
-    foo: &'a mut (A+'a),
+    foo: &'a mut (dyn A+'a),
 }
 
-fn foo(a: &mut A) {
+fn foo(a: &mut dyn A) {
     C{ foo: a };
 }
 
diff --git a/src/test/run-pass/issues/issue-9129.rs b/src/test/run-pass/issues/issue-9129.rs
index c81b9b1a10d..3d87e1c2037 100644
--- a/src/test/run-pass/issues/issue-9129.rs
+++ b/src/test/run-pass/issues/issue-9129.rs
@@ -20,7 +20,7 @@ fn Ident_new() -> Ident {
     Ident {name: 0x6789ABCD }
 }
 
-pub fn light_fuse(fld: Box<bomb>) {
+pub fn light_fuse(fld: Box<dyn bomb>) {
     int3!();
     let f = || {
         int3!();
@@ -30,6 +30,6 @@ pub fn light_fuse(fld: Box<bomb>) {
 }
 
 pub fn main() {
-    let b = box S as Box<bomb>;
+    let b = box S as Box<dyn bomb>;
     light_fuse(b);
 }
diff --git a/src/test/run-pass/issues/issue-9394-inherited-trait-calls.rs b/src/test/run-pass/issues/issue-9394-inherited-trait-calls.rs
index c4c95aa1aae..cc0dd4fc14a 100644
--- a/src/test/run-pass/issues/issue-9394-inherited-trait-calls.rs
+++ b/src/test/run-pass/issues/issue-9394-inherited-trait-calls.rs
@@ -52,7 +52,7 @@ impl Super for X {
 
 pub fn main() {
     let n = X;
-    let s = &n as &Super;
+    let s = &n as &dyn Super;
     assert_eq!(s.bar(),"super bar".to_string());
     assert_eq!(s.foo(),"base foo".to_string());
     assert_eq!(s.foo1(),"base foo1".to_string());
diff --git a/src/test/run-pass/issues/issue-9951.rs b/src/test/run-pass/issues/issue-9951.rs
index 4e14bdbd734..2698a3b17c6 100644
--- a/src/test/run-pass/issues/issue-9951.rs
+++ b/src/test/run-pass/issues/issue-9951.rs
@@ -11,11 +11,11 @@ impl Bar for u8 {
 }
 
 fn main() {
-    let (a, b) = (&5u8 as &Bar, &9u8 as &Bar);
-    let (c, d): (&Bar, &Bar) = (a, b);
+    let (a, b) = (&5u8 as &dyn Bar, &9u8 as &dyn Bar);
+    let (c, d): (&dyn Bar, &dyn Bar) = (a, b);
 
-    let (a, b) = (Box::new(5u8) as Box<Bar>, Box::new(9u8) as Box<Bar>);
-    let (c, d): (&Bar, &Bar) = (&*a, &*b);
+    let (a, b) = (Box::new(5u8) as Box<dyn Bar>, Box::new(9u8) as Box<dyn Bar>);
+    let (c, d): (&dyn Bar, &dyn Bar) = (&*a, &*b);
 
-    let (c, d): (&Bar, &Bar) = (&5, &9);
+    let (c, d): (&dyn Bar, &dyn Bar) = (&5, &9);
 }
diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs
index b77f7b5d782..42dc6a4b06e 100644
--- a/src/test/run-pass/last-use-in-cap-clause.rs
+++ b/src/test/run-pass/last-use-in-cap-clause.rs
@@ -3,7 +3,7 @@
 
 struct A { a: Box<isize> }
 
-fn foo() -> Box<FnMut() -> isize + 'static> {
+fn foo() -> Box<dyn FnMut() -> isize + 'static> {
     let k: Box<_> = Box::new(22);
     let _u = A {a: k.clone()};
     let result  = || 22;
diff --git a/src/test/run-pass/macros/colorful-write-macros.rs b/src/test/run-pass/macros/colorful-write-macros.rs
index aba4383c734..eb1872cc7f0 100644
--- a/src/test/run-pass/macros/colorful-write-macros.rs
+++ b/src/test/run-pass/macros/colorful-write-macros.rs
@@ -4,7 +4,7 @@ use std::io::Write;
 use std::fmt;
 
 struct Foo<'a> {
-    writer: &'a mut (Write+'a),
+    writer: &'a mut (dyn Write+'a),
     other: &'a str,
 }
 
@@ -22,7 +22,7 @@ fn borrowing_writer_from_struct_and_formatting_struct_field(foo: Foo) {
 
 fn main() {
     let mut w = Vec::new();
-    write!(&mut w as &mut Write, "").unwrap();
+    write!(&mut w as &mut dyn Write, "").unwrap();
     write!(&mut w, "").unwrap(); // should coerce
     println!("ok");
 
diff --git a/src/test/run-pass/macros/type-macros-simple.rs b/src/test/run-pass/macros/type-macros-simple.rs
index 579b485a2a5..dd3ad2ef0ac 100644
--- a/src/test/run-pass/macros/type-macros-simple.rs
+++ b/src/test/run-pass/macros/type-macros-simple.rs
@@ -16,7 +16,7 @@ fn issue_36540() {
 
     let x: m!() = m!();
     std::cell::Cell::<m!()>::new(m!());
-    impl<T> std::ops::Index<m!()> for Trait<(m!(), T)>
+    impl<T> std::ops::Index<m!()> for dyn Trait<(m!(), T)>
         where T: Trait<m!()>
     {
         type Output = m!();
diff --git a/src/test/run-pass/methods/method-argument-inference-associated-type.rs b/src/test/run-pass/methods/method-argument-inference-associated-type.rs
index b5ba1f94556..acd4a8465b0 100644
--- a/src/test/run-pass/methods/method-argument-inference-associated-type.rs
+++ b/src/test/run-pass/methods/method-argument-inference-associated-type.rs
@@ -10,13 +10,13 @@ pub trait Service {
 pub struct S<T>(T);
 
 impl Service for ClientMap {
-    type Request = S<Box<Fn(i32)>>;
+    type Request = S<Box<dyn Fn(i32)>>;
     fn call(&self, _req: Self::Request) {}
 }
 
 
 impl Service for ClientMap2 {
-    type Request = (Box<Fn(i32)>,);
+    type Request = (Box<dyn Fn(i32)>,);
     fn call(&self, _req: Self::Request) {}
 }
 
diff --git a/src/test/run-pass/mir/mir_codegen_calls.rs b/src/test/run-pass/mir/mir_codegen_calls.rs
index 075d266d34d..fc0db03e3a9 100644
--- a/src/test/run-pass/mir/mir_codegen_calls.rs
+++ b/src/test/run-pass/mir/mir_codegen_calls.rs
@@ -42,7 +42,7 @@ fn test4(x: &Foo, a: isize) -> isize {
     x.extension_method(a)
 }
 
-fn test5(x: &Bar, a: isize) -> isize {
+fn test5(x: &dyn Bar, a: isize) -> isize {
     // Test calling method on trait object
     x.extension_method(a)
 }
@@ -88,11 +88,11 @@ fn test_closure<F>(f: &F, x: i32, y: i32) -> i32
     f(x, y)
 }
 
-fn test_fn_object(f: &Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
+fn test_fn_object(f: &dyn Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     f(x, y)
 }
 
-fn test_fn_impl(f: &&Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
+fn test_fn_impl(f: &&dyn Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     // This call goes through the Fn implementation for &Fn provided in
     // core::ops::impls. It expands to a static Fn::call() that calls the
     // Fn::call() implementation of the object shim underneath.
@@ -174,7 +174,7 @@ fn main() {
     let closure = |x: i32, y: i32| { r*(x + (y*2)) };
     assert_eq!(test_fn_const_call(&closure), 294);
     assert_eq!(test_closure(&closure, 100, 1), 306);
-    let function_object = &closure as &Fn(i32, i32) -> i32;
+    let function_object = &closure as &dyn Fn(i32, i32) -> i32;
     assert_eq!(test_fn_object(function_object, 100, 2), 312);
     assert_eq!(test_fn_impl(&function_object, 100, 3), 318);
     assert_eq!(test_fn_direct_call(&closure, 100, 4), 324);
diff --git a/src/test/run-pass/mir/mir_codegen_critical_edge.rs b/src/test/run-pass/mir/mir_codegen_critical_edge.rs
index 03b111e93dd..5c1f1c3b701 100644
--- a/src/test/run-pass/mir/mir_codegen_critical_edge.rs
+++ b/src/test/run-pass/mir/mir_codegen_critical_edge.rs
@@ -37,7 +37,7 @@ where A: Iterator, B: Iterator<Item=A::Item>
 }
 
 // Make sure we actually codegen a version of the function
-pub fn do_stuff(mut f: Foo<Box<Iterator<Item=u32>>, Box<Iterator<Item=u32>>>) {
+pub fn do_stuff(mut f: Foo<Box<dyn Iterator<Item=u32>>, Box<dyn Iterator<Item=u32>>>) {
     let _x = f.next();
 }
 
diff --git a/src/test/run-pass/mir/mir_coercions.rs b/src/test/run-pass/mir/mir_coercions.rs
index b673345db70..f3dcc6b85fd 100644
--- a/src/test/run-pass/mir/mir_coercions.rs
+++ b/src/test/run-pass/mir/mir_coercions.rs
@@ -4,12 +4,12 @@
 use std::ops::CoerceUnsized;
 use std::marker::Unsize;
 
-fn identity_coercion(x: &(Fn(u32)->u32 + Send)) -> &Fn(u32)->u32 {
+fn identity_coercion(x: &(dyn Fn(u32)->u32 + Send)) -> &dyn Fn(u32)->u32 {
     x
 }
 fn fn_coercions(f: &fn(u32) -> u32) ->
     (unsafe fn(u32) -> u32,
-     &(Fn(u32) -> u32+Send))
+     &(dyn Fn(u32) -> u32+Send))
 {
     (*f, f)
 }
@@ -35,8 +35,8 @@ fn coerce_triv_ptr_wrapper(p: TrivPtrWrapper<[u8; 3]>) -> TrivPtrWrapper<[u8]> {
     p
 }
 
-fn coerce_fat_ptr_wrapper(p: PtrWrapper<Fn(u32) -> u32+Send>)
-                          -> PtrWrapper<Fn(u32) -> u32> {
+fn coerce_fat_ptr_wrapper(p: PtrWrapper<dyn Fn(u32) -> u32+Send>)
+                          -> PtrWrapper<dyn Fn(u32) -> u32> {
     p
 }
 
@@ -65,7 +65,7 @@ fn main() {
     let z = coerce_fat_ptr_wrapper(PtrWrapper(2,3,(),&square_local));
     assert_eq!((z.3)(6), 36);
 
-    let z: PtrWrapper<Fn(u32) -> u32> =
+    let z: PtrWrapper<dyn Fn(u32) -> u32> =
         coerce_ptr_wrapper_poly(PtrWrapper(2,3,(),&square_local));
     assert_eq!((z.3)(6), 36);
 }
diff --git a/src/test/run-pass/mir/mir_raw_fat_ptr.rs b/src/test/run-pass/mir/mir_raw_fat_ptr.rs
index 328c8c502cb..6583852aa9b 100644
--- a/src/test/run-pass/mir/mir_raw_fat_ptr.rs
+++ b/src/test/run-pass/mir/mir_raw_fat_ptr.rs
@@ -63,7 +63,7 @@ fn compare_au8(a: *const [u8], b: *const [u8]) -> ComparisonResults {
     }
 }
 
-fn compare_foo<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> ComparisonResults {
+fn compare_foo<'a>(a: *const (dyn Foo+'a), b: *const (dyn Foo+'a)) -> ComparisonResults {
     ComparisonResults {
         lt: a < b,
         le: a <= b,
@@ -74,7 +74,7 @@ fn compare_foo<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> ComparisonResults
     }
 }
 
-fn simple_eq<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> bool {
+fn simple_eq<'a>(a: *const (dyn Foo+'a), b: *const (dyn Foo+'a)) -> bool {
     let result = a == b;
     result
 }
@@ -128,7 +128,7 @@ fn main() {
     let u32_ = (4u32, 5u32);
 
     // check ordering for ptrs
-    let buf: &mut [*const Foo] = &mut [
+    let buf: &mut [*const dyn Foo] = &mut [
         &u8_, &u8_.0,
         &u32_, &u32_.0,
     ];
diff --git a/src/test/run-pass/new-box.rs b/src/test/run-pass/new-box.rs
index b35c5445a44..5539518c370 100644
--- a/src/test/run-pass/new-box.rs
+++ b/src/test/run-pass/new-box.rs
@@ -18,13 +18,13 @@ impl Trait for Struct {
     }
 }
 
-fn g(x: Box<Trait>) {
+fn g(x: Box<dyn Trait>) {
     x.printme();
-    let y: &Trait = &*x;
+    let y: &dyn Trait = &*x;
     y.printme();
 }
 
 fn main() {
     f(box 1234);
-    g(box Struct as Box<Trait>);
+    g(box Struct as Box<dyn Trait>);
 }
diff --git a/src/test/run-pass/newlambdas-ret-infer.rs b/src/test/run-pass/newlambdas-ret-infer.rs
index 969868486e6..79c9f7dc011 100644
--- a/src/test/run-pass/newlambdas-ret-infer.rs
+++ b/src/test/run-pass/newlambdas-ret-infer.rs
@@ -4,7 +4,7 @@
 
 // pretty-expanded FIXME #23616
 
-fn unique() -> Box<FnMut()+'static> { return Box::new(|| ()); }
+fn unique() -> Box<dyn FnMut()+'static> { return Box::new(|| ()); }
 
 pub fn main() {
 }
diff --git a/src/test/run-pass/newlambdas-ret-infer2.rs b/src/test/run-pass/newlambdas-ret-infer2.rs
index 676b3507c57..104f5be7767 100644
--- a/src/test/run-pass/newlambdas-ret-infer2.rs
+++ b/src/test/run-pass/newlambdas-ret-infer2.rs
@@ -4,7 +4,7 @@
 
 // pretty-expanded FIXME #23616
 
-fn unique() -> Box<FnMut()+'static> { Box::new(|| ()) }
+fn unique() -> Box<dyn FnMut()+'static> { Box::new(|| ()) }
 
 pub fn main() {
 }
diff --git a/src/test/run-pass/object-lifetime-default-default-to-static.rs b/src/test/run-pass/object-lifetime-default-default-to-static.rs
index cf836c1a7de..cd61dea0378 100644
--- a/src/test/run-pass/object-lifetime-default-default-to-static.rs
+++ b/src/test/run-pass/object-lifetime-default-default-to-static.rs
@@ -10,23 +10,23 @@ trait Test {
 }
 
 struct SomeStruct {
-    t: Box<Test>,
-    u: Box<Test+'static>,
+    t: Box<dyn Test>,
+    u: Box<dyn Test+'static>,
 }
 
-fn a(t: Box<Test>, mut ss: SomeStruct) {
+fn a(t: Box<dyn Test>, mut ss: SomeStruct) {
     ss.t = t;
 }
 
-fn b(t: Box<Test+'static>, mut ss: SomeStruct) {
+fn b(t: Box<dyn Test+'static>, mut ss: SomeStruct) {
     ss.t = t;
 }
 
-fn c(t: Box<Test>, mut ss: SomeStruct) {
+fn c(t: Box<dyn Test>, mut ss: SomeStruct) {
     ss.u = t;
 }
 
-fn d(t: Box<Test+'static>, mut ss: SomeStruct) {
+fn d(t: Box<dyn Test+'static>, mut ss: SomeStruct) {
     ss.u = t;
 }
 
diff --git a/src/test/run-pass/object-lifetime-default-from-rptr-box.rs b/src/test/run-pass/object-lifetime-default-from-rptr-box.rs
index 3f69c927488..9212f2802c0 100644
--- a/src/test/run-pass/object-lifetime-default-from-rptr-box.rs
+++ b/src/test/run-pass/object-lifetime-default-from-rptr-box.rs
@@ -10,21 +10,21 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a Box<Test>,
-    u: &'a Box<Test+'a>,
+    t: &'a Box<dyn Test>,
+    u: &'a Box<dyn Test+'a>,
 }
 
-fn a<'a>(t: &'a Box<Test>, mut ss: SomeStruct<'a>) {
+fn a<'a>(t: &'a Box<dyn Test>, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn b<'a>(t: &'a Box<Test>, mut ss: SomeStruct<'a>) {
+fn b<'a>(t: &'a Box<dyn Test>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
 // see also compile-fail/object-lifetime-default-from-rptr-box-error.rs
 
-fn d<'a>(t: &'a Box<Test+'a>, mut ss: SomeStruct<'a>) {
+fn d<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
diff --git a/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs b/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs
index dc9e292f0de..061f3a116fc 100644
--- a/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs
+++ b/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs
@@ -10,23 +10,23 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a mut Test,
-    u: &'a mut (Test+'a),
+    t: &'a mut dyn Test,
+    u: &'a mut (dyn Test+'a),
 }
 
-fn a<'a>(t: &'a mut Test, mut ss: SomeStruct<'a>) {
+fn a<'a>(t: &'a mut dyn Test, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn b<'a>(t: &'a mut Test, mut ss: SomeStruct<'a>) {
+fn b<'a>(t: &'a mut dyn Test, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
-fn c<'a>(t: &'a mut (Test+'a), mut ss: SomeStruct<'a>) {
+fn c<'a>(t: &'a mut (dyn Test+'a), mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn d<'a>(t: &'a mut (Test+'a), mut ss: SomeStruct<'a>) {
+fn d<'a>(t: &'a mut (dyn Test+'a), mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
diff --git a/src/test/run-pass/object-lifetime-default-from-rptr.rs b/src/test/run-pass/object-lifetime-default-from-rptr.rs
index 061f71b9ae6..cfa4af0d7a5 100644
--- a/src/test/run-pass/object-lifetime-default-from-rptr.rs
+++ b/src/test/run-pass/object-lifetime-default-from-rptr.rs
@@ -12,30 +12,30 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a Test,
-    u: &'a (Test+'a),
+    t: &'a dyn Test,
+    u: &'a (dyn Test+'a),
 }
 
-fn a<'a>(t: &'a Test, mut ss: SomeStruct<'a>) {
+fn a<'a>(t: &'a dyn Test, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn b<'a>(t: &'a Test, mut ss: SomeStruct<'a>) {
+fn b<'a>(t: &'a dyn Test, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
-fn c<'a>(t: &'a (Test+'a), mut ss: SomeStruct<'a>) {
+fn c<'a>(t: &'a (dyn Test+'a), mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn d<'a>(t: &'a (Test+'a), mut ss: SomeStruct<'a>) {
+fn d<'a>(t: &'a (dyn Test+'a), mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
-fn e<'a>(_: &'a (Display+'static)) {}
+fn e<'a>(_: &'a (dyn Display+'static)) {}
 
 fn main() {
     // Inside a function body, we can just infer both
     // lifetimes, to allow &'tmp (Display+'static).
-    e(&0 as &Display);
+    e(&0 as &dyn Display);
 }
diff --git a/src/test/run-pass/object-method-numbering.rs b/src/test/run-pass/object-method-numbering.rs
index 455af78c7a0..7f24ab2cbb5 100644
--- a/src/test/run-pass/object-method-numbering.rs
+++ b/src/test/run-pass/object-method-numbering.rs
@@ -21,7 +21,7 @@ impl SomeTrait for i32 {
 
 fn main() {
     let x = 22;
-    let x1: &SomeTrait<SomeType=i32> = &x;
+    let x1: &dyn SomeTrait<SomeType=i32> = &x;
     let y = get_int(x1);
     assert_eq!(x, y);
 }
diff --git a/src/test/run-pass/objects-coerce-freeze-borrored.rs b/src/test/run-pass/objects-coerce-freeze-borrored.rs
index 872b9d3e916..47196f108c0 100644
--- a/src/test/run-pass/objects-coerce-freeze-borrored.rs
+++ b/src/test/run-pass/objects-coerce-freeze-borrored.rs
@@ -17,7 +17,7 @@ impl Foo for usize {
     }
 }
 
-fn do_it_mut(obj: &mut Foo) {
+fn do_it_mut(obj: &mut dyn Foo) {
     let x = obj.bar();
     let y = obj.foo();
     assert_eq!(x, y);
@@ -25,14 +25,14 @@ fn do_it_mut(obj: &mut Foo) {
     do_it_imm(obj, y);
 }
 
-fn do_it_imm(obj: &Foo, v: usize) {
+fn do_it_imm(obj: &dyn Foo, v: usize) {
     let y = obj.foo();
     assert_eq!(v, y);
 }
 
 pub fn main() {
     let mut x: usize = 22;
-    let obj = &mut x as &mut Foo;
+    let obj = &mut x as &mut dyn Foo;
     do_it_mut(obj);
     do_it_imm(obj, 23);
     do_it_mut(obj);
diff --git a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs
index a96772bfb63..58327237494 100644
--- a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs
+++ b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs
@@ -20,10 +20,10 @@ impl FooTrait for BarStruct {
 }
 
 pub fn main() {
-    let foos: Vec<Box<FooTrait>> = vec![
-        box BarStruct{ x: 0 } as Box<FooTrait>,
-        box BarStruct{ x: 1 } as Box<FooTrait>,
-        box BarStruct{ x: 2 } as Box<FooTrait>
+    let foos: Vec<Box<dyn FooTrait>> = vec![
+        box BarStruct{ x: 0 } as Box<dyn FooTrait>,
+        box BarStruct{ x: 1 } as Box<dyn FooTrait>,
+        box BarStruct{ x: 2 } as Box<dyn FooTrait>
     ];
 
     for i in 0..foos.len() {
diff --git a/src/test/run-pass/objects-owned-object-owned-method.rs b/src/test/run-pass/objects-owned-object-owned-method.rs
index 6ca5233b198..69984fbb62f 100644
--- a/src/test/run-pass/objects-owned-object-owned-method.rs
+++ b/src/test/run-pass/objects-owned-object-owned-method.rs
@@ -19,6 +19,6 @@ impl FooTrait for BarStruct {
 }
 
 pub fn main() {
-    let foo = box BarStruct{ x: 22 } as Box<FooTrait>;
+    let foo = box BarStruct{ x: 22 } as Box<dyn FooTrait>;
     assert_eq!(22, foo.foo());
 }
diff --git a/src/test/run-pass/overloaded/overloaded-calls-object-one-arg.rs b/src/test/run-pass/overloaded/overloaded-calls-object-one-arg.rs
index ff484418c1d..1afab9a1ffb 100644
--- a/src/test/run-pass/overloaded/overloaded-calls-object-one-arg.rs
+++ b/src/test/run-pass/overloaded/overloaded-calls-object-one-arg.rs
@@ -3,7 +3,7 @@
 // This is a bit tricky due to rust-call ABI.
 
 
-fn foo(f: &mut FnMut(isize) -> isize) -> isize {
+fn foo(f: &mut dyn FnMut(isize) -> isize) -> isize {
     f(22)
 }
 
diff --git a/src/test/run-pass/overloaded/overloaded-calls-object-two-args.rs b/src/test/run-pass/overloaded/overloaded-calls-object-two-args.rs
index 0d0136bc29a..38087bc8710 100644
--- a/src/test/run-pass/overloaded/overloaded-calls-object-two-args.rs
+++ b/src/test/run-pass/overloaded/overloaded-calls-object-two-args.rs
@@ -3,7 +3,7 @@
 // This is a bit tricky due to rust-call ABI.
 
 
-fn foo(f: &mut FnMut(isize, isize) -> isize) -> isize {
+fn foo(f: &mut dyn FnMut(isize, isize) -> isize) -> isize {
     f(1, 2)
 }
 
diff --git a/src/test/run-pass/overloaded/overloaded-calls-object-zero-args.rs b/src/test/run-pass/overloaded/overloaded-calls-object-zero-args.rs
index bbea6a909c8..9a7bfaa9bf4 100644
--- a/src/test/run-pass/overloaded/overloaded-calls-object-zero-args.rs
+++ b/src/test/run-pass/overloaded/overloaded-calls-object-zero-args.rs
@@ -3,7 +3,7 @@
 // This is a bit tricky due to rust-call ABI.
 
 
-fn foo(f: &mut FnMut() -> isize) -> isize {
+fn foo(f: &mut dyn FnMut() -> isize) -> isize {
     f()
 }
 
diff --git a/src/test/run-pass/panics/panic-safe.rs b/src/test/run-pass/panics/panic-safe.rs
index 3798a4fc5cb..9867cc56406 100644
--- a/src/test/run-pass/panics/panic-safe.rs
+++ b/src/test/run-pass/panics/panic-safe.rs
@@ -33,7 +33,7 @@ fn main() {
     assert::<Box<[u8]>>();
 
     trait Trait: UnwindSafe {}
-    assert::<Box<Trait>>();
+    assert::<Box<dyn Trait>>();
 
     fn bar<T>() {
         assert::<Mutex<T>>();
diff --git a/src/test/run-pass/privacy/privacy-ns.rs b/src/test/run-pass/privacy/privacy-ns.rs
index b1b03eae5db..c32e3f17880 100644
--- a/src/test/run-pass/privacy/privacy-ns.rs
+++ b/src/test/run-pass/privacy/privacy-ns.rs
@@ -28,19 +28,19 @@ fn test_unused1() {
 fn test_single1() {
     use foo1::Bar;
 
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 fn test_list1() {
     use foo1::{Bar,Baz};
 
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 fn test_glob1() {
     use foo1::*;
 
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 // private type, public value
@@ -93,21 +93,21 @@ fn test_single3() {
     use foo3::Bar;
 
     Bar();
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 fn test_list3() {
     use foo3::{Bar,Baz};
 
     Bar();
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 fn test_glob3() {
     use foo3::*;
 
     Bar();
-    let _x: Box<Bar>;
+    let _x: Box<dyn Bar>;
 }
 
 fn main() {
diff --git a/src/test/run-pass/raw-fat-ptr.rs b/src/test/run-pass/raw-fat-ptr.rs
index df69db1cc9a..511a35b25a3 100644
--- a/src/test/run-pass/raw-fat-ptr.rs
+++ b/src/test/run-pass/raw-fat-ptr.rs
@@ -78,7 +78,7 @@ fn main() {
     let mut u32_ = (4u32, 5u32);
 
     // check ordering for ptrs
-    let buf: &mut [*const Foo] = &mut [
+    let buf: &mut [*const dyn Foo] = &mut [
         &u8_, &u8_.0,
         &u32_, &u32_.0,
     ];
@@ -90,7 +90,7 @@ fn main() {
     assert_inorder(buf);
 
     // check ordering for mut ptrs
-    let buf: &mut [*mut Foo] = &mut [
+    let buf: &mut [*mut dyn Foo] = &mut [
         &mut u8_, &mut u8_.0,
         &mut u32_, &mut u32_.0,
     ];
diff --git a/src/test/run-pass/regions/regions-bound-lists-feature-gate.rs b/src/test/run-pass/regions/regions-bound-lists-feature-gate.rs
index 204f4f8130d..3815498f86f 100644
--- a/src/test/run-pass/regions/regions-bound-lists-feature-gate.rs
+++ b/src/test/run-pass/regions/regions-bound-lists-feature-gate.rs
@@ -9,7 +9,7 @@ trait Foo {
     fn dummy(&self) { }
 }
 
-fn foo<'a>(x: Box<Foo + 'a>) {
+fn foo<'a>(x: Box<dyn Foo + 'a>) {
 }
 
 fn bar<'a, T: 'a>() {
diff --git a/src/test/run-pass/regions/regions-close-over-type-parameter-successfully.rs b/src/test/run-pass/regions/regions-close-over-type-parameter-successfully.rs
index 85c9c64c643..4b47ed8c6ae 100644
--- a/src/test/run-pass/regions/regions-close-over-type-parameter-successfully.rs
+++ b/src/test/run-pass/regions/regions-close-over-type-parameter-successfully.rs
@@ -12,8 +12,8 @@ impl<'a> SomeTrait for &'a isize {
     }
 }
 
-fn make_object<'a,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'a> {
-    box v as Box<SomeTrait+'a>
+fn make_object<'a,A:SomeTrait+'a>(v: A) -> Box<dyn SomeTrait+'a> {
+    box v as Box<dyn SomeTrait+'a>
 }
 
 fn main() {
diff --git a/src/test/run-pass/regions/regions-copy-closure.rs b/src/test/run-pass/regions/regions-copy-closure.rs
index 6545ddf72c7..43640079777 100644
--- a/src/test/run-pass/regions/regions-copy-closure.rs
+++ b/src/test/run-pass/regions/regions-copy-closure.rs
@@ -2,10 +2,10 @@
 #![allow(non_camel_case_types)]
 
 struct closure_box<'a> {
-    cl: Box<FnMut() + 'a>,
+    cl: Box<dyn FnMut() + 'a>,
 }
 
-fn box_it<'a>(x: Box<FnMut() + 'a>) -> closure_box<'a> {
+fn box_it<'a>(x: Box<dyn FnMut() + 'a>) -> closure_box<'a> {
     closure_box {cl: x}
 }
 
diff --git a/src/test/run-pass/regions/regions-debruijn-of-object.rs b/src/test/run-pass/regions/regions-debruijn-of-object.rs
index 24c0cf53317..0b5510489fb 100644
--- a/src/test/run-pass/regions/regions-debruijn-of-object.rs
+++ b/src/test/run-pass/regions/regions-debruijn-of-object.rs
@@ -13,9 +13,9 @@ trait AstConv<'tcx> {
     fn tcx<'a>(&'a self) -> &'a ctxt<'tcx>;
 }
 
-fn foo(conv: &AstConv) { }
+fn foo(conv: &dyn AstConv) { }
 
-fn bar<'tcx>(conv: &AstConv<'tcx>) {
+fn bar<'tcx>(conv: &dyn AstConv<'tcx>) {
     foo(conv)
 }
 
diff --git a/src/test/run-pass/regions/regions-early-bound-trait-param.rs b/src/test/run-pass/regions/regions-early-bound-trait-param.rs
index c71e47db22d..cc2bde78d85 100644
--- a/src/test/run-pass/regions/regions-early-bound-trait-param.rs
+++ b/src/test/run-pass/regions/regions-early-bound-trait-param.rs
@@ -15,14 +15,14 @@ fn poly_invoke<'c, T: Trait<'c>>(x: &'c T) -> (isize, isize) {
     (l,s)
 }
 
-fn object_invoke1<'d>(x: &'d Trait<'d>) -> (isize, isize) {
+fn object_invoke1<'d>(x: &'d dyn Trait<'d>) -> (isize, isize) {
     let l = x.long();
     let s = x.short();
     (l,s)
 }
 
 struct Struct1<'e> {
-    f: &'e (Trait<'e>+'e)
+    f: &'e (dyn Trait<'e>+'e)
 }
 
 fn field_invoke1<'f, 'g>(x: &'g Struct1<'f>) -> (isize,isize) {
@@ -32,10 +32,10 @@ fn field_invoke1<'f, 'g>(x: &'g Struct1<'f>) -> (isize,isize) {
 }
 
 struct Struct2<'h, 'i:'h> {
-    f: &'h (Trait<'i>+'h)
+    f: &'h (dyn Trait<'i>+'h)
 }
 
-fn object_invoke2<'j, 'k>(x: &'k Trait<'j>) -> isize {
+fn object_invoke2<'j, 'k>(x: &'k dyn Trait<'j>) -> isize {
     x.short()
 }
 
@@ -70,10 +70,10 @@ impl<'s> Trait<'s> for (isize,isize) {
     }
 }
 
-impl<'t> MakerTrait for Box<Trait<'t>+'static> {
-    fn mk() -> Box<Trait<'t>+'static> {
+impl<'t> MakerTrait for Box<dyn Trait<'t>+'static> {
+    fn mk() -> Box<dyn Trait<'t>+'static> {
         let tup: Box<(isize, isize)> = box (4,5);
-        tup as Box<Trait>
+        tup as Box<dyn Trait>
     }
 }
 
@@ -105,7 +105,7 @@ impl<'t> RefMakerTrait<'t> for List<'t> {
 
 pub fn main() {
     let t = (2,3);
-    let o = &t as &Trait;
+    let o = &t as &dyn Trait;
     let s1 = Struct1 { f: o };
     let s2 = Struct2 { f: o };
     assert_eq!(poly_invoke(&t), (2,3));
@@ -114,7 +114,7 @@ pub fn main() {
     assert_eq!(object_invoke2(&t), 3);
     assert_eq!(field_invoke2(&s2), 3);
 
-    let m : Box<Trait> = make_val();
+    let m : Box<dyn Trait> = make_val();
     // assert_eq!(object_invoke1(&*m), (4,5));
     //            ~~~~~~~~~~~~~~~~~~~
     // this call yields a compilation error; see compile-fail/dropck-object-cycle.rs
diff --git a/src/test/run-pass/regions/regions-fn-subtyping-2.rs b/src/test/run-pass/regions/regions-fn-subtyping-2.rs
index cbd88ebde0d..83949ddba3d 100644
--- a/src/test/run-pass/regions/regions-fn-subtyping-2.rs
+++ b/src/test/run-pass/regions/regions-fn-subtyping-2.rs
@@ -7,13 +7,13 @@
 // that `x` is in.
 // pretty-expanded FIXME #23616
 
-fn has_same_region(f: Box<for<'a> FnMut(&'a isize, Box<FnMut(&'a isize)>)>) {
+fn has_same_region(f: Box<dyn for<'a> FnMut(&'a isize, Box<dyn FnMut(&'a isize)>)>) {
     // `f` should be the type that `wants_same_region` wants, but
     // right now the compiler complains that it isn't.
     wants_same_region(f);
 }
 
-fn wants_same_region(_f: Box<for<'b> FnMut(&'b isize, Box<FnMut(&'b isize)>)>) {
+fn wants_same_region(_f: Box<dyn for<'b> FnMut(&'b isize, Box<dyn FnMut(&'b isize)>)>) {
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/regions/regions-fn-subtyping.rs b/src/test/run-pass/regions/regions-fn-subtyping.rs
index a1da966659a..9570359c69e 100644
--- a/src/test/run-pass/regions/regions-fn-subtyping.rs
+++ b/src/test/run-pass/regions/regions-fn-subtyping.rs
@@ -8,21 +8,21 @@
 #![allow(unused_variables)]
 
 // Should pass region checking.
-fn ok(f: Box<FnMut(&usize)>) {
+fn ok(f: Box<dyn FnMut(&usize)>) {
     // Here, g is a function that can accept a usize pointer with
     // lifetime r, and f is a function that can accept a usize pointer
     // with any lifetime.  The assignment g = f should be OK (i.e.,
     // f's type should be a subtype of g's type), because f can be
     // used in any context that expects g's type.  But this currently
     // fails.
-    let mut g: Box<for<'r> FnMut(&'r usize)> = Box::new(|x| { });
+    let mut g: Box<dyn for<'r> FnMut(&'r usize)> = Box::new(|x| { });
     g = f;
 }
 
 // This version is the same as above, except that here, g's type is
 // inferred.
-fn ok_inferred(f: Box<FnMut(&usize)>) {
-    let mut g: Box<for<'r> FnMut(&'r usize)> = Box::new(|_| {});
+fn ok_inferred(f: Box<dyn FnMut(&usize)>) {
+    let mut g: Box<dyn for<'r> FnMut(&'r usize)> = Box::new(|_| {});
     g = f;
 }
 
diff --git a/src/test/run-pass/regions/regions-infer-region-in-fn-but-not-type.rs b/src/test/run-pass/regions/regions-infer-region-in-fn-but-not-type.rs
index dff36e6d183..6aa5d8217a4 100644
--- a/src/test/run-pass/regions/regions-infer-region-in-fn-but-not-type.rs
+++ b/src/test/run-pass/regions/regions-infer-region-in-fn-but-not-type.rs
@@ -8,7 +8,7 @@
 // contains region pointers
 // pretty-expanded FIXME #23616
 
-struct foo(Box<FnMut(&isize)+'static>);
+struct foo(Box<dyn FnMut(&isize)+'static>);
 
 fn take_foo<T:'static>(x: T) {}
 
diff --git a/src/test/run-pass/regions/regions-lifetime-nonfree-late-bound.rs b/src/test/run-pass/regions/regions-lifetime-nonfree-late-bound.rs
index 189f6172029..c8106f32c65 100644
--- a/src/test/run-pass/regions/regions-lifetime-nonfree-late-bound.rs
+++ b/src/test/run-pass/regions/regions-lifetime-nonfree-late-bound.rs
@@ -19,15 +19,15 @@
 
 pub fn main() {
     fn explicit() {
-        fn test<F>(_x: Option<Box<F>>) where F: FnMut(Box<for<'a> FnMut(&'a isize)>) {}
-        test(Some(box |_f: Box<for<'a> FnMut(&'a isize)>| {}));
+        fn test<F>(_x: Option<Box<F>>) where F: FnMut(Box<dyn for<'a> FnMut(&'a isize)>) {}
+        test(Some(box |_f: Box<dyn for<'a> FnMut(&'a isize)>| {}));
     }
 
     // The code below is shorthand for the code above (and more likely
     // to represent what one encounters in practice).
     fn implicit() {
-        fn test<F>(_x: Option<Box<F>>) where F: FnMut(Box<        FnMut(&   isize)>) {}
-        test(Some(box |_f: Box<        FnMut(&   isize)>| {}));
+        fn test<F>(_x: Option<Box<F>>) where F: FnMut(Box<dyn        FnMut(&   isize)>) {}
+        test(Some(box |_f: Box<dyn        FnMut(&   isize)>| {}));
     }
 
     explicit();
diff --git a/src/test/run-pass/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/src/test/run-pass/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs
index f26ef85ef72..aec05161c1a 100644
--- a/src/test/run-pass/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs
+++ b/src/test/run-pass/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs
@@ -44,7 +44,7 @@ impl<'a,'tcx> Foo<'a,'tcx> {
 
     fn elaborate_bounds(
         &mut self,
-        mut mk_cand: Box<for<'b> FnMut(&mut Foo<'b, 'tcx>) -> isize>)
+        mut mk_cand: Box<dyn for<'b> FnMut(&mut Foo<'b, 'tcx>) -> isize>)
         -> isize
     {
         mk_cand(self)
diff --git a/src/test/run-pass/regions/regions-static-closure.rs b/src/test/run-pass/regions/regions-static-closure.rs
index 6d00f7501ca..09cd5622032 100644
--- a/src/test/run-pass/regions/regions-static-closure.rs
+++ b/src/test/run-pass/regions/regions-static-closure.rs
@@ -2,10 +2,10 @@
 #![allow(non_camel_case_types)]
 
 struct closure_box<'a> {
-    cl: Box<FnMut() + 'a>,
+    cl: Box<dyn FnMut() + 'a>,
 }
 
-fn box_it<'a>(x: Box<FnMut() + 'a>) -> closure_box<'a> {
+fn box_it<'a>(x: Box<dyn FnMut() + 'a>) -> closure_box<'a> {
     closure_box {cl: x}
 }
 
diff --git a/src/test/run-pass/regions/regions-trait-object-1.rs b/src/test/run-pass/regions/regions-trait-object-1.rs
index 242142588ea..679bf4dd811 100644
--- a/src/test/run-pass/regions/regions-trait-object-1.rs
+++ b/src/test/run-pass/regions/regions-trait-object-1.rs
@@ -21,10 +21,10 @@ impl<'d> M for P<'d> {
     fn n(&self) -> u8 { *self.g }
 }
 
-fn extension<'e>(x: &'e E<'e>) -> Box<M+'e> {
+fn extension<'e>(x: &'e E<'e>) -> Box<dyn M+'e> {
     loop {
         let p = P { g: x.m() };
-        return Box::new(p) as Box<M+'e>;
+        return Box::new(p) as Box<dyn M+'e>;
     }
 }
 
diff --git a/src/test/run-pass/string-box-error.rs b/src/test/run-pass/string-box-error.rs
index debbe665a89..944157d0b20 100644
--- a/src/test/run-pass/string-box-error.rs
+++ b/src/test/run-pass/string-box-error.rs
@@ -4,8 +4,8 @@
 use std::error::Error;
 
 fn main() {
-    let _err1: Box<Error + Send + Sync> = From::from("test".to_string());
-    let _err2: Box<Error> = From::from("test".to_string());
-    let _err3: Box<Error + Send + Sync + 'static> = From::from("test");
-    let _err4: Box<Error> = From::from("test");
+    let _err1: Box<dyn Error + Send + Sync> = From::from("test".to_string());
+    let _err2: Box<dyn Error> = From::from("test".to_string());
+    let _err3: Box<dyn Error + Send + Sync + 'static> = From::from("test");
+    let _err4: Box<dyn Error> = From::from("test");
 }
diff --git a/src/test/run-pass/structs-enums/class-cast-to-trait-cross-crate-2.rs b/src/test/run-pass/structs-enums/class-cast-to-trait-cross-crate-2.rs
index cb4a67f609d..bf1ba8a643f 100644
--- a/src/test/run-pass/structs-enums/class-cast-to-trait-cross-crate-2.rs
+++ b/src/test/run-pass/structs-enums/class-cast-to-trait-cross-crate-2.rs
@@ -8,13 +8,13 @@ extern crate cci_class_cast;
 use std::string::ToString;
 use cci_class_cast::kitty::cat;
 
-fn print_out(thing: Box<ToString>, expected: String) {
+fn print_out(thing: Box<dyn ToString>, expected: String) {
   let actual = (*thing).to_string();
   println!("{}", actual);
   assert_eq!(actual.to_string(), expected);
 }
 
 pub fn main() {
-  let nyan: Box<ToString> = box cat(0, 2, "nyan".to_string()) as Box<ToString>;
+  let nyan: Box<dyn ToString> = box cat(0, 2, "nyan".to_string()) as Box<dyn ToString>;
   print_out(nyan, "nyan".to_string());
 }
diff --git a/src/test/run-pass/structs-enums/class-cast-to-trait-multiple-types.rs b/src/test/run-pass/structs-enums/class-cast-to-trait-multiple-types.rs
index 5ce6538fcb3..55975cbdb53 100644
--- a/src/test/run-pass/structs-enums/class-cast-to-trait-multiple-types.rs
+++ b/src/test/run-pass/structs-enums/class-cast-to-trait-multiple-types.rs
@@ -79,7 +79,7 @@ fn cat(in_x: usize, in_y: isize, in_name: String) -> cat {
 }
 
 
-fn annoy_neighbors(critter: &mut noisy) {
+fn annoy_neighbors(critter: &mut dyn noisy) {
     for _i in 0_usize..10 { critter.speak(); }
 }
 
diff --git a/src/test/run-pass/structs-enums/class-cast-to-trait.rs b/src/test/run-pass/structs-enums/class-cast-to-trait.rs
index 7fa60da6e57..1019bb30015 100644
--- a/src/test/run-pass/structs-enums/class-cast-to-trait.rs
+++ b/src/test/run-pass/structs-enums/class-cast-to-trait.rs
@@ -55,6 +55,6 @@ fn cat(in_x : usize, in_y : isize, in_name: String) -> cat {
 
 pub fn main() {
     let mut nyan = cat(0, 2, "nyan".to_string());
-    let mut nyan: &mut noisy = &mut nyan;
+    let mut nyan: &mut dyn noisy = &mut nyan;
     nyan.speak();
 }
diff --git a/src/test/run-pass/structs-enums/class-separate-impl.rs b/src/test/run-pass/structs-enums/class-separate-impl.rs
index 2b10a46e8e2..947690b51f4 100644
--- a/src/test/run-pass/structs-enums/class-separate-impl.rs
+++ b/src/test/run-pass/structs-enums/class-separate-impl.rs
@@ -53,13 +53,13 @@ impl fmt::Display for cat {
     }
 }
 
-fn print_out(thing: Box<ToString>, expected: String) {
+fn print_out(thing: Box<dyn ToString>, expected: String) {
   let actual = (*thing).to_string();
   println!("{}", actual);
   assert_eq!(actual.to_string(), expected);
 }
 
 pub fn main() {
-  let nyan: Box<ToString> = box cat(0, 2, "nyan".to_string()) as Box<ToString>;
+  let nyan: Box<dyn ToString> = box cat(0, 2, "nyan".to_string()) as Box<dyn ToString>;
   print_out(nyan, "nyan".to_string());
 }
diff --git a/src/test/run-pass/structs-enums/enum-null-pointer-opt.rs b/src/test/run-pass/structs-enums/enum-null-pointer-opt.rs
index 5e3b5942a82..87629665bc2 100644
--- a/src/test/run-pass/structs-enums/enum-null-pointer-opt.rs
+++ b/src/test/run-pass/structs-enums/enum-null-pointer-opt.rs
@@ -22,9 +22,9 @@ fn main() {
     assert_eq!(size_of::<&mut [isize]>(), size_of::<Option<&mut [isize]>>());
 
     // Traits - Box<Trait> / &Trait / &mut Trait
-    assert_eq!(size_of::<Box<Trait>>(), size_of::<Option<Box<Trait>>>());
-    assert_eq!(size_of::<&Trait>(), size_of::<Option<&Trait>>());
-    assert_eq!(size_of::<&mut Trait>(), size_of::<Option<&mut Trait>>());
+    assert_eq!(size_of::<Box<dyn Trait>>(), size_of::<Option<Box<dyn Trait>>>());
+    assert_eq!(size_of::<&dyn Trait>(), size_of::<Option<&dyn Trait>>());
+    assert_eq!(size_of::<&mut dyn Trait>(), size_of::<Option<&mut dyn Trait>>());
 
     // Pointers - Box<T>
     assert_eq!(size_of::<Box<isize>>(), size_of::<Option<Box<isize>>>());
diff --git a/src/test/run-pass/structs-enums/object-lifetime-default-from-ref-struct.rs b/src/test/run-pass/structs-enums/object-lifetime-default-from-ref-struct.rs
index 0a48725cbe4..e1a865fa503 100644
--- a/src/test/run-pass/structs-enums/object-lifetime-default-from-ref-struct.rs
+++ b/src/test/run-pass/structs-enums/object-lifetime-default-from-ref-struct.rs
@@ -22,37 +22,37 @@ struct Ref2<'a,'b,T:'a+'b+?Sized> {
 }
 
 struct SomeStruct<'a> {
-    t: Ref<'a,Test>,
-    u: Ref<'a,Test+'a>,
+    t: Ref<'a, dyn Test>,
+    u: Ref<'a, dyn Test+'a>,
 }
 
-fn a<'a>(t: Ref<'a,Test>, mut ss: SomeStruct<'a>) {
+fn a<'a>(t: Ref<'a, dyn Test>, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn b<'a>(t: Ref<'a,Test>, mut ss: SomeStruct<'a>) {
+fn b<'a>(t: Ref<'a, dyn Test>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
-fn c<'a>(t: Ref<'a,Test+'a>, mut ss: SomeStruct<'a>) {
+fn c<'a>(t: Ref<'a, dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn d<'a>(t: Ref<'a,Test+'a>, mut ss: SomeStruct<'a>) {
+fn d<'a>(t: Ref<'a, dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
-fn e<'a>(_: Ref<'a, Display+'static>) {}
-fn g<'a, 'b>(_: Ref2<'a, 'b, Display+'static>) {}
+fn e<'a>(_: Ref<'a, dyn Display+'static>) {}
+fn g<'a, 'b>(_: Ref2<'a, 'b, dyn Display+'static>) {}
 
 
 fn main() {
     // Inside a function body, we can just infer all
     // lifetimes, to allow Ref<'tmp, Display+'static>
     // and Ref2<'tmp, 'tmp, Display+'static>.
-    let x = &0 as &(Display+'static);
-    let r: Ref<Display> = Ref { r: x };
-    let r2: Ref2<Display> = Ref2 { a: x, b: x };
+    let x = &0 as &(dyn Display+'static);
+    let r: Ref<dyn Display> = Ref { r: x };
+    let r2: Ref2<dyn Display> = Ref2 { a: x, b: x };
     e(r);
     g(r2);
 }
diff --git a/src/test/run-pass/structs-enums/object-lifetime-default-from-rptr-struct.rs b/src/test/run-pass/structs-enums/object-lifetime-default-from-rptr-struct.rs
index 48ee5a2ed54..1fc52ead48e 100644
--- a/src/test/run-pass/structs-enums/object-lifetime-default-from-rptr-struct.rs
+++ b/src/test/run-pass/structs-enums/object-lifetime-default-from-rptr-struct.rs
@@ -11,25 +11,25 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a MyBox<Test>,
-    u: &'a MyBox<Test+'a>,
+    t: &'a MyBox<dyn Test>,
+    u: &'a MyBox<dyn Test+'a>,
 }
 
 struct MyBox<T:?Sized> {
     b: Box<T>
 }
 
-fn a<'a>(t: &'a MyBox<Test>, mut ss: SomeStruct<'a>) {
+fn a<'a>(t: &'a MyBox<dyn Test>, mut ss: SomeStruct<'a>) {
     ss.t = t;
 }
 
-fn b<'a>(t: &'a MyBox<Test>, mut ss: SomeStruct<'a>) {
+fn b<'a>(t: &'a MyBox<dyn Test>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
 // see also compile-fail/object-lifetime-default-from-rptr-box-error.rs
 
-fn d<'a>(t: &'a MyBox<Test+'a>, mut ss: SomeStruct<'a>) {
+fn d<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.u = t;
 }
 
diff --git a/src/test/run-pass/traits/auto-traits.rs b/src/test/run-pass/traits/auto-traits.rs
index 7702725e640..c495b97b25b 100644
--- a/src/test/run-pass/traits/auto-traits.rs
+++ b/src/test/run-pass/traits/auto-traits.rs
@@ -27,5 +27,5 @@ fn main() {
     take_auto_unsafe(AutoBool(true));
 
     /// Auto traits are allowed in trait object bounds.
-    let _: &(Send + Auto) = &0;
+    let _: &(dyn Send + Auto) = &0;
 }
diff --git a/src/test/run-pass/traits/impl-inherent-prefer-over-trait.rs b/src/test/run-pass/traits/impl-inherent-prefer-over-trait.rs
index 140dcaf6a27..82760788897 100644
--- a/src/test/run-pass/traits/impl-inherent-prefer-over-trait.rs
+++ b/src/test/run-pass/traits/impl-inherent-prefer-over-trait.rs
@@ -11,7 +11,7 @@ impl Foo {
     fn bar(&self) {}
 }
 
-impl Trait {
+impl dyn Trait {
     fn baz(_: &Foo) {}
 }
 
@@ -26,5 +26,5 @@ fn main() {
 
     // Should work even if Trait::baz doesn't exist.
     // N.B: `<Trait>::bar` would be ambiguous.
-    <Trait>::baz(&Foo);
+    <dyn Trait>::baz(&Foo);
 }
diff --git a/src/test/run-pass/traits/infer-from-object-trait-issue-26952.rs b/src/test/run-pass/traits/infer-from-object-trait-issue-26952.rs
index 1deb17e00da..ed258dbb24c 100644
--- a/src/test/run-pass/traits/infer-from-object-trait-issue-26952.rs
+++ b/src/test/run-pass/traits/infer-from-object-trait-issue-26952.rs
@@ -14,7 +14,7 @@ trait Trait<A> { fn foo(&self); }
 
 struct Type<A> { a: PhantomData<A> }
 
-fn as_trait<A>(t: &Type<A>) -> &Trait<A> { loop {  } }
+fn as_trait<A>(t: &Type<A>) -> &dyn Trait<A> { loop {  } }
 
 fn want<A,T:Trait<A>+?Sized>(t: &T) { }
 
diff --git a/src/test/run-pass/traits/kindck-owned-trait-contains-1.rs b/src/test/run-pass/traits/kindck-owned-trait-contains-1.rs
index f7a58c6f926..23b91f924b5 100644
--- a/src/test/run-pass/traits/kindck-owned-trait-contains-1.rs
+++ b/src/test/run-pass/traits/kindck-owned-trait-contains-1.rs
@@ -12,8 +12,8 @@ impl<A:Clone + 'static> repeat<A> for Box<A> {
     }
 }
 
-fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<repeat<A>+'static> {
-    box v as Box<repeat<A>+'static> // No
+fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<dyn repeat<A>+'static> {
+    box v as Box<dyn repeat<A>+'static> // No
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/traits/object-one-type-two-traits.rs b/src/test/run-pass/traits/object-one-type-two-traits.rs
index 12e4a34a233..b92a2ab7b4b 100644
--- a/src/test/run-pass/traits/object-one-type-two-traits.rs
+++ b/src/test/run-pass/traits/object-one-type-two-traits.rs
@@ -10,24 +10,24 @@ use std::any::Any;
 
 trait Wrap {
     fn get(&self) -> isize;
-    fn wrap(self: Box<Self>) -> Box<Any+'static>;
+    fn wrap(self: Box<Self>) -> Box<dyn Any+'static>;
 }
 
 impl Wrap for isize {
     fn get(&self) -> isize {
         *self
     }
-    fn wrap(self: Box<isize>) -> Box<Any+'static> {
-        self as Box<Any+'static>
+    fn wrap(self: Box<isize>) -> Box<dyn Any+'static> {
+        self as Box<dyn Any+'static>
     }
 }
 
-fn is<T:Any>(x: &Any) -> bool {
+fn is<T:Any>(x: &dyn Any) -> bool {
     x.is::<T>()
 }
 
 fn main() {
-    let x = box 22isize as Box<Wrap>;
+    let x = box 22isize as Box<dyn Wrap>;
     println!("x={}", x.get());
     let y = x.wrap();
 }
diff --git a/src/test/run-pass/traits/parameterized-trait-with-bounds.rs b/src/test/run-pass/traits/parameterized-trait-with-bounds.rs
index b1339b207eb..832d4f6c89f 100644
--- a/src/test/run-pass/traits/parameterized-trait-with-bounds.rs
+++ b/src/test/run-pass/traits/parameterized-trait-with-bounds.rs
@@ -12,10 +12,10 @@ mod foo {
     pub trait D<'a, T> { fn get(self) -> &'a T; }
 }
 
-fn foo1<T>(_: &(A<T> + Send)) {}
-fn foo2<T>(_: Box<A<T> + Send + Sync>) {}
-fn foo3<T>(_: Box<B<isize, usize> + 'static>) {}
-fn foo4<'a, T>(_: Box<C<'a, T> + 'static + Send>) {}
-fn foo5<'a, T>(_: Box<foo::D<'a, T> + 'static + Send>) {}
+fn foo1<T>(_: &(dyn A<T> + Send)) {}
+fn foo2<T>(_: Box<dyn A<T> + Send + Sync>) {}
+fn foo3<T>(_: Box<dyn B<isize, usize> + 'static>) {}
+fn foo4<'a, T>(_: Box<dyn C<'a, T> + 'static + Send>) {}
+fn foo5<'a, T>(_: Box<dyn foo::D<'a, T> + 'static + Send>) {}
 
 pub fn main() {}
diff --git a/src/test/run-pass/traits/trait-bounds-basic.rs b/src/test/run-pass/traits/trait-bounds-basic.rs
index af6392e5658..8c8a7eb7d9d 100644
--- a/src/test/run-pass/traits/trait-bounds-basic.rs
+++ b/src/test/run-pass/traits/trait-bounds-basic.rs
@@ -7,18 +7,18 @@
 trait Foo {
 }
 
-fn b(_x: Box<Foo+Send>) {
+fn b(_x: Box<dyn Foo+Send>) {
 }
 
-fn c(x: Box<Foo+Sync+Send>) {
+fn c(x: Box<dyn Foo+Sync+Send>) {
     e(x);
 }
 
-fn d(x: Box<Foo+Send>) {
+fn d(x: Box<dyn Foo+Send>) {
     e(x);
 }
 
-fn e(x: Box<Foo>) {
+fn e(x: Box<dyn Foo>) {
     e(x);
 }
 
diff --git a/src/test/run-pass/traits/trait-bounds-in-arc.rs b/src/test/run-pass/traits/trait-bounds-in-arc.rs
index 82bdcdcf7c5..a45d834297e 100644
--- a/src/test/run-pass/traits/trait-bounds-in-arc.rs
+++ b/src/test/run-pass/traits/trait-bounds-in-arc.rs
@@ -12,7 +12,7 @@ use std::sync::mpsc::channel;
 use std::thread;
 
 trait Pet {
-    fn name(&self, blk: Box<FnMut(&str)>);
+    fn name(&self, blk: Box<dyn FnMut(&str)>);
     fn num_legs(&self) -> usize;
     fn of_good_pedigree(&self) -> bool;
 }
@@ -34,19 +34,19 @@ struct Goldfyshe {
 }
 
 impl Pet for Catte {
-    fn name(&self, mut blk: Box<FnMut(&str)>) { blk(&self.name) }
+    fn name(&self, mut blk: Box<dyn FnMut(&str)>) { blk(&self.name) }
     fn num_legs(&self) -> usize { 4 }
     fn of_good_pedigree(&self) -> bool { self.num_whiskers >= 4 }
 }
 impl Pet for Dogge {
-    fn name(&self, mut blk: Box<FnMut(&str)>) { blk(&self.name) }
+    fn name(&self, mut blk: Box<dyn FnMut(&str)>) { blk(&self.name) }
     fn num_legs(&self) -> usize { 4 }
     fn of_good_pedigree(&self) -> bool {
         self.bark_decibels < 70 || self.tricks_known > 20
     }
 }
 impl Pet for Goldfyshe {
-    fn name(&self, mut blk: Box<FnMut(&str)>) { blk(&self.name) }
+    fn name(&self, mut blk: Box<dyn FnMut(&str)>) { blk(&self.name) }
     fn num_legs(&self) -> usize { 0 }
     fn of_good_pedigree(&self) -> bool { self.swim_speed >= 500 }
 }
@@ -67,10 +67,10 @@ pub fn main() {
         swim_speed: 998,
         name: "alec_guinness".to_string(),
     };
-    let arc = Arc::new(vec![box catte  as Box<Pet+Sync+Send>,
-                            box dogge1 as Box<Pet+Sync+Send>,
-                            box fishe  as Box<Pet+Sync+Send>,
-                            box dogge2 as Box<Pet+Sync+Send>]);
+    let arc = Arc::new(vec![box catte  as Box<dyn Pet+Sync+Send>,
+                            box dogge1 as Box<dyn Pet+Sync+Send>,
+                            box fishe  as Box<dyn Pet+Sync+Send>,
+                            box dogge2 as Box<dyn Pet+Sync+Send>]);
     let (tx1, rx1) = channel();
     let arc1 = arc.clone();
     let t1 = thread::spawn(move|| { check_legs(arc1); tx1.send(()); });
@@ -88,21 +88,21 @@ pub fn main() {
     t3.join();
 }
 
-fn check_legs(arc: Arc<Vec<Box<Pet+Sync+Send>>>) {
+fn check_legs(arc: Arc<Vec<Box<dyn Pet+Sync+Send>>>) {
     let mut legs = 0;
     for pet in arc.iter() {
         legs += pet.num_legs();
     }
     assert!(legs == 12);
 }
-fn check_names(arc: Arc<Vec<Box<Pet+Sync+Send>>>) {
+fn check_names(arc: Arc<Vec<Box<dyn Pet+Sync+Send>>>) {
     for pet in arc.iter() {
         pet.name(Box::new(|name| {
             assert!(name.as_bytes()[0] == 'a' as u8 && name.as_bytes()[1] == 'l' as u8);
         }))
     }
 }
-fn check_pedigree(arc: Arc<Vec<Box<Pet+Sync+Send>>>) {
+fn check_pedigree(arc: Arc<Vec<Box<dyn Pet+Sync+Send>>>) {
     for pet in arc.iter() {
         assert!(pet.of_good_pedigree());
     }
diff --git a/src/test/run-pass/traits/trait-bounds-on-structs-and-enums.rs b/src/test/run-pass/traits/trait-bounds-on-structs-and-enums.rs
index 18b25b852d1..4dc4fecc91f 100644
--- a/src/test/run-pass/traits/trait-bounds-on-structs-and-enums.rs
+++ b/src/test/run-pass/traits/trait-bounds-on-structs-and-enums.rs
@@ -7,11 +7,11 @@ trait U {}
 trait T<X: U> { fn get(self) -> X; }
 
 trait S2<Y: U> {
-    fn m(x: Box<T<Y>+'static>) {}
+    fn m(x: Box<dyn T<Y>+'static>) {}
 }
 
 struct St<X: U> {
-    f: Box<T<X>+'static>,
+    f: Box<dyn T<X>+'static>,
 }
 
 impl<X: U> St<X> {
diff --git a/src/test/run-pass/traits/trait-coercion-generic.rs b/src/test/run-pass/traits/trait-coercion-generic.rs
index 5d1b442afcc..bf4dda49519 100644
--- a/src/test/run-pass/traits/trait-coercion-generic.rs
+++ b/src/test/run-pass/traits/trait-coercion-generic.rs
@@ -18,8 +18,8 @@ impl Trait<&'static str> for Struct {
 
 pub fn main() {
     let a = Struct { x: 1, y: 2 };
-    let b: Box<Trait<&'static str>> = Box::new(a);
+    let b: Box<dyn Trait<&'static str>> = Box::new(a);
     b.f("Mary");
-    let c: &Trait<&'static str> = &a;
+    let c: &dyn Trait<&'static str> = &a;
     c.f("Joe");
 }
diff --git a/src/test/run-pass/traits/trait-coercion.rs b/src/test/run-pass/traits/trait-coercion.rs
index 1a40b81c89f..cba33af1f1a 100644
--- a/src/test/run-pass/traits/trait-coercion.rs
+++ b/src/test/run-pass/traits/trait-coercion.rs
@@ -22,13 +22,13 @@ impl Trait for Struct {
     }
 }
 
-fn foo(mut a: Box<Write>) {}
+fn foo(mut a: Box<dyn Write>) {}
 
 pub fn main() {
     let a = Struct { x: 1, y: 2 };
-    let b: Box<Trait> = Box::new(a);
+    let b: Box<dyn Trait> = Box::new(a);
     b.f();
-    let c: &Trait = &a;
+    let c: &dyn Trait = &a;
     c.f();
 
     let out = io::stdout();
diff --git a/src/test/run-pass/traits/trait-impl-2.rs b/src/test/run-pass/traits/trait-impl-2.rs
index b28d74a7b35..804ffec12c2 100644
--- a/src/test/run-pass/traits/trait-impl-2.rs
+++ b/src/test/run-pass/traits/trait-impl-2.rs
@@ -11,7 +11,7 @@ pub mod Foo {
 }
 
 mod Bar {
-    impl<'a> ::Foo::Trait+'a {
+    impl<'a> dyn (::Foo::Trait) + 'a {
         fn bar(&self) { self.foo() }
     }
 }
diff --git a/src/test/run-pass/traits/trait-impl.rs b/src/test/run-pass/traits/trait-impl.rs
index 6b22ac08bb8..14796ce19c8 100644
--- a/src/test/run-pass/traits/trait-impl.rs
+++ b/src/test/run-pass/traits/trait-impl.rs
@@ -12,7 +12,7 @@ trait T {
     fn t(&self) {}
 }
 
-impl<'a> T+'a {
+impl<'a> dyn T+'a {
     fn foo(&self) {
         unsafe { COUNT *= 2; }
     }
@@ -27,7 +27,7 @@ struct Foo;
 impl<'a> Bar<'a> for Foo {}
 
 fn main() {
-    let x: &T = &42;
+    let x: &dyn T = &42;
 
     x.foo();
     T::foo(x);
@@ -36,6 +36,6 @@ fn main() {
     unsafe { assert_eq!(COUNT, 12); }
 
     // Cross-crait case
-    let x: &Bar = &Foo;
+    let x: &dyn Bar = &Foo;
     x.bar();
 }
diff --git a/src/test/run-pass/traits/trait-inheritance-cast-without-call-to-supertrait.rs b/src/test/run-pass/traits/trait-inheritance-cast-without-call-to-supertrait.rs
index c0b5db63bd4..25159c1adb6 100644
--- a/src/test/run-pass/traits/trait-inheritance-cast-without-call-to-supertrait.rs
+++ b/src/test/run-pass/traits/trait-inheritance-cast-without-call-to-supertrait.rs
@@ -26,8 +26,8 @@ impl Bar for A {
 
 pub fn main() {
     let a = &A { x: 3 };
-    let afoo = a as &Foo;
-    let abar = a as &Bar;
+    let afoo = a as &dyn Foo;
+    let abar = a as &dyn Bar;
     assert_eq!(afoo.f(), 10);
     assert_eq!(abar.g(), 20);
 }
diff --git a/src/test/run-pass/traits/trait-inheritance-cast.rs b/src/test/run-pass/traits/trait-inheritance-cast.rs
index 38e5c79e9e0..9070b9d1f56 100644
--- a/src/test/run-pass/traits/trait-inheritance-cast.rs
+++ b/src/test/run-pass/traits/trait-inheritance-cast.rs
@@ -25,8 +25,8 @@ impl Bar for A {
 
 pub fn main() {
     let a = &A { x: 3 };
-    let afoo = a as &Foo;
-    let abar = a as &Bar;
+    let afoo = a as &dyn Foo;
+    let abar = a as &dyn Bar;
     assert_eq!(afoo.f(), 10);
     assert_eq!(abar.g(), 20);
     assert_eq!(abar.f(), 10);
diff --git a/src/test/run-pass/traits/trait-object-exclusion.rs b/src/test/run-pass/traits/trait-object-exclusion.rs
index 248804d144a..0b8b0e2f5ef 100644
--- a/src/test/run-pass/traits/trait-object-exclusion.rs
+++ b/src/test/run-pass/traits/trait-object-exclusion.rs
@@ -4,7 +4,7 @@ trait Future: 'static {
     // Future::forget in vtables, otherwise there's an infinite type
     // recursion through <Map<...> as Future>::forget.
     fn forget(self) where Self: Sized {
-        Box::new(Map(self)) as Box<Future>;
+        Box::new(Map(self)) as Box<dyn Future>;
     }
 }
 
diff --git a/src/test/run-pass/traits/trait-object-generics.rs b/src/test/run-pass/traits/trait-object-generics.rs
index 168bffa0e48..c18754302b7 100644
--- a/src/test/run-pass/traits/trait-object-generics.rs
+++ b/src/test/run-pass/traits/trait-object-generics.rs
@@ -16,7 +16,7 @@ pub struct Impl<A1, A2, A3> {
      * task <unnamed> failed at 'index out of bounds: the len is 1 but the index is 1',
      * src/librustc/middle/subst.rs:58
      */
-    t: Box<Trait2<A2>+'static>
+    t: Box<dyn Trait2<A2>+'static>
 }
 
 impl<A1, A2, A3> Impl<A1, A2, A3> {
@@ -38,6 +38,6 @@ impl<V> Trait<u8,V> for () {
 }
 
 pub fn main() {
-    let a = box () as Box<Trait<u8, u8>>;
+    let a = box () as Box<dyn Trait<u8, u8>>;
     assert_eq!(a.method(Type::Constant((1, 2))), 0);
 }
diff --git a/src/test/run-pass/traits/trait-object-lifetime-first.rs b/src/test/run-pass/traits/trait-object-lifetime-first.rs
index e95a652057d..33757cb7c0a 100644
--- a/src/test/run-pass/traits/trait-object-lifetime-first.rs
+++ b/src/test/run-pass/traits/trait-object-lifetime-first.rs
@@ -4,8 +4,8 @@ use std::fmt::Display;
 static BYTE: u8 = 33;
 
 fn main() {
-    let x: &('static + Display) = &BYTE;
-    let y: Box<'static + Display> = Box::new(BYTE);
+    let x: &(dyn 'static + Display) = &BYTE;
+    let y: Box<dyn 'static + Display> = Box::new(BYTE);
     let xstr = format!("{}", x);
     let ystr = format!("{}", y);
     assert_eq!(xstr, "33");
diff --git a/src/test/run-pass/traits/trait-object-with-lifetime-bound.rs b/src/test/run-pass/traits/trait-object-with-lifetime-bound.rs
index 9060380db17..05aab5e3b08 100644
--- a/src/test/run-pass/traits/trait-object-with-lifetime-bound.rs
+++ b/src/test/run-pass/traits/trait-object-with-lifetime-bound.rs
@@ -20,10 +20,10 @@ impl<'d> M for P<'d> {
     fn n(&self) -> u8 { *self.g }
 }
 
-fn extension<'e>(x: &'e E<'e>) -> Box<M+'e> {
+fn extension<'e>(x: &'e E<'e>) -> Box<dyn M+'e> {
     loop {
         let p = P { g: x.m() };
-        return Box::new(p) as Box<M+'e>;
+        return Box::new(p) as Box<dyn M+'e>;
     }
 }
 
diff --git a/src/test/run-pass/traits/trait-region-pointer-simple.rs b/src/test/run-pass/traits/trait-region-pointer-simple.rs
index 6584182d38a..0456ca93115 100644
--- a/src/test/run-pass/traits/trait-region-pointer-simple.rs
+++ b/src/test/run-pass/traits/trait-region-pointer-simple.rs
@@ -16,6 +16,6 @@ impl Foo for A {
 
 pub fn main() {
     let a = A { x: 3 };
-    let b = (&a) as &Foo;
+    let b = (&a) as &dyn Foo;
     assert_eq!(b.f(), 3);
 }
diff --git a/src/test/run-pass/traits/traits-impl-object-overlap-issue-23853.rs b/src/test/run-pass/traits/traits-impl-object-overlap-issue-23853.rs
index c9745e06d8f..e490967b690 100644
--- a/src/test/run-pass/traits/traits-impl-object-overlap-issue-23853.rs
+++ b/src/test/run-pass/traits/traits-impl-object-overlap-issue-23853.rs
@@ -14,5 +14,5 @@ impl<T:?Sized> Foo for T { }
 fn want_foo<B:?Sized+Foo>() { }
 
 fn main() {
-    want_foo::<Bar>();
+    want_foo::<dyn Bar>();
 }
diff --git a/src/test/run-pass/traits/traits-issue-26339.rs b/src/test/run-pass/traits/traits-issue-26339.rs
index 0f831be2485..bedd87cc4cc 100644
--- a/src/test/run-pass/traits/traits-issue-26339.rs
+++ b/src/test/run-pass/traits/traits-issue-26339.rs
@@ -25,7 +25,7 @@ impl PartialEq<Bar> for Aimpl {
 impl A for Aimpl { }
 
 fn main() {
-    let a = &Aimpl as &A;
+    let a = &Aimpl as &dyn A;
 
     assert!(*a == Foo);
 }
diff --git a/src/test/run-pass/traits/traits-repeated-supertrait.rs b/src/test/run-pass/traits/traits-repeated-supertrait.rs
index c8318bdf154..391d19c4385 100644
--- a/src/test/run-pass/traits/traits-repeated-supertrait.rs
+++ b/src/test/run-pass/traits/traits-repeated-supertrait.rs
@@ -22,7 +22,7 @@ impl CompareTo<u64> for i64 {
 
 impl CompareToInts for i64 { }
 
-fn with_obj(c: &CompareToInts) -> bool {
+fn with_obj(c: &dyn CompareToInts) -> bool {
     c.same_as(22_i64) && c.same_as(22_u64)
 }
 
diff --git a/src/test/run-pass/traits/ufcs-trait-object.rs b/src/test/run-pass/traits/ufcs-trait-object.rs
index abe164a5720..700488c22d6 100644
--- a/src/test/run-pass/traits/ufcs-trait-object.rs
+++ b/src/test/run-pass/traits/ufcs-trait-object.rs
@@ -12,6 +12,6 @@ impl Foo for i32 {
 }
 
 fn main() {
-    let a: &Foo = &22;
+    let a: &dyn Foo = &22;
     assert_eq!(Foo::test(a), 22);
 }
diff --git a/src/test/run-pass/trivial_casts.rs b/src/test/run-pass/trivial_casts.rs
index bc56d0158d4..f06b0708290 100644
--- a/src/test/run-pass/trivial_casts.rs
+++ b/src/test/run-pass/trivial_casts.rs
@@ -36,21 +36,21 @@ pub fn main() {
 
     // unsize trait
     let x: &Bar = &Bar;
-    let _ = x as &Foo;
-    let _ = x as *const Foo;
+    let _ = x as &dyn Foo;
+    let _ = x as *const dyn Foo;
 
     let x: &mut Bar = &mut Bar;
-    let _ = x as &mut Foo;
-    let _ = x as *mut Foo;
+    let _ = x as &mut dyn Foo;
+    let _ = x as *mut dyn Foo;
 
     let x: Box<Bar> = Box::new(Bar);
-    let _ = x as Box<Foo>;
+    let _ = x as Box<dyn Foo>;
 
     // functions
     fn baz(_x: i32) {}
-    let _ = &baz as &Fn(i32);
+    let _ = &baz as &dyn Fn(i32);
     let x = |_x: i32| {};
-    let _ = &x as &Fn(i32);
+    let _ = &x as &dyn Fn(i32);
 }
 
 // subtyping
diff --git a/src/test/run-pass/type-id-higher-rank-2.rs b/src/test/run-pass/type-id-higher-rank-2.rs
index d9280cf97f9..469bc8ed7e1 100644
--- a/src/test/run-pass/type-id-higher-rank-2.rs
+++ b/src/test/run-pass/type-id-higher-rank-2.rs
@@ -7,7 +7,7 @@ struct Foo<'a>(&'a str);
 fn good(s: &String) -> Foo { Foo(s) }
 
 fn bad1(s: String) -> Option<&'static str> {
-    let a: Box<Any> = Box::new(good as fn(&String) -> Foo);
+    let a: Box<dyn Any> = Box::new(good as fn(&String) -> Foo);
     a.downcast_ref::<fn(&String) -> Foo<'static>>().map(|f| f(&s).0)
 }
 
@@ -20,8 +20,8 @@ impl<'a> AsStr<'a, 'a> for String {
 }
 
 fn bad2(s: String) -> Option<&'static str> {
-    let a: Box<Any> = Box::new(Box::new(s) as Box<for<'a> AsStr<'a, 'a>>);
-    a.downcast_ref::<Box<for<'a> AsStr<'a, 'static>>>().map(|x| x.get())
+    let a: Box<dyn Any> = Box::new(Box::new(s) as Box<dyn for<'a> AsStr<'a, 'a>>);
+    a.downcast_ref::<Box<dyn for<'a> AsStr<'a, 'static>>>().map(|x| x.get())
 }
 
 fn main() {
diff --git a/src/test/run-pass/type-id-higher-rank.rs b/src/test/run-pass/type-id-higher-rank.rs
index 55d70e31b16..b98dff0d72b 100644
--- a/src/test/run-pass/type-id-higher-rank.rs
+++ b/src/test/run-pass/type-id-higher-rank.rs
@@ -26,9 +26,9 @@ fn main() {
         assert!(e != f);
 
         // Make sure lifetime parameters of items are not ignored.
-        let g = TypeId::of::<for<'a> fn(&'a Trait<'a>) -> Struct<'a>>();
-        let h = TypeId::of::<for<'a> fn(&'a Trait<'a>) -> Struct<'static>>();
-        let i = TypeId::of::<for<'a, 'b> fn(&'a Trait<'b>) -> Struct<'b>>();
+        let g = TypeId::of::<for<'a> fn(&'a dyn Trait<'a>) -> Struct<'a>>();
+        let h = TypeId::of::<for<'a> fn(&'a dyn Trait<'a>) -> Struct<'static>>();
+        let i = TypeId::of::<for<'a, 'b> fn(&'a dyn Trait<'b>) -> Struct<'b>>();
         assert!(g != h);
         assert!(g != i);
         assert!(h != i);
@@ -40,10 +40,10 @@ fn main() {
     }
     // Boxed unboxed closures
     {
-        let a = TypeId::of::<Box<Fn(&'static isize, &'static isize)>>();
-        let b = TypeId::of::<Box<for<'a> Fn(&'static isize, &'a isize)>>();
-        let c = TypeId::of::<Box<for<'a, 'b> Fn(&'a isize, &'b isize)>>();
-        let d = TypeId::of::<Box<for<'a, 'b> Fn(&'b isize, &'a isize)>>();
+        let a = TypeId::of::<Box<dyn Fn(&'static isize, &'static isize)>>();
+        let b = TypeId::of::<Box<dyn for<'a> Fn(&'static isize, &'a isize)>>();
+        let c = TypeId::of::<Box<dyn for<'a, 'b> Fn(&'a isize, &'b isize)>>();
+        let d = TypeId::of::<Box<dyn for<'a, 'b> Fn(&'b isize, &'a isize)>>();
         assert!(a != b);
         assert!(a != c);
         assert!(a != d);
@@ -52,8 +52,8 @@ fn main() {
         assert_eq!(c, d);
 
         // Make sure De Bruijn indices are handled correctly
-        let e = TypeId::of::<Box<for<'a> Fn(Box<Fn(&'a isize) -> &'a isize>)>>();
-        let f = TypeId::of::<Box<Fn(Box<for<'a> Fn(&'a isize) -> &'a isize>)>>();
+        let e = TypeId::of::<Box<dyn for<'a> Fn(Box<dyn Fn(&'a isize) -> &'a isize>)>>();
+        let f = TypeId::of::<Box<dyn Fn(Box<dyn for<'a> Fn(&'a isize) -> &'a isize>)>>();
         assert!(e != f);
     }
     // Raw unboxed closures
diff --git a/src/test/run-pass/type-infer-generalize-ty-var.rs b/src/test/run-pass/type-infer-generalize-ty-var.rs
index 244a72c80fa..6298156452e 100644
--- a/src/test/run-pass/type-infer-generalize-ty-var.rs
+++ b/src/test/run-pass/type-infer-generalize-ty-var.rs
@@ -23,8 +23,8 @@ trait Get<T: ?Sized> {
     fn get(&self) -> &T;
 }
 
-impl Get<MyShow + 'static> for Wrap<T> {
-    fn get(&self) -> &(MyShow + 'static) {
+impl Get<dyn MyShow + 'static> for Wrap<T> {
+    fn get(&self) -> &(dyn MyShow + 'static) {
         static x: usize = 42;
         &x
     }
@@ -38,9 +38,9 @@ impl Get<usize> for Wrap<U> {
 }
 
 trait MyShow { fn dummy(&self) { } }
-impl<'a> MyShow for &'a (MyShow + 'a) { }
+impl<'a> MyShow for &'a (dyn MyShow + 'a) { }
 impl MyShow for usize { }
-fn constrain<'a>(rc: RefCell<&'a (MyShow + 'a)>) { }
+fn constrain<'a>(rc: RefCell<&'a (dyn MyShow + 'a)>) { }
 
 fn main() {
     let mut collection: Wrap<_> = WrapNone;
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn-mut.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn-mut.rs
index 08a9796ea29..a1001673506 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn-mut.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn-mut.rs
@@ -8,7 +8,7 @@ fn a<F:FnMut() -> i32>(mut f: F) -> i32 {
     f()
 }
 
-fn b(f: &mut FnMut() -> i32) -> i32 {
+fn b(f: &mut dyn FnMut() -> i32) -> i32 {
     a(f)
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn.rs
index 76ad40b8f3d..ca1d31ca544 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-blanket-fn.rs
@@ -8,7 +8,7 @@ fn a<F:Fn() -> i32>(f: F) -> i32 {
     f()
 }
 
-fn b(f: &Fn() -> i32) -> i32 {
+fn b(f: &dyn Fn() -> i32) -> i32 {
     a(f)
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-boxed.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-boxed.rs
index 6d55fe997b0..b2596e49aa7 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-boxed.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-boxed.rs
@@ -3,9 +3,9 @@
 
 use std::ops::FnMut;
 
- fn make_adder(x: i32) -> Box<FnMut(i32)->i32+'static> {
+ fn make_adder(x: i32) -> Box<dyn FnMut(i32)->i32+'static> {
     (box move |y: i32| -> i32 { x + y }) as
-        Box<FnMut(i32)->i32+'static>
+        Box<dyn FnMut(i32)->i32+'static>
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
index 22fc148c352..d47ceea0f4f 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
@@ -3,7 +3,7 @@
 
 use std::ops::FnMut;
 
-fn make_adder(x: isize) -> Box<FnMut(isize)->isize + 'static> {
+fn make_adder(x: isize) -> Box<dyn FnMut(isize)->isize + 'static> {
     Box::new(move |y| { x + y })
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object.rs
index 91311fba2e8..f77733d106d 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-call-sugar-object.rs
@@ -1,7 +1,7 @@
 // run-pass
 use std::ops::FnMut;
 
-fn make_adder(x: isize) -> Box<FnMut(isize)->isize + 'static> {
+fn make_adder(x: isize) -> Box<dyn FnMut(isize)->isize + 'static> {
     Box::new(move |y| { x + y })
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-extern-fn-hr.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-extern-fn-hr.rs
index 0fd23a2d796..3ee1aeb109b 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-extern-fn-hr.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-extern-fn-hr.rs
@@ -7,7 +7,7 @@ fn call_it<F:Fn(&isize)->isize>(f: &F, x: isize) -> isize {
     (*f)(&x)
 }
 
-fn call_it_boxed(f: &Fn(&isize) -> isize, x: isize) -> isize {
+fn call_it_boxed(f: &dyn Fn(&isize) -> isize, x: isize) -> isize {
     f(&x)
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
index 4f23f85b649..d2eaee30410 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
@@ -12,7 +12,7 @@ impl ToPrimitive for isize {}
 impl ToPrimitive for i32 {}
 impl ToPrimitive for usize {}
 
-fn doit<T>(val: T, f: &Fn(T)) { f(val) }
+fn doit<T>(val: T, f: &dyn Fn(T)) { f(val) }
 
 pub fn main() {
     doit(0, &|x /*: isize*/ | { x.to_int(); });
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-infer-recursive-fn.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-infer-recursive-fn.rs
index 72d658f393b..86834f49407 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-infer-recursive-fn.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-infer-recursive-fn.rs
@@ -20,23 +20,23 @@ impl<F,A,R> YCombinator<F,A,R> {
     }
 }
 
-impl<A,R,F : Fn(&Fn(A) -> R, A) -> R> Fn<(A,)> for YCombinator<F,A,R> {
+impl<A,R,F : Fn(&dyn Fn(A) -> R, A) -> R> Fn<(A,)> for YCombinator<F,A,R> {
     extern "rust-call" fn call(&self, (arg,): (A,)) -> R {
         (self.func)(self, arg)
     }
 }
 
-impl<A,R,F : Fn(&Fn(A) -> R, A) -> R> FnMut<(A,)> for YCombinator<F,A,R> {
+impl<A,R,F : Fn(&dyn Fn(A) -> R, A) -> R> FnMut<(A,)> for YCombinator<F,A,R> {
     extern "rust-call" fn call_mut(&mut self, args: (A,)) -> R { self.call(args) }
 }
 
-impl<A,R,F : Fn(&Fn(A) -> R, A) -> R> FnOnce<(A,)> for YCombinator<F,A,R> {
+impl<A,R,F : Fn(&dyn Fn(A) -> R, A) -> R> FnOnce<(A,)> for YCombinator<F,A,R> {
     type Output = R;
     extern "rust-call" fn call_once(self, args: (A,)) -> R { self.call(args) }
 }
 
 fn main() {
-    let factorial = |recur: &Fn(u32) -> u32, arg: u32| -> u32 {
+    let factorial = |recur: &dyn Fn(u32) -> u32, arg: u32| -> u32 {
         if arg == 0 {1} else {arg * recur(arg-1)}
     };
     let factorial: YCombinator<_,u32,u32> = YCombinator::new(factorial);
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-manual-impl.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-manual-impl.rs
index 5c7aafdc573..df60b42ab12 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-manual-impl.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-manual-impl.rs
@@ -19,7 +19,7 @@ fn call_it<F:FnMut(i32)->i32>(mut f: F, x: i32) -> i32 {
     f(x) + 3
 }
 
-fn call_box(f: &mut FnMut(i32) -> i32, x: i32) -> i32 {
+fn call_box(f: &mut dyn FnMut(i32) -> i32, x: i32) -> i32 {
     f(x) + 3
 }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-monomorphization.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-monomorphization.rs
index 092224b7934..2df360d4a30 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-monomorphization.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-monomorphization.rs
@@ -3,7 +3,7 @@
 // monomorphize correctly (issue #16791)
 
 fn main(){
-    fn bar<'a, T:Clone+'a> (t: T) -> Box<FnMut()->T + 'a> {
+    fn bar<'a, T:Clone+'a> (t: T) -> Box<dyn FnMut()->T + 'a> {
         Box::new(move || t.clone())
     }
 
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-prelude.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-prelude.rs
index 7e53c4d9eb6..89a273b7a43 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-prelude.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-prelude.rs
@@ -4,10 +4,10 @@
 // pretty-expanded FIXME #23616
 
 fn main() {
-    let task: Box<Fn(isize) -> isize> = Box::new(|x| x);
+    let task: Box<dyn Fn(isize) -> isize> = Box::new(|x| x);
     task(0);
 
-    let mut task: Box<FnMut(isize) -> isize> = Box::new(|x| x);
+    let mut task: Box<dyn FnMut(isize) -> isize> = Box::new(|x| x);
     task(0);
 
     call(|x| x, 22);
diff --git a/src/test/run-pass/unboxed-closures/unboxed-closures-sugar-object.rs b/src/test/run-pass/unboxed-closures/unboxed-closures-sugar-object.rs
index 45ab5df94b2..1ca25517c3c 100644
--- a/src/test/run-pass/unboxed-closures/unboxed-closures-sugar-object.rs
+++ b/src/test/run-pass/unboxed-closures/unboxed-closures-sugar-object.rs
@@ -19,7 +19,7 @@ impl<X> Getter<X,X> for Identity {
 }
 
 fn main() {
-    let x: &Getter<(i32,), (i32,)> = &Identity;
+    let x: &dyn Getter<(i32,), (i32,)> = &Identity;
     let (y,) = x.get((22,));
     assert_eq!(y, 22);
 }
diff --git a/src/test/run-pass/unique/unique-object-move.rs b/src/test/run-pass/unique/unique-object-move.rs
index 4bd3764fa15..84e8cdb32b8 100644
--- a/src/test/run-pass/unique/unique-object-move.rs
+++ b/src/test/run-pass/unique/unique-object-move.rs
@@ -15,6 +15,6 @@ pub struct UvEventLoop {
 impl EventLoop for UvEventLoop { }
 
 pub fn main() {
-    let loop_: Box<EventLoop> = box UvEventLoop { uvio: 0 } as Box<EventLoop>;
+    let loop_: Box<dyn EventLoop> = box UvEventLoop { uvio: 0 } as Box<dyn EventLoop>;
     let _loop2_ = loop_;
 }
diff --git a/src/test/run-pass/unsized2.rs b/src/test/run-pass/unsized2.rs
index c3eae299b86..c9a8b2e7c66 100644
--- a/src/test/run-pass/unsized2.rs
+++ b/src/test/run-pass/unsized2.rs
@@ -60,26 +60,26 @@ fn f7<X: ?Sized+T3>(x: &X) {
 
 trait T4<X> {
     fn dummy(&self) { }
-    fn m1(&self, x: &T4<X>, y: X);
-    fn m2(&self, x: &T5<X>, y: X);
+    fn m1(&self, x: &dyn T4<X>, y: X);
+    fn m2(&self, x: &dyn T5<X>, y: X);
 }
 trait T5<X: ?Sized> {
     fn dummy(&self) { }
     // not an error (for now)
-    fn m1(&self, x: &T4<X>);
-    fn m2(&self, x: &T5<X>);
+    fn m1(&self, x: &dyn T4<X>);
+    fn m2(&self, x: &dyn T5<X>);
 }
 
 trait T6<X: T> {
     fn dummy(&self) { }
-    fn m1(&self, x: &T4<X>);
-    fn m2(&self, x: &T5<X>);
+    fn m1(&self, x: &dyn T4<X>);
+    fn m2(&self, x: &dyn T5<X>);
 }
 trait T7<X: ?Sized+T> {
     fn dummy(&self) { }
     // not an error (for now)
-    fn m1(&self, x: &T4<X>);
-    fn m2(&self, x: &T5<X>);
+    fn m1(&self, x: &dyn T4<X>);
+    fn m2(&self, x: &dyn T5<X>);
 }
 
 // The last field in a struct may be unsized
diff --git a/src/test/run-pass/wf-bound-region-in-object-type.rs b/src/test/run-pass/wf-bound-region-in-object-type.rs
index d81059ca6a8..6814e2baab5 100644
--- a/src/test/run-pass/wf-bound-region-in-object-type.rs
+++ b/src/test/run-pass/wf-bound-region-in-object-type.rs
@@ -12,7 +12,7 @@ pub struct Context<'tcx> {
 pub type Cmd<'a> = &'a isize;
 
 pub type DecodeInlinedItem<'a> =
-    Box<for<'tcx> FnMut(Cmd, &Context<'tcx>) -> Result<&'tcx isize, ()> + 'a>;
+    Box<dyn for<'tcx> FnMut(Cmd, &Context<'tcx>) -> Result<&'tcx isize, ()> + 'a>;
 
 fn foo(d: DecodeInlinedItem) {
 }
diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.rs b/src/test/ui/anonymous-higher-ranked-lifetime.rs
index 2e2a124db9a..8a1744ed5f8 100644
--- a/src/test/ui/anonymous-higher-ranked-lifetime.rs
+++ b/src/test/ui/anonymous-higher-ranked-lifetime.rs
@@ -31,11 +31,11 @@ fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
 fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
 
 // Nested
-fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
+fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
 fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
-fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
+fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
 fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
 
 // Mixed
-fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
-fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
+fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
+fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr
index 86547303978..0ca3ca84374 100644
--- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr
+++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr
@@ -149,8 +149,8 @@ LL |     g1(|_: (), _: ()| {});
 note: required by `g1`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
    |
-LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
@@ -163,8 +163,8 @@ LL |     g1(|_: (), _: ()| {});
 note: required by `g1`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
    |
-LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
@@ -205,8 +205,8 @@ LL |     g3(|_: (), _: ()| {});
 note: required by `g3`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
    |
-LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
@@ -219,8 +219,8 @@ LL |     g3(|_: (), _: ()| {});
 note: required by `g3`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
    |
-LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
@@ -261,8 +261,8 @@ LL |     h1(|_: (), _: (), _: (), _: ()| {});
 note: required by `h1`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
    |
-LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
@@ -275,8 +275,8 @@ LL |     h1(|_: (), _: (), _: (), _: ()| {});
 note: required by `h1`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
    |
-LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
@@ -289,8 +289,8 @@ LL |     h2(|_: (), _: (), _: (), _: ()| {});
 note: required by `h2`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
    |
-LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
@@ -303,8 +303,8 @@ LL |     h2(|_: (), _: (), _: (), _: ()| {});
 note: required by `h2`
   --> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
    |
-LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 22 previous errors
 
diff --git a/src/test/ui/associated-const/associated-const-in-trait.rs b/src/test/ui/associated-const/associated-const-in-trait.rs
index 187708a60b4..cc3acd53956 100644
--- a/src/test/ui/associated-const/associated-const-in-trait.rs
+++ b/src/test/ui/associated-const/associated-const-in-trait.rs
@@ -6,7 +6,7 @@ trait Trait {
     const N: usize;
 }
 
-impl Trait {
+impl dyn Trait {
     //~^ ERROR the trait `Trait` cannot be made into an object [E0038]
     const fn n() -> usize { Self::N }
 }
diff --git a/src/test/ui/associated-const/associated-const-in-trait.stderr b/src/test/ui/associated-const/associated-const-in-trait.stderr
index 44a92639b5d..dff268a55c9 100644
--- a/src/test/ui/associated-const/associated-const-in-trait.stderr
+++ b/src/test/ui/associated-const/associated-const-in-trait.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/associated-const-in-trait.rs:9:6
    |
-LL | impl Trait {
-   |      ^^^^^ the trait `Trait` cannot be made into an object
+LL | impl dyn Trait {
+   |      ^^^^^^^^^ the trait `Trait` cannot be made into an object
    |
    = note: the trait cannot contain associated consts like `N`
 
diff --git a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.rs b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.rs
index df9143d685f..7a678445796 100644
--- a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.rs
+++ b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.rs
@@ -20,7 +20,7 @@ fn dent<C:BoxCar>(c: C, color: C::Color) {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
 }
 
-fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
+fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
     //~^ ERROR ambiguous associated type
     //~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
 }
diff --git a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
index dd46ad64692..6118ebef125 100644
--- a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
+++ b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
@@ -11,7 +11,7 @@ LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
    |                                ^^^^^^^^ ambiguous associated type `Color`
 
 error[E0221]: ambiguous associated type `Color` in bounds of `BoxCar`
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:33
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
    |
 LL |     type Color;
    |     ----------- ambiguous `Color` from `Vehicle`
@@ -19,8 +19,8 @@ LL |     type Color;
 LL |     type Color;
    |     ----------- ambiguous `Color` from `Box`
 ...
-LL | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
-   |                                 ^^^^^^^^^^^ ambiguous associated type `Color`
+LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
+   |                                     ^^^^^^^^^^^ ambiguous associated type `Color`
 
 error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`) must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:26
@@ -28,8 +28,8 @@ error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`
 LL |     type Color;
    |     ----------- `Color` defined here
 ...
-LL | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
-   |                          ^^^^^^^^^^^^^^^^^^^ associated type `Color` must be specified
+LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^ associated type `Color` must be specified
 
 error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29
diff --git a/src/test/ui/associated-types/associated-types-eq-3.rs b/src/test/ui/associated-types/associated-types-eq-3.rs
index 1a58dcca9e2..9366148b587 100644
--- a/src/test/ui/associated-types/associated-types-eq-3.rs
+++ b/src/test/ui/associated-types/associated-types-eq-3.rs
@@ -28,7 +28,7 @@ fn foo2<I: Foo>(x: I) {
 }
 
 
-pub fn baz(x: &Foo<A=Bar>) {
+pub fn baz(x: &dyn Foo<A=Bar>) {
     let _: Bar = x.boo();
 }
 
diff --git a/src/test/ui/associated-types/associated-types-incomplete-object.rs b/src/test/ui/associated-types/associated-types-incomplete-object.rs
index c93f3bec4d7..4993b131215 100644
--- a/src/test/ui/associated-types/associated-types-incomplete-object.rs
+++ b/src/test/ui/associated-types/associated-types-incomplete-object.rs
@@ -18,14 +18,14 @@ impl Foo for isize {
 }
 
 pub fn main() {
-    let a = &42isize as &Foo<A=usize, B=char>;
+    let a = &42isize as &dyn Foo<A=usize, B=char>;
 
-    let b = &42isize as &Foo<A=usize>;
+    let b = &42isize as &dyn Foo<A=usize>;
     //~^ ERROR the value of the associated type `B` (from the trait `Foo`) must be specified
 
-    let c = &42isize as &Foo<B=char>;
+    let c = &42isize as &dyn Foo<B=char>;
     //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
 
-    let d = &42isize as &Foo;
+    let d = &42isize as &dyn Foo;
     //~^ ERROR the value of the associated types `A` (from the trait `Foo`), `B` (from the trait
 }
diff --git a/src/test/ui/associated-types/associated-types-incomplete-object.stderr b/src/test/ui/associated-types/associated-types-incomplete-object.stderr
index d152e028eb7..b4c08f4a4cc 100644
--- a/src/test/ui/associated-types/associated-types-incomplete-object.stderr
+++ b/src/test/ui/associated-types/associated-types-incomplete-object.stderr
@@ -4,8 +4,8 @@ error[E0191]: the value of the associated type `B` (from the trait `Foo`) must b
 LL |     type B;
    |     ------- `B` defined here
 ...
-LL |     let b = &42isize as &Foo<A=usize>;
-   |                          ^^^^^^^^^^^^ associated type `B` must be specified
+LL |     let b = &42isize as &dyn Foo<A=usize>;
+   |                          ^^^^^^^^^^^^^^^^ associated type `B` must be specified
 
 error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
   --> $DIR/associated-types-incomplete-object.rs:26:26
@@ -13,8 +13,8 @@ error[E0191]: the value of the associated type `A` (from the trait `Foo`) must b
 LL |     type A;
    |     ------- `A` defined here
 ...
-LL |     let c = &42isize as &Foo<B=char>;
-   |                          ^^^^^^^^^^^ associated type `A` must be specified
+LL |     let c = &42isize as &dyn Foo<B=char>;
+   |                          ^^^^^^^^^^^^^^^ associated type `A` must be specified
 
 error[E0191]: the value of the associated types `A` (from the trait `Foo`), `B` (from the trait `Foo`) must be specified
   --> $DIR/associated-types-incomplete-object.rs:29:26
@@ -24,8 +24,8 @@ LL |     type A;
 LL |     type B;
    |     ------- `B` defined here
 ...
-LL |     let d = &42isize as &Foo;
-   |                          ^^^
+LL |     let d = &42isize as &dyn Foo;
+   |                          ^^^^^^^
    |                          |
    |                          associated type `A` must be specified
    |                          associated type `B` must be specified
diff --git a/src/test/ui/associated-types/associated-types-overridden-binding-2.rs b/src/test/ui/associated-types/associated-types-overridden-binding-2.rs
index 7467f332047..109feb8e969 100644
--- a/src/test/ui/associated-types/associated-types-overridden-binding-2.rs
+++ b/src/test/ui/associated-types/associated-types-overridden-binding-2.rs
@@ -3,6 +3,6 @@
 trait I32Iterator = Iterator<Item = i32>;
 
 fn main() {
-    let _: &I32Iterator<Item = u32> = &vec![42].into_iter();
+    let _: &dyn I32Iterator<Item = u32> = &vec![42].into_iter();
     //~^ ERROR type mismatch
 }
diff --git a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
index 85724cb7c6e..aff067c2891 100644
--- a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
+++ b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
@@ -1,8 +1,8 @@
 error[E0271]: type mismatch resolving `<std::vec::IntoIter<u32> as std::iter::Iterator>::Item == i32`
-  --> $DIR/associated-types-overridden-binding-2.rs:6:39
+  --> $DIR/associated-types-overridden-binding-2.rs:6:43
    |
-LL |     let _: &I32Iterator<Item = u32> = &vec![42].into_iter();
-   |                                       ^^^^^^^^^^^^^^^^^^^^^ expected u32, found i32
+LL |     let _: &dyn I32Iterator<Item = u32> = &vec![42].into_iter();
+   |                                           ^^^^^^^^^^^^^^^^^^^^^ expected u32, found i32
    |
    = note: expected type `u32`
               found type `i32`
diff --git a/src/test/ui/associated-types/associated-types-overridden-binding.rs b/src/test/ui/associated-types/associated-types-overridden-binding.rs
index ea3a61b2bef..fa1889389fd 100644
--- a/src/test/ui/associated-types/associated-types-overridden-binding.rs
+++ b/src/test/ui/associated-types/associated-types-overridden-binding.rs
@@ -7,5 +7,5 @@ trait I32Iterator = Iterator<Item = i32>;
 trait U32Iterator = I32Iterator<Item = u32>;
 
 fn main() {
-    let _: &I32Iterator<Item = u32>;
+    let _: &dyn I32Iterator<Item = u32>;
 }
diff --git a/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr b/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
index 9258854245c..36fa06cce4d 100644
--- a/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
+++ b/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
@@ -1,14 +1,14 @@
 error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
-  --> $DIR/bound-lifetime-constrained.rs:28:56
+  --> $DIR/bound-lifetime-constrained.rs:28:60
    |
-LL | fn object1(_: Box<for<'a> Fn(<() as Foo<'a>>::Item) -> &'a i32>) {
-   |                                                        ^^^^^^^
+LL | fn object1(_: Box<dyn for<'a> Fn(<() as Foo<'a>>::Item) -> &'a i32>) {
+   |                                                            ^^^^^^^
 
 error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
-  --> $DIR/bound-lifetime-constrained.rs:33:35
+  --> $DIR/bound-lifetime-constrained.rs:33:39
    |
-LL | fn object2(_: Box<for<'a> Fn() -> <() as Foo<'a>>::Item>) {
-   |                                   ^^^^^^^^^^^^^^^^^^^^^
+LL | fn object2(_: Box<dyn for<'a> Fn() -> <() as Foo<'a>>::Item>) {
+   |                                       ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/associated-types/bound-lifetime-constrained.rs b/src/test/ui/associated-types/bound-lifetime-constrained.rs
index b590f88b60d..fb82b3fa666 100644
--- a/src/test/ui/associated-types/bound-lifetime-constrained.rs
+++ b/src/test/ui/associated-types/bound-lifetime-constrained.rs
@@ -25,12 +25,12 @@ fn func2(_: for<'a> fn() -> <() as Foo<'a>>::Item) {
 }
 
 #[cfg(object)]
-fn object1(_: Box<for<'a> Fn(<() as Foo<'a>>::Item) -> &'a i32>) {
+fn object1(_: Box<dyn for<'a> Fn(<() as Foo<'a>>::Item) -> &'a i32>) {
     //[object]~^ ERROR E0582
 }
 
 #[cfg(object)]
-fn object2(_: Box<for<'a> Fn() -> <() as Foo<'a>>::Item>) {
+fn object2(_: Box<dyn for<'a> Fn() -> <() as Foo<'a>>::Item>) {
     //[object]~^ ERROR E0582
 }
 
diff --git a/src/test/ui/associated-types/bound-lifetime-in-binding-only.angle.stderr b/src/test/ui/associated-types/bound-lifetime-in-binding-only.angle.stderr
index fee64c0f663..54f4bb9076b 100644
--- a/src/test/ui/associated-types/bound-lifetime-in-binding-only.angle.stderr
+++ b/src/test/ui/associated-types/bound-lifetime-in-binding-only.angle.stderr
@@ -17,10 +17,10 @@ LL | fn angle2<T>() where for<'a> T: Foo<Item=&'a i32> {
    |                                     ^^^^^^^^^^^^
 
 error[E0582]: binding for associated type `Item` references lifetime `'a`, which does not appear in the trait input types
-  --> $DIR/bound-lifetime-in-binding-only.rs:27:27
+  --> $DIR/bound-lifetime-in-binding-only.rs:27:31
    |
-LL | fn angle3(_: &for<'a> Foo<Item=&'a i32>) {
-   |                           ^^^^^^^^^^^^
+LL | fn angle3(_: &dyn for<'a> Foo<Item=&'a i32>) {
+   |                               ^^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/associated-types/bound-lifetime-in-binding-only.paren.stderr b/src/test/ui/associated-types/bound-lifetime-in-binding-only.paren.stderr
index 8c9480027e6..74bc84c222a 100644
--- a/src/test/ui/associated-types/bound-lifetime-in-binding-only.paren.stderr
+++ b/src/test/ui/associated-types/bound-lifetime-in-binding-only.paren.stderr
@@ -17,10 +17,10 @@ LL | fn paren2<T>() where for<'a> T: Fn() -> &'a i32 {
    |                                         ^^^^^^^
 
 error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
-  --> $DIR/bound-lifetime-in-binding-only.rs:47:31
+  --> $DIR/bound-lifetime-in-binding-only.rs:47:35
    |
-LL | fn paren3(_: &for<'a> Fn() -> &'a i32) {
-   |                               ^^^^^^^
+LL | fn paren3(_: &dyn for<'a> Fn() -> &'a i32) {
+   |                                   ^^^^^^^
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs b/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
index e1989d35bbb..843f5f06195 100644
--- a/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
+++ b/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
@@ -24,7 +24,7 @@ fn angle2<T>() where for<'a> T: Foo<Item=&'a i32> {
 }
 
 #[cfg(angle)]
-fn angle3(_: &for<'a> Foo<Item=&'a i32>) {
+fn angle3(_: &dyn for<'a> Foo<Item=&'a i32>) {
     //[angle]~^ ERROR binding for associated type `Item` references lifetime `'a`
 }
 
@@ -44,7 +44,7 @@ fn paren2<T>() where for<'a> T: Fn() -> &'a i32 {
 }
 
 #[cfg(paren)]
-fn paren3(_: &for<'a> Fn() -> &'a i32) {
+fn paren3(_: &dyn for<'a> Fn() -> &'a i32) {
     //[paren]~^ ERROR binding for associated type `Output` references lifetime `'a`
 }
 
diff --git a/src/test/ui/associated-types/bound-lifetime-in-return-only.rs b/src/test/ui/associated-types/bound-lifetime-in-return-only.rs
index 5a7e086fd47..9c0dc61494d 100644
--- a/src/test/ui/associated-types/bound-lifetime-in-return-only.rs
+++ b/src/test/ui/associated-types/bound-lifetime-in-return-only.rs
@@ -38,11 +38,11 @@ fn elision(_: fn() -> &i32) {
 struct Parameterized<'a> { x: &'a str }
 
 #[cfg(ok)]
-fn ok1(_: &for<'a> Fn(&Parameterized<'a>) -> &'a i32) {
+fn ok1(_: &dyn for<'a> Fn(&Parameterized<'a>) -> &'a i32) {
 }
 
 #[cfg(ok)]
-fn ok2(_: &for<'a,'b> Fn<(&'b Parameterized<'a>,), Output=&'a i32>) {
+fn ok2(_: &dyn for<'a,'b> Fn<(&'b Parameterized<'a>,), Output=&'a i32>) {
 }
 
 #[rustc_error]
diff --git a/src/test/ui/async-await/async-with-closure.rs b/src/test/ui/async-await/async-with-closure.rs
index 856a778078a..e94a5f0853d 100644
--- a/src/test/ui/async-await/async-with-closure.rs
+++ b/src/test/ui/async-await/async-with-closure.rs
@@ -19,7 +19,7 @@ struct MyStream<C: ?Sized + MyClosure> {
 async fn get_future<C: ?Sized + MyClosure>(_stream: MyStream<C>) {}
 
 async fn f() {
-    let messages: MyStream<FnMut()> = unimplemented!();
+    let messages: MyStream<dyn FnMut()> = unimplemented!();
     await!(get_future(messages));
 }
 
diff --git a/src/test/ui/async-await/issues/issue-53249.rs b/src/test/ui/async-await/issues/issue-53249.rs
index 9e4ff43ecd1..2157cf7d4f7 100644
--- a/src/test/ui/async-await/issues/issue-53249.rs
+++ b/src/test/ui/async-await/issues/issue-53249.rs
@@ -35,7 +35,7 @@ impl<R, F> Future for Lazy<F>
 }
 
 async fn __receive<WantFn, Fut>(want: WantFn) -> ()
-    where Fut: Future<Output = ()>, WantFn: Fn(&Box<Send + 'static>) -> Fut,
+    where Fut: Future<Output = ()>, WantFn: Fn(&Box<dyn Send + 'static>) -> Fut,
 {
     await!(lazy(|_| ()));
 }
diff --git a/src/test/ui/async-await/issues/issue-54974.rs b/src/test/ui/async-await/issues/issue-54974.rs
index d6f18875c9e..ad18f411875 100644
--- a/src/test/ui/async-await/issues/issue-54974.rs
+++ b/src/test/ui/async-await/issues/issue-54974.rs
@@ -9,7 +9,7 @@ trait SomeTrait: Send + Sync + 'static {
     fn do_something(&self);
 }
 
-async fn my_task(obj: Arc<SomeTrait>) {
+async fn my_task(obj: Arc<dyn SomeTrait>) {
     unimplemented!()
 }
 
diff --git a/src/test/ui/bad/bad-sized.rs b/src/test/ui/bad/bad-sized.rs
index 0da4e456f08..b899c59ff2e 100644
--- a/src/test/ui/bad/bad-sized.rs
+++ b/src/test/ui/bad/bad-sized.rs
@@ -1,7 +1,7 @@
 trait Trait {}
 
 pub fn main() {
-    let x: Vec<Trait + Sized> = Vec::new();
+    let x: Vec<dyn Trait + Sized> = Vec::new();
     //~^ ERROR only auto traits can be used as additional traits in a trait object
     //~| ERROR the size for values of type
     //~| ERROR the size for values of type
diff --git a/src/test/ui/bad/bad-sized.stderr b/src/test/ui/bad/bad-sized.stderr
index 6307af5d725..e9ded557281 100644
--- a/src/test/ui/bad/bad-sized.stderr
+++ b/src/test/ui/bad/bad-sized.stderr
@@ -1,29 +1,29 @@
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/bad-sized.rs:4:24
+  --> $DIR/bad-sized.rs:4:28
    |
-LL |     let x: Vec<Trait + Sized> = Vec::new();
-   |                -----   ^^^^^
-   |                |       |
-   |                |       additional non-auto trait
-   |                |       trait alias used in trait object type (additional use)
-   |                first non-auto trait
-   |                trait alias used in trait object type (first use)
+LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
+   |                    -----   ^^^^^
+   |                    |       |
+   |                    |       additional non-auto trait
+   |                    |       trait alias used in trait object type (additional use)
+   |                    first non-auto trait
+   |                    trait alias used in trait object type (first use)
 
 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
   --> $DIR/bad-sized.rs:4:12
    |
-LL |     let x: Vec<Trait + Sized> = Vec::new();
-   |            ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
+   |            ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = note: required by `std::vec::Vec`
 
 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-  --> $DIR/bad-sized.rs:4:33
+  --> $DIR/bad-sized.rs:4:37
    |
-LL |     let x: Vec<Trait + Sized> = Vec::new();
-   |                                 ^^^^^^^^ doesn't have a size known at compile-time
+LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
+   |                                     ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs
index 5e853afd38c..b4d85b60cd5 100644
--- a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs
+++ b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs
@@ -8,7 +8,7 @@ trait Foo {
     fn f2(&mut self);
 }
 
-fn test(x: &mut Foo) {
+fn test(x: &mut dyn Foo) {
     let y = x.f1();
     x.f2(); //~ ERROR cannot borrow `*x` as mutable
     y.use_ref();
diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.rs b/src/test/ui/borrowck/borrowck-consume-upcast-box.rs
index ed669c4d901..6b32d185b6f 100644
--- a/src/test/ui/borrowck/borrowck-consume-upcast-box.rs
+++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.rs
@@ -2,10 +2,10 @@
 
 trait Foo { fn dummy(&self); }
 
-fn consume(_: Box<Foo>) {
+fn consume(_: Box<dyn Foo>) {
 }
 
-fn foo(b: Box<Foo+Send>) {
+fn foo(b: Box<dyn Foo + Send>) {
     consume(b);
     consume(b); //~ ERROR use of moved value
 }
diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr
index e8194ad6944..356cda01e29 100644
--- a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr
+++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr
@@ -1,7 +1,7 @@
 error[E0382]: use of moved value: `b`
   --> $DIR/borrowck-consume-upcast-box.rs:10:13
    |
-LL | fn foo(b: Box<Foo+Send>) {
+LL | fn foo(b: Box<dyn Foo + Send>) {
    |        - move occurs because `b` has type `std::boxed::Box<dyn Foo + std::marker::Send>`, which does not implement the `Copy` trait
 LL |     consume(b);
    |             - value moved here
diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.rs b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.rs
index a44e3031e25..b50d455637b 100644
--- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.rs
+++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.rs
@@ -6,7 +6,7 @@
 //    closure may outlive the current function, but it borrows `books`,
 //    which is owned by the current function
 
-fn foo<'a>(x: &'a i32) -> Box<FnMut()+'a> {
+fn foo<'a>(x: &'a i32) -> Box<dyn FnMut() + 'a> {
     let mut books = vec![1,2,3];
     Box::new(|| books.push(4))
     //~^ ERROR E0373
diff --git a/src/test/ui/borrowck/borrowck-in-static.rs b/src/test/ui/borrowck/borrowck-in-static.rs
index 43bb652a024..c468740bc3b 100644
--- a/src/test/ui/borrowck/borrowck-in-static.rs
+++ b/src/test/ui/borrowck/borrowck-in-static.rs
@@ -1,6 +1,6 @@
 // check that borrowck looks inside consts/statics
 
-static FN : &'static (Fn() -> (Box<Fn()->Box<i32>>) + Sync) = &|| {
+static FN : &'static (dyn Fn() -> (Box<dyn Fn()->Box<i32>>) + Sync) = &|| {
     let x = Box::new(0);
     Box::new(|| x) //~ ERROR cannot move out of captured variable in an `Fn` closure
 };
diff --git a/src/test/ui/borrowck/borrowck-object-lifetime.rs b/src/test/ui/borrowck/borrowck-object-lifetime.rs
index 495516cf976..137a9adbc40 100644
--- a/src/test/ui/borrowck/borrowck-object-lifetime.rs
+++ b/src/test/ui/borrowck/borrowck-object-lifetime.rs
@@ -8,26 +8,26 @@ trait Foo {
     fn mut_borrowed(&mut self) -> &();
 }
 
-fn borrowed_receiver(x: &Foo) {
+fn borrowed_receiver(x: &dyn Foo) {
     let y = x.borrowed();
     let z = x.borrowed();
     z.use_ref();
     y.use_ref();
 }
 
-fn mut_borrowed_receiver(x: &mut Foo) {
+fn mut_borrowed_receiver(x: &mut dyn Foo) {
     let y = x.borrowed();
     let z = x.mut_borrowed(); //~ ERROR cannot borrow
     y.use_ref();
 }
 
-fn mut_owned_receiver(mut x: Box<Foo>) {
+fn mut_owned_receiver(mut x: Box<dyn Foo>) {
     let y = x.borrowed();
     let z = &mut x; //~ ERROR cannot borrow
     y.use_ref();
 }
 
-fn imm_owned_receiver(mut x: Box<Foo>) {
+fn imm_owned_receiver(mut x: Box<dyn Foo>) {
     let y = x.borrowed();
     let z = &x;
     z.use_ref();
diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs
index 1e272372f6c..3ce72161814 100644
--- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs
+++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs
@@ -6,5 +6,5 @@ impl Foo for i32 { }
 
 fn main() {
     let x: &i32;
-    let y = x as *const Foo; //~ ERROR [E0381]
+    let y = x as *const dyn Foo; //~ ERROR [E0381]
 }
diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
index df610cbb561..2b80140c6b3 100644
--- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
+++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
@@ -1,7 +1,7 @@
 error[E0381]: borrow of possibly uninitialized variable: `x`
   --> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:9:13
    |
-LL |     let y = x as *const Foo;
+LL |     let y = x as *const dyn Foo;
    |             ^ use of possibly uninitialized `*x`
 
 error: aborting due to previous error
diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.rs b/src/test/ui/borrowck/regions-escape-unboxed-closure.rs
index 62ddf4decfc..d8bef927fd7 100644
--- a/src/test/ui/borrowck/regions-escape-unboxed-closure.rs
+++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.rs
@@ -1,4 +1,4 @@
-fn with_int(f: &mut FnMut(&isize)) {
+fn with_int(f: &mut dyn FnMut(&isize)) {
 }
 
 fn main() {
diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr
index fca425da34d..baf122df5e2 100644
--- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr
+++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr
@@ -29,7 +29,7 @@ LL |         f(f(10));
 error[E0382]: use of moved value: `f`
   --> $DIR/two-phase-nonrecv-autoref.rs:80:11
    |
-LL |     fn twice_ten_oo(f: Box<FnOnce(i32) -> i32>) {
+LL |     fn twice_ten_oo(f: Box<dyn FnOnce(i32) -> i32>) {
    |                     - move occurs because `f` has type `std::boxed::Box<dyn std::ops::FnOnce(i32) -> i32>`, which does not implement the `Copy` trait
 LL |         f(f(10));
    |         - ^ value used here after move
diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs
index c0a117d6766..b29664e3d8c 100644
--- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs
+++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs
@@ -68,15 +68,15 @@ fn overloaded_call_traits() {
         //[g2p]~^^  ERROR use of moved value: `f`
     }
 
-    fn twice_ten_om(f: &mut FnMut(i32) -> i32) {
+    fn twice_ten_om(f: &mut dyn FnMut(i32) -> i32) {
         f(f(10));
         //[nll]~^   ERROR cannot borrow `*f` as mutable more than once at a time
         //[g2p]~^^  ERROR cannot borrow `*f` as mutable more than once at a time
     }
-    fn twice_ten_oi(f: &mut Fn(i32) -> i32) {
+    fn twice_ten_oi(f: &mut dyn Fn(i32) -> i32) {
         f(f(10));
     }
-    fn twice_ten_oo(f: Box<FnOnce(i32) -> i32>) {
+    fn twice_ten_oo(f: Box<dyn FnOnce(i32) -> i32>) {
         f(f(10));
         //[nll]~^   ERROR use of moved value: `f`
         //[g2p]~^^  ERROR use of moved value: `f`
diff --git a/src/test/ui/bounds-lifetime.rs b/src/test/ui/bounds-lifetime.rs
index 8abfe3e4b76..31aa4011b91 100644
--- a/src/test/ui/bounds-lifetime.rs
+++ b/src/test/ui/bounds-lifetime.rs
@@ -2,6 +2,6 @@ type A = for<'b, 'a: 'b> fn(); //~ ERROR lifetime bounds cannot be used in this
 type B = for<'b, 'a: 'b,> fn(); //~ ERROR lifetime bounds cannot be used in this context
 type C = for<'b, 'a: 'b +> fn(); //~ ERROR lifetime bounds cannot be used in this context
 type D = for<'a, T> fn(); //~ ERROR only lifetime parameters can be used in this context
-type E = for<T> Fn(); //~ ERROR only lifetime parameters can be used in this context
+type E = dyn for<T> Fn(); //~ ERROR only lifetime parameters can be used in this context
 
 fn main() {}
diff --git a/src/test/ui/bounds-lifetime.stderr b/src/test/ui/bounds-lifetime.stderr
index 21a78146267..a0395ed4904 100644
--- a/src/test/ui/bounds-lifetime.stderr
+++ b/src/test/ui/bounds-lifetime.stderr
@@ -23,10 +23,10 @@ LL | type D = for<'a, T> fn();
    |                  ^
 
 error: only lifetime parameters can be used in this context
-  --> $DIR/bounds-lifetime.rs:5:14
+  --> $DIR/bounds-lifetime.rs:5:18
    |
-LL | type E = for<T> Fn();
-   |              ^
+LL | type E = dyn for<T> Fn();
+   |                  ^
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.rs b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.rs
index ac859c51263..5342b595c7c 100644
--- a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.rs
+++ b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.rs
@@ -1,4 +1,4 @@
 fn main() {
-    &1 as Send; //~ ERROR cast to unsized
-    Box::new(1) as Send; //~ ERROR cast to unsized
+    &1 as dyn Send; //~ ERROR cast to unsized
+    Box::new(1) as dyn Send; //~ ERROR cast to unsized
 }
diff --git a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
index bd7a0e1834a..ffa02533d8b 100644
--- a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
+++ b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
@@ -1,18 +1,18 @@
 error[E0620]: cast to unsized type: `&{integer}` as `dyn std::marker::Send`
   --> $DIR/cast-to-unsized-trait-object-suggestion.rs:2:5
    |
-LL |     &1 as Send;
-   |     ^^^^^^----
+LL |     &1 as dyn Send;
+   |     ^^^^^^--------
    |           |
-   |           help: try casting to a reference instead: `&Send`
+   |           help: try casting to a reference instead: `&dyn Send`
 
 error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `dyn std::marker::Send`
   --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5
    |
-LL |     Box::new(1) as Send;
-   |     ^^^^^^^^^^^^^^^----
+LL |     Box::new(1) as dyn Send;
+   |     ^^^^^^^^^^^^^^^--------
    |                    |
-   |                    help: try casting to a `Box` instead: `Box<Send>`
+   |                    help: try casting to a `Box` instead: `Box<dyn Send>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/casts-differing-anon.rs b/src/test/ui/casts-differing-anon.rs
index cba178104c9..d4a0f961305 100644
--- a/src/test/ui/casts-differing-anon.rs
+++ b/src/test/ui/casts-differing-anon.rs
@@ -5,7 +5,7 @@ fn foo() -> Box<impl fmt::Debug+?Sized> {
     x
 }
 fn bar() -> Box<impl fmt::Debug+?Sized> {
-    let y: Box<fmt::Debug> = Box::new([0]);
+    let y: Box<dyn fmt::Debug> = Box::new([0]);
     y
 }
 
diff --git a/src/test/ui/class-cast-to-trait.rs b/src/test/ui/class-cast-to-trait.rs
index 3ae4987254f..bb4c3fac938 100644
--- a/src/test/ui/class-cast-to-trait.rs
+++ b/src/test/ui/class-cast-to-trait.rs
@@ -49,6 +49,6 @@ fn cat(in_x : usize, in_y : isize, in_name: String) -> Cat {
 }
 
 fn main() {
-  let nyan: Box<Noisy> = box cat(0, 2, "nyan".to_string()) as Box<Noisy>;
+  let nyan: Box<dyn Noisy> = box cat(0, 2, "nyan".to_string()) as Box<dyn Noisy>;
   nyan.eat(); //~ ERROR no method named `eat` found
 }
diff --git a/src/test/ui/closure_context/issue-26046-fn-mut.rs b/src/test/ui/closure_context/issue-26046-fn-mut.rs
index e5840181e41..0a015ea1436 100644
--- a/src/test/ui/closure_context/issue-26046-fn-mut.rs
+++ b/src/test/ui/closure_context/issue-26046-fn-mut.rs
@@ -1,4 +1,4 @@
-fn foo() -> Box<Fn()> {
+fn foo() -> Box<dyn Fn()> {
     let num = 5;
 
     let closure = || { //~ ERROR expected a closure that
diff --git a/src/test/ui/closure_context/issue-26046-fn-once.rs b/src/test/ui/closure_context/issue-26046-fn-once.rs
index d33420c52a0..511690e9dd4 100644
--- a/src/test/ui/closure_context/issue-26046-fn-once.rs
+++ b/src/test/ui/closure_context/issue-26046-fn-once.rs
@@ -1,4 +1,4 @@
-fn get_closure() -> Box<Fn() -> Vec<u8>> {
+fn get_closure() -> Box<dyn Fn() -> Vec<u8>> {
     let vec = vec![1u8, 2u8];
 
     let closure = move || { //~ ERROR expected a closure
diff --git a/src/test/ui/closures/closure-immutable-outer-variable.fixed b/src/test/ui/closures/closure-immutable-outer-variable.fixed
index 03240d4857c..102f1f94a36 100644
--- a/src/test/ui/closures/closure-immutable-outer-variable.fixed
+++ b/src/test/ui/closures/closure-immutable-outer-variable.fixed
@@ -2,7 +2,7 @@
 
 // Point at the captured immutable outer variable
 
-fn foo(mut f: Box<FnMut()>) {
+fn foo(mut f: Box<dyn FnMut()>) {
     f();
 }
 
diff --git a/src/test/ui/closures/closure-immutable-outer-variable.rs b/src/test/ui/closures/closure-immutable-outer-variable.rs
index 8fa9e44845d..6eb43b372c9 100644
--- a/src/test/ui/closures/closure-immutable-outer-variable.rs
+++ b/src/test/ui/closures/closure-immutable-outer-variable.rs
@@ -2,7 +2,7 @@
 
 // Point at the captured immutable outer variable
 
-fn foo(mut f: Box<FnMut()>) {
+fn foo(mut f: Box<dyn FnMut()>) {
     f();
 }
 
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
index f35fbad7cd6..414acfd84ce 100644
--- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
+++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
@@ -1,6 +1,6 @@
 #![allow(dead_code)]
 
 trait C {}
-impl C { fn f() {} } //~ ERROR duplicate
-impl C { fn f() {} }
+impl dyn C { fn f() {} } //~ ERROR duplicate
+impl dyn C { fn f() {} }
 fn main() { }
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
index 16cdca774ba..a97161b131d 100644
--- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
+++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
@@ -1,10 +1,10 @@
 error[E0592]: duplicate definitions with name `f`
-  --> $DIR/coherence-overlapping-inherent-impl-trait.rs:4:10
+  --> $DIR/coherence-overlapping-inherent-impl-trait.rs:4:14
    |
-LL | impl C { fn f() {} }
-   |          ^^^^^^^^^ duplicate definitions for `f`
-LL | impl C { fn f() {} }
-   |          --------- other definition for `f`
+LL | impl dyn C { fn f() {} }
+   |              ^^^^^^^^^ duplicate definitions for `f`
+LL | impl dyn C { fn f() {} }
+   |              --------- other definition for `f`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/codemap_tests/two_files_data.rs b/src/test/ui/codemap_tests/two_files_data.rs
index db8ab14e673..b4d2f5d3c6d 100644
--- a/src/test/ui/codemap_tests/two_files_data.rs
+++ b/src/test/ui/codemap_tests/two_files_data.rs
@@ -2,4 +2,4 @@
 
 trait Foo { }
 
-type Bar = Foo;
+type Bar = dyn Foo;
diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.rs b/src/test/ui/coercion/coerce-expect-unsized-ascribed.rs
index 9a4e134cb39..c139e823c2a 100644
--- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.rs
+++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.rs
@@ -10,23 +10,23 @@ pub fn main() {
     let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; //~ ERROR mismatched types
     let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[i32]>;
     //~^ ERROR mismatched types
-    let _ = box { |x| (x as u8) }: Box<Fn(i32) -> _>; //~ ERROR mismatched types
-    let _ = box if true { false } else { true }: Box<Debug>; //~ ERROR mismatched types
-    let _ = box match true { true => 'a', false => 'b' }: Box<Debug>; //~ ERROR mismatched types
+    let _ = box { |x| (x as u8) }: Box<dyn Fn(i32) -> _>; //~ ERROR mismatched types
+    let _ = box if true { false } else { true }: Box<dyn Debug>; //~ ERROR mismatched types
+    let _ = box match true { true => 'a', false => 'b' }: Box<dyn Debug>; //~ ERROR mismatched types
 
     let _ = &{ [1, 2, 3] }: &[i32]; //~ ERROR mismatched types
     let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32]; //~ ERROR mismatched types
     let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32];
     //~^ ERROR mismatched types
-    let _ = &{ |x| (x as u8) }: &Fn(i32) -> _; //~ ERROR mismatched types
-    let _ = &if true { false } else { true }: &Debug; //~ ERROR mismatched types
-    let _ = &match true { true => 'a', false => 'b' }: &Debug; //~ ERROR mismatched types
+    let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _; //~ ERROR mismatched types
+    let _ = &if true { false } else { true }: &dyn Debug; //~ ERROR mismatched types
+    let _ = &match true { true => 'a', false => 'b' }: &dyn Debug; //~ ERROR mismatched types
 
     let _ = Box::new([1, 2, 3]): Box<[i32]>; //~ ERROR mismatched types
-    let _ = Box::new(|x| (x as u8)): Box<Fn(i32) -> _>; //~ ERROR mismatched types
+    let _ = Box::new(|x| (x as u8)): Box<dyn Fn(i32) -> _>; //~ ERROR mismatched types
 
     let _ = vec![
         Box::new(|x| (x as u8)),
         box |x| (x as i16 as u8),
-    ]: Vec<Box<Fn(i32) -> _>>;
+    ]: Vec<Box<dyn Fn(i32) -> _>>;
 }
diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
index be362c9a78b..3b81610a06e 100644
--- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
+++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
@@ -28,7 +28,7 @@ LL |     let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:13:13
    |
-LL |     let _ = box { |x| (x as u8) }: Box<Fn(i32) -> _>;
+LL |     let _ = box { |x| (x as u8) }: Box<dyn Fn(i32) -> _>;
    |             ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
    |
    = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> u8>`
@@ -37,7 +37,7 @@ LL |     let _ = box { |x| (x as u8) }: Box<Fn(i32) -> _>;
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:14:13
    |
-LL |     let _ = box if true { false } else { true }: Box<Debug>;
+LL |     let _ = box if true { false } else { true }: Box<dyn Debug>;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool
    |
    = note: expected type `std::boxed::Box<dyn std::fmt::Debug>`
@@ -46,7 +46,7 @@ LL |     let _ = box if true { false } else { true }: Box<Debug>;
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:15:13
    |
-LL |     let _ = box match true { true => 'a', false => 'b' }: Box<Debug>;
+LL |     let _ = box match true { true => 'a', false => 'b' }: Box<dyn Debug>;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char
    |
    = note: expected type `std::boxed::Box<dyn std::fmt::Debug>`
@@ -82,7 +82,7 @@ LL |     let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32];
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:21:13
    |
-LL |     let _ = &{ |x| (x as u8) }: &Fn(i32) -> _;
+LL |     let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _;
    |             ^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
    |
    = note: expected type `&dyn std::ops::Fn(i32) -> u8`
@@ -91,7 +91,7 @@ LL |     let _ = &{ |x| (x as u8) }: &Fn(i32) -> _;
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:22:13
    |
-LL |     let _ = &if true { false } else { true }: &Debug;
+LL |     let _ = &if true { false } else { true }: &dyn Debug;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool
    |
    = note: expected type `&dyn std::fmt::Debug`
@@ -100,7 +100,7 @@ LL |     let _ = &if true { false } else { true }: &Debug;
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:23:13
    |
-LL |     let _ = &match true { true => 'a', false => 'b' }: &Debug;
+LL |     let _ = &match true { true => 'a', false => 'b' }: &dyn Debug;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char
    |
    = note: expected type `&dyn std::fmt::Debug`
@@ -118,7 +118,7 @@ LL |     let _ = Box::new([1, 2, 3]): Box<[i32]>;
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:26:13
    |
-LL |     let _ = Box::new(|x| (x as u8)): Box<Fn(i32) -> _>;
+LL |     let _ = Box::new(|x| (x as u8)): Box<dyn Fn(i32) -> _>;
    |             ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
    |
    = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> _>`
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr
index b48f6bbfb94..c38d7456a99 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr
@@ -1,7 +1,7 @@
 error[E0038]: the trait `NotObjectSafe` cannot be made into an object
   --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6
    |
-LL | impl NotObjectSafe for NotObjectSafe { }
+LL | impl NotObjectSafe for dyn NotObjectSafe { }
    |      ^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
    |
    = note: method `eq` references the `Self` type in its arguments or return type
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr
index b48f6bbfb94..c38d7456a99 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr
@@ -1,7 +1,7 @@
 error[E0038]: the trait `NotObjectSafe` cannot be made into an object
   --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6
    |
-LL | impl NotObjectSafe for NotObjectSafe { }
+LL | impl NotObjectSafe for dyn NotObjectSafe { }
    |      ^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
    |
    = note: method `eq` references the `Self` type in its arguments or return type
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
index 803e8fc6bca..b4c88e93783 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
@@ -8,7 +8,7 @@
 // If the trait is not object-safe, we give a more tailored message
 // because we're such schnuckels:
 trait NotObjectSafe { fn eq(&self, other: Self); }
-impl NotObjectSafe for NotObjectSafe { }
+impl NotObjectSafe for dyn NotObjectSafe { }
 //[old]~^ ERROR E0038
 //[re]~^^ ERROR E0038
 
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr
index 324747603f9..4819ce9260e 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr
@@ -1,20 +1,20 @@
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo`
   --> $DIR/coherence-impl-trait-for-trait.rs:13:1
    |
-LL | impl Foo for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
+LL | impl Foo for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
 
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar`
   --> $DIR/coherence-impl-trait-for-trait.rs:16:1
    |
-LL | impl Bar for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
+LL | impl Bar for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
 
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz`
   --> $DIR/coherence-impl-trait-for-trait.rs:19:1
    |
-LL | impl Baz for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
+LL | impl Baz for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr
index 324747603f9..4819ce9260e 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr
@@ -1,20 +1,20 @@
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo`
   --> $DIR/coherence-impl-trait-for-trait.rs:13:1
    |
-LL | impl Foo for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
+LL | impl Foo for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
 
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar`
   --> $DIR/coherence-impl-trait-for-trait.rs:16:1
    |
-LL | impl Bar for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
+LL | impl Bar for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
 
 error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz`
   --> $DIR/coherence-impl-trait-for-trait.rs:19:1
    |
-LL | impl Baz for Baz { }
-   | ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
+LL | impl Baz for dyn Baz { }
+   | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.rs b/src/test/ui/coherence/coherence-impl-trait-for-trait.rs
index dcaf564fdec..3ce3dca0660 100644
--- a/src/test/ui/coherence/coherence-impl-trait-for-trait.rs
+++ b/src/test/ui/coherence/coherence-impl-trait-for-trait.rs
@@ -10,18 +10,18 @@ trait Bar: Foo { }
 trait Baz: Bar { }
 
 // Supertraits of Baz are not legal:
-impl Foo for Baz { }
+impl Foo for dyn Baz { }
 //[old]~^ ERROR E0371
 //[re]~^^ ERROR E0371
-impl Bar for Baz { }
+impl Bar for dyn Baz { }
 //[old]~^ ERROR E0371
 //[re]~^^ ERROR E0371
-impl Baz for Baz { }
+impl Baz for dyn Baz { }
 //[old]~^ ERROR E0371
 //[re]~^^ ERROR E0371
 
 // But other random traits are:
 trait Other { }
-impl Other for Baz { } // OK, Other not a supertrait of Baz
+impl Other for dyn Baz { } // OK, Other not a supertrait of Baz
 
 fn main() { }
diff --git a/src/test/ui/confuse-field-and-method/issue-2392.rs b/src/test/ui/confuse-field-and-method/issue-2392.rs
index c242b6c2c20..8aef091fe31 100644
--- a/src/test/ui/confuse-field-and-method/issue-2392.rs
+++ b/src/test/ui/confuse-field-and-method/issue-2392.rs
@@ -14,7 +14,7 @@ struct Obj<F> where F: FnOnce() -> u32 {
 }
 
 struct BoxedObj {
-    boxed_closure: Box<FnOnce() -> u32>,
+    boxed_closure: Box<dyn FnOnce() -> u32>,
 }
 
 struct Wrapper<F> where F: FnMut() -> u32 {
@@ -25,8 +25,8 @@ fn func() -> u32 {
     0
 }
 
-fn check_expression() -> Obj<Box<FnOnce() -> u32>> {
-    Obj { closure: Box::new(|| 42_u32) as Box<FnOnce() -> u32>, not_closure: 42 }
+fn check_expression() -> Obj<Box<dyn FnOnce() -> u32>> {
+    Obj { closure: Box::new(|| 42_u32) as Box<dyn FnOnce() -> u32>, not_closure: 42 }
 }
 
 fn main() {
@@ -44,7 +44,7 @@ fn main() {
     let boxed_fn = BoxedObj { boxed_closure: Box::new(func) };
     boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found
 
-    let boxed_closure = BoxedObj { boxed_closure: Box::new(|| 42_u32) as Box<FnOnce() -> u32> };
+    let boxed_closure = BoxedObj { boxed_closure: Box::new(|| 42_u32) as Box<dyn FnOnce() -> u32> };
     boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found
 
     // test expression writing in the notes
diff --git a/src/test/ui/confuse-field-and-method/issue-32128.rs b/src/test/ui/confuse-field-and-method/issue-32128.rs
index 02c6838d419..5a024aa4b67 100644
--- a/src/test/ui/confuse-field-and-method/issue-32128.rs
+++ b/src/test/ui/confuse-field-and-method/issue-32128.rs
@@ -1,5 +1,5 @@
 struct Example {
-    example: Box<Fn(i32) -> i32>
+    example: Box<dyn Fn(i32) -> i32>
 }
 
 fn main() {
diff --git a/src/test/ui/consts/const-eval/const_transmute.rs b/src/test/ui/consts/const-eval/const_transmute.rs
index e4f7fb155ab..4726f9dde3a 100644
--- a/src/test/ui/consts/const-eval/const_transmute.rs
+++ b/src/test/ui/consts/const-eval/const_transmute.rs
@@ -41,7 +41,7 @@ struct VTable {
     bar: for<'a> fn(&'a Foo) -> u32,
 }
 
-const FOO: &Bar = &Foo { foo: 128, bar: false };
+const FOO: &dyn Bar = &Foo { foo: 128, bar: false };
 const G: Fat = unsafe { Transmute { t: FOO }.u };
 const F: Option<for<'a> fn(&'a mut Foo)> = G.1.drop;
 const H: for<'a> fn(&'a Foo) -> u32 = G.1.bar;
diff --git a/src/test/ui/consts/const-eval/issue-53401.rs b/src/test/ui/consts/const-eval/issue-53401.rs
index 89834aa94fc..e8ac5a90880 100644
--- a/src/test/ui/consts/const-eval/issue-53401.rs
+++ b/src/test/ui/consts/const-eval/issue-53401.rs
@@ -1,6 +1,6 @@
 // compile-pass
 
-pub const STATIC_TRAIT: &Test = &();
+pub const STATIC_TRAIT: &dyn Test = &();
 
 fn main() {}
 
diff --git a/src/test/ui/consts/const-eval/ub-upvars.rs b/src/test/ui/consts/const-eval/ub-upvars.rs
index 9b7bca6b72d..0a427cd8857 100644
--- a/src/test/ui/consts/const-eval/ub-upvars.rs
+++ b/src/test/ui/consts/const-eval/ub-upvars.rs
@@ -3,7 +3,7 @@
 
 use std::mem;
 
-const BAD_UPVAR: &FnOnce() = &{ //~ ERROR it is undefined behavior to use this value
+const BAD_UPVAR: &dyn FnOnce() = &{ //~ ERROR it is undefined behavior to use this value
     let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) };
     let another_var = 13;
     move || { let _ = bad_ref; let _ = another_var; }
diff --git a/src/test/ui/consts/const-eval/ub-upvars.stderr b/src/test/ui/consts/const-eval/ub-upvars.stderr
index 21d2847db1e..f8273ba902a 100644
--- a/src/test/ui/consts/const-eval/ub-upvars.stderr
+++ b/src/test/ui/consts/const-eval/ub-upvars.stderr
@@ -1,7 +1,7 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-upvars.rs:6:1
    |
-LL | / const BAD_UPVAR: &FnOnce() = &{
+LL | / const BAD_UPVAR: &dyn FnOnce() = &{
 LL | |     let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) };
 LL | |     let another_var = 13;
 LL | |     move || { let _ = bad_ref; let _ = another_var; }
diff --git a/src/test/ui/consts/const-eval/union-ub-fat-ptr.rs b/src/test/ui/consts/const-eval/union-ub-fat-ptr.rs
index 13489c50a12..d5405f3441f 100644
--- a/src/test/ui/consts/const-eval/union-ub-fat-ptr.rs
+++ b/src/test/ui/consts/const-eval/union-ub-fat-ptr.rs
@@ -59,7 +59,7 @@ union DynTransmute {
     repr: DynRepr,
     repr2: DynRepr2,
     bad: BadDynRepr,
-    rust: &'static Trait,
+    rust: &'static dyn Trait,
 }
 
 trait Trait {}
@@ -94,17 +94,17 @@ const C3: &[u8] = unsafe { SliceTransmute { bad: BadSliceRepr { ptr: &42, len: &
 //~^ ERROR it is undefined behavior to use this value
 
 // bad trait object
-const D: &Trait = unsafe { DynTransmute { repr: DynRepr { ptr: &92, vtable: &3 } }.rust};
+const D: &dyn Trait = unsafe { DynTransmute { repr: DynRepr { ptr: &92, vtable: &3 } }.rust};
 //~^ ERROR it is undefined behavior to use this value
 // bad trait object
-const E: &Trait = unsafe { DynTransmute { repr2: DynRepr2 { ptr: &92, vtable: &3 } }.rust};
+const E: &dyn Trait = unsafe { DynTransmute { repr2: DynRepr2 { ptr: &92, vtable: &3 } }.rust};
 //~^ ERROR it is undefined behavior to use this value
 // bad trait object
-const F: &Trait = unsafe { DynTransmute { bad: BadDynRepr { ptr: &92, vtable: 3 } }.rust};
+const F: &dyn Trait = unsafe { DynTransmute { bad: BadDynRepr { ptr: &92, vtable: 3 } }.rust};
 //~^ ERROR it is undefined behavior to use this value
 
 // bad data *inside* the trait object
-const G: &Trait = &unsafe { BoolTransmute { val: 3 }.bl };
+const G: &dyn Trait = &unsafe { BoolTransmute { val: 3 }.bl };
 //~^ ERROR it is undefined behavior to use this value
 
 // bad data *inside* the slice
diff --git a/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr b/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
index 761a5fc4445..5048a97d195 100644
--- a/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
+++ b/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
@@ -41,32 +41,32 @@ LL | const C3: &[u8] = unsafe { SliceTransmute { bad: BadSliceRepr { ptr: &42, l
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:97:1
    |
-LL | const D: &Trait = unsafe { DynTransmute { repr: DynRepr { ptr: &92, vtable: &3 } }.rust};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop fn in vtable
+LL | const D: &dyn Trait = unsafe { DynTransmute { repr: DynRepr { ptr: &92, vtable: &3 } }.rust};
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop fn in vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:100:1
    |
-LL | const E: &Trait = unsafe { DynTransmute { repr2: DynRepr2 { ptr: &92, vtable: &3 } }.rust};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop fn in vtable
+LL | const E: &dyn Trait = unsafe { DynTransmute { repr2: DynRepr2 { ptr: &92, vtable: &3 } }.rust};
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop fn in vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:103:1
    |
-LL | const F: &Trait = unsafe { DynTransmute { bad: BadDynRepr { ptr: &92, vtable: 3 } }.rust};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-pointer vtable in fat pointer
+LL | const F: &dyn Trait = unsafe { DynTransmute { bad: BadDynRepr { ptr: &92, vtable: 3 } }.rust};
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-pointer vtable in fat pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:107:1
    |
-LL | const G: &Trait = &unsafe { BoolTransmute { val: 3 }.bl };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 3 at .<deref>.<dyn-downcast>, but expected something less or equal to 1
+LL | const G: &dyn Trait = &unsafe { BoolTransmute { val: 3 }.bl };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 3 at .<deref>.<dyn-downcast>, but expected something less or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
diff --git a/src/test/ui/consts/const-unsized.rs b/src/test/ui/consts/const-unsized.rs
index e20ded68ceb..319b8ef97de 100644
--- a/src/test/ui/consts/const-unsized.rs
+++ b/src/test/ui/consts/const-unsized.rs
@@ -1,12 +1,12 @@
 use std::fmt::Debug;
 
-const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
+const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
 //~^ ERROR the size for values of type
 
 const CONST_FOO: str = *"foo";
 //~^ ERROR the size for values of type
 
-static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
+static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
 //~^ ERROR the size for values of type
 
 static STATIC_BAR: str = *"bar";
diff --git a/src/test/ui/consts/const-unsized.stderr b/src/test/ui/consts/const-unsized.stderr
index 0f996fcd943..beeea87bfb1 100644
--- a/src/test/ui/consts/const-unsized.stderr
+++ b/src/test/ui/consts/const-unsized.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
   --> $DIR/const-unsized.rs:3:16
    |
-LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
-   |                ^^^^^^^^^^ doesn't have a size known at compile-time
+LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
+   |                ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -19,8 +19,8 @@ LL | const CONST_FOO: str = *"foo";
 error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
   --> $DIR/const-unsized.rs:9:18
    |
-LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
-   |                  ^^^^^^^^^^ doesn't have a size known at compile-time
+LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
+   |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr
index 8d962384a12..7a10c469c51 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr
@@ -298,8 +298,8 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
   --> $DIR/min_const_fn.rs:144:41
    |
-LL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
    = help: add #![feature(const_fn)] to the crate attributes to enable
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.rs b/src/test/ui/consts/min_const_fn/min_const_fn.rs
index 783c79005ae..96b6057c8fd 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn.rs
+++ b/src/test/ui/consts/min_const_fn/min_const_fn.rs
@@ -141,7 +141,7 @@ const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
 
 const fn no_unsafe() { unsafe {} }
 
-const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }
+const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
 //~^ ERROR trait bounds other than `Sized`
 
 const fn no_fn_ptrs(_x: fn()) {}
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr
index 93b57bc24a8..e388b443d23 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr
@@ -302,8 +302,8 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
   --> $DIR/min_const_fn.rs:144:41
    |
-LL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
    = help: add #![feature(const_fn)] to the crate attributes to enable
diff --git a/src/test/ui/cross/cross-borrow-trait.rs b/src/test/ui/cross/cross-borrow-trait.rs
index d8d7537f24a..274cdad75ec 100644
--- a/src/test/ui/cross/cross-borrow-trait.rs
+++ b/src/test/ui/cross/cross-borrow-trait.rs
@@ -6,8 +6,8 @@ trait Trait { fn foo(&self) {} }
 impl Trait for Foo {}
 
 pub fn main() {
-    let x: Box<Trait> = Box::new(Foo);
-    let _y: &Trait = x; //~ ERROR E0308
-                        //~| expected type `&dyn Trait`
-                        //~| found type `std::boxed::Box<dyn Trait>`
+    let x: Box<dyn Trait> = Box::new(Foo);
+    let _y: &dyn Trait = x; //~ ERROR E0308
+                            //~| expected type `&dyn Trait`
+                            //~| found type `std::boxed::Box<dyn Trait>`
 }
diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr
index b35f59658c0..ada1c0204eb 100644
--- a/src/test/ui/cross/cross-borrow-trait.stderr
+++ b/src/test/ui/cross/cross-borrow-trait.stderr
@@ -1,11 +1,11 @@
 error[E0308]: mismatched types
-  --> $DIR/cross-borrow-trait.rs:10:22
+  --> $DIR/cross-borrow-trait.rs:10:26
    |
-LL |     let _y: &Trait = x;
-   |                      ^
-   |                      |
-   |                      expected &dyn Trait, found struct `std::boxed::Box`
-   |                      help: consider borrowing here: `&x`
+LL |     let _y: &dyn Trait = x;
+   |                          ^
+   |                          |
+   |                          expected &dyn Trait, found struct `std::boxed::Box`
+   |                          help: consider borrowing here: `&x`
    |
    = note: expected type `&dyn Trait`
               found type `std::boxed::Box<dyn Trait>`
diff --git a/src/test/ui/custom-test-frameworks-simple.rs b/src/test/ui/custom-test-frameworks-simple.rs
index a8aac6ec142..aee0040ef4d 100644
--- a/src/test/ui/custom-test-frameworks-simple.rs
+++ b/src/test/ui/custom-test-frameworks-simple.rs
@@ -5,7 +5,7 @@
 #![test_runner(crate::foo_runner)]
 
 #[cfg(test)]
-fn foo_runner(ts: &[&Fn(usize)->()]) {
+fn foo_runner(ts: &[&dyn Fn(usize)->()]) {
     for (i, t) in ts.iter().enumerate() {
         t(i);
     }
diff --git a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.rs b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.rs
index d658753eb24..6175b7df110 100644
--- a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.rs
+++ b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.rs
@@ -1,7 +1,7 @@
 // Test a cycle where a type parameter on a trait has a default that
 // again references the trait.
 
-trait Foo<X = Box<Foo>> {
+trait Foo<X = Box<dyn Foo>> {
     //~^ ERROR cycle detected
 }
 
diff --git a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
index aa45462a52e..e89d25742a0 100644
--- a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
+++ b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
@@ -1,15 +1,15 @@
 error[E0391]: cycle detected when processing `Foo::X`
-  --> $DIR/cycle-trait-default-type-trait.rs:4:19
+  --> $DIR/cycle-trait-default-type-trait.rs:4:23
    |
-LL | trait Foo<X = Box<Foo>> {
-   |                   ^^^
+LL | trait Foo<X = Box<dyn Foo>> {
+   |                       ^^^
    |
    = note: ...which again requires processing `Foo::X`, completing the cycle
 note: cycle used when collecting item types in top-level module
   --> $DIR/cycle-trait-default-type-trait.rs:4:1
    |
-LL | trait Foo<X = Box<Foo>> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Foo<X = Box<dyn Foo>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/destructure-trait-ref.rs b/src/test/ui/destructure-trait-ref.rs
index 66be493cb1f..71cf37ca849 100644
--- a/src/test/ui/destructure-trait-ref.rs
+++ b/src/test/ui/destructure-trait-ref.rs
@@ -18,27 +18,28 @@ fn main() {
     // if n > m, it's a type mismatch error.
 
     // n < m
-    let &x = &(&1isize as &T);
-    let &x = &&(&1isize as &T);
-    let &&x = &&(&1isize as &T);
+    let &x = &(&1isize as &dyn T);
+    let &x = &&(&1isize as &dyn T);
+    let &&x = &&(&1isize as &dyn T);
 
     // n == m
-    let &x = &1isize as &T;      //~ ERROR type `&dyn T` cannot be dereferenced
-    let &&x = &(&1isize as &T);  //~ ERROR type `&dyn T` cannot be dereferenced
-    let box x = box 1isize as Box<T>; //~ ERROR type `std::boxed::Box<dyn T>` cannot be dereferenced
+    let &x = &1isize as &dyn T;      //~ ERROR type `&dyn T` cannot be dereferenced
+    let &&x = &(&1isize as &dyn T);  //~ ERROR type `&dyn T` cannot be dereferenced
+    let box x = box 1isize as Box<dyn T>;
+    //~^ ERROR type `std::boxed::Box<dyn T>` cannot be dereferenced
 
     // n > m
-    let &&x = &1isize as &T;
+    let &&x = &1isize as &dyn T;
     //~^ ERROR mismatched types
     //~| expected type `dyn T`
     //~| found type `&_`
     //~| expected trait T, found reference
-    let &&&x = &(&1isize as &T);
+    let &&&x = &(&1isize as &dyn T);
     //~^ ERROR mismatched types
     //~| expected type `dyn T`
     //~| found type `&_`
     //~| expected trait T, found reference
-    let box box x = box 1isize as Box<T>;
+    let box box x = box 1isize as Box<dyn T>;
     //~^ ERROR mismatched types
     //~| expected type `dyn T`
     //~| found type `std::boxed::Box<_>`
diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr
index bc3013b78b3..d3ad21eb24f 100644
--- a/src/test/ui/destructure-trait-ref.stderr
+++ b/src/test/ui/destructure-trait-ref.stderr
@@ -1,25 +1,25 @@
 error[E0033]: type `&dyn T` cannot be dereferenced
   --> $DIR/destructure-trait-ref.rs:26:9
    |
-LL |     let &x = &1isize as &T;
+LL |     let &x = &1isize as &dyn T;
    |         ^^ type `&dyn T` cannot be dereferenced
 
 error[E0033]: type `&dyn T` cannot be dereferenced
   --> $DIR/destructure-trait-ref.rs:27:10
    |
-LL |     let &&x = &(&1isize as &T);
+LL |     let &&x = &(&1isize as &dyn T);
    |          ^^ type `&dyn T` cannot be dereferenced
 
 error[E0033]: type `std::boxed::Box<dyn T>` cannot be dereferenced
   --> $DIR/destructure-trait-ref.rs:28:9
    |
-LL |     let box x = box 1isize as Box<T>;
+LL |     let box x = box 1isize as Box<dyn T>;
    |         ^^^^^ type `std::boxed::Box<dyn T>` cannot be dereferenced
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:31:10
+  --> $DIR/destructure-trait-ref.rs:32:10
    |
-LL |     let &&x = &1isize as &T;
+LL |     let &&x = &1isize as &dyn T;
    |          ^^
    |          |
    |          expected trait T, found reference
@@ -29,9 +29,9 @@ LL |     let &&x = &1isize as &T;
               found type `&_`
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:36:11
+  --> $DIR/destructure-trait-ref.rs:37:11
    |
-LL |     let &&&x = &(&1isize as &T);
+LL |     let &&&x = &(&1isize as &dyn T);
    |           ^^
    |           |
    |           expected trait T, found reference
@@ -41,9 +41,9 @@ LL |     let &&&x = &(&1isize as &T);
               found type `&_`
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:41:13
+  --> $DIR/destructure-trait-ref.rs:42:13
    |
-LL |     let box box x = box 1isize as Box<T>;
+LL |     let box box x = box 1isize as Box<dyn T>;
    |             ^^^^^ expected trait T, found struct `std::boxed::Box`
    |
    = note: expected type `dyn T`
diff --git a/src/test/ui/did_you_mean/E0178.rs b/src/test/ui/did_you_mean/E0178.rs
index aad95dc2c20..095df640c38 100644
--- a/src/test/ui/did_you_mean/E0178.rs
+++ b/src/test/ui/did_you_mean/E0178.rs
@@ -1,3 +1,5 @@
+#![allow(bare_trait_objects)]
+
 trait Foo {}
 
 struct Bar<'a> {
diff --git a/src/test/ui/did_you_mean/E0178.stderr b/src/test/ui/did_you_mean/E0178.stderr
index 44e6ddd0eac..58ac6e90823 100644
--- a/src/test/ui/did_you_mean/E0178.stderr
+++ b/src/test/ui/did_you_mean/E0178.stderr
@@ -1,23 +1,23 @@
 error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo`
-  --> $DIR/E0178.rs:4:8
+  --> $DIR/E0178.rs:6:8
    |
 LL |     w: &'a Foo + Copy,
    |        ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Copy)`
 
 error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo`
-  --> $DIR/E0178.rs:5:8
+  --> $DIR/E0178.rs:7:8
    |
 LL |     x: &'a Foo + 'a,
    |        ^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + 'a)`
 
 error[E0178]: expected a path on the left-hand side of `+`, not `&'a mut Foo`
-  --> $DIR/E0178.rs:6:8
+  --> $DIR/E0178.rs:8:8
    |
 LL |     y: &'a mut Foo + 'a,
    |        ^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'a mut (Foo + 'a)`
 
 error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> Foo`
-  --> $DIR/E0178.rs:7:8
+  --> $DIR/E0178.rs:9:8
    |
 LL |     z: fn() -> Foo + 'a,
    |        ^^^^^^^^^^^^^^^^ perhaps you forgot parentheses?
diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.rs b/src/test/ui/did_you_mean/bad-assoc-ty.rs
index 85e36f887be..fccfb7911ce 100644
--- a/src/test/ui/did_you_mean/bad-assoc-ty.rs
+++ b/src/test/ui/did_you_mean/bad-assoc-ty.rs
@@ -24,7 +24,7 @@ type F = &'static (u8)::AssocTy;
 
 // Qualified paths cannot appear in bounds, so the recovery
 // should apply to the whole sum and not `(Send)`.
-type G = 'static + (Send)::AssocTy;
+type G = dyn 'static + (Send)::AssocTy;
 //~^ ERROR missing angle brackets in associated item path
 //~| ERROR ambiguous associated type
 
diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr
index 8c694f9d42b..0ae64edcc05 100644
--- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr
@@ -37,8 +37,8 @@ LL | type F = &'static (u8)::AssocTy;
 error: missing angle brackets in associated item path
   --> $DIR/bad-assoc-ty.rs:27:10
    |
-LL | type G = 'static + (Send)::AssocTy;
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<'static + (Send)>::AssocTy`
+LL | type G = dyn 'static + (Send)::AssocTy;
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<dyn 'static + (Send)>::AssocTy`
 
 error: missing angle brackets in associated item path
   --> $DIR/bad-assoc-ty.rs:44:10
@@ -94,8 +94,8 @@ LL | type F = &'static (u8)::AssocTy;
 error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:27:10
    |
-LL | type G = 'static + (Send)::AssocTy;
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn std::marker::Send + 'static) as Trait>::AssocTy`
+LL | type G = dyn 'static + (Send)::AssocTy;
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn std::marker::Send + 'static) as Trait>::AssocTy`
 
 error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:33:10
diff --git a/src/test/ui/did_you_mean/issue-40006.rs b/src/test/ui/did_you_mean/issue-40006.rs
index 75ea02b6a9d..a1184f757e2 100644
--- a/src/test/ui/did_you_mean/issue-40006.rs
+++ b/src/test/ui/did_you_mean/issue-40006.rs
@@ -1,4 +1,4 @@
-impl X { //~ ERROR cannot be made into an object
+impl dyn X { //~ ERROR cannot be made into an object
 //~^ ERROR missing
     Y
 }
diff --git a/src/test/ui/did_you_mean/issue-40006.stderr b/src/test/ui/did_you_mean/issue-40006.stderr
index f6f7fe5fa38..87e48cd1e1c 100644
--- a/src/test/ui/did_you_mean/issue-40006.stderr
+++ b/src/test/ui/did_you_mean/issue-40006.stderr
@@ -1,8 +1,8 @@
 error: missing `fn`, `type`, or `const` for impl-item declaration
-  --> $DIR/issue-40006.rs:1:9
+  --> $DIR/issue-40006.rs:1:13
    |
-LL |   impl X {
-   |  _________^
+LL |   impl dyn X {
+   |  _____________^
 LL | |
 LL | |     Y
    | |____^ missing `fn`, `type`, or `const`
@@ -59,8 +59,8 @@ LL |     pub hello_method(&self) {
 error[E0038]: the trait `X` cannot be made into an object
   --> $DIR/issue-40006.rs:1:6
    |
-LL | impl X {
-   |      ^ the trait `X` cannot be made into an object
+LL | impl dyn X {
+   |      ^^^^^ the trait `X` cannot be made into an object
    |
    = note: method `xxx` has no receiver
 
diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
index a05227416cf..c9a097d3610 100644
--- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
+++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
@@ -1,3 +1,5 @@
+#![allow(bare_trait_objects)]
+
 fn main() {
     let _: &Copy + 'static; //~ ERROR expected a path
     //~^ ERROR cannot be made into an object
diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
index de1efcd7e0f..8c6c33b1186 100644
--- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
+++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
@@ -1,17 +1,17 @@
 error[E0178]: expected a path on the left-hand side of `+`, not `&Copy`
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:2:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12
    |
 LL |     let _: &Copy + 'static;
    |            ^^^^^^^^^^^^^^^ help: try adding parentheses: `&(Copy + 'static)`
 
 error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy`
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:6:12
    |
 LL |     let _: &'static Copy + 'static;
    |            ^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'static (Copy + 'static)`
 
 error[E0038]: the trait `std::marker::Copy` cannot be made into an object
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:2:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12
    |
 LL |     let _: &Copy + 'static;
    |            ^^^^^ the trait `std::marker::Copy` cannot be made into an object
diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.rs b/src/test/ui/dropck/dropck_trait_cycle_checked.rs
index 128bbb04ee0..bea77dc9f5c 100644
--- a/src/test/ui/dropck/dropck_trait_cycle_checked.rs
+++ b/src/test/ui/dropck/dropck_trait_cycle_checked.rs
@@ -63,14 +63,14 @@ impl<T:HasId> Drop for CheckId<T> {
 }
 
 trait Obj<'a> : HasId {
-    fn set0(&self, b: &'a Box<Obj<'a>>);
-    fn set1(&self, b: &'a Box<Obj<'a>>);
+    fn set0(&self, b: &'a Box<dyn Obj<'a>>);
+    fn set1(&self, b: &'a Box<dyn Obj<'a>>);
 }
 
 struct O<'a> {
     id: Id,
-    obj0: CheckId<Cell<Option<&'a Box<Obj<'a>>>>>,
-    obj1: CheckId<Cell<Option<&'a Box<Obj<'a>>>>>,
+    obj0: CheckId<Cell<Option<&'a Box<dyn Obj<'a>>>>>,
+    obj1: CheckId<Cell<Option<&'a Box<dyn Obj<'a>>>>>,
 }
 
 impl<'a> HasId for O<'a> {
@@ -87,7 +87,7 @@ impl<'a> O<'a> {
     }
 }
 
-impl<'a> HasId for Cell<Option<&'a Box<Obj<'a>>>> {
+impl<'a> HasId for Cell<Option<&'a Box<dyn Obj<'a>>>> {
     fn count(&self) -> usize {
         match self.get() {
             None => 1,
@@ -97,17 +97,17 @@ impl<'a> HasId for Cell<Option<&'a Box<Obj<'a>>>> {
 }
 
 impl<'a> Obj<'a> for O<'a> {
-    fn set0(&self, b: &'a Box<Obj<'a>>) {
+    fn set0(&self, b: &'a Box<dyn Obj<'a>>) {
         self.obj0.v.set(Some(b))
     }
-    fn set1(&self, b: &'a Box<Obj<'a>>) {
+    fn set1(&self, b: &'a Box<dyn Obj<'a>>) {
         self.obj1.v.set(Some(b))
     }
 }
 
 
 fn f() {
-    let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
+    let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
     o1.set0(&o2); //~ ERROR `o2` does not live long enough
     o1.set1(&o3); //~ ERROR `o3` does not live long enough
     o2.set0(&o2); //~ ERROR `o2` does not live long enough
diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr
index 8c669b597c3..1e779208e58 100644
--- a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr
+++ b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr
@@ -1,8 +1,8 @@
 error[E0597]: `o2` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:111:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                                   -------- cast requires that `o2` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                               -------- cast requires that `o2` is borrowed for `'static`
 LL |     o1.set0(&o2);
    |             ^^^ borrowed value does not live long enough
 ...
@@ -12,8 +12,8 @@ LL | }
 error[E0597]: `o3` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:112:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                                             -------- cast requires that `o3` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                                         -------- cast requires that `o3` is borrowed for `'static`
 LL |     o1.set0(&o2);
 LL |     o1.set1(&o3);
    |             ^^^ borrowed value does not live long enough
@@ -24,8 +24,8 @@ LL | }
 error[E0597]: `o2` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:113:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                                   -------- cast requires that `o2` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                               -------- cast requires that `o2` is borrowed for `'static`
 ...
 LL |     o2.set0(&o2);
    |             ^^^ borrowed value does not live long enough
@@ -36,8 +36,8 @@ LL | }
 error[E0597]: `o3` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:114:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                                             -------- cast requires that `o3` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                                         -------- cast requires that `o3` is borrowed for `'static`
 ...
 LL |     o2.set1(&o3);
    |             ^^^ borrowed value does not live long enough
@@ -48,8 +48,8 @@ LL | }
 error[E0597]: `o1` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:115:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                         -------- cast requires that `o1` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                     -------- cast requires that `o1` is borrowed for `'static`
 ...
 LL |     o3.set0(&o1);
    |             ^^^ borrowed value does not live long enough
@@ -60,8 +60,8 @@ LL | }
 error[E0597]: `o2` does not live long enough
   --> $DIR/dropck_trait_cycle_checked.rs:116:13
    |
-LL |     let (o1, o2, o3): (Box<Obj>, Box<Obj>, Box<Obj>) = (O::new(), O::new(), O::new());
-   |                                                                   -------- cast requires that `o2` is borrowed for `'static`
+LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
+   |                                                                               -------- cast requires that `o2` is borrowed for `'static`
 ...
 LL |     o3.set1(&o2);
    |             ^^^ borrowed value does not live long enough
diff --git a/src/test/ui/dst/dst-bad-assign-2.rs b/src/test/ui/dst/dst-bad-assign-2.rs
index b4f72d034f5..7ba31bf2e51 100644
--- a/src/test/ui/dst/dst-bad-assign-2.rs
+++ b/src/test/ui/dst/dst-bad-assign-2.rs
@@ -30,8 +30,8 @@ impl ToBar for Bar1 {
 
 pub fn main() {
     // Assignment.
-    let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
-    let z: Box<ToBar> = Box::new(Bar1 {f: 36});
+    let f5: &mut Fat<dyn ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
+    let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36});
     f5.ptr = *z;
     //~^ ERROR the size for values of type
 
diff --git a/src/test/ui/dst/dst-bad-assign-3.rs b/src/test/ui/dst/dst-bad-assign-3.rs
index 5124abc7d82..691909a2317 100644
--- a/src/test/ui/dst/dst-bad-assign-3.rs
+++ b/src/test/ui/dst/dst-bad-assign-3.rs
@@ -28,8 +28,8 @@ impl ToBar for Bar1 {
 
 pub fn main() {
     // Assignment.
-    let f5: &mut Fat<ToBar> = &mut (5, "some str", Bar1 {f :42});
-    let z: Box<ToBar> = Box::new(Bar1 {f: 36});
+    let f5: &mut Fat<dyn ToBar> = &mut (5, "some str", Bar1 {f :42});
+    let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36});
     f5.2 = Bar1 {f: 36};
     //~^ ERROR mismatched types
     //~| expected type `dyn ToBar`
diff --git a/src/test/ui/dst/dst-bad-assign.rs b/src/test/ui/dst/dst-bad-assign.rs
index 003c80b4dc4..4f2648653f0 100644
--- a/src/test/ui/dst/dst-bad-assign.rs
+++ b/src/test/ui/dst/dst-bad-assign.rs
@@ -30,8 +30,8 @@ impl ToBar for Bar1 {
 
 pub fn main() {
     // Assignment.
-    let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
-    let z: Box<ToBar> = Box::new(Bar1 {f: 36});
+    let f5: &mut Fat<dyn ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
+    let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36});
     f5.ptr = Bar1 {f: 36};
     //~^ ERROR mismatched types
     //~| expected type `dyn ToBar`
diff --git a/src/test/ui/dst/dst-bad-coerce1.rs b/src/test/ui/dst/dst-bad-coerce1.rs
index 8ca34234c03..7ef237e39e3 100644
--- a/src/test/ui/dst/dst-bad-coerce1.rs
+++ b/src/test/ui/dst/dst-bad-coerce1.rs
@@ -19,7 +19,7 @@ pub fn main() {
     // With a trait.
     let f1 = Fat { ptr: Foo };
     let f2: &Fat<Foo> = &f1;
-    let f3: &Fat<Bar> = f2;
+    let f3: &Fat<dyn Bar> = f2;
     //~^ ERROR `Foo: Bar` is not satisfied
 
     // Tuple with a vec of isize.
@@ -31,6 +31,6 @@ pub fn main() {
     // Tuple with a trait.
     let f1 = (Foo,);
     let f2: &(Foo,) = &f1;
-    let f3: &(Bar,) = f2;
+    let f3: &(dyn Bar,) = f2;
     //~^ ERROR `Foo: Bar` is not satisfied
 }
diff --git a/src/test/ui/dst/dst-bad-coerce1.stderr b/src/test/ui/dst/dst-bad-coerce1.stderr
index 3776ce71c61..a48f37b20be 100644
--- a/src/test/ui/dst/dst-bad-coerce1.stderr
+++ b/src/test/ui/dst/dst-bad-coerce1.stderr
@@ -8,10 +8,10 @@ LL |     let f3: &Fat<[usize]> = f2;
               found type `&Fat<[isize; 3]>`
 
 error[E0277]: the trait bound `Foo: Bar` is not satisfied
-  --> $DIR/dst-bad-coerce1.rs:22:25
+  --> $DIR/dst-bad-coerce1.rs:22:29
    |
-LL |     let f3: &Fat<Bar> = f2;
-   |                         ^^ the trait `Bar` is not implemented for `Foo`
+LL |     let f3: &Fat<dyn Bar> = f2;
+   |                             ^^ the trait `Bar` is not implemented for `Foo`
    |
    = note: required for the cast to the object type `dyn Bar`
 
@@ -25,10 +25,10 @@ LL |     let f3: &([usize],) = f2;
               found type `&([isize; 3],)`
 
 error[E0277]: the trait bound `Foo: Bar` is not satisfied
-  --> $DIR/dst-bad-coerce1.rs:34:23
+  --> $DIR/dst-bad-coerce1.rs:34:27
    |
-LL |     let f3: &(Bar,) = f2;
-   |                       ^^ the trait `Bar` is not implemented for `Foo`
+LL |     let f3: &(dyn Bar,) = f2;
+   |                           ^^ the trait `Bar` is not implemented for `Foo`
    |
    = note: required for the cast to the object type `dyn Bar`
 
diff --git a/src/test/ui/dst/dst-bad-coerce2.rs b/src/test/ui/dst/dst-bad-coerce2.rs
index 2bc7ecced0a..e7ce20b8958 100644
--- a/src/test/ui/dst/dst-bad-coerce2.rs
+++ b/src/test/ui/dst/dst-bad-coerce2.rs
@@ -17,7 +17,7 @@ pub fn main() {
     // With a trait.
     let f1 = Fat { ptr: Foo };
     let f2: &Fat<Foo> = &f1;
-    let f3: &mut Fat<Bar> = f2; //~ ERROR mismatched types
+    let f3: &mut Fat<dyn Bar> = f2; //~ ERROR mismatched types
 
     // Tuple with a vec of ints.
     let f1 = ([1, 2, 3],);
@@ -27,5 +27,5 @@ pub fn main() {
     // Tuple with a trait.
     let f1 = (Foo,);
     let f2: &(Foo,) = &f1;
-    let f3: &mut (Bar,) = f2; //~ ERROR mismatched types
+    let f3: &mut (dyn Bar,) = f2; //~ ERROR mismatched types
 }
diff --git a/src/test/ui/dst/dst-bad-coerce2.stderr b/src/test/ui/dst/dst-bad-coerce2.stderr
index cae4ec51c37..d1da9b6ca07 100644
--- a/src/test/ui/dst/dst-bad-coerce2.stderr
+++ b/src/test/ui/dst/dst-bad-coerce2.stderr
@@ -8,10 +8,10 @@ LL |     let f3: &mut Fat<[isize]> = f2;
               found type `&Fat<[isize; 3]>`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coerce2.rs:20:29
+  --> $DIR/dst-bad-coerce2.rs:20:33
    |
-LL |     let f3: &mut Fat<Bar> = f2;
-   |                             ^^ types differ in mutability
+LL |     let f3: &mut Fat<dyn Bar> = f2;
+   |                                 ^^ types differ in mutability
    |
    = note: expected type `&mut Fat<dyn Bar>`
               found type `&Fat<Foo>`
@@ -26,10 +26,10 @@ LL |     let f3: &mut ([isize],) = f2;
               found type `&([isize; 3],)`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coerce2.rs:30:27
+  --> $DIR/dst-bad-coerce2.rs:30:31
    |
-LL |     let f3: &mut (Bar,) = f2;
-   |                           ^^ types differ in mutability
+LL |     let f3: &mut (dyn Bar,) = f2;
+   |                               ^^ types differ in mutability
    |
    = note: expected type `&mut (dyn Bar,)`
               found type `&(Foo,)`
diff --git a/src/test/ui/dst/dst-bad-coerce3.rs b/src/test/ui/dst/dst-bad-coerce3.rs
index 58c988520eb..fd5ee3b57bb 100644
--- a/src/test/ui/dst/dst-bad-coerce3.rs
+++ b/src/test/ui/dst/dst-bad-coerce3.rs
@@ -19,7 +19,7 @@ fn baz<'a>() {
     // With a trait.
     let f1 = Fat { ptr: Foo };
     let f2: &Fat<Foo> = &f1; //~ ERROR `f1` does not live long enough
-    let f3: &'a Fat<Bar> = f2;
+    let f3: &'a Fat<dyn Bar> = f2;
 
     // Tuple with a vec of ints.
     let f1 = ([1, 2, 3],);
@@ -29,7 +29,7 @@ fn baz<'a>() {
     // Tuple with a trait.
     let f1 = (Foo,);
     let f2: &(Foo,) = &f1; //~ ERROR `f1` does not live long enough
-    let f3: &'a (Bar,) = f2;
+    let f3: &'a (dyn Bar,) = f2;
 }
 
 pub fn main() {
diff --git a/src/test/ui/dst/dst-bad-coerce3.stderr b/src/test/ui/dst/dst-bad-coerce3.stderr
index 289d451f02a..957e98bbeee 100644
--- a/src/test/ui/dst/dst-bad-coerce3.stderr
+++ b/src/test/ui/dst/dst-bad-coerce3.stderr
@@ -20,8 +20,8 @@ LL | fn baz<'a>() {
 ...
 LL |     let f2: &Fat<Foo> = &f1;
    |                         ^^^ borrowed value does not live long enough
-LL |     let f3: &'a Fat<Bar> = f2;
-   |             ------------ type annotation requires that `f1` is borrowed for `'a`
+LL |     let f3: &'a Fat<dyn Bar> = f2;
+   |             ---------------- type annotation requires that `f1` is borrowed for `'a`
 ...
 LL | }
    | - `f1` dropped here while still borrowed
@@ -48,8 +48,8 @@ LL | fn baz<'a>() {
 ...
 LL |     let f2: &(Foo,) = &f1;
    |                       ^^^ borrowed value does not live long enough
-LL |     let f3: &'a (Bar,) = f2;
-   |             ---------- type annotation requires that `f1` is borrowed for `'a`
+LL |     let f3: &'a (dyn Bar,) = f2;
+   |             -------------- type annotation requires that `f1` is borrowed for `'a`
 LL | }
    | - `f1` dropped here while still borrowed
 
diff --git a/src/test/ui/dst/dst-bad-coercions.rs b/src/test/ui/dst/dst-bad-coercions.rs
index 9aa697225d5..bffef378c92 100644
--- a/src/test/ui/dst/dst-bad-coercions.rs
+++ b/src/test/ui/dst/dst-bad-coercions.rs
@@ -12,15 +12,15 @@ pub fn main() {
     // Test that we cannot convert from *-ptr to &S and &T
     let x: *const S = &S;
     let y: &S = x; //~ ERROR mismatched types
-    let y: &T = x; //~ ERROR mismatched types
+    let y: &dyn T = x; //~ ERROR mismatched types
 
     // Test that we cannot convert from *-ptr to &S and &T (mut version)
     let x: *mut S = &mut S;
     let y: &S = x; //~ ERROR mismatched types
-    let y: &T = x; //~ ERROR mismatched types
+    let y: &dyn T = x; //~ ERROR mismatched types
 
     // Test that we cannot convert an immutable ptr to a mutable one using *-ptrs
-    let x: &mut T = &S; //~ ERROR mismatched types
-    let x: *mut T = &S; //~ ERROR mismatched types
+    let x: &mut dyn T = &S; //~ ERROR mismatched types
+    let x: *mut dyn T = &S; //~ ERROR mismatched types
     let x: *mut S = &S; //~ ERROR mismatched types
 }
diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr
index 27016829a07..e4bc6ee0010 100644
--- a/src/test/ui/dst/dst-bad-coercions.stderr
+++ b/src/test/ui/dst/dst-bad-coercions.stderr
@@ -8,13 +8,13 @@ LL |     let y: &S = x;
               found type `*const S`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coercions.rs:15:17
+  --> $DIR/dst-bad-coercions.rs:15:21
    |
-LL |     let y: &T = x;
-   |                 ^
-   |                 |
-   |                 expected &dyn T, found *-ptr
-   |                 help: consider borrowing here: `&x`
+LL |     let y: &dyn T = x;
+   |                     ^
+   |                     |
+   |                     expected &dyn T, found *-ptr
+   |                     help: consider borrowing here: `&x`
    |
    = note: expected type `&dyn T`
               found type `*const S`
@@ -29,31 +29,31 @@ LL |     let y: &S = x;
               found type `*mut S`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coercions.rs:20:17
+  --> $DIR/dst-bad-coercions.rs:20:21
    |
-LL |     let y: &T = x;
-   |                 ^
-   |                 |
-   |                 expected &dyn T, found *-ptr
-   |                 help: consider borrowing here: `&x`
+LL |     let y: &dyn T = x;
+   |                     ^
+   |                     |
+   |                     expected &dyn T, found *-ptr
+   |                     help: consider borrowing here: `&x`
    |
    = note: expected type `&dyn T`
               found type `*mut S`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coercions.rs:23:21
+  --> $DIR/dst-bad-coercions.rs:23:25
    |
-LL |     let x: &mut T = &S;
-   |                     ^^ types differ in mutability
+LL |     let x: &mut dyn T = &S;
+   |                         ^^ types differ in mutability
    |
    = note: expected type `&mut dyn T`
               found type `&S`
 
 error[E0308]: mismatched types
-  --> $DIR/dst-bad-coercions.rs:24:21
+  --> $DIR/dst-bad-coercions.rs:24:25
    |
-LL |     let x: *mut T = &S;
-   |                     ^^ types differ in mutability
+LL |     let x: *mut dyn T = &S;
+   |                         ^^ types differ in mutability
    |
    = note: expected type `*mut dyn T`
               found type `&S`
diff --git a/src/test/ui/dst/dst-index.rs b/src/test/ui/dst/dst-index.rs
index 71ff067bbd9..fced3144eb8 100644
--- a/src/test/ui/dst/dst-index.rs
+++ b/src/test/ui/dst/dst-index.rs
@@ -19,9 +19,9 @@ impl Index<usize> for S {
 struct T;
 
 impl Index<usize> for T {
-    type Output = Debug + 'static;
+    type Output = dyn Debug + 'static;
 
-    fn index<'a>(&'a self, idx: usize) -> &'a (Debug + 'static) {
+    fn index<'a>(&'a self, idx: usize) -> &'a (dyn Debug + 'static) {
         static x: usize = 42;
         &x
     }
diff --git a/src/test/ui/dst/dst-object-from-unsized-type.rs b/src/test/ui/dst/dst-object-from-unsized-type.rs
index f4ee1783a2e..3cd5b1ed6f4 100644
--- a/src/test/ui/dst/dst-object-from-unsized-type.rs
+++ b/src/test/ui/dst/dst-object-from-unsized-type.rs
@@ -5,22 +5,22 @@ impl Foo for str {}
 impl Foo for [u8] {}
 
 fn test1<T: ?Sized + Foo>(t: &T) {
-    let u: &Foo = t;
+    let u: &dyn Foo = t;
     //~^ ERROR the size for values of type
 }
 
 fn test2<T: ?Sized + Foo>(t: &T) {
-    let v: &Foo = t as &Foo;
+    let v: &dyn Foo = t as &dyn Foo;
     //~^ ERROR the size for values of type
 }
 
 fn test3() {
-    let _: &[&Foo] = &["hi"];
+    let _: &[&dyn Foo] = &["hi"];
     //~^ ERROR the size for values of type
 }
 
 fn test4(x: &[u8]) {
-    let _: &Foo = x as &Foo;
+    let _: &dyn Foo = x as &dyn Foo;
     //~^ ERROR the size for values of type
 }
 
diff --git a/src/test/ui/dst/dst-object-from-unsized-type.stderr b/src/test/ui/dst/dst-object-from-unsized-type.stderr
index 4851ca10828..55ac625fc98 100644
--- a/src/test/ui/dst/dst-object-from-unsized-type.stderr
+++ b/src/test/ui/dst/dst-object-from-unsized-type.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `T` cannot be known at compilation time
-  --> $DIR/dst-object-from-unsized-type.rs:8:19
+  --> $DIR/dst-object-from-unsized-type.rs:8:23
    |
-LL |     let u: &Foo = t;
-   |                   ^ doesn't have a size known at compile-time
+LL |     let u: &dyn Foo = t;
+   |                       ^ 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -10,10 +10,10 @@ LL |     let u: &Foo = t;
    = note: required for the cast to the object type `dyn Foo`
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
-  --> $DIR/dst-object-from-unsized-type.rs:13:19
+  --> $DIR/dst-object-from-unsized-type.rs:13:23
    |
-LL |     let v: &Foo = t as &Foo;
-   |                   ^ doesn't have a size known at compile-time
+LL |     let v: &dyn Foo = t as &dyn Foo;
+   |                       ^ 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -21,20 +21,20 @@ LL |     let v: &Foo = t as &Foo;
    = note: required for the cast to the object type `dyn Foo`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/dst-object-from-unsized-type.rs:18:24
+  --> $DIR/dst-object-from-unsized-type.rs:18:28
    |
-LL |     let _: &[&Foo] = &["hi"];
-   |                        ^^^^ doesn't have a size known at compile-time
+LL |     let _: &[&dyn Foo] = &["hi"];
+   |                            ^^^^ 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = note: required for the cast to the object type `dyn Foo`
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/dst-object-from-unsized-type.rs:23:19
+  --> $DIR/dst-object-from-unsized-type.rs:23:23
    |
-LL |     let _: &Foo = x as &Foo;
-   |                   ^ doesn't have a size known at compile-time
+LL |     let _: &dyn Foo = x as &dyn Foo;
+   |                       ^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `[u8]`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/elide-errors-on-mismatched-tuple.rs b/src/test/ui/elide-errors-on-mismatched-tuple.rs
index e68358fd978..7d87b0a7756 100644
--- a/src/test/ui/elide-errors-on-mismatched-tuple.rs
+++ b/src/test/ui/elide-errors-on-mismatched-tuple.rs
@@ -13,6 +13,6 @@ impl A {
 fn main() {
     let (a, b, c) = (A::new(), A::new()); // This tuple is 2 elements, should be three
     //~^ ERROR mismatched types
-    let ts: Vec<&T> = vec![&a, &b, &c];
+    let ts: Vec<&dyn T> = vec![&a, &b, &c];
     // There is no E0277 error above, as `a`, `b` and `c` are `TyErr`
 }
diff --git a/src/test/ui/error-codes/E0033-teach.rs b/src/test/ui/error-codes/E0033-teach.rs
index 0f0b8d864dc..6a27b07fa8b 100644
--- a/src/test/ui/error-codes/E0033-teach.rs
+++ b/src/test/ui/error-codes/E0033-teach.rs
@@ -5,7 +5,7 @@ trait SomeTrait {
 }
 
 fn main() {
-    let trait_obj: &SomeTrait = SomeTrait;
+    let trait_obj: &dyn SomeTrait = SomeTrait;
     //~^ ERROR expected value, found trait `SomeTrait`
     //~| ERROR E0038
     //~| method `foo` has no receiver
diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr
index 1b78820cae0..fb630de7fc1 100644
--- a/src/test/ui/error-codes/E0033-teach.stderr
+++ b/src/test/ui/error-codes/E0033-teach.stderr
@@ -1,14 +1,14 @@
 error[E0423]: expected value, found trait `SomeTrait`
-  --> $DIR/E0033-teach.rs:8:33
+  --> $DIR/E0033-teach.rs:8:37
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                                 ^^^^^^^^^ not a value
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                                     ^^^^^^^^^ not a value
 
 error[E0038]: the trait `SomeTrait` cannot be made into an object
   --> $DIR/E0033-teach.rs:8:20
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/error-codes/E0033.rs b/src/test/ui/error-codes/E0033.rs
index 5a4f3cbce60..582600e110b 100644
--- a/src/test/ui/error-codes/E0033.rs
+++ b/src/test/ui/error-codes/E0033.rs
@@ -3,7 +3,7 @@ trait SomeTrait {
 }
 
 fn main() {
-    let trait_obj: &SomeTrait = SomeTrait;
+    let trait_obj: &dyn SomeTrait = SomeTrait;
     //~^ ERROR expected value, found trait `SomeTrait`
     //~| ERROR E0038
     //~| method `foo` has no receiver
diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr
index 976b0e0286f..fe9f45d86a6 100644
--- a/src/test/ui/error-codes/E0033.stderr
+++ b/src/test/ui/error-codes/E0033.stderr
@@ -1,14 +1,14 @@
 error[E0423]: expected value, found trait `SomeTrait`
-  --> $DIR/E0033.rs:6:33
+  --> $DIR/E0033.rs:6:37
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                                 ^^^^^^^^^ not a value
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                                     ^^^^^^^^^ not a value
 
 error[E0038]: the trait `SomeTrait` cannot be made into an object
   --> $DIR/E0033.rs:6:20
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/error-codes/E0038.rs b/src/test/ui/error-codes/E0038.rs
index b2226803da7..9757e2ab10c 100644
--- a/src/test/ui/error-codes/E0038.rs
+++ b/src/test/ui/error-codes/E0038.rs
@@ -2,7 +2,7 @@ trait Trait {
     fn foo(&self) -> Self;
 }
 
-fn call_foo(x: Box<Trait>) {
+fn call_foo(x: Box<dyn Trait>) {
     //~^ ERROR E0038
     let y = x.foo();
 }
diff --git a/src/test/ui/error-codes/E0038.stderr b/src/test/ui/error-codes/E0038.stderr
index 74b77338c85..e3d7593e42a 100644
--- a/src/test/ui/error-codes/E0038.stderr
+++ b/src/test/ui/error-codes/E0038.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/E0038.rs:5:1
    |
-LL | fn call_foo(x: Box<Trait>) {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object
+LL | fn call_foo(x: Box<dyn Trait>) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object
    |
    = note: method `foo` references the `Self` type in its arguments or return type
 
diff --git a/src/test/ui/error-codes/E0120.rs b/src/test/ui/error-codes/E0120.rs
index 049707415e5..287a4088183 100644
--- a/src/test/ui/error-codes/E0120.rs
+++ b/src/test/ui/error-codes/E0120.rs
@@ -1,6 +1,6 @@
 trait MyTrait { fn foo() {} }
 
-impl Drop for MyTrait {
+impl Drop for dyn MyTrait {
               //~^ ERROR E0120
     fn drop(&mut self) {}
 }
diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr
index 9b6603dbaca..68ca7d800d5 100644
--- a/src/test/ui/error-codes/E0120.stderr
+++ b/src/test/ui/error-codes/E0120.stderr
@@ -1,8 +1,8 @@
 error[E0120]: the Drop trait may only be implemented on structures
   --> $DIR/E0120.rs:3:15
    |
-LL | impl Drop for MyTrait {
-   |               ^^^^^^^ implementing Drop requires a struct
+LL | impl Drop for dyn MyTrait {
+   |               ^^^^^^^^^^^ implementing Drop requires a struct
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0191.rs b/src/test/ui/error-codes/E0191.rs
index 356110671e7..22f739b9e76 100644
--- a/src/test/ui/error-codes/E0191.rs
+++ b/src/test/ui/error-codes/E0191.rs
@@ -2,6 +2,6 @@ trait Trait {
     type Bar;
 }
 
-type Foo = Trait; //~ ERROR E0191
+type Foo = dyn Trait; //~ ERROR E0191
 
 fn main() {}
diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr
index 2d9fdfe5d29..92fa85bca0e 100644
--- a/src/test/ui/error-codes/E0191.stderr
+++ b/src/test/ui/error-codes/E0191.stderr
@@ -4,8 +4,8 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu
 LL |     type Bar;
    |     --------- `Bar` defined here
 ...
-LL | type Foo = Trait;
-   |            ^^^^^ associated type `Bar` must be specified
+LL | type Foo = dyn Trait;
+   |            ^^^^^^^^^ associated type `Bar` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0220.rs b/src/test/ui/error-codes/E0220.rs
index f4798042538..e11a570df79 100644
--- a/src/test/ui/error-codes/E0220.rs
+++ b/src/test/ui/error-codes/E0220.rs
@@ -2,7 +2,7 @@ trait Trait {
     type Bar;
 }
 
-type Foo = Trait<F=i32>; //~ ERROR E0220
-                         //~| ERROR E0191
+type Foo = dyn Trait<F=i32>; //~ ERROR E0220
+                             //~| ERROR E0191
 fn main() {
 }
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
index bd2205fb752..5da302748cd 100644
--- a/src/test/ui/error-codes/E0220.stderr
+++ b/src/test/ui/error-codes/E0220.stderr
@@ -1,8 +1,8 @@
 error[E0220]: associated type `F` not found for `Trait`
-  --> $DIR/E0220.rs:5:18
+  --> $DIR/E0220.rs:5:22
    |
-LL | type Foo = Trait<F=i32>;
-   |                  ^^^^^ associated type `F` not found
+LL | type Foo = dyn Trait<F=i32>;
+   |                      ^^^^^ associated type `F` not found
 
 error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
   --> $DIR/E0220.rs:5:12
@@ -10,8 +10,8 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu
 LL |     type Bar;
    |     --------- `Bar` defined here
 ...
-LL | type Foo = Trait<F=i32>;
-   |            ^^^^^^^^^^^^ associated type `Bar` must be specified
+LL | type Foo = dyn Trait<F=i32>;
+   |            ^^^^^^^^^^^^^^^^ associated type `Bar` must be specified
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/error-codes/E0393.rs b/src/test/ui/error-codes/E0393.rs
index bdd4deafc83..0c1a369806d 100644
--- a/src/test/ui/error-codes/E0393.rs
+++ b/src/test/ui/error-codes/E0393.rs
@@ -1,6 +1,6 @@
 trait A<T=Self> {}
 
-fn together_we_will_rule_the_galaxy(son: &A) {}
+fn together_we_will_rule_the_galaxy(son: &dyn A) {}
 //~^ ERROR E0393
 
 fn main() {
diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr
index bf564ef1021..543e3213633 100644
--- a/src/test/ui/error-codes/E0393.stderr
+++ b/src/test/ui/error-codes/E0393.stderr
@@ -1,8 +1,8 @@
 error[E0393]: the type parameter `T` must be explicitly specified
-  --> $DIR/E0393.rs:3:43
+  --> $DIR/E0393.rs:3:47
    |
-LL | fn together_we_will_rule_the_galaxy(son: &A) {}
-   |                                           ^ missing reference to `T`
+LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
+   |                                               ^ missing reference to `T`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
diff --git a/src/test/ui/error-codes/E0478.rs b/src/test/ui/error-codes/E0478.rs
index 1b5ca09d5a6..b1562dc0a8b 100644
--- a/src/test/ui/error-codes/E0478.rs
+++ b/src/test/ui/error-codes/E0478.rs
@@ -1,7 +1,7 @@
 trait Wedding<'t>: 't { }
 
 struct Prince<'kiss, 'SnowWhite> {
-    child: Box<Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
+    child: Box<dyn Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
 }
 
 fn main() {
diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr
index 71e490364d7..587125fdc33 100644
--- a/src/test/ui/error-codes/E0478.stderr
+++ b/src/test/ui/error-codes/E0478.stderr
@@ -1,8 +1,8 @@
 error[E0478]: lifetime bound not satisfied
   --> $DIR/E0478.rs:4:5
    |
-LL |     child: Box<Wedding<'kiss> + 'SnowWhite>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     child: Box<dyn Wedding<'kiss> + 'SnowWhite>,
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 3:22
   --> $DIR/E0478.rs:3:22
diff --git a/src/test/ui/error-codes/E0719.rs b/src/test/ui/error-codes/E0719.rs
index 6b572f49cee..3311e190937 100644
--- a/src/test/ui/error-codes/E0719.rs
+++ b/src/test/ui/error-codes/E0719.rs
@@ -3,12 +3,12 @@ trait Foo: Iterator<Item = i32, Item = i32> {}
 
 type Unit = ();
 
-fn test() -> Box<Iterator<Item = (), Item = Unit>> {
+fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
 //~^ ERROR is already specified
     Box::new(None.into_iter())
 }
 
 fn main() {
-    let _: &Iterator<Item = i32, Item = i32>;
+    let _: &dyn Iterator<Item = i32, Item = i32>;
     test();
 }
diff --git a/src/test/ui/error-codes/E0719.stderr b/src/test/ui/error-codes/E0719.stderr
index 5854cd7e143..c5b9a71c659 100644
--- a/src/test/ui/error-codes/E0719.stderr
+++ b/src/test/ui/error-codes/E0719.stderr
@@ -7,12 +7,12 @@ LL | trait Foo: Iterator<Item = i32, Item = i32> {}
    |                     `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
-  --> $DIR/E0719.rs:6:38
+  --> $DIR/E0719.rs:6:42
    |
-LL | fn test() -> Box<Iterator<Item = (), Item = Unit>> {
-   |                           ---------  ^^^^^^^^^^^ re-bound here
-   |                           |
-   |                           `Item` bound here first
+LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
+   |                               ---------  ^^^^^^^^^^^ re-bound here
+   |                               |
+   |                               `Item` bound here first
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/fat-ptr-cast.rs b/src/test/ui/fat-ptr-cast.rs
index eb419ba2036..a0fad583a16 100644
--- a/src/test/ui/fat-ptr-cast.rs
+++ b/src/test/ui/fat-ptr-cast.rs
@@ -19,6 +19,6 @@ fn main() {
     q as *const [i32]; //~ ERROR cannot cast
 
     // #21397
-    let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting
+    let t: *mut (dyn Trait + 'static) = 0 as *mut _; //~ ERROR casting
     let mut fail: *const str = 0 as *const str; //~ ERROR casting
 }
diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr
index bb7a4d3ff7f..93e1471838f 100644
--- a/src/test/ui/fat-ptr-cast.stderr
+++ b/src/test/ui/fat-ptr-cast.stderr
@@ -53,10 +53,10 @@ LL |     q as *const [i32];
    |     ^^^^^^^^^^^^^^^^^
 
 error[E0606]: casting `usize` as `*mut (dyn Trait + 'static)` is invalid
-  --> $DIR/fat-ptr-cast.rs:22:37
+  --> $DIR/fat-ptr-cast.rs:22:41
    |
-LL |     let t: *mut (Trait + 'static) = 0 as *mut _;
-   |                                     ^^^^^^^^^^^
+LL |     let t: *mut (dyn Trait + 'static) = 0 as *mut _;
+   |                                         ^^^^^^^^^^^
 
 error[E0606]: casting `usize` as `*const str` is invalid
   --> $DIR/fat-ptr-cast.rs:23:32
diff --git a/src/test/ui/feature-gates/feature-gate-trivial_bounds.rs b/src/test/ui/feature-gates/feature-gate-trivial_bounds.rs
index e5028f2f8aa..3dbaf5dea25 100644
--- a/src/test/ui/feature-gates/feature-gate-trivial_bounds.rs
+++ b/src/test/ui/feature-gates/feature-gate-trivial_bounds.rs
@@ -52,8 +52,8 @@ struct Dst<X: ?Sized> {
 struct TwoStrs(str, str) where str: Sized; //~ ERROR
 
 
-fn unsized_local() where Dst<A>: Sized { //~ ERROR
-    let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
+fn unsized_local() where Dst<dyn A>: Sized { //~ ERROR
+    let x: Dst<dyn A> = *(Box::new(Dst { x: 1 }) as Box<Dst<dyn A>>);
 }
 
 fn return_str() -> str where str: Sized { //~ ERROR
diff --git a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
index b04a6e4d671..1d346fd42ff 100644
--- a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
+++ b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
@@ -102,8 +102,8 @@ LL | struct TwoStrs(str, str) where str: Sized;
 error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
   --> $DIR/feature-gate-trivial_bounds.rs:55:1
    |
-LL | / fn unsized_local() where Dst<A>: Sized {
-LL | |     let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
+LL | / fn unsized_local() where Dst<dyn A>: Sized {
+LL | |     let x: Dst<dyn A> = *(Box::new(Dst { x: 1 }) as Box<Dst<dyn A>>);
 LL | | }
    | |_^ doesn't have a size known at compile-time
    |
diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.rs b/src/test/ui/feature-gates/feature-gate-unsized_locals.rs
index a8f81f3f113..3686e7b37f4 100644
--- a/src/test/ui/feature-gates/feature-gate-unsized_locals.rs
+++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.rs
@@ -1,4 +1,4 @@
-fn f(f: FnOnce()) {}
+fn f(f: dyn FnOnce()) {}
 //~^ ERROR E0277
 
 fn main() {
diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr
index bde39cbeaeb..d20b9e2981e 100644
--- a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr
+++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr
@@ -1,7 +1,7 @@
 error[E0277]: the size for values of type `(dyn std::ops::FnOnce() + 'static)` cannot be known at compilation time
   --> $DIR/feature-gate-unsized_locals.rs:1:6
    |
-LL | fn f(f: FnOnce()) {}
+LL | fn f(f: dyn FnOnce()) {}
    |      ^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::FnOnce() + 'static)`
diff --git a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
index f781bc9aedd..c3d62a231e5 100644
--- a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
+++ b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
@@ -1,4 +1,4 @@
 fn main() {
-    let _ : &(Send,) = &((),);
+    let _ : &(dyn Send,) = &((),);
     //~^ ERROR unsized tuple coercion is not stable enough
 }
diff --git a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
index 669e87ceada..5b93c889db1 100644
--- a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
+++ b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
@@ -1,8 +1,8 @@
 error[E0658]: unsized tuple coercion is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-unsized_tuple_coercion.rs:2:24
+  --> $DIR/feature-gate-unsized_tuple_coercion.rs:2:28
    |
-LL |     let _ : &(Send,) = &((),);
-   |                        ^^^^^^
+LL |     let _ : &(dyn Send,) = &((),);
+   |                            ^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/42877
    = help: add #![feature(unsized_tuple_coercion)] to the crate attributes to enable
diff --git a/src/test/ui/fn/fn-trait-formatting.rs b/src/test/ui/fn/fn-trait-formatting.rs
index 21da39dd400..5c16c1a7e88 100644
--- a/src/test/ui/fn/fn-trait-formatting.rs
+++ b/src/test/ui/fn/fn-trait-formatting.rs
@@ -3,15 +3,15 @@
 fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
 
 fn main() {
-    let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
+    let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
     //~^ ERROR mismatched types
     //~| expected type `()`
     //~| found type `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
-    let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
+    let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
     //~^ ERROR mismatched types
     //~| expected type `()`
     //~| found type `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
-    let _: () = (box || -> isize { unimplemented!() }) as Box<FnMut() -> isize>;
+    let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
     //~^ ERROR mismatched types
     //~| expected type `()`
     //~| found type `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr
index 6b76a6c914f..504bc2605ec 100644
--- a/src/test/ui/fn/fn-trait-formatting.stderr
+++ b/src/test/ui/fn/fn-trait-formatting.stderr
@@ -1,8 +1,8 @@
 error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:6:17
    |
-LL |     let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+LL |     let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
    = note: expected type `()`
               found type `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
@@ -10,8 +10,8 @@ LL |     let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
 error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:10:17
    |
-LL |     let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+LL |     let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
    = note: expected type `()`
               found type `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
@@ -19,8 +19,8 @@ LL |     let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
 error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:14:17
    |
-LL |     let _: () = (box || -> isize { unimplemented!() }) as Box<FnMut() -> isize>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+LL |     let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
    = note: expected type `()`
               found type `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
diff --git a/src/test/ui/higher-lifetime-bounds.rs b/src/test/ui/higher-lifetime-bounds.rs
index 546f4d43663..f3393347d90 100644
--- a/src/test/ui/higher-lifetime-bounds.rs
+++ b/src/test/ui/higher-lifetime-bounds.rs
@@ -58,12 +58,12 @@ struct S3<F>(F) where for<'xa, 'xb: 'xa> F: Fn(&'xa i32, &'xb i32) -> &'xa i32;
 struct S_fnty(for<'xa, 'xb: 'xa> fn(&'xa i32, &'xb i32) -> &'xa i32);
 //~^ ERROR lifetime bounds cannot be used in this context
 
-type T1 = Box<for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>;
+type T1 = Box<dyn for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>;
 //~^ ERROR lifetime bounds cannot be used in this context
 
 fn main() {
     let _ : Option<for<'xa, 'xb: 'xa> fn(&'xa i32, &'xb i32) -> &'xa i32> = None;
     //~^ ERROR lifetime bounds cannot be used in this context
-    let _ : Option<Box<for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>> = None;
+    let _ : Option<Box<dyn for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>> = None;
     //~^ ERROR lifetime bounds cannot be used in this context
 }
diff --git a/src/test/ui/higher-lifetime-bounds.stderr b/src/test/ui/higher-lifetime-bounds.stderr
index 431a89f5eb8..bc6d2288cdf 100644
--- a/src/test/ui/higher-lifetime-bounds.stderr
+++ b/src/test/ui/higher-lifetime-bounds.stderr
@@ -47,10 +47,10 @@ LL | struct S_fnty(for<'xa, 'xb: 'xa> fn(&'xa i32, &'xb i32) -> &'xa i32);
    |                             ^^^
 
 error: lifetime bounds cannot be used in this context
-  --> $DIR/higher-lifetime-bounds.rs:61:29
+  --> $DIR/higher-lifetime-bounds.rs:61:33
    |
-LL | type T1 = Box<for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>;
-   |                             ^^^
+LL | type T1 = Box<dyn for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>;
+   |                                 ^^^
 
 error: lifetime bounds cannot be used in this context
   --> $DIR/higher-lifetime-bounds.rs:65:34
@@ -59,10 +59,10 @@ LL |     let _ : Option<for<'xa, 'xb: 'xa> fn(&'xa i32, &'xb i32) -> &'xa i32> =
    |                                  ^^^
 
 error: lifetime bounds cannot be used in this context
-  --> $DIR/higher-lifetime-bounds.rs:67:38
+  --> $DIR/higher-lifetime-bounds.rs:67:42
    |
-LL |     let _ : Option<Box<for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>> = None;
-   |                                      ^^^
+LL |     let _ : Option<Box<dyn for<'xa, 'xb: 'xa> Fn(&'xa i32, &'xb i32) -> &'xa i32>> = None;
+   |                                          ^^^
 
 error: aborting due to 11 previous errors
 
diff --git a/src/test/ui/imports/extern-crate-used.rs b/src/test/ui/imports/extern-crate-used.rs
index 26150c7d4a1..8198c1816a1 100644
--- a/src/test/ui/imports/extern-crate-used.rs
+++ b/src/test/ui/imports/extern-crate-used.rs
@@ -20,13 +20,13 @@ extern crate core; //~ ERROR unused extern crate
 mod m {
     use iso1::any as are_you_okay1;
     use ::iso2::any as are_you_okay2;
-    type AreYouOkay1 = iso3::any::Any;
-    type AreYouOkay2 = ::iso4::any::Any;
+    type AreYouOkay1 = dyn iso3::any::Any;
+    type AreYouOkay2 = dyn (::iso4::any::Any);
 
     use core::any as are_you_okay3;
     use ::core::any as are_you_okay4;
-    type AreYouOkay3 = core::any::Any;
-    type AreYouOkay4 = ::core::any::Any;
+    type AreYouOkay3 = dyn core::any::Any;
+    type AreYouOkay4 = dyn (::core::any::Any);
 }
 
 fn main() {}
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs
index d4535ac4425..d131a944721 100644
--- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs
+++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs
@@ -4,8 +4,8 @@ trait Trait {}
 struct Struct;
 
 impl Deref for Struct {
-    type Target = Trait;
-    fn deref(&self) -> &Trait {
+    type Target = dyn Trait;
+    fn deref(&self) -> &dyn Trait {
         unimplemented!();
     }
 }
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr
index e56a56e2dae..b50a926c637 100644
--- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr
+++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr
@@ -1,13 +1,13 @@
 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
   --> $DIR/mismatched_trait_impl-2.rs:8:5
    |
-LL |     fn deref(&self) -> &Trait {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn deref(&self) -> &dyn Trait {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5...
   --> $DIR/mismatched_trait_impl-2.rs:8:5
    |
-LL | /     fn deref(&self) -> &Trait {
+LL | /     fn deref(&self) -> &dyn Trait {
 LL | |         unimplemented!();
 LL | |     }
    | |_____^
diff --git a/src/test/ui/issues/issue-10291.nll.stderr b/src/test/ui/issues/issue-10291.nll.stderr
index 45f29fd7956..a7b827d27a8 100644
--- a/src/test/ui/issues/issue-10291.nll.stderr
+++ b/src/test/ui/issues/issue-10291.nll.stderr
@@ -3,7 +3,7 @@ error: lifetime may not live long enough
    |
 LL | fn test<'x>(x: &'x isize) {
    |         -- lifetime `'x` defined here
-LL |     drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+LL |     drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
 LL |         x
    |         ^ returning this value requires that `'x` must outlive `'static`
 
diff --git a/src/test/ui/issues/issue-10291.rs b/src/test/ui/issues/issue-10291.rs
index 877b0aba473..559c5fcac95 100644
--- a/src/test/ui/issues/issue-10291.rs
+++ b/src/test/ui/issues/issue-10291.rs
@@ -1,5 +1,5 @@
 fn test<'x>(x: &'x isize) {
-    drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+    drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
         x //~ ERROR E0312
     }));
 }
diff --git a/src/test/ui/issues/issue-10291.stderr b/src/test/ui/issues/issue-10291.stderr
index 0d653e6ced1..5e63469da59 100644
--- a/src/test/ui/issues/issue-10291.stderr
+++ b/src/test/ui/issues/issue-10291.stderr
@@ -4,11 +4,11 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content...
 LL |         x
    |         ^
    |
-note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 2:65...
-  --> $DIR/issue-10291.rs:2:65
+note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 2:69...
+  --> $DIR/issue-10291.rs:2:69
    |
-LL |       drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
-   |  _________________________________________________________________^
+LL |       drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+   |  _____________________________________________________________________^
 LL | |         x
 LL | |     }));
    | |_____^
diff --git a/src/test/ui/issues/issue-10902.rs b/src/test/ui/issues/issue-10902.rs
index 672386bc8a6..5e7f8ed7fd5 100644
--- a/src/test/ui/issues/issue-10902.rs
+++ b/src/test/ui/issues/issue-10902.rs
@@ -4,16 +4,16 @@
 
 pub mod two_tuple {
     pub trait T { fn dummy(&self) { } }
-    pub struct P<'a>(&'a (T + 'a), &'a (T + 'a));
-    pub fn f<'a>(car: &'a T, cdr: &'a T) -> P<'a> {
+    pub struct P<'a>(&'a (dyn T + 'a), &'a (dyn T + 'a));
+    pub fn f<'a>(car: &'a dyn T, cdr: &'a dyn T) -> P<'a> {
         P(car, cdr)
     }
 }
 
 pub mod two_fields {
     pub trait T { fn dummy(&self) { } }
-    pub struct P<'a> { car: &'a (T + 'a), cdr: &'a (T + 'a) }
-    pub fn f<'a>(car: &'a T, cdr: &'a T) -> P<'a> {
+    pub struct P<'a> { car: &'a (dyn T + 'a), cdr: &'a (dyn T + 'a) }
+    pub fn f<'a>(car: &'a dyn T, cdr: &'a dyn T) -> P<'a> {
         P{ car: car, cdr: cdr }
     }
 }
diff --git a/src/test/ui/issues/issue-11374.rs b/src/test/ui/issues/issue-11374.rs
index f00da0acf81..7519ba2826e 100644
--- a/src/test/ui/issues/issue-11374.rs
+++ b/src/test/ui/issues/issue-11374.rs
@@ -2,11 +2,11 @@ use std::io::{self, Read};
 use std::vec;
 
 pub struct Container<'a> {
-    reader: &'a mut Read
+    reader: &'a mut dyn Read
 }
 
 impl<'a> Container<'a> {
-    pub fn wrap<'s>(reader: &'s mut io::Read) -> Container<'s> {
+    pub fn wrap<'s>(reader: &'s mut dyn io::Read) -> Container<'s> {
         Container { reader: reader }
     }
 
@@ -17,7 +17,7 @@ impl<'a> Container<'a> {
 
 pub fn for_stdin<'a>() -> Container<'a> {
     let mut r = io::stdin();
-    Container::wrap(&mut r as &mut io::Read)
+    Container::wrap(&mut r as &mut dyn io::Read)
 }
 
 fn main() {
diff --git a/src/test/ui/issues/issue-11515.rs b/src/test/ui/issues/issue-11515.rs
index 7eab2a26178..a7671b9282a 100644
--- a/src/test/ui/issues/issue-11515.rs
+++ b/src/test/ui/issues/issue-11515.rs
@@ -1,10 +1,10 @@
 #![feature(box_syntax)]
 
 struct Test {
-    func: Box<FnMut()+'static>
+    func: Box<dyn FnMut() + 'static>
 }
 
 fn main() {
-    let closure: Box<Fn()+'static> = Box::new(|| ());
+    let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
     let test = box Test { func: closure }; //~ ERROR mismatched types
 }
diff --git a/src/test/ui/issues/issue-11612.rs b/src/test/ui/issues/issue-11612.rs
index 4d6f4656d58..fd4fb2443cb 100644
--- a/src/test/ui/issues/issue-11612.rs
+++ b/src/test/ui/issues/issue-11612.rs
@@ -14,11 +14,11 @@ struct B<'a, T:'a> {
 
 impl<'a, T> A for B<'a, T> {}
 
-fn foo(_: &A) {}
+fn foo(_: &dyn A) {}
 
 fn bar<G>(b: &B<G>) {
     foo(b);       // Coercion should work
-    foo(b as &A); // Explicit cast should work as well
+    foo(b as &dyn A); // Explicit cast should work as well
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-12470.rs b/src/test/ui/issues/issue-12470.rs
index 77b78c8a1f7..0ade359923a 100644
--- a/src/test/ui/issues/issue-12470.rs
+++ b/src/test/ui/issues/issue-12470.rs
@@ -16,10 +16,10 @@ impl X for B {
 }
 
 struct A<'a> {
-    p: &'a (X+'a)
+    p: &'a (dyn X + 'a)
 }
 
-fn make_a<'a>(p: &'a X) -> A<'a> {
+fn make_a<'a>(p: &'a dyn X) -> A<'a> {
     A { p: p }
 }
 
diff --git a/src/test/ui/issues/issue-13033.rs b/src/test/ui/issues/issue-13033.rs
index a6c9e9712c0..e5274eb823d 100644
--- a/src/test/ui/issues/issue-13033.rs
+++ b/src/test/ui/issues/issue-13033.rs
@@ -1,11 +1,11 @@
 trait Foo {
-    fn bar(&mut self, other: &mut Foo);
+    fn bar(&mut self, other: &mut dyn Foo);
 }
 
 struct Baz;
 
 impl Foo for Baz {
-    fn bar(&mut self, other: &Foo) {}
+    fn bar(&mut self, other: &dyn Foo) {}
     //~^ ERROR method `bar` has an incompatible type for trait
     //~| expected type `fn(&mut Baz, &mut dyn Foo)`
     //~| found type `fn(&mut Baz, &dyn Foo)`
diff --git a/src/test/ui/issues/issue-13033.stderr b/src/test/ui/issues/issue-13033.stderr
index d1e8eb31c88..195d0c39b29 100644
--- a/src/test/ui/issues/issue-13033.stderr
+++ b/src/test/ui/issues/issue-13033.stderr
@@ -1,18 +1,18 @@
 error[E0053]: method `bar` has an incompatible type for trait
   --> $DIR/issue-13033.rs:8:30
    |
-LL |     fn bar(&mut self, other: &mut Foo);
-   |                              -------- type in trait
+LL |     fn bar(&mut self, other: &mut dyn Foo);
+   |                              ------------ type in trait
 ...
-LL |     fn bar(&mut self, other: &Foo) {}
-   |                              ^^^^ types differ in mutability
+LL |     fn bar(&mut self, other: &dyn Foo) {}
+   |                              ^^^^^^^^ types differ in mutability
    |
    = note: expected type `fn(&mut Baz, &mut dyn Foo)`
               found type `fn(&mut Baz, &dyn Foo)`
 help: consider change the type to match the mutability in trait
    |
-LL |     fn bar(&mut self, other: &mut Foo) {}
-   |                              ^^^^^^^^
+LL |     fn bar(&mut self, other: &mut dyn Foo) {}
+   |                              ^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-13352.rs b/src/test/ui/issues/issue-13352.rs
index c711e3b713f..e6995be27d2 100644
--- a/src/test/ui/issues/issue-13352.rs
+++ b/src/test/ui/issues/issue-13352.rs
@@ -1,6 +1,6 @@
 // ignore-cloudabi no std::process
 
-fn foo(_: Box<FnMut()>) {}
+fn foo(_: Box<dyn FnMut()>) {}
 
 fn main() {
     foo(loop {
diff --git a/src/test/ui/issues/issue-13853-2.rs b/src/test/ui/issues/issue-13853-2.rs
index b58f2bd3b3b..27319c98d6e 100644
--- a/src/test/ui/issues/issue-13853-2.rs
+++ b/src/test/ui/issues/issue-13853-2.rs
@@ -2,5 +2,5 @@ trait FromStructReader<'a> { }
 trait ResponseHook {
      fn get(&self);
 }
-fn foo(res : Box<ResponseHook>) { res.get } //~ ERROR attempted to take value of method
+fn foo(res : Box<dyn ResponseHook>) { res.get } //~ ERROR attempted to take value of method
 fn main() {}
diff --git a/src/test/ui/issues/issue-13853-2.stderr b/src/test/ui/issues/issue-13853-2.stderr
index 0853f5cffb7..ea3b38940cf 100644
--- a/src/test/ui/issues/issue-13853-2.stderr
+++ b/src/test/ui/issues/issue-13853-2.stderr
@@ -1,8 +1,8 @@
 error[E0615]: attempted to take value of method `get` on type `std::boxed::Box<(dyn ResponseHook + 'static)>`
-  --> $DIR/issue-13853-2.rs:5:39
+  --> $DIR/issue-13853-2.rs:5:43
    |
-LL | fn foo(res : Box<ResponseHook>) { res.get }
-   |                                       ^^^ help: use parentheses to call the method: `get()`
+LL | fn foo(res : Box<dyn ResponseHook>) { res.get }
+   |                                           ^^^ help: use parentheses to call the method: `get()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-14285.rs b/src/test/ui/issues/issue-14285.rs
index 934d72a67ca..2ba9ff71773 100644
--- a/src/test/ui/issues/issue-14285.rs
+++ b/src/test/ui/issues/issue-14285.rs
@@ -6,9 +6,9 @@ struct A;
 
 impl Foo for A {}
 
-struct B<'a>(&'a (Foo+'a));
+struct B<'a>(&'a (dyn Foo + 'a));
 
-fn foo<'a>(a: &Foo) -> B<'a> {
+fn foo<'a>(a: &dyn Foo) -> B<'a> {
     B(a)    //~ ERROR explicit lifetime required in the type of `a` [E0621]
 }
 
diff --git a/src/test/ui/issues/issue-14285.stderr b/src/test/ui/issues/issue-14285.stderr
index c180ed03e54..5c07066018e 100644
--- a/src/test/ui/issues/issue-14285.stderr
+++ b/src/test/ui/issues/issue-14285.stderr
@@ -1,8 +1,8 @@
 error[E0621]: explicit lifetime required in the type of `a`
   --> $DIR/issue-14285.rs:12:5
    |
-LL | fn foo<'a>(a: &Foo) -> B<'a> {
-   |               ---- help: add explicit lifetime `'a` to the type of `a`: `&'a (dyn Foo + 'a)`
+LL | fn foo<'a>(a: &dyn Foo) -> B<'a> {
+   |               -------- help: add explicit lifetime `'a` to the type of `a`: `&'a (dyn Foo + 'a)`
 LL |     B(a)
    |     ^^^^ lifetime `'a` required
 
diff --git a/src/test/ui/issues/issue-14366.rs b/src/test/ui/issues/issue-14366.rs
index a6298f25d47..bb338860d8b 100644
--- a/src/test/ui/issues/issue-14366.rs
+++ b/src/test/ui/issues/issue-14366.rs
@@ -1,4 +1,4 @@
 fn main() {
-    let _x = "test" as &::std::any::Any;
+    let _x = "test" as &dyn (::std::any::Any);
     //~^ ERROR the size for values of type
 }
diff --git a/src/test/ui/issues/issue-14366.stderr b/src/test/ui/issues/issue-14366.stderr
index a3588bb8ebe..542d8a904c4 100644
--- a/src/test/ui/issues/issue-14366.stderr
+++ b/src/test/ui/issues/issue-14366.stderr
@@ -1,7 +1,7 @@
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/issue-14366.rs:2:14
    |
-LL |     let _x = "test" as &::std::any::Any;
+LL |     let _x = "test" as &dyn (::std::any::Any);
    |              ^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `str`
diff --git a/src/test/ui/issues/issue-14901.rs b/src/test/ui/issues/issue-14901.rs
index 61b2b64ddf0..9b89c1631df 100644
--- a/src/test/ui/issues/issue-14901.rs
+++ b/src/test/ui/issues/issue-14901.rs
@@ -2,7 +2,7 @@
 pub trait Reader {}
 
 enum Wrapper<'a> {
-    WrapReader(&'a (Reader + 'a))
+    WrapReader(&'a (dyn Reader + 'a))
 }
 
 trait Wrap<'a> {
@@ -11,7 +11,7 @@ trait Wrap<'a> {
 
 impl<'a, R: Reader> Wrap<'a> for &'a mut R {
     fn wrap(self) -> Wrapper<'a> {
-        Wrapper::WrapReader(self as &'a mut Reader)
+        Wrapper::WrapReader(self as &'a mut dyn Reader)
     }
 }
 
diff --git a/src/test/ui/issues/issue-14959.rs b/src/test/ui/issues/issue-14959.rs
index 78ae21e2837..60daaafbcc8 100644
--- a/src/test/ui/issues/issue-14959.rs
+++ b/src/test/ui/issues/issue-14959.rs
@@ -26,20 +26,20 @@ impl Alloy {
     }
 }
 
-impl<'b> Fn<(&'b mut (Response+'b),)> for SendFile {
-    extern "rust-call" fn call(&self, (_res,): (&'b mut (Response+'b),)) {}
+impl<'b> Fn<(&'b mut (dyn Response + 'b),)> for SendFile {
+    extern "rust-call" fn call(&self, (_res,): (&'b mut (dyn Response + 'b),)) {}
 }
 
-impl<'b> FnMut<(&'b mut (Response+'b),)> for SendFile {
-    extern "rust-call" fn call_mut(&mut self, (_res,): (&'b mut (Response+'b),)) {
+impl<'b> FnMut<(&'b mut (dyn Response + 'b),)> for SendFile {
+    extern "rust-call" fn call_mut(&mut self, (_res,): (&'b mut (dyn Response+'b),)) {
         self.call((_res,))
     }
 }
 
-impl<'b> FnOnce<(&'b mut (Response+'b),)> for SendFile {
+impl<'b> FnOnce<(&'b mut (dyn Response + 'b),)> for SendFile {
     type Output = ();
 
-    extern "rust-call" fn call_once(self, (_res,): (&'b mut (Response+'b),)) {
+    extern "rust-call" fn call_once(self, (_res,): (&'b mut (dyn Response+'b),)) {
         self.call((_res,))
     }
 }
diff --git a/src/test/ui/issues/issue-16668.rs b/src/test/ui/issues/issue-16668.rs
index f69ca4677c9..b570a2ced67 100644
--- a/src/test/ui/issues/issue-16668.rs
+++ b/src/test/ui/issues/issue-16668.rs
@@ -1,7 +1,7 @@
 // compile-pass
 #![allow(dead_code)]
 struct Parser<'a, I, O> {
-    parse: Box<FnMut(I) -> Result<O, String> + 'a>
+    parse: Box<dyn FnMut(I) -> Result<O, String> + 'a>
 }
 
 impl<'a, I: 'a, O: 'a> Parser<'a, I, O> {
diff --git a/src/test/ui/issues/issue-16922.rs b/src/test/ui/issues/issue-16922.rs
index 1e865515c4b..10a5cccbcee 100644
--- a/src/test/ui/issues/issue-16922.rs
+++ b/src/test/ui/issues/issue-16922.rs
@@ -1,7 +1,7 @@
 use std::any::Any;
 
-fn foo<T: Any>(value: &T) -> Box<Any> {
-    Box::new(value) as Box<Any>
+fn foo<T: Any>(value: &T) -> Box<dyn Any> {
+    Box::new(value) as Box<dyn Any>
     //~^ ERROR explicit lifetime required in the type of `value` [E0621]
 }
 
diff --git a/src/test/ui/issues/issue-16922.stderr b/src/test/ui/issues/issue-16922.stderr
index 1f3b3fe739c..4e3d3ecb9c0 100644
--- a/src/test/ui/issues/issue-16922.stderr
+++ b/src/test/ui/issues/issue-16922.stderr
@@ -1,9 +1,9 @@
 error[E0621]: explicit lifetime required in the type of `value`
   --> $DIR/issue-16922.rs:4:5
    |
-LL | fn foo<T: Any>(value: &T) -> Box<Any> {
+LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
    |                       -- help: add explicit lifetime `'static` to the type of `value`: `&'static T`
-LL |     Box::new(value) as Box<Any>
+LL |     Box::new(value) as Box<dyn Any>
    |     ^^^^^^^^^^^^^^^ lifetime `'static` required
 
 error: aborting due to previous error
diff --git a/src/test/ui/issues/issue-16994.rs b/src/test/ui/issues/issue-16994.rs
index d356ce8a4da..d5f1b1310eb 100644
--- a/src/test/ui/issues/issue-16994.rs
+++ b/src/test/ui/issues/issue-16994.rs
@@ -1,6 +1,6 @@
 // compile-pass
 // skip-codegen
-fn cb<'a,T>(_x: Box<Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
+fn cb<'a,T>(_x: Box<dyn Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
     panic!()
 }
 
diff --git a/src/test/ui/issues/issue-17441.rs b/src/test/ui/issues/issue-17441.rs
index cfb2fe674ed..b9813ef1eef 100644
--- a/src/test/ui/issues/issue-17441.rs
+++ b/src/test/ui/issues/issue-17441.rs
@@ -2,10 +2,10 @@ fn main() {
     let _foo = &[1_usize, 2] as [usize];
     //~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]`
 
-    let _bar = Box::new(1_usize) as std::fmt::Debug;
+    let _bar = Box::new(1_usize) as dyn std::fmt::Debug;
     //~^ ERROR cast to unsized type: `std::boxed::Box<usize>` as `dyn std::fmt::Debug`
 
-    let _baz = 1_usize as std::fmt::Debug;
+    let _baz = 1_usize as dyn std::fmt::Debug;
     //~^ ERROR cast to unsized type: `usize` as `dyn std::fmt::Debug`
 
     let _quux = [1_usize, 2] as [usize];
diff --git a/src/test/ui/issues/issue-17441.stderr b/src/test/ui/issues/issue-17441.stderr
index 436ee7325f8..0ab035515a0 100644
--- a/src/test/ui/issues/issue-17441.stderr
+++ b/src/test/ui/issues/issue-17441.stderr
@@ -13,21 +13,21 @@ LL |     let _foo = &[1_usize, 2] as [usize];
 error[E0620]: cast to unsized type: `std::boxed::Box<usize>` as `dyn std::fmt::Debug`
   --> $DIR/issue-17441.rs:5:16
    |
-LL |     let _bar = Box::new(1_usize) as std::fmt::Debug;
-   |                ^^^^^^^^^^^^^^^^^^^^^---------------
+LL |     let _bar = Box::new(1_usize) as dyn std::fmt::Debug;
+   |                ^^^^^^^^^^^^^^^^^^^^^-------------------
    |                                     |
-   |                                     help: try casting to a `Box` instead: `Box<std::fmt::Debug>`
+   |                                     help: try casting to a `Box` instead: `Box<dyn std::fmt::Debug>`
 
 error[E0620]: cast to unsized type: `usize` as `dyn std::fmt::Debug`
   --> $DIR/issue-17441.rs:8:16
    |
-LL |     let _baz = 1_usize as std::fmt::Debug;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     let _baz = 1_usize as dyn std::fmt::Debug;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 help: consider using a box or reference as appropriate
   --> $DIR/issue-17441.rs:8:16
    |
-LL |     let _baz = 1_usize as std::fmt::Debug;
+LL |     let _baz = 1_usize as dyn std::fmt::Debug;
    |                ^^^^^^^
 
 error[E0620]: cast to unsized type: `[usize; 2]` as `[usize]`
diff --git a/src/test/ui/issues/issue-17959.rs b/src/test/ui/issues/issue-17959.rs
index d56f346ecd4..73865ae2d2e 100644
--- a/src/test/ui/issues/issue-17959.rs
+++ b/src/test/ui/issues/issue-17959.rs
@@ -17,5 +17,5 @@ impl<T> Drop for G<T> {
 }
 
 fn main() {
-    let x:G<Bar>;
+    let x:G<dyn Bar>;
 }
diff --git a/src/test/ui/issues/issue-18107.rs b/src/test/ui/issues/issue-18107.rs
index 184d122d5cd..122940f1c17 100644
--- a/src/test/ui/issues/issue-18107.rs
+++ b/src/test/ui/issues/issue-18107.rs
@@ -1,7 +1,7 @@
 pub trait AbstractRenderer {}
 
 fn _create_render(_: &()) ->
-    AbstractRenderer
+    dyn AbstractRenderer
 //~^ ERROR the size for values of type
 {
     match 0 {
diff --git a/src/test/ui/issues/issue-18107.stderr b/src/test/ui/issues/issue-18107.stderr
index 23b58c3f6df..9bdf470413b 100644
--- a/src/test/ui/issues/issue-18107.stderr
+++ b/src/test/ui/issues/issue-18107.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `(dyn AbstractRenderer + 'static)` cannot be known at compilation time
   --> $DIR/issue-18107.rs:4:5
    |
-LL |     AbstractRenderer
-   |     ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL |     dyn 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/issues/issue-18188.rs b/src/test/ui/issues/issue-18188.rs
index 8e39dc15597..4d0c4464759 100644
--- a/src/test/ui/issues/issue-18188.rs
+++ b/src/test/ui/issues/issue-18188.rs
@@ -5,7 +5,7 @@ pub trait Promisable: Send + Sync {}
 impl<T: Send + Sync> Promisable for T {}
 
 pub fn propagate<'a, T, E, F, G>(mut action: F)
-    -> Box<FnMut(Result<T, E>) -> Result<T, E> + 'a>
+    -> Box<dyn FnMut(Result<T, E>) -> Result<T, E> + 'a>
     where
         T: Promisable + Clone + 'a,
         E: Promisable + Clone + 'a,
diff --git a/src/test/ui/issues/issue-18446-2.rs b/src/test/ui/issues/issue-18446-2.rs
index 2f05ece3197..3e04a914d45 100644
--- a/src/test/ui/issues/issue-18446-2.rs
+++ b/src/test/ui/issues/issue-18446-2.rs
@@ -6,7 +6,7 @@ trait T {
     fn foo(&self) -> i32 { 0 }
 }
 
-impl<'a> T + 'a {
+impl<'a> dyn T + 'a {
     fn foo(&self) -> i32 { 1 }
 }
 
diff --git a/src/test/ui/issues/issue-18446.rs b/src/test/ui/issues/issue-18446.rs
index 64c89df3868..a2e238da03a 100644
--- a/src/test/ui/issues/issue-18446.rs
+++ b/src/test/ui/issues/issue-18446.rs
@@ -5,7 +5,7 @@ trait T {
     fn foo(&self);
 }
 
-impl<'a> T + 'a {
+impl<'a> dyn T + 'a {
     fn foo(&self) {}
 }
 
@@ -14,6 +14,6 @@ impl T for i32 {
 }
 
 fn main() {
-    let x: &T = &0i32;
+    let x: &dyn T = &0i32;
     x.foo(); //~ ERROR multiple applicable items in scope [E0034]
 }
diff --git a/src/test/ui/issues/issue-18783.rs b/src/test/ui/issues/issue-18783.rs
index b84a1adb425..d4851ac1418 100644
--- a/src/test/ui/issues/issue-18783.rs
+++ b/src/test/ui/issues/issue-18783.rs
@@ -18,11 +18,11 @@ fn ufcs() {
 }
 
 trait Push<'c> {
-    fn push<'f: 'c>(&self, push: Box<FnMut() + 'f>);
+    fn push<'f: 'c>(&self, push: Box<dyn FnMut() + 'f>);
 }
 
-impl<'c> Push<'c> for RefCell<Vec<Box<FnMut() + 'c>>> {
-    fn push<'f: 'c>(&self, fun: Box<FnMut() + 'f>) {
+impl<'c> Push<'c> for RefCell<Vec<Box<dyn FnMut() + 'c>>> {
+    fn push<'f: 'c>(&self, fun: Box<dyn FnMut() + 'f>) {
         self.borrow_mut().push(fun)
     }
 }
diff --git a/src/test/ui/issues/issue-18819.rs b/src/test/ui/issues/issue-18819.rs
index 80db056e7dd..e634c55f824 100644
--- a/src/test/ui/issues/issue-18819.rs
+++ b/src/test/ui/issues/issue-18819.rs
@@ -8,7 +8,7 @@ impl Foo for X {
     type Item = bool;
 }
 
-fn print_x(_: &Foo<Item=bool>, extra: &str) {
+fn print_x(_: &dyn Foo<Item=bool>, extra: &str) {
     println!("{}", extra);
 }
 
diff --git a/src/test/ui/issues/issue-18819.stderr b/src/test/ui/issues/issue-18819.stderr
index eb7e4ad405f..41e8470ecd0 100644
--- a/src/test/ui/issues/issue-18819.stderr
+++ b/src/test/ui/issues/issue-18819.stderr
@@ -1,8 +1,8 @@
 error[E0061]: this function takes 2 parameters but 1 parameter was supplied
   --> $DIR/issue-18819.rs:16:5
    |
-LL | fn print_x(_: &Foo<Item=bool>, extra: &str) {
-   | ------------------------------------------- defined here
+LL | fn print_x(_: &dyn Foo<Item=bool>, extra: &str) {
+   | ----------------------------------------------- defined here
 ...
 LL |     print_x(X);
    |     ^^^^^^^^^^ expected 2 parameters
diff --git a/src/test/ui/issues/issue-18919.rs b/src/test/ui/issues/issue-18919.rs
index 9db30849182..91fbb13cd69 100644
--- a/src/test/ui/issues/issue-18919.rs
+++ b/src/test/ui/issues/issue-18919.rs
@@ -1,4 +1,4 @@
-type FuncType<'f> = Fn(&isize) -> isize + 'f;
+type FuncType<'f> = dyn Fn(&isize) -> isize + 'f;
 
 fn ho_func(f: Option<FuncType>) {
     //~^ ERROR the size for values of type
diff --git a/src/test/ui/issues/issue-18937.rs b/src/test/ui/issues/issue-18937.rs
index f3824765f23..ab4c9c736d8 100644
--- a/src/test/ui/issues/issue-18937.rs
+++ b/src/test/ui/issues/issue-18937.rs
@@ -6,7 +6,7 @@ use std::fmt;
 struct MyString<'a>(&'a String);
 
 struct B {
-    list: Vec<Box<fmt::Debug>>,
+    list: Vec<Box<dyn fmt::Debug>>,
 }
 
 trait A<'a> {
diff --git a/src/test/ui/issues/issue-18959.rs b/src/test/ui/issues/issue-18959.rs
index b07800928bc..4b6f04e251b 100644
--- a/src/test/ui/issues/issue-18959.rs
+++ b/src/test/ui/issues/issue-18959.rs
@@ -8,13 +8,13 @@ impl Foo for Thing {
 }
 
 #[inline(never)]
-fn foo(b: &Bar) {
+fn foo(b: &dyn Bar) {
     //~^ ERROR E0038
     b.foo(&0)
 }
 
 fn main() {
     let mut thing = Thing;
-    let test: &Bar = &mut thing;
+    let test: &dyn Bar = &mut thing;
     foo(test);
 }
diff --git a/src/test/ui/issues/issue-18959.stderr b/src/test/ui/issues/issue-18959.stderr
index 939390102c3..63c33b7f447 100644
--- a/src/test/ui/issues/issue-18959.stderr
+++ b/src/test/ui/issues/issue-18959.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/issue-18959.rs:11:1
    |
-LL | fn foo(b: &Bar) {
-   | ^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn foo(b: &dyn Bar) {
+   | ^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: method `foo` has generic type parameters
 
diff --git a/src/test/ui/issues/issue-18988.rs b/src/test/ui/issues/issue-18988.rs
index e0393486649..7fe662e907d 100644
--- a/src/test/ui/issues/issue-18988.rs
+++ b/src/test/ui/issues/issue-18988.rs
@@ -3,7 +3,7 @@
 pub trait Foo : Send { }
 
 pub struct MyFoo {
-    children: Vec<Box<Foo>>,
+    children: Vec<Box<dyn Foo>>,
 }
 
 impl Foo for MyFoo { }
diff --git a/src/test/ui/issues/issue-19380.rs b/src/test/ui/issues/issue-19380.rs
index efbc5a0346a..5c10e2067e4 100644
--- a/src/test/ui/issues/issue-19380.rs
+++ b/src/test/ui/issues/issue-19380.rs
@@ -8,7 +8,7 @@ impl Qiz for Foo {
 }
 
 struct Bar {
-  foos: &'static [&'static (Qiz + 'static)]
+  foos: &'static [&'static (dyn Qiz + 'static)]
 //~^ ERROR E0038
 }
 
diff --git a/src/test/ui/issues/issue-19380.stderr b/src/test/ui/issues/issue-19380.stderr
index 060e160f2e4..27e3ff57bf9 100644
--- a/src/test/ui/issues/issue-19380.stderr
+++ b/src/test/ui/issues/issue-19380.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Qiz` cannot be made into an object
   --> $DIR/issue-19380.rs:11:3
    |
-LL |   foos: &'static [&'static (Qiz + 'static)]
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Qiz` cannot be made into an object
+LL |   foos: &'static [&'static (dyn Qiz + 'static)]
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Qiz` cannot be made into an object
    |
    = note: method `qiz` has no receiver
 
diff --git a/src/test/ui/issues/issue-19404.rs b/src/test/ui/issues/issue-19404.rs
index cdec74fe968..59544393bae 100644
--- a/src/test/ui/issues/issue-19404.rs
+++ b/src/test/ui/issues/issue-19404.rs
@@ -12,10 +12,10 @@ trait Component: 'static {}
 impl Component for Engine {}
 
 trait Env {
-    fn get_component_type_id(&self, type_id: TypeId) -> Option<Fp<Component>>;
+    fn get_component_type_id(&self, type_id: TypeId) -> Option<Fp<dyn Component>>;
 }
 
-impl<'a> Env+'a {
+impl<'a> dyn Env + 'a {
     fn get_component<T: Component>(&self) -> Option<Fp<T>> {
         let x = self.get_component_type_id(TypeId::of::<T>());
         None
@@ -23,13 +23,13 @@ impl<'a> Env+'a {
 }
 
 trait Figment {
-    fn init(&mut self, env: &Env);
+    fn init(&mut self, env: &dyn Env);
 }
 
 struct MyFigment;
 
 impl Figment for MyFigment {
-    fn init(&mut self, env: &Env) {
+    fn init(&mut self, env: &dyn Env) {
         let engine = env.get_component::<Engine>();
     }
 }
diff --git a/src/test/ui/issues/issue-19482.rs b/src/test/ui/issues/issue-19482.rs
index 6ba33490549..9e4b77d87f8 100644
--- a/src/test/ui/issues/issue-19482.rs
+++ b/src/test/ui/issues/issue-19482.rs
@@ -7,7 +7,7 @@ trait Foo {
     fn dummy(&self) { }
 }
 
-fn bar(x: &Foo) {}
+fn bar(x: &dyn Foo) {}
 //~^ ERROR the associated type `A` (from the trait `Foo`) must be specified
 
 pub fn main() {}
diff --git a/src/test/ui/issues/issue-19482.stderr b/src/test/ui/issues/issue-19482.stderr
index a8894f84e74..f1e5419c712 100644
--- a/src/test/ui/issues/issue-19482.stderr
+++ b/src/test/ui/issues/issue-19482.stderr
@@ -4,8 +4,8 @@ error[E0191]: the value of the associated type `A` (from the trait `Foo`) must b
 LL |     type A;
    |     ------- `A` defined here
 ...
-LL | fn bar(x: &Foo) {}
-   |            ^^^ associated type `A` must be specified
+LL | fn bar(x: &dyn Foo) {}
+   |            ^^^^^^^ associated type `A` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-19538.rs b/src/test/ui/issues/issue-19538.rs
index 9f0b08d6c35..7054ef41b1c 100644
--- a/src/test/ui/issues/issue-19538.rs
+++ b/src/test/ui/issues/issue-19538.rs
@@ -14,7 +14,7 @@ impl Bar for Thing { }
 
 fn main() {
     let mut thing = Thing;
-    let test: &mut Bar = &mut thing;
+    let test: &mut dyn Bar = &mut thing;
     //~^ ERROR E0038
     //~| ERROR E0038
 }
diff --git a/src/test/ui/issues/issue-19538.stderr b/src/test/ui/issues/issue-19538.stderr
index d0f05a41d4d..e5da0a9b0da 100644
--- a/src/test/ui/issues/issue-19538.stderr
+++ b/src/test/ui/issues/issue-19538.stderr
@@ -1,16 +1,16 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/issue-19538.rs:17:15
    |
-LL |     let test: &mut Bar = &mut thing;
-   |               ^^^^^^^^ the trait `Bar` cannot be made into an object
+LL |     let test: &mut dyn 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:17:26
+  --> $DIR/issue-19538.rs:17:30
    |
-LL |     let test: &mut Bar = &mut thing;
-   |                          ^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL |     let test: &mut dyn 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`
diff --git a/src/test/ui/issues/issue-20396.rs b/src/test/ui/issues/issue-20396.rs
index b6dfffbd69e..0e69b7f3d1e 100644
--- a/src/test/ui/issues/issue-20396.rs
+++ b/src/test/ui/issues/issue-20396.rs
@@ -10,7 +10,7 @@ trait Foo<T> {
 enum Bar<T> { Bla(T) }
 
 struct Baz<'a> {
-    inner: for<'b> Foo<Bar<&'b ()>> + 'a,
+    inner: dyn for<'b> Foo<Bar<&'b ()>> + 'a,
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-20605.rs b/src/test/ui/issues/issue-20605.rs
index 11a2a573ea6..17b7d32ebf5 100644
--- a/src/test/ui/issues/issue-20605.rs
+++ b/src/test/ui/issues/issue-20605.rs
@@ -1,4 +1,4 @@
-fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
+fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
     for item in *things { *item = 0 }
 //~^ ERROR the size for values of type
 }
diff --git a/src/test/ui/issues/issue-20692.rs b/src/test/ui/issues/issue-20692.rs
index ea89bca78d0..2a05bba7b16 100644
--- a/src/test/ui/issues/issue-20692.rs
+++ b/src/test/ui/issues/issue-20692.rs
@@ -4,7 +4,7 @@ fn f<T: Array>(x: &T) {
     let _ = x
     //~^ ERROR `Array` cannot be made into an object
     as
-    &Array;
+    &dyn Array;
     //~^ ERROR `Array` cannot be made into an object
 }
 
diff --git a/src/test/ui/issues/issue-20692.stderr b/src/test/ui/issues/issue-20692.stderr
index acc223c0b2d..66309394a42 100644
--- a/src/test/ui/issues/issue-20692.stderr
+++ b/src/test/ui/issues/issue-20692.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Array` cannot be made into an object
   --> $DIR/issue-20692.rs:7:5
    |
-LL |     &Array;
-   |     ^^^^^^ the trait `Array` cannot be made into an object
+LL |     &dyn Array;
+   |     ^^^^^^^^^^ the trait `Array` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
 
diff --git a/src/test/ui/issues/issue-20831-debruijn.rs b/src/test/ui/issues/issue-20831-debruijn.rs
index 6d3c7331a45..ef4b1581fd8 100644
--- a/src/test/ui/issues/issue-20831-debruijn.rs
+++ b/src/test/ui/issues/issue-20831-debruijn.rs
@@ -12,7 +12,7 @@ pub trait Subscriber {
 
 pub trait Publisher<'a> {
     type Output;
-    fn subscribe(&mut self, _: Box<Subscriber<Input=Self::Output> + 'a>);
+    fn subscribe(&mut self, _: Box<dyn Subscriber<Input=Self::Output> + 'a>);
 }
 
 pub trait Processor<'a> : Subscriber + Publisher<'a> { }
@@ -20,12 +20,12 @@ pub trait Processor<'a> : Subscriber + Publisher<'a> { }
 impl<'a, P> Processor<'a> for P where P : Subscriber + Publisher<'a> { }
 
 struct MyStruct<'a> {
-    sub: Box<Subscriber<Input=u64> + 'a>
+    sub: Box<dyn Subscriber<Input=u64> + 'a>
 }
 
 impl<'a> Publisher<'a> for MyStruct<'a> {
     type Output = u64;
-    fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+    fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
         // Not obvious, but there is an implicit lifetime here -------^
         //~^^ ERROR cannot infer
         //~| ERROR mismatched types
diff --git a/src/test/ui/issues/issue-20831-debruijn.stderr b/src/test/ui/issues/issue-20831-debruijn.stderr
index 70a395d0b89..64e3cdc64c1 100644
--- a/src/test/ui/issues/issue-20831-debruijn.stderr
+++ b/src/test/ui/issues/issue-20831-debruijn.stderr
@@ -1,7 +1,7 @@
 error[E0308]: mismatched types
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
@@ -15,7 +15,7 @@ LL | |     }
 note: the anonymous lifetime #2 defined on the method body at 28:5...
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
@@ -32,7 +32,7 @@ LL | impl<'a> Publisher<'a> for MyStruct<'a> {
 error[E0308]: mismatched types
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
@@ -51,7 +51,7 @@ LL | impl<'a> Publisher<'a> for MyStruct<'a> {
 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 28:5
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
@@ -63,7 +63,7 @@ LL | |     }
 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
@@ -75,7 +75,7 @@ LL | |     }
 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 28:5...
   --> $DIR/issue-20831-debruijn.rs:28:5
    |
-LL | /     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
+LL | /     fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
 LL | |         // Not obvious, but there is an implicit lifetime here -------^
 LL | |
 LL | |
diff --git a/src/test/ui/issues/issue-20939.rs b/src/test/ui/issues/issue-20939.rs
index 259fff2e6c2..c0c22297897 100644
--- a/src/test/ui/issues/issue-20939.rs
+++ b/src/test/ui/issues/issue-20939.rs
@@ -1,6 +1,6 @@
 trait Foo {}
 
-impl<'a> Foo for Foo+'a {}
+impl<'a> Foo for dyn Foo + 'a {}
 //~^ ERROR the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-20939.stderr b/src/test/ui/issues/issue-20939.stderr
index d15a5196667..3819a21a2cf 100644
--- a/src/test/ui/issues/issue-20939.stderr
+++ b/src/test/ui/issues/issue-20939.stderr
@@ -1,8 +1,8 @@
 error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
   --> $DIR/issue-20939.rs:3:1
    |
-LL | impl<'a> Foo for Foo+'a {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo`
+LL | impl<'a> Foo for dyn Foo + 'a {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-21363.rs b/src/test/ui/issues/issue-21363.rs
index 5e30db17c6d..12efce9496e 100644
--- a/src/test/ui/issues/issue-21363.rs
+++ b/src/test/ui/issues/issue-21363.rs
@@ -8,7 +8,7 @@ trait Iterator {
     fn dummy(&self) { }
 }
 
-impl<'a, T> Iterator for &'a mut (Iterator<Item=T> + 'a) {
+impl<'a, T> Iterator for &'a mut (dyn Iterator<Item=T> + 'a) {
     type Item = T;
 }
 
diff --git a/src/test/ui/issues/issue-21950.rs b/src/test/ui/issues/issue-21950.rs
index b902893bf82..0bc87824cce 100644
--- a/src/test/ui/issues/issue-21950.rs
+++ b/src/test/ui/issues/issue-21950.rs
@@ -2,7 +2,7 @@ use std::ops::Add;
 
 fn main() {
     let x = &10 as
-            &Add;
+            &dyn Add;
             //~^ ERROR E0393
             //~| ERROR E0191
 }
diff --git a/src/test/ui/issues/issue-21950.stderr b/src/test/ui/issues/issue-21950.stderr
index 7655e0811e0..9be7b052da3 100644
--- a/src/test/ui/issues/issue-21950.stderr
+++ b/src/test/ui/issues/issue-21950.stderr
@@ -1,16 +1,16 @@
 error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/issue-21950.rs:5:14
+  --> $DIR/issue-21950.rs:5:18
    |
-LL |             &Add;
-   |              ^^^ missing reference to `Rhs`
+LL |             &dyn Add;
+   |                  ^^^ missing reference to `Rhs`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
 error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified
   --> $DIR/issue-21950.rs:5:14
    |
-LL |             &Add;
-   |              ^^^ associated type `Output` must be specified
+LL |             &dyn Add;
+   |              ^^^^^^^ associated type `Output` must be specified
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-22034.rs b/src/test/ui/issues/issue-22034.rs
index 75ac78ad24f..508c9c91b04 100644
--- a/src/test/ui/issues/issue-22034.rs
+++ b/src/test/ui/issues/issue-22034.rs
@@ -4,8 +4,8 @@ extern crate libc;
 
 fn main() {
     let ptr: *mut () = 0 as *mut _;
-    let _: &mut Fn() = unsafe {
-        &mut *(ptr as *mut Fn())
+    let _: &mut dyn Fn() = unsafe {
+        &mut *(ptr as *mut dyn Fn())
         //~^ ERROR expected a `std::ops::Fn<()>` closure, found `()`
     };
 }
diff --git a/src/test/ui/issues/issue-22034.stderr b/src/test/ui/issues/issue-22034.stderr
index de2d315ff5c..19fb080154a 100644
--- a/src/test/ui/issues/issue-22034.stderr
+++ b/src/test/ui/issues/issue-22034.stderr
@@ -1,7 +1,7 @@
 error[E0277]: expected a `std::ops::Fn<()>` closure, found `()`
   --> $DIR/issue-22034.rs:8:16
    |
-LL |         &mut *(ptr as *mut Fn())
+LL |         &mut *(ptr as *mut dyn Fn())
    |                ^^^ expected an `Fn<()>` closure, found `()`
    |
    = help: the trait `std::ops::Fn<()>` is not implemented for `()`
diff --git a/src/test/ui/issues/issue-22289.rs b/src/test/ui/issues/issue-22289.rs
index b683834de44..e1b3dfe5b61 100644
--- a/src/test/ui/issues/issue-22289.rs
+++ b/src/test/ui/issues/issue-22289.rs
@@ -1,3 +1,3 @@
 fn main() {
-    0 as &std::any::Any; //~ ERROR non-primitive cast
+    0 as &dyn std::any::Any; //~ ERROR non-primitive cast
 }
diff --git a/src/test/ui/issues/issue-22289.stderr b/src/test/ui/issues/issue-22289.stderr
index e9846b848f4..cc7ace30cab 100644
--- a/src/test/ui/issues/issue-22289.stderr
+++ b/src/test/ui/issues/issue-22289.stderr
@@ -1,8 +1,8 @@
 error[E0605]: non-primitive cast: `i32` as `&(dyn std::any::Any + 'static)`
   --> $DIR/issue-22289.rs:2:5
    |
-LL |     0 as &std::any::Any;
-   |     ^^^^^^^^^^^^^^^^^^^
+LL |     0 as &dyn std::any::Any;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
 
diff --git a/src/test/ui/issues/issue-22312.rs b/src/test/ui/issues/issue-22312.rs
index f7ebdb0372a..250fec25887 100644
--- a/src/test/ui/issues/issue-22312.rs
+++ b/src/test/ui/issues/issue-22312.rs
@@ -8,7 +8,7 @@ pub trait Array2D: Index<usize> {
             return None;
         }
         let i = y * self.columns() + x;
-        let indexer = &(*self as &Index<usize, Output = <Self as Index<usize>>::Output>);
+        let indexer = &(*self as &dyn Index<usize, Output = <Self as Index<usize>>::Output>);
         //~^ERROR non-primitive cast
         Some(indexer.index(i))
     }
diff --git a/src/test/ui/issues/issue-22312.stderr b/src/test/ui/issues/issue-22312.stderr
index 6a012b214c5..fc32fd376b7 100644
--- a/src/test/ui/issues/issue-22312.stderr
+++ b/src/test/ui/issues/issue-22312.stderr
@@ -1,8 +1,8 @@
 error[E0605]: non-primitive cast: `Self` as `&dyn std::ops::Index<usize, Output = <Self as std::ops::Index<usize>>::Output>`
   --> $DIR/issue-22312.rs:11:24
    |
-LL |         let indexer = &(*self as &Index<usize, Output = <Self as Index<usize>>::Output>);
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         let indexer = &(*self as &dyn 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
 
diff --git a/src/test/ui/issues/issue-22370.rs b/src/test/ui/issues/issue-22370.rs
index 90912cfda0d..bab0469c011 100644
--- a/src/test/ui/issues/issue-22370.rs
+++ b/src/test/ui/issues/issue-22370.rs
@@ -1,6 +1,6 @@
 trait A<T=Self> {}
 
-fn f(a: &A) {}
+fn f(a: &dyn A) {}
 //~^ ERROR E0393
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-22370.stderr b/src/test/ui/issues/issue-22370.stderr
index f21551a55bc..3ce164e9548 100644
--- a/src/test/ui/issues/issue-22370.stderr
+++ b/src/test/ui/issues/issue-22370.stderr
@@ -1,8 +1,8 @@
 error[E0393]: the type parameter `T` must be explicitly specified
-  --> $DIR/issue-22370.rs:3:10
+  --> $DIR/issue-22370.rs:3:14
    |
-LL | fn f(a: &A) {}
-   |          ^ missing reference to `T`
+LL | fn f(a: &dyn A) {}
+   |              ^ missing reference to `T`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
diff --git a/src/test/ui/issues/issue-22434.rs b/src/test/ui/issues/issue-22434.rs
index 0d7d67cbc1b..3e800a2b61d 100644
--- a/src/test/ui/issues/issue-22434.rs
+++ b/src/test/ui/issues/issue-22434.rs
@@ -2,7 +2,7 @@ pub trait Foo {
     type A;
 }
 
-type I<'a> = &'a (Foo + 'a);
+type I<'a> = &'a (dyn Foo + 'a);
 //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-22434.stderr b/src/test/ui/issues/issue-22434.stderr
index bbdbeb6ae98..eb78c4fc311 100644
--- a/src/test/ui/issues/issue-22434.stderr
+++ b/src/test/ui/issues/issue-22434.stderr
@@ -4,8 +4,8 @@ error[E0191]: the value of the associated type `A` (from the trait `Foo`) must b
 LL |     type A;
    |     ------- `A` defined here
 ...
-LL | type I<'a> = &'a (Foo + 'a);
-   |                   ^^^^^^^^ associated type `A` must be specified
+LL | type I<'a> = &'a (dyn Foo + 'a);
+   |                   ^^^^^^^^^^^^ associated type `A` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-22560.rs b/src/test/ui/issues/issue-22560.rs
index 4b8e3aa9eb3..acee99dbedc 100644
--- a/src/test/ui/issues/issue-22560.rs
+++ b/src/test/ui/issues/issue-22560.rs
@@ -1,6 +1,6 @@
 use std::ops::{Add, Sub};
 
-type Test = Add +
+type Test = dyn Add +
             //~^ ERROR E0393
             //~| ERROR E0191
             Sub;
diff --git a/src/test/ui/issues/issue-22560.stderr b/src/test/ui/issues/issue-22560.stderr
index 322136d35ca..5b58adb197c 100644
--- a/src/test/ui/issues/issue-22560.stderr
+++ b/src/test/ui/issues/issue-22560.stderr
@@ -7,21 +7,21 @@ LL |             Sub;
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
 error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/issue-22560.rs:3:13
+  --> $DIR/issue-22560.rs:3:17
    |
-LL | type Test = Add +
-   |             ^^^ missing reference to `Rhs`
+LL | type Test = dyn Add +
+   |                 ^^^ missing reference to `Rhs`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
   --> $DIR/issue-22560.rs:6:13
    |
-LL | type Test = Add +
-   |             ---
-   |             |
-   |             first non-auto trait
-   |             trait alias used in trait object type (first use)
+LL | type Test = dyn Add +
+   |                 ---
+   |                 |
+   |                 first non-auto trait
+   |                 trait alias used in trait object type (first use)
 ...
 LL |             Sub;
    |             ^^^
@@ -32,7 +32,7 @@ LL |             Sub;
 error[E0191]: the value of the associated types `Output` (from the trait `std::ops::Add`), `Output` (from the trait `std::ops::Sub`) must be specified
   --> $DIR/issue-22560.rs:3:13
    |
-LL |   type Test = Add +
+LL |   type Test = dyn Add +
    |  _____________^
    | |_____________|
    | |
diff --git a/src/test/ui/issues/issue-22781.rs b/src/test/ui/issues/issue-22781.rs
index 5df3d88b168..a7b94c106a4 100644
--- a/src/test/ui/issues/issue-22781.rs
+++ b/src/test/ui/issues/issue-22781.rs
@@ -4,7 +4,7 @@ use std::collections::HashMap;
 use std::collections::hash_map::Entry::Vacant;
 
 pub fn foo() {
-    type F = Box<Fn(&()) + 'static>;
+    type F = Box<dyn Fn(&()) + 'static>;
     let mut map: HashMap<(), F> = HashMap::new();
     let x: &mut F = match map.entry(()) {
         Vacant(_) => unimplemented!(),
diff --git a/src/test/ui/issues/issue-22872.rs b/src/test/ui/issues/issue-22872.rs
index 8ef4af15bd4..5db2891e65e 100644
--- a/src/test/ui/issues/issue-22872.rs
+++ b/src/test/ui/issues/issue-22872.rs
@@ -17,7 +17,7 @@ pub trait Process<'a> {
 }
 
 fn push_process<P>(process: P) where P: Process<'static> {
-    let _: Box<for<'b> Wrap<'b>> = Box::new(Wrapper(process));
+    let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
 //~^ ERROR is not an iterator
 }
 
diff --git a/src/test/ui/issues/issue-22872.stderr b/src/test/ui/issues/issue-22872.stderr
index ebd096f1dde..fc5de23752b 100644
--- a/src/test/ui/issues/issue-22872.stderr
+++ b/src/test/ui/issues/issue-22872.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `<P as Process<'_>>::Item` is not an iterator
-  --> $DIR/issue-22872.rs:20:36
+  --> $DIR/issue-22872.rs:20:40
    |
-LL |     let _: Box<for<'b> Wrap<'b>> = Box::new(Wrapper(process));
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ `<P as Process<'_>>::Item` is not an iterator
+LL |     let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ `<P as Process<'_>>::Item` is not an iterator
    |
    = help: the trait `std::iter::Iterator` is not implemented for `<P as Process<'_>>::Item`
    = help: consider adding a `where <P as Process<'_>>::Item: std::iter::Iterator` bound
diff --git a/src/test/ui/issues/issue-23024.rs b/src/test/ui/issues/issue-23024.rs
index 0639ce30aa0..2638e15f0ea 100644
--- a/src/test/ui/issues/issue-23024.rs
+++ b/src/test/ui/issues/issue-23024.rs
@@ -4,9 +4,9 @@ use std::any::Any;
 fn main()
 {
     fn h(x:i32) -> i32 {3*x}
-    let mut vfnfer:Vec<Box<Any>> = vec![];
+    let mut vfnfer:Vec<Box<dyn Any>> = vec![];
     vfnfer.push(box h);
-    println!("{:?}",(vfnfer[0] as Fn)(3));
+    println!("{:?}",(vfnfer[0] as dyn Fn)(3));
     //~^ ERROR the precise format of `Fn`-family traits'
     //~| ERROR wrong number of type arguments: expected 1, found 0 [E0107]
     //~| ERROR the value of the associated type `Output` (from the trait `std::ops::FnOnce`)
diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr
index fbefbe4f56e..e99854539de 100644
--- a/src/test/ui/issues/issue-23024.stderr
+++ b/src/test/ui/issues/issue-23024.stderr
@@ -1,23 +1,23 @@
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead
-  --> $DIR/issue-23024.rs:9:35
+  --> $DIR/issue-23024.rs:9:39
    |
-LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
-   |                                   ^^
+LL |     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
+   |                                       ^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/29625
    = help: add #![feature(unboxed_closures)] to the crate attributes to enable
 
 error[E0107]: wrong number of type arguments: expected 1, found 0
-  --> $DIR/issue-23024.rs:9:35
+  --> $DIR/issue-23024.rs:9:39
    |
-LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
-   |                                   ^^ expected 1 type argument
+LL |     println!("{:?}",(vfnfer[0] as dyn 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:9:35
    |
-LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
-   |                                   ^^ associated type `Output` must be specified
+LL |     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
+   |                                   ^^^^^^ associated type `Output` must be specified
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-23041.rs b/src/test/ui/issues/issue-23041.rs
index a18e85806d9..a1371521a0a 100644
--- a/src/test/ui/issues/issue-23041.rs
+++ b/src/test/ui/issues/issue-23041.rs
@@ -2,6 +2,6 @@ use std::any::Any;
 fn main()
 {
     fn bar(x:i32) ->i32 { 3*x };
-    let b:Box<Any> = Box::new(bar as fn(_)->_);
+    let b:Box<dyn Any> = Box::new(bar as fn(_)->_);
     b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
 }
diff --git a/src/test/ui/issues/issue-23046.rs b/src/test/ui/issues/issue-23046.rs
index 898654b7b59..a68369616d8 100644
--- a/src/test/ui/issues/issue-23046.rs
+++ b/src/test/ui/issues/issue-23046.rs
@@ -1,6 +1,6 @@
 pub enum Expr<'var, VAR> {
     Let(Box<Expr<'var, VAR>>,
-        Box<for<'v> Fn(Expr<'v, VAR>) -> Expr<'v, VAR> + 'var>)
+        Box<dyn for<'v> Fn(Expr<'v, VAR>) -> Expr<'v, VAR> + 'var>)
 }
 
 pub fn add<'var, VAR>
diff --git a/src/test/ui/issues/issue-23281.rs b/src/test/ui/issues/issue-23281.rs
index 2b457a57d3e..d5f74728862 100644
--- a/src/test/ui/issues/issue-23281.rs
+++ b/src/test/ui/issues/issue-23281.rs
@@ -1,7 +1,7 @@
 pub struct Struct;
 
 impl Struct {
-    pub fn function(funs: Vec<Fn() -> ()>) {}
+    pub fn function(funs: Vec<dyn Fn() -> ()>) {}
     //~^ ERROR the size for values of type
 }
 
diff --git a/src/test/ui/issues/issue-23281.stderr b/src/test/ui/issues/issue-23281.stderr
index e540d4e8192..f1def474583 100644
--- a/src/test/ui/issues/issue-23281.stderr
+++ b/src/test/ui/issues/issue-23281.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time
   --> $DIR/issue-23281.rs:4:5
    |
-LL |     pub fn function(funs: Vec<Fn() -> ()>) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL |     pub fn function(funs: Vec<dyn 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/issues/issue-24446.rs b/src/test/ui/issues/issue-24446.rs
index c5e1b49e5ed..ffd6dfabc28 100644
--- a/src/test/ui/issues/issue-24446.rs
+++ b/src/test/ui/issues/issue-24446.rs
@@ -1,5 +1,5 @@
 fn main() {
-    static foo: Fn() -> u32 = || -> u32 {
+    static foo: dyn Fn() -> u32 = || -> u32 {
         //~^ ERROR the size for values of type
         0
     };
diff --git a/src/test/ui/issues/issue-24446.stderr b/src/test/ui/issues/issue-24446.stderr
index ffec73b1ab4..344443e7830 100644
--- a/src/test/ui/issues/issue-24446.stderr
+++ b/src/test/ui/issues/issue-24446.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `(dyn std::ops::Fn() -> u32 + 'static)` cannot be known at compilation time
   --> $DIR/issue-24446.rs:2:17
    |
-LL |     static foo: Fn() -> u32 = || -> u32 {
-   |                 ^^^^^^^^^^^ doesn't have a size known at compile-time
+LL |     static foo: dyn Fn() -> u32 = || -> u32 {
+   |                 ^^^^^^^^^^^^^^^ 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/issues/issue-25180.rs b/src/test/ui/issues/issue-25180.rs
index 739d571d727..297f403c05e 100644
--- a/src/test/ui/issues/issue-25180.rs
+++ b/src/test/ui/issues/issue-25180.rs
@@ -2,6 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_upper_case_globals)]
 
-const x: &'static Fn() = &|| println!("ICE here");
+const x: &'static dyn Fn() = &|| println!("ICE here");
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-26056.rs b/src/test/ui/issues/issue-26056.rs
index 0d9973b4548..99d43ec792b 100644
--- a/src/test/ui/issues/issue-26056.rs
+++ b/src/test/ui/issues/issue-26056.rs
@@ -17,6 +17,6 @@ impl<K> Map for K {
 
 fn main() {
     let _ = &()
-        as &Map<Key=u32,MapValue=u32>;
+        as &dyn Map<Key=u32,MapValue=u32>;
     //~^ ERROR E0038
 }
diff --git a/src/test/ui/issues/issue-26056.stderr b/src/test/ui/issues/issue-26056.stderr
index 44fabd0db19..9c4cf0b18ac 100644
--- a/src/test/ui/issues/issue-26056.stderr
+++ b/src/test/ui/issues/issue-26056.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Map` cannot be made into an object
   --> $DIR/issue-26056.rs:20:13
    |
-LL |         as &Map<Key=u32,MapValue=u32>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Map` cannot be made into an object
+LL |         as &dyn Map<Key=u32,MapValue=u32>;
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Map` cannot be made into an object
    |
    = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
 
diff --git a/src/test/ui/issues/issue-26638.rs b/src/test/ui/issues/issue-26638.rs
index 0f5ed5caa74..72fe4286a06 100644
--- a/src/test/ui/issues/issue-26638.rs
+++ b/src/test/ui/issues/issue-26638.rs
@@ -1,4 +1,4 @@
-fn parse_type(iter: Box<Iterator<Item=&str>+'static>) -> &str { iter.next() }
+fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next() }
 //~^ ERROR missing lifetime specifier [E0106]
 
 fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
diff --git a/src/test/ui/issues/issue-26638.stderr b/src/test/ui/issues/issue-26638.stderr
index 64c2cd43264..6d7c1b0c43f 100644
--- a/src/test/ui/issues/issue-26638.stderr
+++ b/src/test/ui/issues/issue-26638.stderr
@@ -1,8 +1,8 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/issue-26638.rs:1:58
+  --> $DIR/issue-26638.rs:1:62
    |
-LL | fn parse_type(iter: Box<Iterator<Item=&str>+'static>) -> &str { iter.next() }
-   |                                                          ^ expected lifetime parameter
+LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next() }
+   |                                                              ^ expected lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `iter`'s 2 lifetimes it is borrowed from
 
diff --git a/src/test/ui/issues/issue-26905.rs b/src/test/ui/issues/issue-26905.rs
index efd06219c3d..4c5c67d58bc 100644
--- a/src/test/ui/issues/issue-26905.rs
+++ b/src/test/ui/issues/issue-26905.rs
@@ -19,5 +19,5 @@ fn main() {
     let data = [1, 2, 3];
     let iter = data.iter();
     let x = MyRc { _ptr: &iter, _boo: NotPhantomData(PhantomData) };
-    let _y: MyRc<Iterator<Item=&u32>> = x;
+    let _y: MyRc<dyn Iterator<Item=&u32>> = x;
 }
diff --git a/src/test/ui/issues/issue-27105.rs b/src/test/ui/issues/issue-27105.rs
index 5f0dff12aec..1aafa11768f 100644
--- a/src/test/ui/issues/issue-27105.rs
+++ b/src/test/ui/issues/issue-27105.rs
@@ -3,7 +3,7 @@ use std::cell::RefCell;
 use std::rc::Rc;
 
 pub struct Callbacks {
-    callbacks: Vec<Rc<RefCell<FnMut(i32)>>>,
+    callbacks: Vec<Rc<RefCell<dyn FnMut(i32)>>>,
 }
 
 impl Callbacks {
diff --git a/src/test/ui/issues/issue-28279.rs b/src/test/ui/issues/issue-28279.rs
index c770c509859..fab91160a88 100644
--- a/src/test/ui/issues/issue-28279.rs
+++ b/src/test/ui/issues/issue-28279.rs
@@ -2,7 +2,7 @@
 #![allow(dead_code)]
 use std::rc::Rc;
 
-fn test1() -> Rc<for<'a> Fn(&'a usize) + 'static> {
+fn test1() -> Rc<dyn for<'a> Fn(&'a usize) + 'static> {
     if let Some(_) = Some(1) {
         loop{}
     } else {
@@ -10,7 +10,7 @@ fn test1() -> Rc<for<'a> Fn(&'a usize) + 'static> {
     }
 }
 
-fn test2() -> *mut (for<'a> Fn(&'a usize) + 'static) {
+fn test2() -> *mut (dyn for<'a> Fn(&'a usize) + 'static) {
     if let Some(_) = Some(1) {
         loop{}
     } else {
diff --git a/src/test/ui/issues/issue-28576.rs b/src/test/ui/issues/issue-28576.rs
index de665d5aa16..972c839b648 100644
--- a/src/test/ui/issues/issue-28576.rs
+++ b/src/test/ui/issues/issue-28576.rs
@@ -4,7 +4,7 @@ pub trait Foo<RHS=Self> {
 
 pub trait Bar: Foo<Assoc=()> {
     fn new(&self, b: &
-           Bar //~ ERROR the trait `Bar` cannot be made into an object
+           dyn Bar //~ ERROR the trait `Bar` cannot be made into an object
               <Assoc=()>
     );
 }
diff --git a/src/test/ui/issues/issue-28576.stderr b/src/test/ui/issues/issue-28576.stderr
index cf6174ba857..3249d76e69b 100644
--- a/src/test/ui/issues/issue-28576.stderr
+++ b/src/test/ui/issues/issue-28576.stderr
@@ -1,7 +1,7 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/issue-28576.rs:7:12
    |
-LL | /            Bar
+LL | /            dyn Bar
 LL | |               <Assoc=()>
    | |________________________^ the trait `Bar` cannot be made into an object
    |
diff --git a/src/test/ui/issues/issue-2904.rs b/src/test/ui/issues/issue-2904.rs
index 7755b7ecee3..42f71a1b096 100644
--- a/src/test/ui/issues/issue-2904.rs
+++ b/src/test/ui/issues/issue-2904.rs
@@ -55,7 +55,7 @@ fn square_from_char(c: char) -> square {
 
 fn read_board_grid<rdr:'static + Read>(mut input: rdr)
                    -> Vec<Vec<square>> {
-    let mut input: &mut Read = &mut input;
+    let mut input: &mut dyn Read = &mut input;
     let mut grid = Vec::new();
     let mut line = [0; 10];
     input.read(&mut line);
diff --git a/src/test/ui/issues/issue-32963.rs b/src/test/ui/issues/issue-32963.rs
index be59d3522b8..ee099069f02 100644
--- a/src/test/ui/issues/issue-32963.rs
+++ b/src/test/ui/issues/issue-32963.rs
@@ -5,7 +5,7 @@ trait Misc {}
 fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
 
 fn main() {
-    size_of_copy::<Misc+Copy>();
+    size_of_copy::<dyn Misc + Copy>();
     //~^ ERROR only auto traits can be used as additional traits in a trait object
     //~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied
 }
diff --git a/src/test/ui/issues/issue-32963.stderr b/src/test/ui/issues/issue-32963.stderr
index cde4123dc3f..a31a74a07f4 100644
--- a/src/test/ui/issues/issue-32963.stderr
+++ b/src/test/ui/issues/issue-32963.stderr
@@ -1,19 +1,19 @@
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/issue-32963.rs:8:25
+  --> $DIR/issue-32963.rs:8:31
    |
-LL |     size_of_copy::<Misc+Copy>();
-   |                    ---- ^^^^
-   |                    |    |
-   |                    |    additional non-auto trait
-   |                    |    trait alias used in trait object type (additional use)
-   |                    first non-auto trait
-   |                    trait alias used in trait object type (first use)
+LL |     size_of_copy::<dyn Misc + Copy>();
+   |                        ----   ^^^^
+   |                        |      |
+   |                        |      additional non-auto trait
+   |                        |      trait alias used in trait object type (additional use)
+   |                        first non-auto trait
+   |                        trait alias used in trait object type (first use)
 
 error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied
   --> $DIR/issue-32963.rs:8:5
    |
-LL |     size_of_copy::<Misc+Copy>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`
+LL |     size_of_copy::<dyn Misc + Copy>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`
    |
 note: required by `size_of_copy`
   --> $DIR/issue-32963.rs:5:1
diff --git a/src/test/ui/issues/issue-32995.rs b/src/test/ui/issues/issue-32995.rs
index c32fb63f1e5..3526deffc79 100644
--- a/src/test/ui/issues/issue-32995.rs
+++ b/src/test/ui/issues/issue-32995.rs
@@ -17,11 +17,11 @@ fn main() {
     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
     //~| WARN previously accepted
 
-    let o : Box<::std::marker()::Send> = Box::new(1);
+    let o : Box<dyn (::std::marker()::Send)> = Box::new(1);
     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
     //~| WARN previously accepted
 
-    let o : Box<Send + ::std::marker()::Sync> = Box::new(1);
+    let o : Box<dyn Send + ::std::marker()::Sync> = Box::new(1);
     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
     //~| WARN previously accepted
 }
diff --git a/src/test/ui/issues/issue-32995.stderr b/src/test/ui/issues/issue-32995.stderr
index 97b4b7fa76c..f97d86f6522 100644
--- a/src/test/ui/issues/issue-32995.stderr
+++ b/src/test/ui/issues/issue-32995.stderr
@@ -36,19 +36,19 @@ LL |     let p = ::std::str::from_utf8::()(b"foo").unwrap();
    = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
 
 error: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-32995.rs:20:30
+  --> $DIR/issue-32995.rs:20:35
    |
-LL |     let o : Box<::std::marker()::Send> = Box::new(1);
-   |                              ^^
+LL |     let o : Box<dyn (::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 type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-32995.rs:24:37
+  --> $DIR/issue-32995.rs:24:41
    |
-LL |     let o : Box<Send + ::std::marker()::Sync> = Box::new(1);
-   |                                     ^^
+LL |     let o : Box<dyn 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>
diff --git a/src/test/ui/issues/issue-33140-traitobject-crate.rs b/src/test/ui/issues/issue-33140-traitobject-crate.rs
index 2b644817df1..078f3f3dd2c 100644
--- a/src/test/ui/issues/issue-33140-traitobject-crate.rs
+++ b/src/test/ui/issues/issue-33140-traitobject-crate.rs
@@ -13,85 +13,85 @@
 /// Implementations for all traits in std are provided.
 pub unsafe trait Trait {}
 
-unsafe impl Trait for ::std::any::Any + Send { }
-unsafe impl Trait for ::std::any::Any + Sync { }
-unsafe impl Trait for ::std::any::Any + Send + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::Borrow<T> + Send { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::Borrow<T> + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::Borrow<T> + Send + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::BorrowMut<T> + Send { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::BorrowMut<T> + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::borrow::BorrowMut<T> + Send + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsMut<T> + Send { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsMut<T> + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsMut<T> + Send + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsRef<T> + Send { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsRef<T> + Sync { }
-unsafe impl<T: ?Sized> Trait for ::std::convert::AsRef<T> + Send + Sync { }
-unsafe impl Trait for ::std::error::Error + Send { }
-unsafe impl Trait for ::std::error::Error + Sync { }
-unsafe impl Trait for ::std::error::Error + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Binary + Send { }
-unsafe impl Trait for ::std::fmt::Binary + Sync { }
-unsafe impl Trait for ::std::fmt::Binary + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Debug + Send { }
-unsafe impl Trait for ::std::fmt::Debug + Sync { }
-unsafe impl Trait for ::std::fmt::Debug + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Display + Send { }
-unsafe impl Trait for ::std::fmt::Display + Sync { }
-unsafe impl Trait for ::std::fmt::Display + Send + Sync { }
-unsafe impl Trait for ::std::fmt::LowerExp + Send { }
-unsafe impl Trait for ::std::fmt::LowerExp + Sync { }
-unsafe impl Trait for ::std::fmt::LowerExp + Send + Sync { }
-unsafe impl Trait for ::std::fmt::LowerHex + Send { }
-unsafe impl Trait for ::std::fmt::LowerHex + Sync { }
-unsafe impl Trait for ::std::fmt::LowerHex + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Octal + Send { }
-unsafe impl Trait for ::std::fmt::Octal + Sync { }
-unsafe impl Trait for ::std::fmt::Octal + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Pointer + Send { }
-unsafe impl Trait for ::std::fmt::Pointer + Sync { }
-unsafe impl Trait for ::std::fmt::Pointer + Send + Sync { }
-unsafe impl Trait for ::std::fmt::UpperExp + Send { }
-unsafe impl Trait for ::std::fmt::UpperExp + Sync { }
-unsafe impl Trait for ::std::fmt::UpperExp + Send + Sync { }
-unsafe impl Trait for ::std::fmt::UpperHex + Send { }
-unsafe impl Trait for ::std::fmt::UpperHex + Sync { }
-unsafe impl Trait for ::std::fmt::UpperHex + Send + Sync { }
-unsafe impl Trait for ::std::fmt::Write + Send { }
-unsafe impl Trait for ::std::fmt::Write + Sync { }
-unsafe impl Trait for ::std::fmt::Write + Send + Sync { }
-unsafe impl Trait for ::std::hash::Hasher + Send { }
-unsafe impl Trait for ::std::hash::Hasher + Sync { }
-unsafe impl Trait for ::std::hash::Hasher + Send + Sync { }
-unsafe impl Trait for ::std::io::BufRead + Send { }
-unsafe impl Trait for ::std::io::BufRead + Sync { }
-unsafe impl Trait for ::std::io::BufRead + Send + Sync { }
-unsafe impl Trait for ::std::io::Read + Send { }
-unsafe impl Trait for ::std::io::Read + Sync { }
-unsafe impl Trait for ::std::io::Read + Send + Sync { }
-unsafe impl Trait for ::std::io::Seek + Send { }
-unsafe impl Trait for ::std::io::Seek + Sync { }
-unsafe impl Trait for ::std::io::Seek + Send + Sync { }
-unsafe impl Trait for ::std::io::Write + Send { }
-unsafe impl Trait for ::std::io::Write + Sync { }
-unsafe impl Trait for ::std::io::Write + Send + Sync { }
-unsafe impl<T, I> Trait for ::std::iter::IntoIterator<IntoIter=I, Item=T> { }
-unsafe impl<T> Trait for ::std::iter::Iterator<Item=T> + Send { }
-unsafe impl<T> Trait for ::std::iter::Iterator<Item=T> + Sync { }
-unsafe impl<T> Trait for ::std::iter::Iterator<Item=T> + Send + Sync { }
-unsafe impl Trait for ::std::marker::Send + Send { }
-unsafe impl Trait for ::std::marker::Send + Sync { }
-unsafe impl Trait for ::std::marker::Send + Send + Sync { }
-unsafe impl Trait for ::std::marker::Sync + Send { }
-unsafe impl Trait for ::std::marker::Sync + Sync { }
-unsafe impl Trait for ::std::marker::Sync + Send + Sync { }
-unsafe impl Trait for ::std::ops::Drop + Send { }
-unsafe impl Trait for ::std::ops::Drop + Sync { }
-unsafe impl Trait for ::std::ops::Drop + Send + Sync { }
-unsafe impl Trait for ::std::string::ToString + Send { }
-unsafe impl Trait for ::std::string::ToString + Sync { }
-unsafe impl Trait for ::std::string::ToString + Send + Sync { }
+unsafe impl Trait for dyn (::std::any::Any) + Send { }
+unsafe impl Trait for dyn (::std::any::Any) + Sync { }
+unsafe impl Trait for dyn (::std::any::Any) + Send + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::Borrow<T>) + Send { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::Borrow<T>) + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::Borrow<T>) + Send + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::BorrowMut<T>) + Send { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::BorrowMut<T>) + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::borrow::BorrowMut<T>) + Send + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsMut<T>) + Send { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsMut<T>) + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsMut<T>) + Send + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsRef<T>) + Send { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsRef<T>) + Sync { }
+unsafe impl<T: ?Sized> Trait for dyn (::std::convert::AsRef<T>) + Send + Sync { }
+unsafe impl Trait for dyn (::std::error::Error) + Send { }
+unsafe impl Trait for dyn (::std::error::Error) + Sync { }
+unsafe impl Trait for dyn (::std::error::Error) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Binary) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Binary) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Binary) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Debug) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Debug) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Debug) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Display) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Display) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Display) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::LowerExp) + Send { }
+unsafe impl Trait for dyn (::std::fmt::LowerExp) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::LowerExp) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::LowerHex) + Send { }
+unsafe impl Trait for dyn (::std::fmt::LowerHex) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::LowerHex) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Octal) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Octal) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Octal) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Pointer) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Pointer) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Pointer) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::UpperExp) + Send { }
+unsafe impl Trait for dyn (::std::fmt::UpperExp) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::UpperExp) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::UpperHex) + Send { }
+unsafe impl Trait for dyn (::std::fmt::UpperHex) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::UpperHex) + Send + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Write) + Send { }
+unsafe impl Trait for dyn (::std::fmt::Write) + Sync { }
+unsafe impl Trait for dyn (::std::fmt::Write) + Send + Sync { }
+unsafe impl Trait for dyn (::std::hash::Hasher) + Send { }
+unsafe impl Trait for dyn (::std::hash::Hasher) + Sync { }
+unsafe impl Trait for dyn (::std::hash::Hasher) + Send + Sync { }
+unsafe impl Trait for dyn (::std::io::BufRead) + Send { }
+unsafe impl Trait for dyn (::std::io::BufRead) + Sync { }
+unsafe impl Trait for dyn (::std::io::BufRead) + Send + Sync { }
+unsafe impl Trait for dyn (::std::io::Read) + Send { }
+unsafe impl Trait for dyn (::std::io::Read) + Sync { }
+unsafe impl Trait for dyn (::std::io::Read) + Send + Sync { }
+unsafe impl Trait for dyn (::std::io::Seek) + Send { }
+unsafe impl Trait for dyn (::std::io::Seek) + Sync { }
+unsafe impl Trait for dyn (::std::io::Seek) + Send + Sync { }
+unsafe impl Trait for dyn (::std::io::Write) + Send { }
+unsafe impl Trait for dyn (::std::io::Write) + Sync { }
+unsafe impl Trait for dyn (::std::io::Write) + Send + Sync { }
+unsafe impl<T, I> Trait for dyn (::std::iter::IntoIterator<IntoIter=I, Item=T>) { }
+unsafe impl<T> Trait for dyn (::std::iter::Iterator<Item=T>) + Send { }
+unsafe impl<T> Trait for dyn (::std::iter::Iterator<Item=T>) + Sync { }
+unsafe impl<T> Trait for dyn (::std::iter::Iterator<Item=T>) + Send + Sync { }
+unsafe impl Trait for dyn (::std::marker::Send) + Send { }
+unsafe impl Trait for dyn (::std::marker::Send) + Sync { }
+unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
+unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
+unsafe impl Trait for dyn (::std::marker::Sync) + Sync { }
+unsafe impl Trait for dyn (::std::marker::Sync) + Send + Sync { }
+unsafe impl Trait for dyn (::std::ops::Drop) + Send { }
+unsafe impl Trait for dyn (::std::ops::Drop) + Sync { }
+unsafe impl Trait for dyn (::std::ops::Drop) + Send + Sync { }
+unsafe impl Trait for dyn (::std::string::ToString) + Send { }
+unsafe impl Trait for dyn (::std::string::ToString) + Sync { }
+unsafe impl Trait for dyn (::std::string::ToString) + Send + Sync { }
 fn assert_trait<T: Trait + ?Sized>() {}
 
 fn main() {
diff --git a/src/test/ui/issues/issue-33140-traitobject-crate.stderr b/src/test/ui/issues/issue-33140-traitobject-crate.stderr
index 6f71e79d0ee..76db98aa38b 100644
--- a/src/test/ui/issues/issue-33140-traitobject-crate.stderr
+++ b/src/test/ui/issues/issue-33140-traitobject-crate.stderr
@@ -1,10 +1,10 @@
 warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
   --> $DIR/issue-33140-traitobject-crate.rs:85:1
    |
-LL | unsafe impl Trait for ::std::marker::Send + Sync { }
-   | ------------------------------------------------ first implementation here
-LL | unsafe impl Trait for ::std::marker::Send + Send + Sync { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
+LL | unsafe impl Trait for dyn (::std::marker::Send) + Sync { }
+   | ------------------------------------------------------ first implementation here
+LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
    |
 note: lint level defined here
   --> $DIR/issue-33140-traitobject-crate.rs:3:9
@@ -17,10 +17,10 @@ LL | #![warn(order_dependent_trait_objects)]
 warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
   --> $DIR/issue-33140-traitobject-crate.rs:86:1
    |
-LL | unsafe impl Trait for ::std::marker::Send + Send + Sync { }
-   | ------------------------------------------------------- first implementation here
-LL | unsafe impl Trait for ::std::marker::Sync + Send { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
+LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
+   | ------------------------------------------------------------- first implementation here
+LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
    |
    = 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 #56484 <https://github.com/rust-lang/rust/issues/56484>
@@ -28,11 +28,11 @@ LL | unsafe impl Trait for ::std::marker::Sync + Send { }
 warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
   --> $DIR/issue-33140-traitobject-crate.rs:88:1
    |
-LL | unsafe impl Trait for ::std::marker::Sync + Send { }
-   | ------------------------------------------------ first implementation here
-LL | unsafe impl Trait for ::std::marker::Sync + Sync { }
-LL | unsafe impl Trait for ::std::marker::Sync + Send + Sync { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
+LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
+   | ------------------------------------------------------ first implementation here
+LL | unsafe impl Trait for dyn (::std::marker::Sync) + Sync { }
+LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send + Sync { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
    |
    = 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 #56484 <https://github.com/rust-lang/rust/issues/56484>
diff --git a/src/test/ui/issues/issue-33140.rs b/src/test/ui/issues/issue-33140.rs
index 930e24218ac..9bdac4b8375 100644
--- a/src/test/ui/issues/issue-33140.rs
+++ b/src/test/ui/issues/issue-33140.rs
@@ -38,10 +38,10 @@ impl Foo<dyn Sync + Send> {
 }
 
 fn main() {
-    assert_eq!(<Send+Sync>::xyz(), false);
-    assert_eq!(<Sync+Send>::xyz(), true);
-    assert_eq!(<Send+Sync>::uvw(), false);
-    assert_eq!(<Sync+Send+Sync>::uvw(), true);
-    assert_eq!(<Foo<Send+Sync>>::abc(), false);
-    assert_eq!(<Foo<Sync+Send>>::abc(), true);
+    assert_eq!(<dyn Send + Sync>::xyz(), false);
+    assert_eq!(<dyn Sync + Send>::xyz(), true);
+    assert_eq!(<dyn Send + Sync>::uvw(), false);
+    assert_eq!(<dyn Sync + Send+ Sync>::uvw(), true);
+    assert_eq!(<Foo<dyn Send + Sync>>::abc(), false);
+    assert_eq!(<Foo<dyn Sync + Send>>::abc(), true);
 }
diff --git a/src/test/ui/issues/issue-33241.rs b/src/test/ui/issues/issue-33241.rs
index 4c5052a60d3..4d6204cb288 100644
--- a/src/test/ui/issues/issue-33241.rs
+++ b/src/test/ui/issues/issue-33241.rs
@@ -9,6 +9,6 @@ fn any<T>() -> T { unreachable!() }
 
 
 fn main() {
-    let t: &(u8, fmt::Debug) = any();
+    let t: &(u8, dyn fmt::Debug) = any();
     println!("{:?}", &t.1);
 }
diff --git a/src/test/ui/issues/issue-3424.rs b/src/test/ui/issues/issue-3424.rs
index a9ba5f5408b..19f9f13e144 100644
--- a/src/test/ui/issues/issue-3424.rs
+++ b/src/test/ui/issues/issue-3424.rs
@@ -5,7 +5,7 @@
 
 pub struct Path;
 
-type rsrc_loader = Box<FnMut(&Path) -> Result<String, String>>;
+type rsrc_loader = Box<dyn FnMut(&Path) -> Result<String, String>>;
 
 fn tester()
 {
diff --git a/src/test/ui/issues/issue-35139.rs b/src/test/ui/issues/issue-35139.rs
index 1ee00fc7ec2..e462f354373 100644
--- a/src/test/ui/issues/issue-35139.rs
+++ b/src/test/ui/issues/issue-35139.rs
@@ -7,14 +7,14 @@ pub trait MethodType {
 pub struct MTFn;
 
 impl<'a> MethodType for MTFn { //~ ERROR E0207
-    type GetProp = fmt::Debug + 'a;
+    type GetProp = dyn fmt::Debug + 'a;
 }
 
-fn bad(a: Box<<MTFn as MethodType>::GetProp>) -> Box<fmt::Debug+'static> {
+fn bad(a: Box<<MTFn as MethodType>::GetProp>) -> Box<dyn fmt::Debug+'static> {
     a
 }
 
-fn dangling(a: &str) -> Box<fmt::Debug> {
+fn dangling(a: &str) -> Box<dyn fmt::Debug> {
     bad(Box::new(a))
 }
 
diff --git a/src/test/ui/issues/issue-35546.rs b/src/test/ui/issues/issue-35546.rs
index 19c0491e4bc..500ba48e0b7 100644
--- a/src/test/ui/issues/issue-35546.rs
+++ b/src/test/ui/issues/issue-35546.rs
@@ -6,11 +6,11 @@
 // `value` field of `Node<Send>`).
 
 struct Node<T: ?Sized + Send> {
-    next: Option<Box<Node<Send>>>,
+    next: Option<Box<Node<dyn Send>>>,
     value: T,
 }
 
-fn clear(head: &mut Option<Box<Node<Send>>>) {
+fn clear(head: &mut Option<Box<Node<dyn Send>>>) {
     match head.take() {
         Some(node) => *head = node.next,
         None => (),
diff --git a/src/test/ui/issues/issue-35570.rs b/src/test/ui/issues/issue-35570.rs
index e809b46bcdc..9bb9db63951 100644
--- a/src/test/ui/issues/issue-35570.rs
+++ b/src/test/ui/issues/issue-35570.rs
@@ -8,7 +8,7 @@ trait Trait2<'a> {
   type Ty;
 }
 
-fn _ice(param: Box<for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
+fn _ice(param: Box<dyn for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
     let _e: (usize, usize) = unsafe{mem::transmute(param)};
 }
 
diff --git a/src/test/ui/issues/issue-35976.rs b/src/test/ui/issues/issue-35976.rs
index 95c0cc95bb2..d075794d994 100644
--- a/src/test/ui/issues/issue-35976.rs
+++ b/src/test/ui/issues/issue-35976.rs
@@ -3,14 +3,14 @@ mod private {
         fn wait(&self) where Self: Sized;
     }
 
-    impl Future for Box<Future> {
+    impl Future for Box<dyn Future> {
         fn wait(&self) { }
     }
 }
 
 //use private::Future;
 
-fn bar(arg: Box<private::Future>) {
+fn bar(arg: Box<dyn private::Future>) {
     arg.wait();
     //~^ ERROR the `wait` method cannot be invoked on a trait object
 }
diff --git a/src/test/ui/issues/issue-3609.rs b/src/test/ui/issues/issue-3609.rs
index c76c183821e..9bccb2a21e3 100644
--- a/src/test/ui/issues/issue-3609.rs
+++ b/src/test/ui/issues/issue-3609.rs
@@ -6,7 +6,7 @@ use std::thread;
 use std::sync::mpsc::Sender;
 
 type RingBuffer = Vec<f64> ;
-type SamplesFn = Box<FnMut(&RingBuffer) + Send>;
+type SamplesFn = Box<dyn FnMut(&RingBuffer) + Send>;
 
 enum Msg
 {
diff --git a/src/test/ui/issues/issue-36839.rs b/src/test/ui/issues/issue-36839.rs
index 0944d07896e..a660368f401 100644
--- a/src/test/ui/issues/issue-36839.rs
+++ b/src/test/ui/issues/issue-36839.rs
@@ -19,5 +19,5 @@ impl<T> Broken for T {
 
 
 fn main() {
-    let _m: &Broken<Assoc=()> = &();
+    let _m: &dyn Broken<Assoc=()> = &();
 }
diff --git a/src/test/ui/issues/issue-3702-2.rs b/src/test/ui/issues/issue-3702-2.rs
index c3a92a23cef..d47f6d248f7 100644
--- a/src/test/ui/issues/issue-3702-2.rs
+++ b/src/test/ui/issues/issue-3702-2.rs
@@ -7,12 +7,12 @@ impl ToPrimitive for isize {}
 
 trait Add {
     fn to_int(&self) -> isize;
-    fn add_dynamic(&self, other: &Add) -> isize;
+    fn add_dynamic(&self, other: &dyn Add) -> isize;
 }
 
 impl Add for isize {
     fn to_int(&self) -> isize { *self }
-    fn add_dynamic(&self, other: &Add) -> isize {
+    fn add_dynamic(&self, other: &dyn Add) -> isize {
         self.to_int() + other.to_int() //~ ERROR multiple applicable items in scope
     }
 }
diff --git a/src/test/ui/issues/issue-37515.rs b/src/test/ui/issues/issue-37515.rs
index 090b9bbf1ec..cc07bd1d915 100644
--- a/src/test/ui/issues/issue-37515.rs
+++ b/src/test/ui/issues/issue-37515.rs
@@ -2,7 +2,7 @@
 // compile-pass
 #![warn(unused)]
 
-type Z = for<'x> Send;
+type Z = dyn for<'x> Send;
 //~^ WARN type alias is never used
 
 
diff --git a/src/test/ui/issues/issue-37515.stderr b/src/test/ui/issues/issue-37515.stderr
index 1b496559484..1476d17cdc6 100644
--- a/src/test/ui/issues/issue-37515.stderr
+++ b/src/test/ui/issues/issue-37515.stderr
@@ -1,8 +1,8 @@
 warning: type alias is never used: `Z`
   --> $DIR/issue-37515.rs:5:1
    |
-LL | type Z = for<'x> Send;
-   | ^^^^^^^^^^^^^^^^^^^^^^
+LL | type Z = dyn for<'x> Send;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: lint level defined here
   --> $DIR/issue-37515.rs:3:9
diff --git a/src/test/ui/issues/issue-38404.rs b/src/test/ui/issues/issue-38404.rs
index cddd75e267c..1a92acc3404 100644
--- a/src/test/ui/issues/issue-38404.rs
+++ b/src/test/ui/issues/issue-38404.rs
@@ -1,6 +1,6 @@
 trait A<T>: std::ops::Add<Self> + Sized {}
 trait B<T>: A<T> {}
-trait C<T>: A<B<T, Output=usize>> {}
+trait C<T>: A<dyn B<T, Output=usize>> {}
 //~^ ERROR the trait `B` cannot be made into an object
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-38404.stderr b/src/test/ui/issues/issue-38404.stderr
index 06bcf220f18..d18a26b3a76 100644
--- a/src/test/ui/issues/issue-38404.stderr
+++ b/src/test/ui/issues/issue-38404.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `B` cannot be made into an object
   --> $DIR/issue-38404.rs:3:15
    |
-LL | trait C<T>: A<B<T, Output=usize>> {}
-   |               ^^^^^^^^^^^^^^^^^^ the trait `B` cannot be made into an object
+LL | trait C<T>: A<dyn 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
 
diff --git a/src/test/ui/issues/issue-38604.rs b/src/test/ui/issues/issue-38604.rs
index c172595a245..002a3c43fcb 100644
--- a/src/test/ui/issues/issue-38604.rs
+++ b/src/test/ui/issues/issue-38604.rs
@@ -11,6 +11,6 @@ impl Foo for () {
 }
 
 fn main() {
-    let _f: Box<Foo> = //~ ERROR `Foo` cannot be made into an object
+    let _f: Box<dyn Foo> = //~ ERROR `Foo` cannot be made into an object
         Box::new(()); //~ ERROR `Foo` cannot be made into an object
 }
diff --git a/src/test/ui/issues/issue-38604.stderr b/src/test/ui/issues/issue-38604.stderr
index 77b42b80613..8ef7d346cb3 100644
--- a/src/test/ui/issues/issue-38604.stderr
+++ b/src/test/ui/issues/issue-38604.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/issue-38604.rs:14:13
    |
-LL |     let _f: Box<Foo> =
-   |             ^^^^^^^^ the trait `Foo` cannot be made into an object
+LL |     let _f: Box<dyn Foo> =
+   |             ^^^^^^^^^^^^ 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
 
diff --git a/src/test/ui/issues/issue-40000.rs b/src/test/ui/issues/issue-40000.rs
index 320992c0764..9d5ef481afc 100644
--- a/src/test/ui/issues/issue-40000.rs
+++ b/src/test/ui/issues/issue-40000.rs
@@ -1,7 +1,7 @@
 fn main() {
     let bar: fn(&mut u32) = |_| {};
 
-    fn foo(x: Box<Fn(&i32)>) {}
-    let bar = Box::new(|x: &i32| {}) as Box<Fn(_)>;
+    fn foo(x: Box<dyn Fn(&i32)>) {}
+    let bar = Box::new(|x: &i32| {}) as Box<dyn Fn(_)>;
     foo(bar); //~ ERROR E0308
 }
diff --git a/src/test/ui/issues/issue-41139.rs b/src/test/ui/issues/issue-41139.rs
index f3e6c44ecb9..4814232607c 100644
--- a/src/test/ui/issues/issue-41139.rs
+++ b/src/test/ui/issues/issue-41139.rs
@@ -1,8 +1,8 @@
 trait Trait {}
 
-fn get_function<'a>() -> &'a Fn() -> Trait { panic!("") }
+fn get_function<'a>() -> &'a dyn Fn() -> dyn Trait { panic!("") }
 
 fn main() {
-    let t : &Trait = &get_function()();
+    let t : &dyn Trait = &get_function()();
     //~^ ERROR cannot move a value of type dyn Trait
 }
diff --git a/src/test/ui/issues/issue-41139.stderr b/src/test/ui/issues/issue-41139.stderr
index 4dd017b0a91..829d0cfa72c 100644
--- a/src/test/ui/issues/issue-41139.stderr
+++ b/src/test/ui/issues/issue-41139.stderr
@@ -1,8 +1,8 @@
 error[E0161]: cannot move a value of type dyn Trait: the size of dyn Trait cannot be statically determined
-  --> $DIR/issue-41139.rs:6:23
+  --> $DIR/issue-41139.rs:6:27
    |
-LL |     let t : &Trait = &get_function()();
-   |                       ^^^^^^^^^^^^^^^^
+LL |     let t : &dyn Trait = &get_function()();
+   |                           ^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-42312.rs b/src/test/ui/issues/issue-42312.rs
index b1c651f665b..426efcbf9b1 100644
--- a/src/test/ui/issues/issue-42312.rs
+++ b/src/test/ui/issues/issue-42312.rs
@@ -5,7 +5,7 @@ pub trait Foo {
     //~^ ERROR the size for values of type
 }
 
-pub fn f(_: ToString) {}
+pub fn f(_: dyn ToString) {}
 //~^ ERROR the size for values of type
 
 fn main() { }
diff --git a/src/test/ui/issues/issue-42312.stderr b/src/test/ui/issues/issue-42312.stderr
index 20c8d085cbc..bfdc4272fb3 100644
--- a/src/test/ui/issues/issue-42312.stderr
+++ b/src/test/ui/issues/issue-42312.stderr
@@ -11,10 +11,10 @@ LL |     fn baz(_: Self::Target) where Self: Deref {}
    = help: unsized locals are gated as an unstable feature
 
 error[E0277]: the size for values of type `(dyn std::string::ToString + 'static)` cannot be known at compilation time
-  --> $DIR/issue-42312.rs:8:23
+  --> $DIR/issue-42312.rs:8:27
    |
-LL | pub fn f(_: ToString) {}
-   |                       ^ doesn't have a size known at compile-time
+LL | pub fn f(_: dyn 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/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/issues/issue-4335.rs b/src/test/ui/issues/issue-4335.rs
index d3c9954cdb0..a10ae9a1243 100644
--- a/src/test/ui/issues/issue-4335.rs
+++ b/src/test/ui/issues/issue-4335.rs
@@ -2,7 +2,7 @@
 
 fn id<T>(t: T) -> T { t }
 
-fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
+fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> {
     id(Box::new(|| *v))
         //~^ ERROR E0373
         //~| ERROR E0507
diff --git a/src/test/ui/issues/issue-4335.stderr b/src/test/ui/issues/issue-4335.stderr
index 1b5cab24929..f1b6e475949 100644
--- a/src/test/ui/issues/issue-4335.stderr
+++ b/src/test/ui/issues/issue-4335.stderr
@@ -1,7 +1,7 @@
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
   --> $DIR/issue-4335.rs:6:20
    |
-LL | fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
+LL | fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> {
    |             - captured outer variable
 LL |     id(Box::new(|| *v))
    |                    ^^ cannot move out of captured variable in an `FnMut` closure
diff --git a/src/test/ui/issues/issue-45730.rs b/src/test/ui/issues/issue-45730.rs
index 5709125e5f0..3776759fe07 100644
--- a/src/test/ui/issues/issue-45730.rs
+++ b/src/test/ui/issues/issue-45730.rs
@@ -3,7 +3,7 @@ fn main() {
     let x: *const _ = 0 as _; //~ ERROR cannot cast
 
     let x: *const _ = 0 as *const _; //~ ERROR cannot cast
-    let y: Option<*const fmt::Debug> = Some(x) as _;
+    let y: Option<*const dyn fmt::Debug> = Some(x) as _;
 
     let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast
 }
diff --git a/src/test/ui/issues/issue-4972.rs b/src/test/ui/issues/issue-4972.rs
index 9c95a979476..fab258f137e 100644
--- a/src/test/ui/issues/issue-4972.rs
+++ b/src/test/ui/issues/issue-4972.rs
@@ -6,10 +6,10 @@ trait MyTrait {
 }
 
 pub enum TraitWrapper {
-    A(Box<MyTrait+'static>),
+    A(Box<dyn MyTrait + 'static>),
 }
 
-fn get_tw_map(tw: &TraitWrapper) -> &MyTrait {
+fn get_tw_map(tw: &TraitWrapper) -> &dyn MyTrait {
     match *tw {
         TraitWrapper::A(box ref map) => map, //~ ERROR cannot be dereferenced
     }
diff --git a/src/test/ui/issues/issue-50761.rs b/src/test/ui/issues/issue-50761.rs
index bcf3ebcd60a..70b4bc8b755 100644
--- a/src/test/ui/issues/issue-50761.rs
+++ b/src/test/ui/issues/issue-50761.rs
@@ -14,7 +14,7 @@ mod b {
     }
 
     impl Builder {
-        pub fn with_a(&mut self, _a: fn() -> ::a::A) {}
+        pub fn with_a(&mut self, _a: fn() -> dyn (::a::A)) {}
     }
 }
 
diff --git a/src/test/ui/issues/issue-50781.rs b/src/test/ui/issues/issue-50781.rs
index edf8d82b480..3c5e5a9f69a 100644
--- a/src/test/ui/issues/issue-50781.rs
+++ b/src/test/ui/issues/issue-50781.rs
@@ -15,5 +15,5 @@ impl Trait for dyn X {}
 
 pub fn main() {
     // Check that this does not segfault.
-    <X as X>::foo(&());
+    <dyn X as X>::foo(&());
 }
diff --git a/src/test/ui/issues/issue-5153.rs b/src/test/ui/issues/issue-5153.rs
index 551880ae009..e6737662088 100644
--- a/src/test/ui/issues/issue-5153.rs
+++ b/src/test/ui/issues/issue-5153.rs
@@ -7,6 +7,6 @@ impl Foo for isize {
 }
 
 fn main() {
-    (&5isize as &Foo).foo();
+    (&5isize as &dyn Foo).foo();
     //~^ ERROR: no method named `foo` found for type `&dyn Foo` in the current scope
 }
diff --git a/src/test/ui/issues/issue-5153.stderr b/src/test/ui/issues/issue-5153.stderr
index 48adfee0dec..97214fbdc52 100644
--- a/src/test/ui/issues/issue-5153.stderr
+++ b/src/test/ui/issues/issue-5153.stderr
@@ -1,8 +1,8 @@
 error[E0599]: no method named `foo` found for type `&dyn Foo` in the current scope
-  --> $DIR/issue-5153.rs:10:23
+  --> $DIR/issue-5153.rs:10:27
    |
-LL |     (&5isize as &Foo).foo();
-   |                       ^^^
+LL |     (&5isize as &dyn 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:
diff --git a/src/test/ui/issues/issue-5216.rs b/src/test/ui/issues/issue-5216.rs
index fd490884fa1..35b343edfbd 100644
--- a/src/test/ui/issues/issue-5216.rs
+++ b/src/test/ui/issues/issue-5216.rs
@@ -1,10 +1,10 @@
 fn f() { }
-struct S(Box<FnMut()>);
+struct S(Box<dyn FnMut()>);
 pub static C: S = S(f); //~ ERROR mismatched types
 
 
 fn g() { }
-type T = Box<FnMut()>;
+type T = Box<dyn FnMut()>;
 pub static D: T = g; //~ ERROR mismatched types
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-53419.rs b/src/test/ui/issues/issue-53419.rs
index 52149cf486d..bf6791734d4 100644
--- a/src/test/ui/issues/issue-53419.rs
+++ b/src/test/ui/issues/issue-53419.rs
@@ -1,7 +1,7 @@
 //compile-pass
 
 struct Foo {
-    bar: for<'r> Fn(usize, &'r FnMut())
+    bar: dyn for<'r> Fn(usize, &'r dyn FnMut())
 }
 
 fn main() {
diff --git a/src/test/ui/issues/issue-54582.rs b/src/test/ui/issues/issue-54582.rs
index c2dbf361911..8c50cac67f8 100644
--- a/src/test/ui/issues/issue-54582.rs
+++ b/src/test/ui/issues/issue-54582.rs
@@ -9,7 +9,7 @@ pub enum Enum {
 
 impl Stage for Enum {}
 
-pub static ARRAY: [(&Stage, &str); 1] = [
+pub static ARRAY: [(&dyn Stage, &str); 1] = [
     (&Enum::A, ""),
 ];
 
diff --git a/src/test/ui/issues/issue-55796.rs b/src/test/ui/issues/issue-55796.rs
index efdea5c9b1e..088d4301c51 100644
--- a/src/test/ui/issues/issue-55796.rs
+++ b/src/test/ui/issues/issue-55796.rs
@@ -12,12 +12,12 @@ pub trait Graph<'a> {
     fn out_edges(&'a self, u: &Self::Node) -> Self::EdgesIter;
     fn in_edges(&'a self, u: &Self::Node) -> Self::EdgesIter;
 
-    fn out_neighbors(&'a self, u: &Self::Node) -> Box<Iterator<Item = Self::Node>> {
+    fn out_neighbors(&'a self, u: &Self::Node) -> Box<dyn Iterator<Item = Self::Node>> {
         Box::new(self.out_edges(u).map(|e| e.target()))
 //~^ ERROR cannot infer
     }
 
-    fn in_neighbors(&'a self, u: &Self::Node) -> Box<Iterator<Item = Self::Node>> {
+    fn in_neighbors(&'a self, u: &Self::Node) -> Box<dyn Iterator<Item = Self::Node>> {
         Box::new(self.in_edges(u).map(|e| e.target()))
 //~^ ERROR cannot infer
     }
diff --git a/src/test/ui/issues/issue-5883.rs b/src/test/ui/issues/issue-5883.rs
index b4a73ba99c5..0de53502397 100644
--- a/src/test/ui/issues/issue-5883.rs
+++ b/src/test/ui/issues/issue-5883.rs
@@ -1,10 +1,10 @@
 trait A {}
 
 struct Struct {
-    r: A+'static
+    r: dyn A + 'static
 }
 
-fn new_struct(r: A+'static)
+fn new_struct(r: dyn A + 'static)
     -> Struct { //~^ ERROR the size for values of type
     //~^ ERROR the size for values of type
     Struct { r: r }
diff --git a/src/test/ui/issues/issue-5883.stderr b/src/test/ui/issues/issue-5883.stderr
index 7753881f736..c2de1d09550 100644
--- a/src/test/ui/issues/issue-5883.stderr
+++ b/src/test/ui/issues/issue-5883.stderr
@@ -1,7 +1,7 @@
 error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
   --> $DIR/issue-5883.rs:7:15
    |
-LL | fn new_struct(r: A+'static)
+LL | fn new_struct(r: dyn A + 'static)
    |               ^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)`
diff --git a/src/test/ui/issues/issue-60989.rs b/src/test/ui/issues/issue-60989.rs
index 930e98bedce..6dae1e1347b 100644
--- a/src/test/ui/issues/issue-60989.rs
+++ b/src/test/ui/issues/issue-60989.rs
@@ -13,6 +13,6 @@ fn main() {
     //~^ ERROR type arguments are not allowed for this type
 
     let c1 = A {};
-    c1::<Into<B>>;
+    c1::<dyn Into<B>>;
     //~^ ERROR type arguments are not allowed for this type
 }
diff --git a/src/test/ui/issues/issue-60989.stderr b/src/test/ui/issues/issue-60989.stderr
index 55a0b9626df..5d2d9e83c9b 100644
--- a/src/test/ui/issues/issue-60989.stderr
+++ b/src/test/ui/issues/issue-60989.stderr
@@ -7,8 +7,8 @@ LL |     c1::<()>;
 error[E0109]: type arguments are not allowed for this type
   --> $DIR/issue-60989.rs:16:10
    |
-LL |     c1::<Into<B>>;
-   |          ^^^^^^^ type argument not allowed
+LL |     c1::<dyn Into<B>>;
+   |          ^^^^^^^^^^^ type argument not allowed
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-7013.rs b/src/test/ui/issues/issue-7013.rs
index ee68aa8623b..3d72b67e391 100644
--- a/src/test/ui/issues/issue-7013.rs
+++ b/src/test/ui/issues/issue-7013.rs
@@ -19,10 +19,10 @@ impl Foo for B {
 }
 
 struct A {
-    v: Box<Foo + Send>,
+    v: Box<dyn Foo + Send>,
 }
 
 fn main() {
-    let a = A {v: box B{v: None} as Box<Foo+Send>};
+    let a = A {v: box B{v: None} as Box<dyn Foo + Send>};
     //~^ ERROR `std::rc::Rc<std::cell::RefCell<A>>` cannot be sent between threads safely
 }
diff --git a/src/test/ui/issues/issue-7013.stderr b/src/test/ui/issues/issue-7013.stderr
index 22185c7da34..f2668d33122 100644
--- a/src/test/ui/issues/issue-7013.stderr
+++ b/src/test/ui/issues/issue-7013.stderr
@@ -1,7 +1,7 @@
 error[E0277]: `std::rc::Rc<std::cell::RefCell<A>>` cannot be sent between threads safely
   --> $DIR/issue-7013.rs:26:19
    |
-LL |     let a = A {v: box B{v: None} as Box<Foo+Send>};
+LL |     let a = A {v: box B{v: None} as Box<dyn 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>>`
diff --git a/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs
index 7dd6b07177f..619256c7871 100644
--- a/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs
+++ b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs
@@ -18,5 +18,5 @@ trait A {
 
 impl<T: 'static> A for T {}
 
-fn owned2<T: 'static>(a: Box<T>) { a as Box<A>; }
-fn owned3<T: 'static>(a: Box<T>) { box a as Box<A>; }
+fn owned2<T: 'static>(a: Box<T>) { a as Box<dyn A>; }
+fn owned3<T: 'static>(a: Box<T>) { box a as Box<dyn A>; }
diff --git a/src/test/ui/issues/issue-8398.rs b/src/test/ui/issues/issue-8398.rs
index bd37b8582b2..a65c667b08e 100644
--- a/src/test/ui/issues/issue-8398.rs
+++ b/src/test/ui/issues/issue-8398.rs
@@ -6,7 +6,7 @@ pub trait Writer {
     fn write(&mut self, b: &[u8]) -> Result<(), ()>;
 }
 
-fn foo(a: &mut Writer) {
+fn foo(a: &mut dyn Writer) {
     a.write(&[]).unwrap();
 }
 
diff --git a/src/test/ui/issues/issue-9719.rs b/src/test/ui/issues/issue-9719.rs
index 96865344e74..1e38ab9c6c2 100644
--- a/src/test/ui/issues/issue-9719.rs
+++ b/src/test/ui/issues/issue-9719.rs
@@ -12,8 +12,8 @@ mod a {
     }
     impl X for isize {}
 
-    pub struct Z<'a>(Enum<&'a (X+'a)>);
-    fn foo() { let x: isize = 42; let z = Z(Enum::A(&x as &X)); let _ = z; }
+    pub struct Z<'a>(Enum<&'a (dyn X + 'a)>);
+    fn foo() { let x: isize = 42; let z = Z(Enum::A(&x as &dyn X)); let _ = z; }
 }
 
 mod b {
@@ -22,20 +22,20 @@ mod b {
     }
     impl X for isize {}
     struct Y<'a>{
-        x:Option<&'a (X+'a)>,
+        x:Option<&'a (dyn X + 'a)>,
     }
 
     fn bar() {
         let x: isize = 42;
-        let _y = Y { x: Some(&x as &X) };
+        let _y = Y { x: Some(&x as &dyn X) };
     }
 }
 
 mod c {
     pub trait X { fn f(&self); }
     impl X for isize { fn f(&self) {} }
-    pub struct Z<'a>(Option<&'a (X+'a)>);
-    fn main() { let x: isize = 42; let z = Z(Some(&x as &X)); let _ = z; }
+    pub struct Z<'a>(Option<&'a (dyn X + 'a)>);
+    fn main() { let x: isize = 42; let z = Z(Some(&x as &dyn X)); let _ = z; }
 }
 
 pub fn main() {}
diff --git a/src/test/ui/kindck/kindck-copy.rs b/src/test/ui/kindck/kindck-copy.rs
index dadeb956964..eb18613682f 100644
--- a/src/test/ui/kindck/kindck-copy.rs
+++ b/src/test/ui/kindck/kindck-copy.rs
@@ -34,16 +34,16 @@ fn test<'a,T,U:Copy>(_: &'a isize) {
     assert_copy::<Box<&'a mut isize>>(); //~ ERROR : std::marker::Copy` is not satisfied
 
     // borrowed object types are generally ok
-    assert_copy::<&'a Dummy>();
-    assert_copy::<&'a (Dummy+Send)>();
-    assert_copy::<&'static (Dummy+Send)>();
+    assert_copy::<&'a dyn Dummy>();
+    assert_copy::<&'a (dyn Dummy + Send)>();
+    assert_copy::<&'static (dyn Dummy + Send)>();
 
     // owned object types are not ok
-    assert_copy::<Box<Dummy>>(); //~ ERROR : std::marker::Copy` is not satisfied
-    assert_copy::<Box<Dummy+Send>>(); //~ ERROR : std::marker::Copy` is not satisfied
+    assert_copy::<Box<dyn Dummy>>(); //~ ERROR : std::marker::Copy` is not satisfied
+    assert_copy::<Box<dyn Dummy + Send>>(); //~ ERROR : std::marker::Copy` is not satisfied
 
     // mutable object types are not ok
-    assert_copy::<&'a mut (Dummy+Send)>();  //~ ERROR : std::marker::Copy` is not satisfied
+    assert_copy::<&'a mut (dyn Dummy + Send)>();  //~ ERROR : std::marker::Copy` is not satisfied
 
     // unsafe ptrs are ok
     assert_copy::<*const isize>();
diff --git a/src/test/ui/kindck/kindck-copy.stderr b/src/test/ui/kindck/kindck-copy.stderr
index 2680cb7c012..929a8076562 100644
--- a/src/test/ui/kindck/kindck-copy.stderr
+++ b/src/test/ui/kindck/kindck-copy.stderr
@@ -77,8 +77,8 @@ LL | fn assert_copy<T:Copy>() { }
 error[E0277]: the trait bound `std::boxed::Box<dyn Dummy>: std::marker::Copy` is not satisfied
   --> $DIR/kindck-copy.rs:42:5
    |
-LL |     assert_copy::<Box<Dummy>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy>`
+LL |     assert_copy::<Box<dyn Dummy>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy>`
    |
 note: required by `assert_copy`
   --> $DIR/kindck-copy.rs:5:1
@@ -89,8 +89,8 @@ LL | fn assert_copy<T:Copy>() { }
 error[E0277]: the trait bound `std::boxed::Box<dyn Dummy + std::marker::Send>: std::marker::Copy` is not satisfied
   --> $DIR/kindck-copy.rs:43:5
    |
-LL |     assert_copy::<Box<Dummy+Send>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy + std::marker::Send>`
+LL |     assert_copy::<Box<dyn Dummy + Send>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy + std::marker::Send>`
    |
 note: required by `assert_copy`
   --> $DIR/kindck-copy.rs:5:1
@@ -101,8 +101,8 @@ LL | fn assert_copy<T:Copy>() { }
 error[E0277]: the trait bound `&'a mut (dyn Dummy + std::marker::Send + 'a): std::marker::Copy` is not satisfied
   --> $DIR/kindck-copy.rs:46:5
    |
-LL |     assert_copy::<&'a mut (Dummy+Send)>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)`
+LL |     assert_copy::<&'a mut (dyn Dummy + Send)>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)`
    |
 note: required by `assert_copy`
   --> $DIR/kindck-copy.rs:5:1
diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr
index c1f662fda61..25d0e74187f 100644
--- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr
+++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr
@@ -1,7 +1,7 @@
 error[E0277]: `T` cannot be sent between threads safely
   --> $DIR/kindck-impl-type-params.rs:18:13
    |
-LL |     let a = &t as &Gettable<T>;
+LL |     let a = &t as &dyn Gettable<T>;
    |             ^^ `T` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `T`
@@ -12,7 +12,7 @@ LL |     let a = &t as &Gettable<T>;
 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:18:13
    |
-LL |     let a = &t as &Gettable<T>;
+LL |     let a = &t as &dyn Gettable<T>;
    |             ^^ the trait `std::marker::Copy` is not implemented for `T`
    |
    = help: consider adding a `where T: std::marker::Copy` bound
@@ -20,10 +20,10 @@ LL |     let a = &t as &Gettable<T>;
    = note: required for the cast to the object type `dyn Gettable<T>`
 
 error[E0277]: `T` cannot be sent between threads safely
-  --> $DIR/kindck-impl-type-params.rs:25:27
+  --> $DIR/kindck-impl-type-params.rs:25:31
    |
-LL |     let a: &Gettable<T> = &t;
-   |                           ^^ `T` cannot be sent between threads safely
+LL |     let a: &dyn Gettable<T> = &t;
+   |                               ^^ `T` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `T`
    = help: consider adding a `where T: std::marker::Send` bound
@@ -31,10 +31,10 @@ LL |     let a: &Gettable<T> = &t;
    = note: required for the cast to the object type `dyn Gettable<T>`
 
 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
-  --> $DIR/kindck-impl-type-params.rs:25:27
+  --> $DIR/kindck-impl-type-params.rs:25:31
    |
-LL |     let a: &Gettable<T> = &t;
-   |                           ^^ the trait `std::marker::Copy` is not implemented for `T`
+LL |     let a: &dyn Gettable<T> = &t;
+   |                               ^^ the trait `std::marker::Copy` is not implemented for `T`
    |
    = help: consider adding a `where T: std::marker::Copy` bound
    = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
@@ -43,17 +43,17 @@ LL |     let a: &Gettable<T> = &t;
 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:38:13
    |
-LL |     let a = t as Box<Gettable<String>>;
+LL |     let a = t as Box<dyn Gettable<String>>;
    |             ^ the trait `std::marker::Copy` is not implemented for `std::string::String`
    |
    = note: required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>`
    = note: required for the cast to the object type `dyn Gettable<std::string::String>`
 
 error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied
-  --> $DIR/kindck-impl-type-params.rs:46:33
+  --> $DIR/kindck-impl-type-params.rs:46:37
    |
-LL |     let a: Box<Gettable<Foo>> = t;
-   |                                 ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
+LL |     let a: Box<dyn Gettable<Foo>> = t;
+   |                                     ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
    |
    = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`
    = note: required for the cast to the object type `dyn Gettable<foo3::Foo>`
diff --git a/src/test/ui/kindck/kindck-impl-type-params.rs b/src/test/ui/kindck/kindck-impl-type-params.rs
index a47e418709d..c4f90f36acf 100644
--- a/src/test/ui/kindck/kindck-impl-type-params.rs
+++ b/src/test/ui/kindck/kindck-impl-type-params.rs
@@ -15,27 +15,27 @@ impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 
 fn f<T>(val: T) {
     let t: S<T> = S(marker::PhantomData);
-    let a = &t as &Gettable<T>;
+    let a = &t as &dyn Gettable<T>;
     //~^ ERROR `T` cannot be sent between threads safely
     //~| ERROR : std::marker::Copy` is not satisfied
 }
 
 fn g<T>(val: T) {
     let t: S<T> = S(marker::PhantomData);
-    let a: &Gettable<T> = &t;
+    let a: &dyn Gettable<T> = &t;
     //~^ ERROR `T` cannot be sent between threads safely
     //~| ERROR : std::marker::Copy` is not satisfied
 }
 
 fn foo<'a>() {
     let t: S<&'a isize> = S(marker::PhantomData);
-    let a = &t as &Gettable<&'a isize>;
+    let a = &t as &dyn Gettable<&'a isize>;
     //~^ ERROR does not fulfill
 }
 
 fn foo2<'a>() {
     let t: Box<S<String>> = box S(marker::PhantomData);
-    let a = t as Box<Gettable<String>>;
+    let a = t as Box<dyn Gettable<String>>;
     //~^ ERROR : std::marker::Copy` is not satisfied
 }
 
@@ -43,7 +43,7 @@ fn foo3<'a>() {
     struct Foo; // does not impl Copy
 
     let t: Box<S<Foo>> = box S(marker::PhantomData);
-    let a: Box<Gettable<Foo>> = t;
+    let a: Box<dyn Gettable<Foo>> = t;
     //~^ ERROR : std::marker::Copy` is not satisfied
 }
 
diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr
index 8580e6812b4..e6f7088bd46 100644
--- a/src/test/ui/kindck/kindck-impl-type-params.stderr
+++ b/src/test/ui/kindck/kindck-impl-type-params.stderr
@@ -1,7 +1,7 @@
 error[E0277]: `T` cannot be sent between threads safely
   --> $DIR/kindck-impl-type-params.rs:18:13
    |
-LL |     let a = &t as &Gettable<T>;
+LL |     let a = &t as &dyn Gettable<T>;
    |             ^^ `T` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `T`
@@ -12,7 +12,7 @@ LL |     let a = &t as &Gettable<T>;
 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:18:13
    |
-LL |     let a = &t as &Gettable<T>;
+LL |     let a = &t as &dyn Gettable<T>;
    |             ^^ the trait `std::marker::Copy` is not implemented for `T`
    |
    = help: consider adding a `where T: std::marker::Copy` bound
@@ -20,10 +20,10 @@ LL |     let a = &t as &Gettable<T>;
    = note: required for the cast to the object type `dyn Gettable<T>`
 
 error[E0277]: `T` cannot be sent between threads safely
-  --> $DIR/kindck-impl-type-params.rs:25:27
+  --> $DIR/kindck-impl-type-params.rs:25:31
    |
-LL |     let a: &Gettable<T> = &t;
-   |                           ^^ `T` cannot be sent between threads safely
+LL |     let a: &dyn Gettable<T> = &t;
+   |                               ^^ `T` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `T`
    = help: consider adding a `where T: std::marker::Send` bound
@@ -31,10 +31,10 @@ LL |     let a: &Gettable<T> = &t;
    = note: required for the cast to the object type `dyn Gettable<T>`
 
 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
-  --> $DIR/kindck-impl-type-params.rs:25:27
+  --> $DIR/kindck-impl-type-params.rs:25:31
    |
-LL |     let a: &Gettable<T> = &t;
-   |                           ^^ the trait `std::marker::Copy` is not implemented for `T`
+LL |     let a: &dyn Gettable<T> = &t;
+   |                               ^^ the trait `std::marker::Copy` is not implemented for `T`
    |
    = help: consider adding a `where T: std::marker::Copy` bound
    = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
@@ -43,7 +43,7 @@ LL |     let a: &Gettable<T> = &t;
 error[E0477]: the type `&'a isize` does not fulfill the required lifetime
   --> $DIR/kindck-impl-type-params.rs:32:13
    |
-LL |     let a = &t as &Gettable<&'a isize>;
+LL |     let a = &t as &dyn Gettable<&'a isize>;
    |             ^^
    |
    = note: type must satisfy the static lifetime
@@ -51,17 +51,17 @@ LL |     let a = &t as &Gettable<&'a isize>;
 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:38:13
    |
-LL |     let a = t as Box<Gettable<String>>;
+LL |     let a = t as Box<dyn Gettable<String>>;
    |             ^ the trait `std::marker::Copy` is not implemented for `std::string::String`
    |
    = note: required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>`
    = note: required for the cast to the object type `dyn Gettable<std::string::String>`
 
 error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied
-  --> $DIR/kindck-impl-type-params.rs:46:33
+  --> $DIR/kindck-impl-type-params.rs:46:37
    |
-LL |     let a: Box<Gettable<Foo>> = t;
-   |                                 ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
+LL |     let a: Box<dyn Gettable<Foo>> = t;
+   |                                     ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
    |
    = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`
    = note: required for the cast to the object type `dyn Gettable<foo3::Foo>`
diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.rs b/src/test/ui/kindck/kindck-inherited-copy-bound.rs
index 0134636fa0d..61e72908248 100644
--- a/src/test/ui/kindck/kindck-inherited-copy-bound.rs
+++ b/src/test/ui/kindck/kindck-inherited-copy-bound.rs
@@ -21,7 +21,7 @@ fn a() {
 fn b() {
     let x: Box<_> = box 3;
     let y = &x;
-    let z = &x as &Foo;
+    let z = &x as &dyn Foo;
     //~^ ERROR E0038
     //~| ERROR E0038
 }
diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr
index 0ed2da46fba..1e719e26084 100644
--- a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr
+++ b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr
@@ -14,15 +14,15 @@ LL | fn take_param<T:Foo>(foo: &T) { }
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/kindck-inherited-copy-bound.rs:24:19
    |
-LL |     let z = &x as &Foo;
-   |                   ^^^^ the trait `Foo` cannot be made into an object
+LL |     let z = &x as &dyn Foo;
+   |                   ^^^^^^^^ the trait `Foo` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
 
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/kindck-inherited-copy-bound.rs:24:13
    |
-LL |     let z = &x as &Foo;
+LL |     let z = &x as &dyn Foo;
    |             ^^ the trait `Foo` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
diff --git a/src/test/ui/kindck/kindck-send-object.rs b/src/test/ui/kindck/kindck-send-object.rs
index 97f46c3953d..6411e688b4a 100644
--- a/src/test/ui/kindck/kindck-send-object.rs
+++ b/src/test/ui/kindck/kindck-send-object.rs
@@ -9,18 +9,18 @@ trait Message : Send { }
 // careful with object types, who knows what they close over...
 
 fn object_ref_with_static_bound_not_ok() {
-    assert_send::<&'static (Dummy+'static)>();
+    assert_send::<&'static (dyn Dummy + 'static)>();
     //~^ ERROR `(dyn Dummy + 'static)` cannot be shared between threads safely [E0277]
 }
 
 fn box_object_with_no_bound_not_ok<'a>() {
-    assert_send::<Box<Dummy>>();
+    assert_send::<Box<dyn Dummy>>();
     //~^ ERROR `dyn Dummy` cannot be sent between threads safely
 }
 
 fn object_with_send_bound_ok() {
-    assert_send::<&'static (Dummy+Sync)>();
-    assert_send::<Box<Dummy+Send>>();
+    assert_send::<&'static (dyn Dummy + Sync)>();
+    assert_send::<Box<dyn Dummy + Send>>();
 }
 
 fn main() { }
diff --git a/src/test/ui/kindck/kindck-send-object.stderr b/src/test/ui/kindck/kindck-send-object.stderr
index 8d993566029..c9aadd85a53 100644
--- a/src/test/ui/kindck/kindck-send-object.stderr
+++ b/src/test/ui/kindck/kindck-send-object.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely
   --> $DIR/kindck-send-object.rs:12:5
    |
-LL |     assert_send::<&'static (Dummy+'static)>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
+LL |     assert_send::<&'static (dyn Dummy + 'static)>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)`
@@ -15,8 +15,8 @@ LL | fn assert_send<T:Send>() { }
 error[E0277]: `dyn Dummy` cannot be sent between threads safely
   --> $DIR/kindck-send-object.rs:17:5
    |
-LL |     assert_send::<Box<Dummy>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
+LL |     assert_send::<Box<dyn Dummy>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `dyn Dummy`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>`
diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr
index 1df7412132b..998dc90456f 100644
--- a/src/test/ui/kindck/kindck-send-object1.nll.stderr
+++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
   --> $DIR/kindck-send-object1.rs:10:5
    |
-LL |     assert_send::<&'a Dummy>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
+LL |     assert_send::<&'a dyn Dummy>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
@@ -15,8 +15,8 @@ LL | fn assert_send<T:Send+'static>() { }
 error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
   --> $DIR/kindck-send-object1.rs:29:5
    |
-LL |     assert_send::<Box<Dummy+'a>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
+LL |     assert_send::<Box<dyn Dummy + 'a>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
diff --git a/src/test/ui/kindck/kindck-send-object1.rs b/src/test/ui/kindck/kindck-send-object1.rs
index 341985467de..0e198395c26 100644
--- a/src/test/ui/kindck/kindck-send-object1.rs
+++ b/src/test/ui/kindck/kindck-send-object1.rs
@@ -7,26 +7,26 @@ trait Dummy { }
 
 // careful with object types, who knows what they close over...
 fn test51<'a>() {
-    assert_send::<&'a Dummy>();
+    assert_send::<&'a dyn Dummy>();
     //~^ ERROR `(dyn Dummy + 'a)` cannot be shared between threads safely [E0277]
 }
 fn test52<'a>() {
-    assert_send::<&'a (Dummy+Sync)>();
+    assert_send::<&'a (dyn Dummy + Sync)>();
     //~^ ERROR does not fulfill the required lifetime
 }
 
 // ...unless they are properly bounded
 fn test60() {
-    assert_send::<&'static (Dummy+Sync)>();
+    assert_send::<&'static (dyn Dummy + Sync)>();
 }
 fn test61() {
-    assert_send::<Box<Dummy+Send>>();
+    assert_send::<Box<dyn Dummy + Send>>();
 }
 
 // closure and object types can have lifetime bounds which make
 // them not ok
 fn test_71<'a>() {
-    assert_send::<Box<Dummy+'a>>();
+    assert_send::<Box<dyn Dummy + 'a>>();
     //~^ ERROR `(dyn Dummy + 'a)` cannot be sent between threads safely
 }
 
diff --git a/src/test/ui/kindck/kindck-send-object1.stderr b/src/test/ui/kindck/kindck-send-object1.stderr
index a4b908e4101..757b41ab6cb 100644
--- a/src/test/ui/kindck/kindck-send-object1.stderr
+++ b/src/test/ui/kindck/kindck-send-object1.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
   --> $DIR/kindck-send-object1.rs:10:5
    |
-LL |     assert_send::<&'a Dummy>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
+LL |     assert_send::<&'a dyn Dummy>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
@@ -15,16 +15,16 @@ LL | fn assert_send<T:Send+'static>() { }
 error[E0477]: the type `&'a (dyn Dummy + std::marker::Sync + 'a)` does not fulfill the required lifetime
   --> $DIR/kindck-send-object1.rs:14:5
    |
-LL |     assert_send::<&'a (Dummy+Sync)>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     assert_send::<&'a (dyn Dummy + Sync)>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: type must satisfy the static lifetime
 
 error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
   --> $DIR/kindck-send-object1.rs:29:5
    |
-LL |     assert_send::<Box<Dummy+'a>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
+LL |     assert_send::<Box<dyn Dummy + 'a>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
diff --git a/src/test/ui/kindck/kindck-send-object2.rs b/src/test/ui/kindck/kindck-send-object2.rs
index 911ad988081..b797588e446 100644
--- a/src/test/ui/kindck/kindck-send-object2.rs
+++ b/src/test/ui/kindck/kindck-send-object2.rs
@@ -4,21 +4,21 @@ fn assert_send<T:Send>() { }
 trait Dummy { }
 
 fn test50() {
-    assert_send::<&'static Dummy>();
+    assert_send::<&'static dyn Dummy>();
     //~^ ERROR `(dyn Dummy + 'static)` cannot be shared between threads safely [E0277]
 }
 
 fn test53() {
-    assert_send::<Box<Dummy>>();
+    assert_send::<Box<dyn Dummy>>();
     //~^ ERROR `dyn Dummy` cannot be sent between threads safely
 }
 
 // ...unless they are properly bounded
 fn test60() {
-    assert_send::<&'static (Dummy+Sync)>();
+    assert_send::<&'static (dyn Dummy + Sync)>();
 }
 fn test61() {
-    assert_send::<Box<Dummy+Send>>();
+    assert_send::<Box<dyn Dummy + Send>>();
 }
 
 fn main() { }
diff --git a/src/test/ui/kindck/kindck-send-object2.stderr b/src/test/ui/kindck/kindck-send-object2.stderr
index db79989dc5f..c1c9db9da83 100644
--- a/src/test/ui/kindck/kindck-send-object2.stderr
+++ b/src/test/ui/kindck/kindck-send-object2.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely
   --> $DIR/kindck-send-object2.rs:7:5
    |
-LL |     assert_send::<&'static Dummy>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
+LL |     assert_send::<&'static dyn Dummy>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)`
@@ -15,8 +15,8 @@ LL | fn assert_send<T:Send>() { }
 error[E0277]: `dyn Dummy` cannot be sent between threads safely
   --> $DIR/kindck-send-object2.rs:12:5
    |
-LL |     assert_send::<Box<Dummy>>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
+LL |     assert_send::<Box<dyn Dummy>>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `dyn Dummy`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>`
diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr
index 8b24563e920..f2cf19abdac 100644
--- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr
+++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr
@@ -1,7 +1,7 @@
 error[E0521]: borrowed data escapes outside of function
   --> $DIR/lifetime-bound-will-change-warning.rs:34:5
    |
-LL | fn test2<'a>(x: &'a Box<Fn()+'a>) {
+LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
    |              - `x` is a reference that is only valid in the function body
 LL |     // but ref_obj will not, so warn.
 LL |     ref_obj(x)
@@ -10,7 +10,7 @@ LL |     ref_obj(x)
 error[E0521]: borrowed data escapes outside of function
   --> $DIR/lifetime-bound-will-change-warning.rs:39:5
    |
-LL | fn test2cc<'a>(x: &'a Box<Fn()+'a>) {
+LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
    |                - `x` is a reference that is only valid in the function body
 LL |     // same as test2, but cross crate
 LL |     lib::ref_obj(x)
diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs
index 5461f875af6..3c6d92234c4 100644
--- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs
+++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs
@@ -9,42 +9,42 @@
 
 extern crate lifetime_bound_will_change_warning_lib as lib;
 
-fn just_ref(x: &Fn()) {
+fn just_ref(x: &dyn Fn()) {
 }
 
-fn ref_obj(x: &Box<Fn()>) {
+fn ref_obj(x: &Box<dyn Fn()>) {
     // this will change to &Box<Fn()+'static>...
 
     // Note: no warning is issued here, because the type of `x` will change to 'static
     if false { ref_obj(x); }
 }
 
-fn test1<'a>(x: &'a Box<Fn()+'a>) {
+fn test1<'a>(x: &'a Box<dyn Fn() + 'a>) {
     // just_ref will stay the same.
     just_ref(&**x)
 }
 
-fn test1cc<'a>(x: &'a Box<Fn()+'a>) {
+fn test1cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
     // same as test1, but cross-crate
     lib::just_ref(&**x)
 }
 
-fn test2<'a>(x: &'a Box<Fn()+'a>) {
+fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
     // but ref_obj will not, so warn.
     ref_obj(x) //~ ERROR mismatched types
 }
 
-fn test2cc<'a>(x: &'a Box<Fn()+'a>) {
+fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
     // same as test2, but cross crate
     lib::ref_obj(x) //~ ERROR mismatched types
 }
 
-fn test3<'a>(x: &'a Box<Fn()+'static>) {
+fn test3<'a>(x: &'a Box<dyn Fn() + 'static>) {
     // here, we have a 'static bound, so even when ref_obj changes, no error results
     ref_obj(x)
 }
 
-fn test3cc<'a>(x: &'a Box<Fn()+'static>) {
+fn test3cc<'a>(x: &'a Box<dyn Fn() + 'static>) {
     // same as test3, but cross crate
     lib::ref_obj(x)
 }
diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
index 1af4bd501ba..35d63c17276 100644
--- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
+++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
@@ -9,7 +9,7 @@ LL |     ref_obj(x)
 note: the lifetime 'a as defined on the function body at 32:10...
   --> $DIR/lifetime-bound-will-change-warning.rs:32:10
    |
-LL | fn test2<'a>(x: &'a Box<Fn()+'a>) {
+LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
    |          ^^
    = note: ...does not necessarily outlive the static lifetime
 
@@ -24,7 +24,7 @@ LL |     lib::ref_obj(x)
 note: the lifetime 'a as defined on the function body at 37:12...
   --> $DIR/lifetime-bound-will-change-warning.rs:37:12
    |
-LL | fn test2cc<'a>(x: &'a Box<Fn()+'a>) {
+LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
    |            ^^
    = note: ...does not necessarily outlive the static lifetime
 
diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs
index 1c288a7e44f..2370084b072 100644
--- a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs
+++ b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs
@@ -5,7 +5,7 @@ trait Future {
 
 use std::error::Error;
 
-fn foo() -> impl Future<Item=(), Error=Box<Error>> {
+fn foo() -> impl Future<Item=(), Error=Box<dyn Error>> {
 //~^ ERROR missing lifetime
     Ok(())
 }
diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr
index b2a3d9a9436..06b317ce952 100644
--- a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr
+++ b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr
@@ -1,8 +1,8 @@
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-trait.rs:8:44
    |
-LL | fn foo() -> impl Future<Item=(), Error=Box<Error>> {
-   |                                            ^^^^^ help: consider giving it a 'static lifetime: `Error + 'static`
+LL | fn foo() -> impl Future<Item=(), Error=Box<dyn Error>> {
+   |                                            ^^^^^^^^^ help: consider giving it a 'static lifetime: `dyn Error + 'static`
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
 
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr
index c4e7ff90069..3c95be95db0 100644
--- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr
+++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr
@@ -1,18 +1,18 @@
 error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
   --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3
    |
-LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
-   |                              - help: consider changing this to be mutable: `mut y`
+LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
+   |                                  - help: consider changing this to be mutable: `mut y`
 LL |   y.push(z);
    |   ^ cannot borrow as mutable
 
 error: lifetime may not live long enough
   --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3
    |
-LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
-   |                                     -        - let's call the lifetime of this reference `'1`
-   |                                     |
-   |                                     let's call the lifetime of this reference `'2`
+LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
+   |                                         -        - let's call the lifetime of this reference `'1`
+   |                                         |
+   |                                         let's call the lifetime of this reference `'2`
 LL |   y.push(z);
    |   ^^^^^^^^^ argument requires that `'1` must outlive `'2`
 
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs
index 324a5846c94..6625d41c7de 100644
--- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs
+++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs
@@ -1,4 +1,4 @@
-fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
+fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
   y.push(z); //~ ERROR lifetime mismatch
 }
 
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr
index 6cd175b8a61..bfecb4d3393 100644
--- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr
+++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr
@@ -1,8 +1,8 @@
 error[E0623]: lifetime mismatch
   --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:10
    |
-LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
-   |                 ---  --- these two types are declared with different lifetimes...
+LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
+   |                     ---  --- these two types are declared with different lifetimes...
 LL |   y.push(z);
    |          ^ ...but data from `z` flows into `y` here
 
diff --git a/src/test/ui/lint/lint-ctypes.rs b/src/test/ui/lint/lint-ctypes.rs
index 816177abdea..a3d9b6febdb 100644
--- a/src/test/ui/lint/lint-ctypes.rs
+++ b/src/test/ui/lint/lint-ctypes.rs
@@ -51,7 +51,7 @@ extern {
     pub fn char_type(p: char); //~ ERROR uses type `char`
     pub fn i128_type(p: i128); //~ ERROR uses type `i128`
     pub fn u128_type(p: u128); //~ ERROR uses type `u128`
-    pub fn trait_type(p: &Clone); //~ ERROR uses type `dyn std::clone::Clone`
+    pub fn trait_type(p: &dyn Clone); //~ ERROR uses type `dyn std::clone::Clone`
     pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)`
     pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)`
     pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields
diff --git a/src/test/ui/lint/lint-ctypes.stderr b/src/test/ui/lint/lint-ctypes.stderr
index 67ba30a81c5..03c18e4530b 100644
--- a/src/test/ui/lint/lint-ctypes.stderr
+++ b/src/test/ui/lint/lint-ctypes.stderr
@@ -76,8 +76,8 @@ LL |     pub fn u128_type(p: u128);
 error: `extern` block uses type `dyn std::clone::Clone` which is not FFI-safe: trait objects have no C equivalent
   --> $DIR/lint-ctypes.rs:54:26
    |
-LL |     pub fn trait_type(p: &Clone);
-   |                          ^^^^^^
+LL |     pub fn trait_type(p: &dyn Clone);
+   |                          ^^^^^^^^^^
 
 error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout
   --> $DIR/lint-ctypes.rs:55:26
diff --git a/src/test/ui/lint/lint-dead-code-3.rs b/src/test/ui/lint/lint-dead-code-3.rs
index 00b250f83dd..4397522f3f3 100644
--- a/src/test/ui/lint/lint-dead-code-3.rs
+++ b/src/test/ui/lint/lint-dead-code-3.rs
@@ -73,6 +73,6 @@ mod inner {
 }
 
 pub fn foo() {
-    let a: &inner::Trait = &1_isize;
+    let a: &dyn inner::Trait = &1_isize;
     a.f();
 }
diff --git a/src/test/ui/lint/lint-stability-2.rs b/src/test/ui/lint/lint-stability-2.rs
index 12e7b086d35..53eee35a9ca 100644
--- a/src/test/ui/lint/lint-stability-2.rs
+++ b/src/test/ui/lint/lint-stability-2.rs
@@ -148,7 +148,7 @@ mod cross_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated();
         foo.trait_deprecated_text();
         foo.trait_deprecated_unstable();
@@ -373,7 +373,7 @@ mod this_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated();
         foo.trait_deprecated_text();
         foo.trait_unstable();
diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs
index bf574d7144d..a2031c2189a 100644
--- a/src/test/ui/lint/lint-stability-deprecated.rs
+++ b/src/test/ui/lint/lint-stability-deprecated.rs
@@ -98,7 +98,7 @@ mod cross_crate {
         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
         struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
         //~^ WARN use of deprecated item 'lint_stability::TraitWithAssociatedTypes::TypeDeprecated': text
-        type A = TraitWithAssociatedTypes<
+        type A = dyn TraitWithAssociatedTypes<
             TypeUnstable = u8,
             TypeDeprecated = u16,
             //~^ WARN use of deprecated item 'lint_stability::TraitWithAssociatedTypes::TypeDeprecated'
@@ -170,7 +170,7 @@ mod cross_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated'
         foo.trait_deprecated_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text
         foo.trait_deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable'
@@ -423,7 +423,7 @@ mod this_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated'
         foo.trait_deprecated_text(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text
         foo.trait_unstable();
diff --git a/src/test/ui/lint/lint-stability.rs b/src/test/ui/lint/lint-stability.rs
index 3e4a3874d2c..fde27eec7d3 100644
--- a/src/test/ui/lint/lint-stability.rs
+++ b/src/test/ui/lint/lint-stability.rs
@@ -88,7 +88,7 @@ mod cross_crate {
         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
         //~^ ERROR use of unstable library feature
         struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
-        type A = TraitWithAssociatedTypes<
+        type A = dyn TraitWithAssociatedTypes<
             TypeUnstable = u8, //~ ERROR use of unstable library feature
             TypeDeprecated = u16,
         >;
@@ -161,7 +161,7 @@ mod cross_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated();
         foo.trait_deprecated_text();
         foo.trait_stable();
@@ -414,7 +414,7 @@ mod this_crate {
         <Foo as Trait>::trait_stable(&foo);
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated();
         foo.trait_deprecated_text();
         foo.trait_unstable();
diff --git a/src/test/ui/lint/lint-unconditional-recursion.rs b/src/test/ui/lint/lint-unconditional-recursion.rs
index 44af1179097..ab60a326cd2 100644
--- a/src/test/ui/lint/lint-unconditional-recursion.rs
+++ b/src/test/ui/lint/lint-unconditional-recursion.rs
@@ -39,7 +39,7 @@ trait Foo {
     }
 }
 
-impl Foo for Box<Foo+'static> {
+impl Foo for Box<dyn Foo + 'static> {
     fn bar(&self) { //~ ERROR function cannot return without recursing
         loop {
             self.bar()
@@ -67,7 +67,7 @@ trait Foo2 {
     }
 }
 
-impl Foo2 for Box<Foo2+'static> {
+impl Foo2 for Box<dyn Foo2 + 'static> {
     fn bar(&self) { //~ ERROR function cannot return without recursing
         loop {
             Foo2::bar(self)
diff --git a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs
index f48e9848456..656ed6576e2 100644
--- a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs
+++ b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs
@@ -18,7 +18,7 @@ fn foo() {
     let z = 3_i8;
 
     'a: loop {
-        let b = Box::new(|x: &i8| *x) as Box<for <'a> Fn(&'a i8) -> i8>;
+        let b = Box::new(|x: &i8| *x) as Box<dyn for <'a> Fn(&'a i8) -> i8>;
         //~^ WARN lifetime name `'a` shadows a label name that is already in scope
         assert_eq!((*b)(&z), z);
         break 'a;
diff --git a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr
index 4c4d9218ec9..e5d376675c6 100644
--- a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr
+++ b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr
@@ -1,8 +1,8 @@
 warning: lifetime name `'a` shadows a label name that is already in scope
-  --> $DIR/loops-reject-lifetime-shadowing-label.rs:21:51
+  --> $DIR/loops-reject-lifetime-shadowing-label.rs:21:55
    |
 LL |     'a: loop {
    |     -- first declared here
-LL |         let b = Box::new(|x: &i8| *x) as Box<for <'a> Fn(&'a i8) -> i8>;
-   |                                                   ^^ lifetime 'a already in scope
+LL |         let b = Box::new(|x: &i8| *x) as Box<dyn for <'a> Fn(&'a i8) -> i8>;
+   |                                                       ^^ lifetime 'a already in scope
 
diff --git a/src/test/ui/lub-glb/old-lub-glb-object.rs b/src/test/ui/lub-glb/old-lub-glb-object.rs
index dcd604a5157..f303c07e6d7 100644
--- a/src/test/ui/lub-glb/old-lub-glb-object.rs
+++ b/src/test/ui/lub-glb/old-lub-glb-object.rs
@@ -4,8 +4,8 @@
 trait Foo<T, U> { }
 
 fn foo(
-    x: &for<'a, 'b> Foo<&'a u8, &'b u8>,
-    y: &for<'a> Foo<&'a u8, &'a u8>,
+    x: &dyn for<'a, 'b> Foo<&'a u8, &'b u8>,
+    y: &dyn for<'a> Foo<&'a u8, &'a u8>,
 ) {
     let z = match 22 {
         0 => x,
@@ -14,12 +14,12 @@ fn foo(
 }
 
 fn bar(
-    x: &for<'a, 'b> Foo<&'a u8, &'b u8>,
-    y: &for<'a> Foo<&'a u8, &'a u8>,
+    x: &dyn for<'a, 'b> Foo<&'a u8, &'b u8>,
+    y: &dyn for<'a> Foo<&'a u8, &'a u8>,
 ) {
     // Accepted with explicit case:
     let z = match 22 {
-        0 => x as &for<'a> Foo<&'a u8, &'a u8>,
+        0 => x as &dyn for<'a> Foo<&'a u8, &'a u8>,
         _ => y,
     };
 }
diff --git a/src/test/ui/map-types.rs b/src/test/ui/map-types.rs
index dab7863415f..c355a0e420f 100644
--- a/src/test/ui/map-types.rs
+++ b/src/test/ui/map-types.rs
@@ -13,7 +13,7 @@ impl<K, V> Map<K, V> for HashMap<K, V> {}
 
 fn main() {
     let x: Box<HashMap<isize, isize>> = box HashMap::new();
-    let x: Box<Map<isize, isize>> = x;
-    let y: Box<Map<usize, isize>> = Box::new(x);
+    let x: Box<dyn Map<isize, isize>> = x;
+    let y: Box<dyn Map<usize, isize>> = Box::new(x);
     //~^ ERROR `std::boxed::Box<dyn Map<isize, isize>>: Map<usize, isize>` is not satisfied
 }
diff --git a/src/test/ui/map-types.stderr b/src/test/ui/map-types.stderr
index 9aa98044242..21dac1ab1ed 100644
--- a/src/test/ui/map-types.stderr
+++ b/src/test/ui/map-types.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `std::boxed::Box<dyn Map<isize, isize>>: Map<usize, isize>` is not satisfied
-  --> $DIR/map-types.rs:17:37
+  --> $DIR/map-types.rs:17:41
    |
-LL |     let y: Box<Map<usize, isize>> = Box::new(x);
-   |                                     ^^^^^^^^^^^ the trait `Map<usize, isize>` is not implemented for `std::boxed::Box<dyn Map<isize, isize>>`
+LL |     let y: Box<dyn Map<usize, isize>> = Box::new(x);
+   |                                         ^^^^^^^^^^^ the trait `Map<usize, isize>` is not implemented for `std::boxed::Box<dyn Map<isize, isize>>`
    |
    = note: required for the cast to the object type `dyn Map<usize, isize>`
 
diff --git a/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs b/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs
index 36a1a2fda69..23893911eab 100644
--- a/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs
+++ b/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs
@@ -11,10 +11,10 @@ impl S {
 
     // 'late lifetimes here belong to nested types not to the tested functions.
     fn early_tricky_explicit<'a>(_: for<'late> fn(&'late u8),
-                                 _: Box<for<'late> Fn(&'late u8)>)
+                                 _: Box<dyn for<'late> Fn(&'late u8)>)
                                  -> &'a u8 { loop {} }
     fn early_tricky_implicit<'a>(_: fn(&u8),
-                                 _: Box<Fn(&u8)>)
+                                 _: Box<dyn Fn(&u8)>)
                                  -> &'a u8 { loop {} }
 }
 
diff --git a/src/test/ui/mismatched_types/cast-rfc0401.rs b/src/test/ui/mismatched_types/cast-rfc0401.rs
index a5e03a18e6a..2f88c6496c4 100644
--- a/src/test/ui/mismatched_types/cast-rfc0401.rs
+++ b/src/test/ui/mismatched_types/cast-rfc0401.rs
@@ -24,7 +24,7 @@ fn main()
     let v = 0 as *const u8;
     let fat_v : *const [u8] = unsafe { &*(0 as *const [u8; 1])};
     let fat_sv : *const [i8] = unsafe { &*(0 as *const [i8; 1])};
-    let foo: &Foo = &f;
+    let foo: &dyn Foo = &f;
 
     let _ = v as &u8; //~ ERROR non-primitive cast
     let _ = v as E; //~ ERROR non-primitive cast
@@ -50,7 +50,7 @@ fn main()
 
     let _ = 42usize as *const [u8]; //~ ERROR is invalid
     let _ = v as *const [u8]; //~ ERROR cannot cast
-    let _ = fat_v as *const Foo; //~ ERROR the size for values of type
+    let _ = fat_v as *const dyn Foo; //~ ERROR the size for values of type
     let _ = foo as *const str; //~ ERROR is invalid
     let _ = foo as *mut str; //~ ERROR is invalid
     let _ = main as *mut str; //~ ERROR is invalid
@@ -59,14 +59,14 @@ fn main()
     let _ = fat_sv as usize; //~ ERROR is invalid
 
     let a : *const str = "hello";
-    let _ = a as *const Foo; //~ ERROR the size for values of type
+    let _ = a as *const dyn Foo; //~ ERROR the size for values of type
 
     // check no error cascade
     let _ = main.f as *const u32; //~ ERROR no field
 
-    let cf: *const Foo = &0;
+    let cf: *const dyn Foo = &0;
     let _ = cf as *const [u16]; //~ ERROR is invalid
-    let _ = cf as *const Bar; //~ ERROR is invalid
+    let _ = cf as *const dyn Bar; //~ ERROR is invalid
 
     vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>(); //~ ERROR is invalid
 }
diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr
index 0e0bb8da81e..f94dfd100a6 100644
--- a/src/test/ui/mismatched_types/cast-rfc0401.stderr
+++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr
@@ -207,15 +207,15 @@ LL |     let _ = cf as *const [u16];
 error[E0606]: casting `*const dyn Foo` as `*const dyn Bar` is invalid
   --> $DIR/cast-rfc0401.rs:69:13
    |
-LL |     let _ = cf as *const Bar;
-   |             ^^^^^^^^^^^^^^^^
+LL |     let _ = cf as *const dyn Bar;
+   |             ^^^^^^^^^^^^^^^^^^^^
    |
    = note: vtable kinds may not match
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/cast-rfc0401.rs:53:13
    |
-LL |     let _ = fat_v as *const Foo;
+LL |     let _ = fat_v as *const dyn Foo;
    |             ^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `[u8]`
@@ -225,7 +225,7 @@ LL |     let _ = fat_v as *const Foo;
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/cast-rfc0401.rs:62:13
    |
-LL |     let _ = a as *const Foo;
+LL |     let _ = a as *const dyn Foo;
    |             ^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `str`
diff --git a/src/test/ui/mismatched_types/issue-19109.rs b/src/test/ui/mismatched_types/issue-19109.rs
index 030b7a40ca6..eae6a87905b 100644
--- a/src/test/ui/mismatched_types/issue-19109.rs
+++ b/src/test/ui/mismatched_types/issue-19109.rs
@@ -1,7 +1,7 @@
 trait Trait { }
 
-fn function(t: &mut Trait) {
-    t as *mut Trait
+fn function(t: &mut dyn Trait) {
+    t as *mut dyn Trait
  //~^ ERROR: mismatched types
 }
 
diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr
index db2d484edff..b826ca66c68 100644
--- a/src/test/ui/mismatched_types/issue-19109.stderr
+++ b/src/test/ui/mismatched_types/issue-19109.stderr
@@ -1,10 +1,10 @@
 error[E0308]: mismatched types
   --> $DIR/issue-19109.rs:4:5
    |
-LL | fn function(t: &mut Trait) {
-   |                            - help: try adding a return type: `-> *mut dyn Trait`
-LL |     t as *mut Trait
-   |     ^^^^^^^^^^^^^^^ expected (), found *-ptr
+LL | fn function(t: &mut dyn Trait) {
+   |                                - help: try adding a return type: `-> *mut dyn Trait`
+LL |     t as *mut dyn Trait
+   |     ^^^^^^^^^^^^^^^^^^^ expected (), found *-ptr
    |
    = note: expected type `()`
               found type `*mut dyn Trait`
diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs
index be5fab871b4..882533992bd 100644
--- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs
+++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs
@@ -2,14 +2,14 @@ trait Foo {
     fn dummy(&self) { }
 }
 
-fn a(_x: Box<Foo+Send>) {
+fn a(_x: Box<dyn Foo + Send>) {
 }
 
-fn c(x: Box<Foo+Sync+Send>) {
+fn c(x: Box<dyn Foo + Sync + Send>) {
     a(x);
 }
 
-fn d(x: Box<Foo>) {
+fn d(x: Box<dyn Foo>) {
     a(x); //~ ERROR mismatched types [E0308]
 }
 
diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs
index 3fa11878629..0385a120ce2 100644
--- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs
+++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs
@@ -6,7 +6,7 @@ struct R<'a> {
     // This struct is needed to create the
     // otherwise infinite type of a fn that
     // accepts itself as argument:
-    c: Box<FnMut(&mut R, bool) + 'a>
+    c: Box<dyn FnMut(&mut R, bool) + 'a>
 }
 
 fn innocent_looking_victim() {
diff --git a/src/test/ui/nll/issue-52663-trait-object.rs b/src/test/ui/nll/issue-52663-trait-object.rs
index e8e571aadc3..a7be365bde4 100644
--- a/src/test/ui/nll/issue-52663-trait-object.rs
+++ b/src/test/ui/nll/issue-52663-trait-object.rs
@@ -10,7 +10,7 @@ fn main() {
     let _ = {
         let tmp0 = 3;
         let tmp1 = &tmp0;
-        box tmp1 as Box<Foo + '_>
+        box tmp1 as Box<dyn Foo + '_>
     };
     //~^^^ ERROR `tmp0` does not live long enough
 }
diff --git a/src/test/ui/nll/issue-52663-trait-object.stderr b/src/test/ui/nll/issue-52663-trait-object.stderr
index 9262117f397..b71893de7f8 100644
--- a/src/test/ui/nll/issue-52663-trait-object.stderr
+++ b/src/test/ui/nll/issue-52663-trait-object.stderr
@@ -3,8 +3,8 @@ error[E0597]: `tmp0` does not live long enough
    |
 LL |         let tmp1 = &tmp0;
    |                    ^^^^^ borrowed value does not live long enough
-LL |         box tmp1 as Box<Foo + '_>
-   |         ------------------------- borrow later captured here by trait object
+LL |         box tmp1 as Box<dyn Foo + '_>
+   |         ----------------------------- borrow later captured here by trait object
 LL |     };
    |     - `tmp0` dropped here while still borrowed
 
diff --git a/src/test/ui/nll/issue-53570.rs b/src/test/ui/nll/issue-53570.rs
index cea458dcb65..81c50edfed1 100644
--- a/src/test/ui/nll/issue-53570.rs
+++ b/src/test/ui/nll/issue-53570.rs
@@ -14,11 +14,11 @@ trait AnyVec<'a> {
 }
 
 trait GenericVec<T> {
-    fn unwrap<'a, 'b>(vec: &'b AnyVec<'a>) -> &'b [T] where T: 'a;
+    fn unwrap<'a, 'b>(vec: &'b dyn AnyVec<'a>) -> &'b [T] where T: 'a;
 }
 
 struct Scratchpad<'a> {
-    buffers: RefCell<Box<AnyVec<'a>>>,
+    buffers: RefCell<Box<dyn AnyVec<'a>>>,
 }
 
 impl<'a> Scratchpad<'a> {
diff --git a/src/test/ui/object-does-not-impl-trait.rs b/src/test/ui/object-does-not-impl-trait.rs
index 2d72b4588f7..104e7b2e215 100644
--- a/src/test/ui/object-does-not-impl-trait.rs
+++ b/src/test/ui/object-does-not-impl-trait.rs
@@ -3,6 +3,6 @@
 
 trait Foo {}
 fn take_foo<F:Foo>(f: F) {}
-fn take_object(f: Box<Foo>) { take_foo(f); }
+fn take_object(f: Box<dyn Foo>) { take_foo(f); }
 //~^ ERROR `std::boxed::Box<dyn Foo>: Foo` is not satisfied
 fn main() {}
diff --git a/src/test/ui/object-does-not-impl-trait.stderr b/src/test/ui/object-does-not-impl-trait.stderr
index 0e28875ced6..288ce9682c2 100644
--- a/src/test/ui/object-does-not-impl-trait.stderr
+++ b/src/test/ui/object-does-not-impl-trait.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `std::boxed::Box<dyn Foo>: Foo` is not satisfied
-  --> $DIR/object-does-not-impl-trait.rs:6:31
+  --> $DIR/object-does-not-impl-trait.rs:6:35
    |
-LL | fn take_object(f: Box<Foo>) { take_foo(f); }
-   |                               ^^^^^^^^ the trait `Foo` is not implemented for `std::boxed::Box<dyn Foo>`
+LL | fn take_object(f: Box<dyn Foo>) { take_foo(f); }
+   |                                   ^^^^^^^^ the trait `Foo` is not implemented for `std::boxed::Box<dyn Foo>`
    |
 note: required by `take_foo`
   --> $DIR/object-does-not-impl-trait.rs:5:1
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.rs b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.rs
index d14351aef9a..5dae92fee5f 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.rs
@@ -20,27 +20,27 @@ struct Ref2<'a,'b:'a,T:'a+'b+?Sized> {
     r: &'a &'b T
 }
 
-fn a<'a,'b>(t: Ref2<'a,'b,Test>) {
+fn a<'a,'b>(t: Ref2<'a,'b, dyn Test>) {
     //~^ ERROR lifetime bound for this object type cannot be deduced from context
 }
 
-fn b(t: Ref2<Test>) {
+fn b(t: Ref2<dyn Test>) {
     //~^ ERROR lifetime bound for this object type cannot be deduced from context
 }
 
-fn c(t: Ref2<&Test>) {
+fn c(t: Ref2<&dyn Test>) {
     // In this case, the &'a overrides.
 }
 
-fn d(t: Ref2<Ref1<Test>>) {
+fn d(t: Ref2<Ref1<dyn Test>>) {
     // In this case, the lifetime parameter from the Ref1 overrides.
 }
 
-fn e(t: Ref2<Ref0<Test>>) {
+fn e(t: Ref2<Ref0<dyn Test>>) {
     // In this case, Ref2 is ambiguous, but Ref0 overrides with 'static.
 }
 
-fn f(t: &Ref2<Test>) {
+fn f(t: &Ref2<dyn Test>) {
     //~^ ERROR lifetime bound for this object type cannot be deduced from context
 }
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr
index 0319c7bfbe2..0c3dbffeea6 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr
@@ -1,20 +1,20 @@
 error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
-  --> $DIR/object-lifetime-default-ambiguous.rs:23:27
+  --> $DIR/object-lifetime-default-ambiguous.rs:23:28
    |
-LL | fn a<'a,'b>(t: Ref2<'a,'b,Test>) {
-   |                           ^^^^
+LL | fn a<'a,'b>(t: Ref2<'a,'b, dyn Test>) {
+   |                            ^^^^^^^^
 
 error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
   --> $DIR/object-lifetime-default-ambiguous.rs:27:14
    |
-LL | fn b(t: Ref2<Test>) {
-   |              ^^^^
+LL | fn b(t: Ref2<dyn Test>) {
+   |              ^^^^^^^^
 
 error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
   --> $DIR/object-lifetime-default-ambiguous.rs:43:15
    |
-LL | fn f(t: &Ref2<Test>) {
-   |               ^^^^
+LL | fn f(t: &Ref2<dyn Test>) {
+   |               ^^^^^^^^
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr
index 19cdd66ef75..e94f2a92125 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/object-lifetime-default-elision.rs:71:5
    |
-LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
    |          -- -- lifetime `'b` defined here
    |          |
    |          lifetime `'a` defined here
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.rs b/src/test/ui/object-lifetime/object-lifetime-default-elision.rs
index cf15a4e8676..dc42edfba2c 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-elision.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.rs
@@ -8,7 +8,7 @@ trait SomeTrait {
 }
 
 struct SomeStruct<'a> {
-    r: Box<SomeTrait+'a>
+    r: Box<dyn SomeTrait+'a>
 }
 
 fn deref<T>(ss: &T) -> T {
@@ -17,7 +17,7 @@ fn deref<T>(ss: &T) -> T {
     loop { }
 }
 
-fn load0<'a>(ss: &'a Box<SomeTrait>) -> Box<SomeTrait> {
+fn load0<'a>(ss: &'a Box<dyn SomeTrait>) -> Box<dyn SomeTrait> {
     // Under old rules, the fully elaborated types of input/output were:
     //
     // for<'a,'b> fn(&'a Box<SomeTrait+'b>) -> Box<SomeTrait+'a>
@@ -31,7 +31,7 @@ fn load0<'a>(ss: &'a Box<SomeTrait>) -> Box<SomeTrait> {
     deref(ss)
 }
 
-fn load1(ss: &SomeTrait) -> &SomeTrait {
+fn load1(ss: &dyn SomeTrait) -> &dyn SomeTrait {
     // Under old rules, the fully elaborated types of input/output were:
     //
     // for<'a,'b> fn(&'a (SomeTrait+'b)) -> &'a (SomeTrait+'a)
@@ -45,13 +45,13 @@ fn load1(ss: &SomeTrait) -> &SomeTrait {
     ss
 }
 
-fn load2<'a>(ss: &'a SomeTrait) -> &SomeTrait {
+fn load2<'a>(ss: &'a dyn SomeTrait) -> &dyn SomeTrait {
     // Same as `load1` but with an explicit name thrown in for fun.
 
     ss
 }
 
-fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
     // Under old rules, the fully elaborated types of input/output were:
     //
     // for<'a,'b,'c>fn(&'a (SomeTrait+'c)) -> &'b (SomeTrait+'a)
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr b/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr
index dcb07a1706f..2cdd6c5d890 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr
@@ -7,7 +7,7 @@ LL |     ss
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 54:10...
   --> $DIR/object-lifetime-default-elision.rs:54:10
    |
-LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
    |          ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/object-lifetime-default-elision.rs:71:5
@@ -17,7 +17,7 @@ LL |     ss
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 54:13...
   --> $DIR/object-lifetime-default-elision.rs:54:13
    |
-LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
    |             ^^
    = note: ...so that the expression is assignable:
            expected &'b (dyn SomeTrait + 'b)
@@ -32,7 +32,7 @@ LL |     ss
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 54:10...
   --> $DIR/object-lifetime-default-elision.rs:54:10
    |
-LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
    |          ^^
 note: ...so that the declared lifetime parameter bounds are satisfied
   --> $DIR/object-lifetime-default-elision.rs:71:5
@@ -42,7 +42,7 @@ LL |     ss
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 54:13...
   --> $DIR/object-lifetime-default-elision.rs:54:13
    |
-LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
+LL | fn load3<'a,'b>(ss: &'a dyn SomeTrait) -> &'b dyn SomeTrait {
    |             ^^
    = note: ...so that the expression is assignable:
            expected &'b (dyn SomeTrait + 'b)
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr
index 9e68647214c..17fb7c4acdf 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr
@@ -1,7 +1,7 @@
 error[E0621]: explicit lifetime required in the type of `ss`
   --> $DIR/object-lifetime-default-from-box-error.rs:18:5
    |
-LL | fn load(ss: &mut SomeStruct) -> Box<SomeTrait> {
+LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
    |             --------------- help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>`
 ...
 LL |     ss.r
@@ -16,7 +16,7 @@ LL |     ss.r
 error[E0621]: explicit lifetime required in the type of `ss`
   --> $DIR/object-lifetime-default-from-box-error.rs:31:5
    |
-LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<SomeTrait+'b>) {
+LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<dyn SomeTrait+'b>) {
    |                   --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>`
 ...
 LL |     ss.r = b;
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
index b6d72f1fce3..587aab1edce 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
@@ -8,24 +8,24 @@ trait SomeTrait {
 }
 
 struct SomeStruct<'a> {
-    r: Box<SomeTrait+'a>
+    r: Box<dyn SomeTrait+'a>
 }
 
-fn load(ss: &mut SomeStruct) -> Box<SomeTrait> {
+fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
     // `Box<SomeTrait>` defaults to a `'static` bound, so this return
     // is illegal.
 
     ss.r //~ ERROR explicit lifetime required in the type of `ss` [E0621]
 }
 
-fn store(ss: &mut SomeStruct, b: Box<SomeTrait>) {
+fn store(ss: &mut SomeStruct, b: Box<dyn SomeTrait>) {
     // No error: b is bounded by 'static which outlives the
     // (anonymous) lifetime on the struct.
 
     ss.r = b;
 }
 
-fn store1<'b>(ss: &mut SomeStruct, b: Box<SomeTrait+'b>) {
+fn store1<'b>(ss: &mut SomeStruct, b: Box<dyn SomeTrait+'b>) {
     // Here we override the lifetimes explicitly, and so naturally we get an error.
 
     ss.r = b; //~ ERROR explicit lifetime required in the type of `ss` [E0621]
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
index 0077c95139f..78e4bdd374d 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
@@ -1,7 +1,7 @@
 error[E0621]: explicit lifetime required in the type of `ss`
   --> $DIR/object-lifetime-default-from-box-error.rs:18:5
    |
-LL | fn load(ss: &mut SomeStruct) -> Box<SomeTrait> {
+LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
    |             --------------- help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>`
 ...
 LL |     ss.r
@@ -10,7 +10,7 @@ LL |     ss.r
 error[E0621]: explicit lifetime required in the type of `ss`
   --> $DIR/object-lifetime-default-from-box-error.rs:31:12
    |
-LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<SomeTrait+'b>) {
+LL | fn store1<'b>(ss: &mut SomeStruct, b: Box<dyn SomeTrait+'b>) {
    |                   --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>`
 ...
 LL |     ss.r = b;
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr
index 6d183ddf22d..7d6f9f39d13 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:5
    |
-LL | fn c<'a>(t: &'a Box<Test+'a>, mut ss: SomeStruct<'a>) {
+LL | fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
    |      -- lifetime `'a` defined here
 LL |     ss.t = t;
    |     ^^^^^^^^ assignment requires that `'a` must outlive `'static`
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs
index 91b384e0071..bf9e0beb57c 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs
@@ -8,10 +8,10 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a Box<Test>,
+    t: &'a Box<dyn Test>,
 }
 
-fn c<'a>(t: &'a Box<Test+'a>, mut ss: SomeStruct<'a>) {
+fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.t = t; //~ ERROR mismatched types
 }
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
index d7e3a171333..4f9cef12c5e 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
@@ -9,7 +9,7 @@ LL |     ss.t = t;
 note: the lifetime 'a as defined on the function body at 14:6...
   --> $DIR/object-lifetime-default-from-rptr-box-error.rs:14:6
    |
-LL | fn c<'a>(t: &'a Box<Test+'a>, mut ss: SomeStruct<'a>) {
+LL | fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
    |      ^^
    = note: ...does not necessarily outlive the static lifetime
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr
index fe3b21fa39c..6df54638ce0 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:21:5
    |
-LL | fn c<'a>(t: &'a MyBox<Test+'a>, mut ss: SomeStruct<'a>) {
+LL | fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
    |      -- lifetime `'a` defined here
 LL |     ss.t = t;
    |     ^^^^^^^^ assignment requires that `'a` must outlive `'static`
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.rs b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.rs
index 6a84621f59e..ae2878539cf 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.rs
@@ -9,15 +9,15 @@ trait Test {
 }
 
 struct SomeStruct<'a> {
-    t: &'a MyBox<Test>,
-    u: &'a MyBox<Test+'a>,
+    t: &'a MyBox<dyn Test>,
+    u: &'a MyBox<dyn Test + 'a>,
 }
 
 struct MyBox<T:?Sized> {
     b: Box<T>
 }
 
-fn c<'a>(t: &'a MyBox<Test+'a>, mut ss: SomeStruct<'a>) {
+fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
     ss.t = t; //~ ERROR mismatched types
 }
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
index 4d082530dc5..3b7faee68aa 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
@@ -9,7 +9,7 @@ LL |     ss.t = t;
 note: the lifetime 'a as defined on the function body at 20:6...
   --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:20:6
    |
-LL | fn c<'a>(t: &'a MyBox<Test+'a>, mut ss: SomeStruct<'a>) {
+LL | fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
    |      ^^
    = note: ...does not necessarily outlive the static lifetime
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr
index 448fe9e5510..cdfbf0fc878 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/object-lifetime-default-mybox.rs:27:5
    |
-LL | fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
+LL | fn load1<'a,'b>(a: &'a MyBox<dyn SomeTrait>,
    |          -- -- lifetime `'b` defined here
    |          |
    |          lifetime `'a` defined here
@@ -12,7 +12,7 @@ LL |     a
 error[E0521]: borrowed data escapes outside of function
   --> $DIR/object-lifetime-default-mybox.rs:31:5
    |
-LL | fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
+LL | fn load2<'a>(ss: &MyBox<dyn SomeTrait + 'a>) -> MyBox<dyn SomeTrait + 'a> {
    |              -- `ss` is a reference that is only valid in the function body
 LL |     load0(ss)
    |     ^^^^^^^^^ `ss` escapes the function body here
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.rs b/src/test/ui/object-lifetime/object-lifetime-default-mybox.rs
index c94df82a177..eb27fe90f47 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.rs
@@ -16,18 +16,18 @@ fn deref<T>(ss: &T) -> T {
     loop { }
 }
 
-fn load0(ss: &MyBox<SomeTrait>) -> MyBox<SomeTrait> {
+fn load0(ss: &MyBox<dyn SomeTrait>) -> MyBox<dyn SomeTrait> {
     deref(ss)
 }
 
-fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
-                b: &'b MyBox<SomeTrait>)
-                -> &'b MyBox<SomeTrait>
+fn load1<'a,'b>(a: &'a MyBox<dyn SomeTrait>,
+                b: &'b MyBox<dyn SomeTrait>)
+                -> &'b MyBox<dyn SomeTrait>
 {
     a //~ ERROR lifetime mismatch
 }
 
-fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
+fn load2<'a>(ss: &MyBox<dyn SomeTrait + 'a>) -> MyBox<dyn SomeTrait + 'a> {
     load0(ss) //~ ERROR mismatched types
 }
 
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
index 4c23f867be8..928b9201982 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
@@ -1,11 +1,11 @@
 error[E0623]: lifetime mismatch
   --> $DIR/object-lifetime-default-mybox.rs:27:5
    |
-LL | fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
-   |                    -------------------- this parameter and the return type are declared with different lifetimes...
-LL |                 b: &'b MyBox<SomeTrait>)
-LL |                 -> &'b MyBox<SomeTrait>
-   |                    --------------------
+LL | fn load1<'a,'b>(a: &'a MyBox<dyn SomeTrait>,
+   |                    ------------------------ this parameter and the return type are declared with different lifetimes...
+LL |                 b: &'b MyBox<dyn SomeTrait>)
+LL |                 -> &'b MyBox<dyn SomeTrait>
+   |                    ------------------------
 LL | {
 LL |     a
    |     ^ ...but data from `a` is returned here
@@ -21,7 +21,7 @@ LL |     load0(ss)
 note: the lifetime 'a as defined on the function body at 30:10...
   --> $DIR/object-lifetime-default-mybox.rs:30:10
    |
-LL | fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
+LL | fn load2<'a>(ss: &MyBox<dyn SomeTrait + 'a>) -> MyBox<dyn SomeTrait + 'a> {
    |          ^^
    = note: ...does not necessarily outlive the static lifetime
 
diff --git a/src/test/ui/object-pointer-types.rs b/src/test/ui/object-pointer-types.rs
index a8a482fb5a6..760a50e5b79 100644
--- a/src/test/ui/object-pointer-types.rs
+++ b/src/test/ui/object-pointer-types.rs
@@ -5,19 +5,19 @@ trait Foo {
     fn owned(self: Box<Self>);
 }
 
-fn borrowed_receiver(x: &Foo) {
+fn borrowed_receiver(x: &dyn Foo) {
     x.borrowed();
     x.borrowed_mut(); // See [1]
     x.owned(); //~ ERROR no method named `owned` found
 }
 
-fn borrowed_mut_receiver(x: &mut Foo) {
+fn borrowed_mut_receiver(x: &mut dyn Foo) {
     x.borrowed();
     x.borrowed_mut();
     x.owned(); //~ ERROR no method named `owned` found
 }
 
-fn owned_receiver(x: Box<Foo>) {
+fn owned_receiver(x: Box<dyn Foo>) {
     x.borrowed();
     x.borrowed_mut(); // See [1]
     x.managed();  //~ ERROR no method named `managed` found
diff --git a/src/test/ui/object-safety/object-safety-associated-consts.rs b/src/test/ui/object-safety/object-safety-associated-consts.rs
index 79b7e541af8..5900019ea91 100644
--- a/src/test/ui/object-safety/object-safety-associated-consts.rs
+++ b/src/test/ui/object-safety/object-safety-associated-consts.rs
@@ -6,7 +6,7 @@ trait Bar {
     const X: usize;
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
 }
diff --git a/src/test/ui/object-safety/object-safety-associated-consts.stderr b/src/test/ui/object-safety/object-safety-associated-consts.stderr
index 96962c10720..55f9e3f9f13 100644
--- a/src/test/ui/object-safety/object-safety-associated-consts.stderr
+++ b/src/test/ui/object-safety/object-safety-associated-consts.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-associated-consts.rs:9:1
    |
-LL | fn make_bar<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: the trait cannot contain associated consts like `X`
 
diff --git a/src/test/ui/object-safety/object-safety-by-value-self-use.rs b/src/test/ui/object-safety/object-safety-by-value-self-use.rs
index 0b70c8ad45e..f903f26c090 100644
--- a/src/test/ui/object-safety/object-safety-by-value-self-use.rs
+++ b/src/test/ui/object-safety/object-safety-by-value-self-use.rs
@@ -11,7 +11,7 @@ trait Baz {
     fn baz(self: Self);
 }
 
-fn use_bar(t: Box<Bar>) {
+fn use_bar(t: Box<dyn Bar>) {
     t.bar() //~ ERROR cannot move a value of type dyn Bar
 }
 
diff --git a/src/test/ui/object-safety/object-safety-by-value-self.rs b/src/test/ui/object-safety/object-safety-by-value-self.rs
index dee31f6e370..a8b1ddfaba7 100644
--- a/src/test/ui/object-safety/object-safety-by-value-self.rs
+++ b/src/test/ui/object-safety/object-safety-by-value-self.rs
@@ -17,28 +17,28 @@ trait Quux {
     fn baz(self: Self) where Self : Sized;
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     t // legal
 }
 
-fn make_bar_explicit<T:Bar>(t: &T) -> &Bar {
-    t as &Bar // legal
+fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
+    t as &dyn Bar // legal
 }
 
-fn make_baz<T:Baz>(t: &T) -> &Baz {
+fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
     t // legal
 }
 
-fn make_baz_explicit<T:Baz>(t: &T) -> &Baz {
-    t as &Baz // legal
+fn make_baz_explicit<T:Baz>(t: &T) -> &dyn Baz {
+    t as &dyn Baz // legal
 }
 
-fn make_quux<T:Quux>(t: &T) -> &Quux {
+fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
     t
 }
 
-fn make_quux_explicit<T:Quux>(t: &T) -> &Quux {
-    t as &Quux
+fn make_quux_explicit<T:Quux>(t: &T) -> &dyn Quux {
+    t as &dyn Quux
 }
 
 
diff --git a/src/test/ui/object-safety/object-safety-generics.rs b/src/test/ui/object-safety/object-safety-generics.rs
index 5f4aabf5469..d63ea28c8f2 100644
--- a/src/test/ui/object-safety/object-safety-generics.rs
+++ b/src/test/ui/object-safety/object-safety-generics.rs
@@ -11,22 +11,22 @@ trait Quux {
         where Self : Sized;
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
         //~^ ERROR E0038
     t
 }
 
-fn make_bar_explicit<T:Bar>(t: &T) -> &Bar {
+fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
-    t as &Bar
+    t as &dyn Bar
 }
 
-fn make_quux<T:Quux>(t: &T) -> &Quux {
+fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
     t
 }
 
-fn make_quux_explicit<T:Quux>(t: &T) -> &Quux {
-    t as &Quux
+fn make_quux_explicit<T:Quux>(t: &T) -> &dyn Quux {
+    t as &dyn Quux
 }
 
 fn main() {
diff --git a/src/test/ui/object-safety/object-safety-generics.stderr b/src/test/ui/object-safety/object-safety-generics.stderr
index 7ae44794ceb..d66cdb98448 100644
--- a/src/test/ui/object-safety/object-safety-generics.stderr
+++ b/src/test/ui/object-safety/object-safety-generics.stderr
@@ -1,16 +1,16 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-generics.rs:14:1
    |
-LL | fn make_bar<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: method `bar` has generic type parameters
 
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-generics.rs:19:1
    |
-LL | fn make_bar_explicit<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: method `bar` has generic type parameters
 
diff --git a/src/test/ui/object-safety/object-safety-issue-22040.rs b/src/test/ui/object-safety/object-safety-issue-22040.rs
index eb28fcf0d5a..1fc5c5442c2 100644
--- a/src/test/ui/object-safety/object-safety-issue-22040.rs
+++ b/src/test/ui/object-safety/object-safety-issue-22040.rs
@@ -9,7 +9,7 @@ trait Expr: Debug + PartialEq {
 //#[derive(PartialEq)]
 #[derive(Debug)]
 struct SExpr<'x> {
-    elements: Vec<Box<Expr+ 'x>>,
+    elements: Vec<Box<dyn Expr + 'x>>,
     //~^ ERROR E0038
 }
 
@@ -35,8 +35,8 @@ impl <'x> Expr for SExpr<'x> {
 }
 
 fn main() {
-    let a: Box<Expr> = Box::new(SExpr::new());
-    let b: Box<Expr> = Box::new(SExpr::new());
+    let a: Box<dyn Expr> = Box::new(SExpr::new());
+    let b: Box<dyn Expr> = Box::new(SExpr::new());
 
     // assert_eq!(a , b);
 }
diff --git a/src/test/ui/object-safety/object-safety-issue-22040.stderr b/src/test/ui/object-safety/object-safety-issue-22040.stderr
index 85721f1a5f8..1f5c472ddc2 100644
--- a/src/test/ui/object-safety/object-safety-issue-22040.stderr
+++ b/src/test/ui/object-safety/object-safety-issue-22040.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Expr` cannot be made into an object
   --> $DIR/object-safety-issue-22040.rs:12:23
    |
-LL |     elements: Vec<Box<Expr+ 'x>>,
-   |                       ^^^^^^^^ the trait `Expr` cannot be made into an object
+LL |     elements: Vec<Box<dyn Expr + 'x>>,
+   |                       ^^^^^^^^^^^^^ the trait `Expr` cannot be made into an object
    |
    = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
 
diff --git a/src/test/ui/object-safety/object-safety-mentions-Self.rs b/src/test/ui/object-safety/object-safety-mentions-Self.rs
index 8e1bd83cec0..f13ffe53626 100644
--- a/src/test/ui/object-safety/object-safety-mentions-Self.rs
+++ b/src/test/ui/object-safety/object-safety-mentions-Self.rs
@@ -14,22 +14,22 @@ trait Quux {
     fn get(&self, s: &Self) -> Self where Self : Sized;
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
         //~^ ERROR E0038
     loop { }
 }
 
-fn make_baz<T:Baz>(t: &T) -> &Baz {
+fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
         //~^ ERROR E0038
     t
 }
 
-fn make_quux<T:Quux>(t: &T) -> &Quux {
+fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
     t
 }
 
-fn make_quux_explicit<T:Quux>(t: &T) -> &Quux {
-    t as &Quux
+fn make_quux_explicit<T:Quux>(t: &T) -> &dyn Quux {
+    t as &dyn Quux
 }
 
 fn main() {
diff --git a/src/test/ui/object-safety/object-safety-mentions-Self.stderr b/src/test/ui/object-safety/object-safety-mentions-Self.stderr
index ed3aed983cf..c0c471c2b1e 100644
--- a/src/test/ui/object-safety/object-safety-mentions-Self.stderr
+++ b/src/test/ui/object-safety/object-safety-mentions-Self.stderr
@@ -1,16 +1,16 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-mentions-Self.rs:17:1
    |
-LL | fn make_bar<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: method `bar` references the `Self` type in its arguments or return type
 
 error[E0038]: the trait `Baz` cannot be made into an object
   --> $DIR/object-safety-mentions-Self.rs:22:1
    |
-LL | fn make_baz<T:Baz>(t: &T) -> &Baz {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Baz` cannot be made into an object
+LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Baz` cannot be made into an object
    |
    = note: method `bar` references the `Self` type in its arguments or return type
 
diff --git a/src/test/ui/object-safety/object-safety-no-static.rs b/src/test/ui/object-safety/object-safety-no-static.rs
index 4faf9386f9a..55d31ce8087 100644
--- a/src/test/ui/object-safety/object-safety-no-static.rs
+++ b/src/test/ui/object-safety/object-safety-no-static.rs
@@ -5,7 +5,7 @@ trait Foo {
     fn foo();
 }
 
-fn foo_implicit<T:Foo+'static>(b: Box<T>) -> Box<Foo+'static> {
+fn foo_implicit<T:Foo+'static>(b: Box<T>) -> Box<dyn Foo + 'static> {
     //~^ ERROR E0038
     loop { }
 }
diff --git a/src/test/ui/object-safety/object-safety-no-static.stderr b/src/test/ui/object-safety/object-safety-no-static.stderr
index 3b8ccb594c1..da8dd657c2a 100644
--- a/src/test/ui/object-safety/object-safety-no-static.stderr
+++ b/src/test/ui/object-safety/object-safety-no-static.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/object-safety-no-static.rs:8:1
    |
-LL | fn foo_implicit<T:Foo+'static>(b: Box<T>) -> Box<Foo+'static> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
+LL | fn foo_implicit<T:Foo+'static>(b: Box<T>) -> Box<dyn Foo + 'static> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/object-safety/object-safety-phantom-fn.rs b/src/test/ui/object-safety/object-safety-phantom-fn.rs
index f8875e4995b..59ed12c78f0 100644
--- a/src/test/ui/object-safety/object-safety-phantom-fn.rs
+++ b/src/test/ui/object-safety/object-safety-phantom-fn.rs
@@ -9,11 +9,11 @@ trait Baz {
 trait Bar<T> {
 }
 
-fn make_bar<T:Bar<u32>>(t: &T) -> &Bar<u32> {
+fn make_bar<T:Bar<u32>>(t: &T) -> &dyn Bar<u32> {
     t
 }
 
-fn make_baz<T:Baz>(t: &T) -> &Baz {
+fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
     t
 }
 
diff --git a/src/test/ui/object-safety/object-safety-sized-2.rs b/src/test/ui/object-safety/object-safety-sized-2.rs
index baeb3734677..7235b22404e 100644
--- a/src/test/ui/object-safety/object-safety-sized-2.rs
+++ b/src/test/ui/object-safety/object-safety-sized-2.rs
@@ -7,7 +7,7 @@ trait Bar
     fn bar<T>(&self, t: T);
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
         //~^ ERROR E0038
     loop { }
 }
diff --git a/src/test/ui/object-safety/object-safety-sized-2.stderr b/src/test/ui/object-safety/object-safety-sized-2.stderr
index 2b8bfa341d7..dcaf2ff0bc2 100644
--- a/src/test/ui/object-safety/object-safety-sized-2.stderr
+++ b/src/test/ui/object-safety/object-safety-sized-2.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized-2.rs:10:1
    |
-LL | fn make_bar<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
 
diff --git a/src/test/ui/object-safety/object-safety-sized.rs b/src/test/ui/object-safety/object-safety-sized.rs
index 77dc7390aff..1312bb34717 100644
--- a/src/test/ui/object-safety/object-safety-sized.rs
+++ b/src/test/ui/object-safety/object-safety-sized.rs
@@ -5,7 +5,7 @@ trait Bar : Sized {
     fn bar<T>(&self, t: T);
 }
 
-fn make_bar<T:Bar>(t: &T) -> &Bar {
+fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
         //~^ ERROR E0038
     t
 }
diff --git a/src/test/ui/object-safety/object-safety-sized.stderr b/src/test/ui/object-safety/object-safety-sized.stderr
index ba98e2f1ef6..98bc73e38d4 100644
--- a/src/test/ui/object-safety/object-safety-sized.stderr
+++ b/src/test/ui/object-safety/object-safety-sized.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized.rs:8:1
    |
-LL | fn make_bar<T:Bar>(t: &T) -> &Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
 
diff --git a/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.rs b/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.rs
index 9d0da4e327c..2445b33c814 100644
--- a/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.rs
+++ b/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.rs
@@ -8,11 +8,11 @@ trait Bar<T> {
 trait Baz : Bar<Self> {
 }
 
-fn make_bar<T:Bar<u32>>(t: &T) -> &Bar<u32> {
+fn make_bar<T:Bar<u32>>(t: &T) -> &dyn Bar<u32> {
     t
 }
 
-fn make_baz<T:Baz>(t: &T) -> &Baz {
+fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
     //~^ ERROR E0038
     t
 }
diff --git a/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.stderr b/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
index 5db34a23fff..8ae89832703 100644
--- a/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
+++ b/src/test/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Baz` cannot be made into an object
   --> $DIR/object-safety-supertrait-mentions-Self.rs:15:31
    |
-LL | fn make_baz<T:Baz>(t: &T) -> &Baz {
-   |                               ^^^ the trait `Baz` cannot be made into an object
+LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
+   |                               ^^^^^^^ the trait `Baz` cannot be made into an object
    |
    = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses
 
diff --git a/src/test/ui/parser/bounds-obj-parens.rs b/src/test/ui/parser/bounds-obj-parens.rs
index cc86879bf46..1e0f9e40cdc 100644
--- a/src/test/ui/parser/bounds-obj-parens.rs
+++ b/src/test/ui/parser/bounds-obj-parens.rs
@@ -1,5 +1,7 @@
 // compile-pass
 
+#![allow(bare_trait_objects)]
+
 type A = Box<(Fn(u8) -> u8) + 'static + Send + Sync>; // OK (but see #39318)
 
 fn main() {}
diff --git a/src/test/ui/parser/trailing-plus-in-bounds.rs b/src/test/ui/parser/trailing-plus-in-bounds.rs
index 153f942b978..89a2953ad0f 100644
--- a/src/test/ui/parser/trailing-plus-in-bounds.rs
+++ b/src/test/ui/parser/trailing-plus-in-bounds.rs
@@ -2,6 +2,7 @@
 // compile-flags: -Z continue-parse-after-error
 
 #![feature(box_syntax)]
+#![allow(bare_trait_objects)]
 
 use std::fmt::Debug;
 
diff --git a/src/test/ui/parser/trait-object-bad-parens.rs b/src/test/ui/parser/trait-object-bad-parens.rs
index 0f1f49a521b..e81b019b646 100644
--- a/src/test/ui/parser/trait-object-bad-parens.rs
+++ b/src/test/ui/parser/trait-object-bad-parens.rs
@@ -1,6 +1,7 @@
 // compile-flags: -Z continue-parse-after-error
 
 #![feature(optin_builtin_traits)]
+#![allow(bare_trait_objects)]
 
 auto trait Auto {}
 
diff --git a/src/test/ui/parser/trait-object-bad-parens.stderr b/src/test/ui/parser/trait-object-bad-parens.stderr
index 74e484eebee..a36727ffeaf 100644
--- a/src/test/ui/parser/trait-object-bad-parens.stderr
+++ b/src/test/ui/parser/trait-object-bad-parens.stderr
@@ -1,23 +1,23 @@
 error[E0178]: expected a path on the left-hand side of `+`, not `((Auto))`
-  --> $DIR/trait-object-bad-parens.rs:8:16
+  --> $DIR/trait-object-bad-parens.rs:9:16
    |
 LL |     let _: Box<((Auto)) + Auto>;
    |                ^^^^^^^^^^^^^^^ expected a path
 
 error[E0178]: expected a path on the left-hand side of `+`, not `(Auto + Auto)`
-  --> $DIR/trait-object-bad-parens.rs:10:16
+  --> $DIR/trait-object-bad-parens.rs:11:16
    |
 LL |     let _: Box<(Auto + Auto) + Auto>;
    |                ^^^^^^^^^^^^^^^^^^^^ expected a path
 
 error[E0178]: expected a path on the left-hand side of `+`, not `(Auto)`
-  --> $DIR/trait-object-bad-parens.rs:12:16
+  --> $DIR/trait-object-bad-parens.rs:13:16
    |
 LL |     let _: Box<(Auto +) + Auto>;
    |                ^^^^^^^^^^^^^^^ expected a path
 
 error[E0178]: expected a path on the left-hand side of `+`, not `(dyn Auto)`
-  --> $DIR/trait-object-bad-parens.rs:14:16
+  --> $DIR/trait-object-bad-parens.rs:15:16
    |
 LL |     let _: Box<(dyn Auto) + Auto>;
    |                ^^^^^^^^^^^^^^^^^ expected a path
diff --git a/src/test/ui/parser/trait-object-lifetime-parens.rs b/src/test/ui/parser/trait-object-lifetime-parens.rs
index 43f6497f7e7..d5598afd6f4 100644
--- a/src/test/ui/parser/trait-object-lifetime-parens.rs
+++ b/src/test/ui/parser/trait-object-lifetime-parens.rs
@@ -1,5 +1,7 @@
 // compile-flags: -Z continue-parse-after-error
 
+#![allow(bare_trait_objects)]
+
 trait Trait {}
 
 fn f<'a, T: Trait + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
diff --git a/src/test/ui/parser/trait-object-lifetime-parens.stderr b/src/test/ui/parser/trait-object-lifetime-parens.stderr
index a31b7aea8fe..55f14c97876 100644
--- a/src/test/ui/parser/trait-object-lifetime-parens.stderr
+++ b/src/test/ui/parser/trait-object-lifetime-parens.stderr
@@ -1,23 +1,23 @@
 error: parenthesized lifetime bounds are not supported
-  --> $DIR/trait-object-lifetime-parens.rs:5:21
+  --> $DIR/trait-object-lifetime-parens.rs:7:21
    |
 LL | fn f<'a, T: Trait + ('a)>() {}
    |                     ^^^^ help: remove the parentheses
 
 error: parenthesized lifetime bounds are not supported
-  --> $DIR/trait-object-lifetime-parens.rs:8:24
+  --> $DIR/trait-object-lifetime-parens.rs:10:24
    |
 LL |     let _: Box<Trait + ('a)>;
    |                        ^^^^ help: remove the parentheses
 
 error: expected `:`, found `)`
-  --> $DIR/trait-object-lifetime-parens.rs:9:19
+  --> $DIR/trait-object-lifetime-parens.rs:11:19
    |
 LL |     let _: Box<('a) + Trait>;
    |                   ^ expected `:`
 
 error: chained comparison operators require parentheses
-  --> $DIR/trait-object-lifetime-parens.rs:9:15
+  --> $DIR/trait-object-lifetime-parens.rs:11:15
    |
 LL |     let _: Box<('a) + Trait>;
    |               ^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL |     let _: Box<('a) + Trait>;
    = help: or use `(...)` if you meant to specify fn arguments
 
 error: expected type, found `'a`
-  --> $DIR/trait-object-lifetime-parens.rs:9:17
+  --> $DIR/trait-object-lifetime-parens.rs:11:17
    |
 LL |     let _: Box<('a) + Trait>;
    |         -       ^^
diff --git a/src/test/ui/parser/trait-object-polytrait-priority.rs b/src/test/ui/parser/trait-object-polytrait-priority.rs
index 40d2ad52c35..63425f3e201 100644
--- a/src/test/ui/parser/trait-object-polytrait-priority.rs
+++ b/src/test/ui/parser/trait-object-polytrait-priority.rs
@@ -1,3 +1,5 @@
+#![allow(bare_trait_objects)]
+
 trait Trait<'a> {}
 
 fn main() {
diff --git a/src/test/ui/parser/trait-object-polytrait-priority.stderr b/src/test/ui/parser/trait-object-polytrait-priority.stderr
index 5e2a35ea60c..a6add6079ce 100644
--- a/src/test/ui/parser/trait-object-polytrait-priority.stderr
+++ b/src/test/ui/parser/trait-object-polytrait-priority.stderr
@@ -1,5 +1,5 @@
 error[E0178]: expected a path on the left-hand side of `+`, not `&for<'a> Trait<'a>`
-  --> $DIR/trait-object-polytrait-priority.rs:4:12
+  --> $DIR/trait-object-polytrait-priority.rs:6:12
    |
 LL |     let _: &for<'a> Trait<'a> + 'static;
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&(for<'a> Trait<'a> + 'static)`
diff --git a/src/test/ui/parser/trait-object-trait-parens.rs b/src/test/ui/parser/trait-object-trait-parens.rs
index 9ac10cd1327..a113de14b6f 100644
--- a/src/test/ui/parser/trait-object-trait-parens.rs
+++ b/src/test/ui/parser/trait-object-trait-parens.rs
@@ -5,8 +5,11 @@ fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
 fn main() {
     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
     //~^ ERROR `?Trait` is not permitted in trait object types
+    //~| WARN trait objects without an explicit `dyn` are deprecated
     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
+    //~^ WARN trait objects without an explicit `dyn` are deprecated
     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
     //~^ ERROR use of undeclared lifetime name `'a`
     //~| ERROR `?Trait` is not permitted in trait object types
+    //~| WARN trait objects without an explicit `dyn` are deprecated
 }
diff --git a/src/test/ui/parser/trait-object-trait-parens.stderr b/src/test/ui/parser/trait-object-trait-parens.stderr
index 36494b76539..e3fb8a0113a 100644
--- a/src/test/ui/parser/trait-object-trait-parens.stderr
+++ b/src/test/ui/parser/trait-object-trait-parens.stderr
@@ -5,13 +5,33 @@ LL |     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
    |                         ^^^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/trait-object-trait-parens.rs:9:47
+  --> $DIR/trait-object-trait-parens.rs:11:47
    |
 LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
    |                                               ^^^^^^^^
 
+warning: trait objects without an explicit `dyn` are deprecated
+  --> $DIR/trait-object-trait-parens.rs:6:16
+   |
+LL |     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Copy) + (?Sized) + (for<'a> Trait<'a>)`
+   |
+   = note: #[warn(bare_trait_objects)] on by default
+
+warning: trait objects without an explicit `dyn` are deprecated
+  --> $DIR/trait-object-trait-parens.rs:9:16
+   |
+LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Copy)`
+
+warning: trait objects without an explicit `dyn` are deprecated
+  --> $DIR/trait-object-trait-parens.rs:11:16
+   |
+LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Copy) + (?Sized)`
+
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/trait-object-trait-parens.rs:9:31
+  --> $DIR/trait-object-trait-parens.rs:11:31
    |
 LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
    |                               ^^ undeclared lifetime
diff --git a/src/test/ui/privacy/private-in-public-non-principal-2.rs b/src/test/ui/privacy/private-in-public-non-principal-2.rs
index 02fd92aa7a4..8a59073fa6c 100644
--- a/src/test/ui/privacy/private-in-public-non-principal-2.rs
+++ b/src/test/ui/privacy/private-in-public-non-principal-2.rs
@@ -4,7 +4,7 @@
 mod m {
     pub trait PubPrincipal {}
     auto trait PrivNonPrincipal {}
-    pub fn leak_dyn_nonprincipal() -> Box<PubPrincipal + PrivNonPrincipal> { loop {} }
+    pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
 }
 
 fn main() {
diff --git a/src/test/ui/privacy/private-in-public-non-principal.rs b/src/test/ui/privacy/private-in-public-non-principal.rs
index 5de5a685208..5d89d8105b1 100644
--- a/src/test/ui/privacy/private-in-public-non-principal.rs
+++ b/src/test/ui/privacy/private-in-public-non-principal.rs
@@ -3,7 +3,7 @@
 pub trait PubPrincipal {}
 auto trait PrivNonPrincipal {}
 
-pub fn leak_dyn_nonprincipal() -> Box<PubPrincipal + PrivNonPrincipal> { loop {} }
+pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
 //~^ WARN private trait `PrivNonPrincipal` in public interface
 //~| WARN this was previously accepted
 
diff --git a/src/test/ui/privacy/private-in-public-non-principal.stderr b/src/test/ui/privacy/private-in-public-non-principal.stderr
index 729b94ed892..578f4380b42 100644
--- a/src/test/ui/privacy/private-in-public-non-principal.stderr
+++ b/src/test/ui/privacy/private-in-public-non-principal.stderr
@@ -1,8 +1,8 @@
 warning: private trait `PrivNonPrincipal` in public interface (error E0445)
   --> $DIR/private-in-public-non-principal.rs:6:1
    |
-LL | pub fn leak_dyn_nonprincipal() -> Box<PubPrincipal + PrivNonPrincipal> { loop {} }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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!
diff --git a/src/test/ui/privacy/private-inferred-type.rs b/src/test/ui/privacy/private-inferred-type.rs
index d9bb421b53f..dab440b2d99 100644
--- a/src/test/ui/privacy/private-inferred-type.rs
+++ b/src/test/ui/privacy/private-inferred-type.rs
@@ -65,9 +65,9 @@ mod m {
     pub fn leak_anon2() -> impl TraitWithTyParam<Alias> { 0 }
     pub fn leak_anon3() -> impl TraitWithAssocTy<AssocTy = Alias> { 0 }
 
-    pub fn leak_dyn1() -> Box<Trait + 'static> { Box::new(0) }
-    pub fn leak_dyn2() -> Box<TraitWithTyParam<Alias>> { Box::new(0) }
-    pub fn leak_dyn3() -> Box<TraitWithAssocTy<AssocTy = Alias>> { Box::new(0) }
+    pub fn leak_dyn1() -> Box<dyn Trait + 'static> { Box::new(0) }
+    pub fn leak_dyn2() -> Box<dyn TraitWithTyParam<Alias>> { Box::new(0) }
+    pub fn leak_dyn3() -> Box<dyn TraitWithAssocTy<AssocTy = Alias>> { Box::new(0) }
 }
 
 mod adjust {
diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs
index a1ccf667671..5f1c2ed08f6 100644
--- a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs
+++ b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs
@@ -51,7 +51,7 @@ fn ok_borrow_of_fn_params(a: usize, b:usize) {
 // TOP-LEVEL FN'S
 
 fn escaping_borrow_of_fn_params_1() {
-    fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+    fn g<'a>(x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
         let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
         //~^ ERROR E0373
         //~| ERROR E0373
@@ -62,7 +62,7 @@ fn escaping_borrow_of_fn_params_1() {
 }
 
 fn escaping_borrow_of_fn_params_2() {
-    fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+    fn g<'a>(x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
         let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
         //~^ ERROR E0373
         //~| ERROR E0373
@@ -73,7 +73,7 @@ fn escaping_borrow_of_fn_params_2() {
 }
 
 fn move_of_fn_params() {
-    fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+    fn g<'a>(x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
         let f = move |t: bool| if t { x } else { y };
         return Box::new(f);
     };
@@ -86,7 +86,7 @@ fn move_of_fn_params() {
 fn escaping_borrow_of_method_params_1() {
     struct S;
     impl S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -100,7 +100,7 @@ fn escaping_borrow_of_method_params_1() {
 fn escaping_borrow_of_method_params_2() {
     struct S;
     impl S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -113,7 +113,7 @@ fn escaping_borrow_of_method_params_2() {
 fn move_of_method_params() {
     struct S;
     impl S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = move |t: bool| if t { x } else { y };
             return Box::new(f);
         }
@@ -125,10 +125,10 @@ fn move_of_method_params() {
 // TRAIT IMPL METHODS
 
 fn escaping_borrow_of_trait_impl_params_1() {
-    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a>; }
+    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a>; }
     struct S;
     impl T for S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -140,10 +140,10 @@ fn escaping_borrow_of_trait_impl_params_1() {
 }
 
 fn escaping_borrow_of_trait_impl_params_2() {
-    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a>; }
+    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a>; }
     struct S;
     impl T for S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -154,10 +154,10 @@ fn escaping_borrow_of_trait_impl_params_2() {
 }
 
 fn move_of_trait_impl_params() {
-    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a>; }
+    trait T { fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a>; }
     struct S;
     impl T for S {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = move |t: bool| if t { x } else { y };
             return Box::new(f);
         }
@@ -171,7 +171,7 @@ fn move_of_trait_impl_params() {
 fn escaping_borrow_of_trait_default_params_1() {
     struct S;
     trait T {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -185,7 +185,7 @@ fn escaping_borrow_of_trait_default_params_1() {
 fn escaping_borrow_of_trait_default_params_2() {
     struct S;
     trait T {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
             //~^ ERROR E0373
             //~| ERROR E0373
@@ -199,7 +199,7 @@ fn escaping_borrow_of_trait_default_params_2() {
 fn move_of_trait_default_params() {
     struct S;
     trait T {
-        fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
+        fn g<'a>(&self, x: usize, y:usize) -> Box<dyn Fn(bool) -> usize + 'a> {
             let f = move |t: bool| if t { x } else { y };
             return Box::new(f);
         }
diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.rs b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.rs
index 3a211b04636..40d2b740b43 100644
--- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.rs
+++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.rs
@@ -10,15 +10,15 @@ trait SomeTrait { }
 
 struct Foo<'a,'b,'c> { //~ ERROR parameter `'c` is never used
     // All of these are ok, because we can derive exactly one bound:
-    a: Box<IsStatic>,
-    b: Box<Is<'static>>,
-    c: Box<Is<'a>>,
-    d: Box<IsSend>,
-    e: Box<Is<'a>+Send>, // we can derive two bounds, but one is 'static, so ok
-    f: Box<SomeTrait>,   // OK, defaults to 'static due to RFC 599.
-    g: Box<SomeTrait+'a>,
+    a: Box<dyn IsStatic>,
+    b: Box<dyn Is<'static>>,
+    c: Box<dyn Is<'a>>,
+    d: Box<dyn IsSend>,
+    e: Box<dyn Is<'a>+Send>, // we can derive two bounds, but one is 'static, so ok
+    f: Box<dyn SomeTrait>,   // OK, defaults to 'static due to RFC 599.
+    g: Box<dyn SomeTrait+'a>,
 
-    z: Box<Is<'a>+'b+'c>,
+    z: Box<dyn Is<'a>+'b+'c>,
     //~^ ERROR only a single explicit lifetime bound is permitted
     //~| ERROR lifetime bound not satisfied
 }
diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr
index 8bcb2da4577..003dd0699d3 100644
--- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr
+++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr
@@ -1,14 +1,14 @@
 error[E0226]: only a single explicit lifetime bound is permitted
-  --> $DIR/region-bounds-on-objects-and-type-parameters.rs:21:22
+  --> $DIR/region-bounds-on-objects-and-type-parameters.rs:21:26
    |
-LL |     z: Box<Is<'a>+'b+'c>,
-   |                      ^^
+LL |     z: Box<dyn Is<'a>+'b+'c>,
+   |                          ^^
 
 error[E0478]: lifetime bound not satisfied
   --> $DIR/region-bounds-on-objects-and-type-parameters.rs:21:5
    |
-LL |     z: Box<Is<'a>+'b+'c>,
-   |     ^^^^^^^^^^^^^^^^^^^^
+LL |     z: Box<dyn Is<'a>+'b+'c>,
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime 'b as defined on the struct at 11:15
   --> $DIR/region-bounds-on-objects-and-type-parameters.rs:11:15
diff --git a/src/test/ui/regions/region-object-lifetime-2.nll.stderr b/src/test/ui/regions/region-object-lifetime-2.nll.stderr
index 56e8c40c99f..60084773466 100644
--- a/src/test/ui/regions/region-object-lifetime-2.nll.stderr
+++ b/src/test/ui/regions/region-object-lifetime-2.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/region-object-lifetime-2.rs:10:5
    |
-LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
+LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () {
    |                                          -- -- lifetime `'b` defined here
    |                                          |
    |                                          lifetime `'a` defined here
diff --git a/src/test/ui/regions/region-object-lifetime-2.rs b/src/test/ui/regions/region-object-lifetime-2.rs
index 92c85020e9a..42798487893 100644
--- a/src/test/ui/regions/region-object-lifetime-2.rs
+++ b/src/test/ui/regions/region-object-lifetime-2.rs
@@ -6,7 +6,7 @@ trait Foo {
 }
 
 // Borrowed receiver but two distinct lifetimes, we get an error.
-fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
+fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () {
     x.borrowed() //~ ERROR cannot infer
 }
 
diff --git a/src/test/ui/regions/region-object-lifetime-2.stderr b/src/test/ui/regions/region-object-lifetime-2.stderr
index d3552ab0c4b..0c5e22ebae2 100644
--- a/src/test/ui/regions/region-object-lifetime-2.stderr
+++ b/src/test/ui/regions/region-object-lifetime-2.stderr
@@ -7,7 +7,7 @@ LL |     x.borrowed()
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:42...
   --> $DIR/region-object-lifetime-2.rs:9:42
    |
-LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
+LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () {
    |                                          ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/region-object-lifetime-2.rs:10:5
@@ -17,7 +17,7 @@ LL |     x.borrowed()
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 9:45...
   --> $DIR/region-object-lifetime-2.rs:9:45
    |
-LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
+LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a dyn Foo) -> &'b () {
    |                                             ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/region-object-lifetime-2.rs:10:5
diff --git a/src/test/ui/regions/region-object-lifetime-4.nll.stderr b/src/test/ui/regions/region-object-lifetime-4.nll.stderr
index aa91c371f41..75b049dae21 100644
--- a/src/test/ui/regions/region-object-lifetime-4.nll.stderr
+++ b/src/test/ui/regions/region-object-lifetime-4.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/region-object-lifetime-4.rs:12:5
    |
-LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
+LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
    |                                         -- -- lifetime `'b` defined here
    |                                         |
    |                                         lifetime `'a` defined here
diff --git a/src/test/ui/regions/region-object-lifetime-4.rs b/src/test/ui/regions/region-object-lifetime-4.rs
index d2ab617ebb7..4fe12b2acfc 100644
--- a/src/test/ui/regions/region-object-lifetime-4.rs
+++ b/src/test/ui/regions/region-object-lifetime-4.rs
@@ -8,7 +8,7 @@ trait Foo {
 // Here we have two distinct lifetimes, but we try to return a pointer
 // with the longer lifetime when (from the signature) we only know
 // that it lives as long as the shorter lifetime. Therefore, error.
-fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
+fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
     x.borrowed() //~ ERROR cannot infer
 }
 
diff --git a/src/test/ui/regions/region-object-lifetime-4.stderr b/src/test/ui/regions/region-object-lifetime-4.stderr
index 75b26ffc6d5..e737d27d560 100644
--- a/src/test/ui/regions/region-object-lifetime-4.stderr
+++ b/src/test/ui/regions/region-object-lifetime-4.stderr
@@ -7,7 +7,7 @@ LL |     x.borrowed()
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 11:41...
   --> $DIR/region-object-lifetime-4.rs:11:41
    |
-LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
+LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
    |                                         ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/region-object-lifetime-4.rs:12:5
@@ -17,7 +17,7 @@ LL |     x.borrowed()
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 11:44...
   --> $DIR/region-object-lifetime-4.rs:11:44
    |
-LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
+LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
    |                                            ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/region-object-lifetime-4.rs:12:5
diff --git a/src/test/ui/regions/region-object-lifetime-5.rs b/src/test/ui/regions/region-object-lifetime-5.rs
index bd68aebbeeb..307bbcbd58d 100644
--- a/src/test/ui/regions/region-object-lifetime-5.rs
+++ b/src/test/ui/regions/region-object-lifetime-5.rs
@@ -7,7 +7,7 @@ trait Foo {
 
 // Here, the object is bounded by an anonymous lifetime and returned
 // as `&'static`, so you get an error.
-fn owned_receiver(x: Box<Foo>) -> &'static () {
+fn owned_receiver(x: Box<dyn Foo>) -> &'static () {
     x.borrowed() //~ ERROR cannot return value referencing local data `*x`
 }
 
diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr
index a54f8f5faab..43acbfd412d 100644
--- a/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr
+++ b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr
@@ -1,15 +1,15 @@
 error[E0621]: explicit lifetime required in the type of `v`
   --> $DIR/region-object-lifetime-in-coercion.rs:8:12
    |
-LL | fn a(v: &[u8]) -> Box<Foo + 'static> {
+LL | fn a(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
-LL |     let x: Box<Foo + 'static> = Box::new(v);
-   |            ^^^^^^^^^^^^^^^^^^ lifetime `'static` required
+LL |     let x: Box<dyn Foo + 'static> = Box::new(v);
+   |            ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
 
 error[E0621]: explicit lifetime required in the type of `v`
   --> $DIR/region-object-lifetime-in-coercion.rs:14:5
    |
-LL | fn b(v: &[u8]) -> Box<Foo + 'static> {
+LL | fn b(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
 LL |     Box::new(v)
    |     ^^^^^^^^^^^ lifetime `'static` required
@@ -17,7 +17,7 @@ LL |     Box::new(v)
 error[E0621]: explicit lifetime required in the type of `v`
   --> $DIR/region-object-lifetime-in-coercion.rs:21:5
    |
-LL | fn c(v: &[u8]) -> Box<Foo> {
+LL | fn c(v: &[u8]) -> Box<dyn Foo> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
 ...
 LL |     Box::new(v)
@@ -26,7 +26,7 @@ LL |     Box::new(v)
 error: lifetime may not live long enough
   --> $DIR/region-object-lifetime-in-coercion.rs:26:5
    |
-LL | fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
+LL | fn d<'a,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> {
    |      -- -- lifetime `'b` defined here
    |      |
    |      lifetime `'a` defined here
diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.rs b/src/test/ui/regions/region-object-lifetime-in-coercion.rs
index dfba04b0d25..2dc67599913 100644
--- a/src/test/ui/regions/region-object-lifetime-in-coercion.rs
+++ b/src/test/ui/regions/region-object-lifetime-in-coercion.rs
@@ -4,30 +4,30 @@
 trait Foo {}
 impl<'a> Foo for &'a [u8] {}
 
-fn a(v: &[u8]) -> Box<Foo + 'static> {
-    let x: Box<Foo + 'static> = Box::new(v);
+fn a(v: &[u8]) -> Box<dyn Foo + 'static> {
+    let x: Box<dyn Foo + 'static> = Box::new(v);
     //~^ ERROR explicit lifetime required in the type of `v` [E0621]
     x
 }
 
-fn b(v: &[u8]) -> Box<Foo + 'static> {
+fn b(v: &[u8]) -> Box<dyn Foo + 'static> {
     Box::new(v)
         //~^ ERROR explicit lifetime required in the type of `v` [E0621]
 }
 
-fn c(v: &[u8]) -> Box<Foo> {
+fn c(v: &[u8]) -> Box<dyn Foo> {
     // same as previous case due to RFC 599
 
     Box::new(v)
         //~^ ERROR explicit lifetime required in the type of `v` [E0621]
 }
 
-fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
+fn d<'a,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> {
     Box::new(v)
         //~^ ERROR cannot infer an appropriate lifetime due to conflicting
 }
 
-fn e<'a:'b,'b>(v: &'a [u8]) -> Box<Foo+'b> {
+fn e<'a:'b,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> {
     Box::new(v) // OK, thanks to 'a:'b
 }
 
diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
index c94a25ce604..8209fa1840d 100644
--- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
+++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
@@ -1,15 +1,15 @@
 error[E0621]: explicit lifetime required in the type of `v`
-  --> $DIR/region-object-lifetime-in-coercion.rs:8:33
+  --> $DIR/region-object-lifetime-in-coercion.rs:8:37
    |
-LL | fn a(v: &[u8]) -> Box<Foo + 'static> {
+LL | fn a(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
-LL |     let x: Box<Foo + 'static> = Box::new(v);
-   |                                 ^^^^^^^^^^^ lifetime `'static` required
+LL |     let x: Box<dyn Foo + 'static> = Box::new(v);
+   |                                     ^^^^^^^^^^^ lifetime `'static` required
 
 error[E0621]: explicit lifetime required in the type of `v`
   --> $DIR/region-object-lifetime-in-coercion.rs:14:5
    |
-LL | fn b(v: &[u8]) -> Box<Foo + 'static> {
+LL | fn b(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
 LL |     Box::new(v)
    |     ^^^^^^^^^^^ lifetime `'static` required
@@ -17,7 +17,7 @@ LL |     Box::new(v)
 error[E0621]: explicit lifetime required in the type of `v`
   --> $DIR/region-object-lifetime-in-coercion.rs:21:5
    |
-LL | fn c(v: &[u8]) -> Box<Foo> {
+LL | fn c(v: &[u8]) -> Box<dyn Foo> {
    |         ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
 ...
 LL |     Box::new(v)
@@ -32,7 +32,7 @@ LL |     Box::new(v)
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 25:6...
   --> $DIR/region-object-lifetime-in-coercion.rs:25:6
    |
-LL | fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
+LL | fn d<'a,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> {
    |      ^^
    = note: ...so that the expression is assignable:
            expected &[u8]
@@ -40,7 +40,7 @@ LL | fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 25:9...
   --> $DIR/region-object-lifetime-in-coercion.rs:25:9
    |
-LL | fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
+LL | fn d<'a,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> {
    |         ^^
    = note: ...so that the expression is assignable:
            expected std::boxed::Box<(dyn Foo + 'b)>
diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.rs b/src/test/ui/regions/regions-close-associated-type-into-object.rs
index 853d9611387..0cbdc828c50 100644
--- a/src/test/ui/regions/regions-close-associated-type-into-object.rs
+++ b/src/test/ui/regions/regions-close-associated-type-into-object.rs
@@ -9,54 +9,54 @@ trait Iter {
     fn as_item(&self) -> &Self::Item;
 }
 
-fn bad1<T: Iter>(v: T) -> Box<X+'static>
+fn bad1<T: Iter>(v: T) -> Box<dyn X + 'static>
 {
     let item = v.into_item();
     Box::new(item) //~ ERROR associated type `<T as Iter>::Item` may not live long enough
 }
 
-fn bad2<T: Iter>(v: T) -> Box<X+'static>
+fn bad2<T: Iter>(v: T) -> Box<dyn X + 'static>
     where Box<T::Item> : X
 {
     let item: Box<_> = box v.into_item();
     Box::new(item) //~ ERROR associated type `<T as Iter>::Item` may not live long enough
 }
 
-fn bad3<'a, T: Iter>(v: T) -> Box<X+'a>
+fn bad3<'a, T: Iter>(v: T) -> Box<dyn X + 'a>
 {
     let item = v.into_item();
     Box::new(item) //~ ERROR associated type `<T as Iter>::Item` may not live long enough
 }
 
-fn bad4<'a, T: Iter>(v: T) -> Box<X+'a>
+fn bad4<'a, T: Iter>(v: T) -> Box<dyn X + 'a>
     where Box<T::Item> : X
 {
     let item: Box<_> = box v.into_item();
     Box::new(item) //~ ERROR associated type `<T as Iter>::Item` may not live long enough
 }
 
-fn ok1<'a, T: Iter>(v: T) -> Box<X+'a>
+fn ok1<'a, T: Iter>(v: T) -> Box<dyn X + 'a>
     where T::Item : 'a
 {
     let item = v.into_item();
     Box::new(item) // OK, T::Item : 'a is declared
 }
 
-fn ok2<'a, T: Iter>(v: &T, w: &'a T::Item) -> Box<X+'a>
+fn ok2<'a, T: Iter>(v: &T, w: &'a T::Item) -> Box<dyn X + 'a>
     where T::Item : Clone
 {
     let item = Clone::clone(w);
     Box::new(item) // OK, T::Item : 'a is implied
 }
 
-fn ok3<'a, T: Iter>(v: &'a T) -> Box<X+'a>
+fn ok3<'a, T: Iter>(v: &'a T) -> Box<dyn X + 'a>
     where T::Item : Clone + 'a
 {
     let item = Clone::clone(v.as_item());
     Box::new(item) // OK, T::Item : 'a was declared
 }
 
-fn meh1<'a, T: Iter>(v: &'a T) -> Box<X+'a>
+fn meh1<'a, T: Iter>(v: &'a T) -> Box<dyn X + 'a>
     where T::Item : Clone
 {
     // This case is kind of interesting. It's the same as `ok3` but
diff --git a/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr
index 42df9b1c49f..806a3ca8242 100644
--- a/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr
@@ -1,16 +1,16 @@
 error: lifetime may not live long enough
   --> $DIR/regions-close-object-into-object-2.rs:10:5
    |
-LL | fn g<'a, T: 'static>(v: Box<A<T>+'a>) -> Box<X+'static> {
+LL | fn g<'a, T: 'static>(v: Box<dyn A<T> + 'a>) -> Box<dyn X + 'static> {
    |      -- lifetime `'a` defined here
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+LL |     box B(&*v) as Box<dyn X>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
 
 error[E0515]: cannot return value referencing local data `*v`
   --> $DIR/regions-close-object-into-object-2.rs:10:5
    |
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^---^^^^^^^^^^^
+LL |     box B(&*v) as Box<dyn X>
+   |     ^^^^^^---^^^^^^^^^^^^^^^
    |     |     |
    |     |     `*v` is borrowed here
    |     returns a value referencing data owned by the current function
diff --git a/src/test/ui/regions/regions-close-object-into-object-2.rs b/src/test/ui/regions/regions-close-object-into-object-2.rs
index cebb4ac68cb..2364ba27286 100644
--- a/src/test/ui/regions/regions-close-object-into-object-2.rs
+++ b/src/test/ui/regions/regions-close-object-into-object-2.rs
@@ -1,13 +1,13 @@
 #![feature(box_syntax)]
 
 trait A<T> { }
-struct B<'a, T:'a>(&'a (A<T>+'a));
+struct B<'a, T:'a>(&'a (dyn A<T> + 'a));
 
 trait X { }
 impl<'a, T> X for B<'a, T> {}
 
-fn g<'a, T: 'static>(v: Box<A<T>+'a>) -> Box<X+'static> {
-    box B(&*v) as Box<X> //~ ERROR cannot infer
+fn g<'a, T: 'static>(v: Box<dyn A<T> + 'a>) -> Box<dyn X + 'static> {
+    box B(&*v) as Box<dyn X> //~ ERROR cannot infer
 }
 
 fn main() { }
diff --git a/src/test/ui/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr
index b5b03e618e1..fa203debb3a 100644
--- a/src/test/ui/regions/regions-close-object-into-object-2.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr
@@ -1,18 +1,18 @@
 error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
   --> $DIR/regions-close-object-into-object-2.rs:10:11
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |           ^^^
    |
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:6...
   --> $DIR/regions-close-object-into-object-2.rs:9:6
    |
-LL | fn g<'a, T: 'static>(v: Box<A<T>+'a>) -> Box<X+'static> {
+LL | fn g<'a, T: 'static>(v: Box<dyn A<T> + 'a>) -> Box<dyn X + 'static> {
    |      ^^
 note: ...so that the type `(dyn A<T> + 'a)` is not borrowed for too long
   --> $DIR/regions-close-object-into-object-2.rs:10:11
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |           ^^^
    = note: but, the lifetime must be valid for the static lifetime...
    = note: ...so that the expression is assignable:
diff --git a/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr
index 8af94fa7e79..1e57023bc23 100644
--- a/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr
@@ -1,7 +1,7 @@
 error[E0310]: the parameter type `U` may not live long enough
   --> $DIR/regions-close-object-into-object-4.rs:10:5
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |     ^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `U: 'static`...
@@ -9,16 +9,16 @@ LL |     box B(&*v) as Box<X>
 error: lifetime may not live long enough
   --> $DIR/regions-close-object-into-object-4.rs:10:5
    |
-LL | fn i<'a, T, U>(v: Box<A<U>+'a>) -> Box<X+'static> {
+LL | fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
    |      -- lifetime `'a` defined here
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+LL |     box B(&*v) as Box<dyn X>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
 
 error[E0515]: cannot return value referencing local data `*v`
   --> $DIR/regions-close-object-into-object-4.rs:10:5
    |
-LL |     box B(&*v) as Box<X>
-   |     ^^^^^^---^^^^^^^^^^^
+LL |     box B(&*v) as Box<dyn X>
+   |     ^^^^^^---^^^^^^^^^^^^^^^
    |     |     |
    |     |     `*v` is borrowed here
    |     returns a value referencing data owned by the current function
@@ -26,7 +26,7 @@ LL |     box B(&*v) as Box<X>
 error[E0310]: the parameter type `U` may not live long enough
   --> $DIR/regions-close-object-into-object-4.rs:10:9
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |         ^^^^^^
    |
    = help: consider adding an explicit lifetime bound `U: 'static`...
diff --git a/src/test/ui/regions/regions-close-object-into-object-4.rs b/src/test/ui/regions/regions-close-object-into-object-4.rs
index 91aab057bb9..d5310770436 100644
--- a/src/test/ui/regions/regions-close-object-into-object-4.rs
+++ b/src/test/ui/regions/regions-close-object-into-object-4.rs
@@ -1,13 +1,13 @@
 #![feature(box_syntax)]
 
 trait A<T> { }
-struct B<'a, T:'a>(&'a (A<T>+'a));
+struct B<'a, T:'a>(&'a (dyn A<T> + 'a));
 
 trait X { }
 impl<'a, T> X for B<'a, T> {}
 
-fn i<'a, T, U>(v: Box<A<U>+'a>) -> Box<X+'static> {
-    box B(&*v) as Box<X> //~ ERROR cannot infer
+fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
+    box B(&*v) as Box<dyn X> //~ ERROR cannot infer
 }
 
 fn main() {}
diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr
index 20cbcbb841f..f5e66f84a9e 100644
--- a/src/test/ui/regions/regions-close-object-into-object-4.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr
@@ -1,18 +1,18 @@
 error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
   --> $DIR/regions-close-object-into-object-4.rs:10:11
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |           ^^^
    |
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:6...
   --> $DIR/regions-close-object-into-object-4.rs:9:6
    |
-LL | fn i<'a, T, U>(v: Box<A<U>+'a>) -> Box<X+'static> {
+LL | fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
    |      ^^
 note: ...so that the type `(dyn A<U> + 'a)` is not borrowed for too long
   --> $DIR/regions-close-object-into-object-4.rs:10:11
    |
-LL |     box B(&*v) as Box<X>
+LL |     box B(&*v) as Box<dyn X>
    |           ^^^
    = note: but, the lifetime must be valid for the static lifetime...
    = note: ...so that the expression is assignable:
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr
index 30fdb820e36..7d3d51bdb43 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr
+++ b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr
@@ -1,7 +1,7 @@
 error[E0310]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:10:5
    |
-LL |     box v as Box<SomeTrait+'static>
+LL |     box v as Box<dyn SomeTrait + 'static>
    |     ^^^^^
    |
    = help: consider adding an explicit lifetime bound `A: 'static`...
@@ -9,7 +9,7 @@ LL |     box v as Box<SomeTrait+'static>
 error[E0309]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
    |
-LL |     box v as Box<SomeTrait+'b>
+LL |     box v as Box<dyn SomeTrait + 'b>
    |     ^^^^^
    |
    = help: consider adding an explicit lifetime bound `A: 'b`...
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.rs b/src/test/ui/regions/regions-close-over-type-parameter-1.rs
index 9aee9663e8f..6a9aa66a446 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-1.rs
+++ b/src/test/ui/regions/regions-close-over-type-parameter-1.rs
@@ -6,18 +6,18 @@
 
 trait SomeTrait { fn get(&self) -> isize; }
 
-fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
-    box v as Box<SomeTrait+'static>
+fn make_object1<A:SomeTrait>(v: A) -> Box<dyn SomeTrait + 'static> {
+    box v as Box<dyn SomeTrait + 'static>
         //~^ ERROR the parameter type `A` may not live long enough
         //~| ERROR the parameter type `A` may not live long enough
 }
 
-fn make_object2<'a,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'a> {
-    box v as Box<SomeTrait+'a>
+fn make_object2<'a,A:SomeTrait+'a>(v: A) -> Box<dyn SomeTrait + 'a> {
+    box v as Box<dyn SomeTrait + 'a>
 }
 
-fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
-    box v as Box<SomeTrait+'b>
+fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<dyn SomeTrait + 'b> {
+    box v as Box<dyn SomeTrait + 'b>
         //~^ ERROR the parameter type `A` may not live long enough
         //~| ERROR the parameter type `A` may not live long enough
 }
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.stderr b/src/test/ui/regions/regions-close-over-type-parameter-1.stderr
index 615c55d9da3..81534b7b770 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-1.stderr
+++ b/src/test/ui/regions/regions-close-over-type-parameter-1.stderr
@@ -1,58 +1,58 @@
 error[E0310]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:10:5
    |
-LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
+LL | fn make_object1<A:SomeTrait>(v: A) -> Box<dyn SomeTrait + 'static> {
    |                 -- help: consider adding an explicit lifetime bound `A: 'static`...
-LL |     box v as Box<SomeTrait+'static>
+LL |     box v as Box<dyn SomeTrait + 'static>
    |     ^^^^^
    |
 note: ...so that the type `A` will meet its required lifetime bounds
   --> $DIR/regions-close-over-type-parameter-1.rs:10:5
    |
-LL |     box v as Box<SomeTrait+'static>
+LL |     box v as Box<dyn SomeTrait + 'static>
    |     ^^^^^
 
 error[E0310]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:10:5
    |
-LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
+LL | fn make_object1<A:SomeTrait>(v: A) -> Box<dyn SomeTrait + 'static> {
    |                 -- help: consider adding an explicit lifetime bound `A: 'static`...
-LL |     box v as Box<SomeTrait+'static>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'static>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...so that it can be closed over into an object
   --> $DIR/regions-close-over-type-parameter-1.rs:10:5
    |
-LL |     box v as Box<SomeTrait+'static>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'static>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0309]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
    |
-LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
+LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<dyn SomeTrait + 'b> {
    |                       -- help: consider adding an explicit lifetime bound `A: 'b`...
-LL |     box v as Box<SomeTrait+'b>
+LL |     box v as Box<dyn SomeTrait + 'b>
    |     ^^^^^
    |
 note: ...so that the type `A` will meet its required lifetime bounds
   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
    |
-LL |     box v as Box<SomeTrait+'b>
+LL |     box v as Box<dyn SomeTrait + 'b>
    |     ^^^^^
 
 error[E0309]: the parameter type `A` may not live long enough
   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
    |
-LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
+LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<dyn SomeTrait + 'b> {
    |                       -- help: consider adding an explicit lifetime bound `A: 'b`...
-LL |     box v as Box<SomeTrait+'b>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'b>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...so that it can be closed over into an object
   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
    |
-LL |     box v as Box<SomeTrait+'b>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'b>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr
index 001ed7fe4c5..88d6abd1428 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr
+++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr
@@ -1,13 +1,13 @@
 error: lifetime may not live long enough
   --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
    |
-LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'c> {
+LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
    |                    --    -- lifetime `'c` defined here
    |                    |
    |                    lifetime `'a` defined here
 LL |     // A outlives 'a AND 'b...but not 'c.
-LL |     box v as Box<SomeTrait+'a>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'c`
+LL |     box v as Box<dyn SomeTrait + 'a>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'c`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.rs b/src/test/ui/regions/regions-close-over-type-parameter-multiple.rs
index defbc5d9f23..26643e08985 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.rs
+++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.rs
@@ -5,19 +5,19 @@
 
 trait SomeTrait { fn get(&self) -> isize; }
 
-fn make_object_good1<'a,'b,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'a> {
+fn make_object_good1<'a,'b,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'a> {
     // A outlives 'a AND 'b...
-    box v as Box<SomeTrait+'a> // ...hence this type is safe.
+    box v as Box<dyn SomeTrait + 'a> // ...hence this type is safe.
 }
 
-fn make_object_good2<'a,'b,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'b> {
+fn make_object_good2<'a,'b,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'b> {
     // A outlives 'a AND 'b...
-    box v as Box<SomeTrait+'b> // ...hence this type is safe.
+    box v as Box<dyn SomeTrait + 'b> // ...hence this type is safe.
 }
 
-fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'c> {
+fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
     // A outlives 'a AND 'b...but not 'c.
-    box v as Box<SomeTrait+'a> //~ ERROR cannot infer an appropriate lifetime
+    box v as Box<dyn SomeTrait + 'a> //~ ERROR cannot infer an appropriate lifetime
 }
 
 fn main() {
diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr
index 96e6a329e7d..8b3dbc8b649 100644
--- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr
+++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr
@@ -1,23 +1,23 @@
 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
   --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
    |
-LL |     box v as Box<SomeTrait+'a>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'a>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 18:20...
   --> $DIR/regions-close-over-type-parameter-multiple.rs:18:20
    |
-LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'c> {
+LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
    |                    ^^
 note: ...so that the declared lifetime parameter bounds are satisfied
   --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
    |
-LL |     box v as Box<SomeTrait+'a>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     box v as Box<dyn SomeTrait + 'a>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: but, the lifetime must be valid for the lifetime 'c as defined on the function body at 18:26...
   --> $DIR/regions-close-over-type-parameter-multiple.rs:18:26
    |
-LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'c> {
+LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
    |                          ^^
    = note: ...so that the expression is assignable:
            expected std::boxed::Box<(dyn SomeTrait + 'c)>
diff --git a/src/test/ui/regions/regions-close-param-into-object.rs b/src/test/ui/regions/regions-close-param-into-object.rs
index 86590748cb2..2760e5eed95 100644
--- a/src/test/ui/regions/regions-close-param-into-object.rs
+++ b/src/test/ui/regions/regions-close-param-into-object.rs
@@ -1,24 +1,24 @@
 trait X { fn foo(&self) {} }
 
-fn p1<T>(v: T) -> Box<X+'static>
+fn p1<T>(v: T) -> Box<dyn X + 'static>
     where T : X
 {
     Box::new(v) //~ ERROR parameter type `T` may not live long enough
 }
 
-fn p2<T>(v: Box<T>) -> Box<X+'static>
+fn p2<T>(v: Box<T>) -> Box<dyn X + 'static>
     where Box<T> : X
 {
     Box::new(v) //~ ERROR parameter type `T` may not live long enough
 }
 
-fn p3<'a,T>(v: T) -> Box<X+'a>
+fn p3<'a,T>(v: T) -> Box<dyn X + 'a>
     where T : X
 {
     Box::new(v) //~ ERROR parameter type `T` may not live long enough
 }
 
-fn p4<'a,T>(v: Box<T>) -> Box<X+'a>
+fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a>
     where Box<T> : X
 {
     Box::new(v) //~ ERROR parameter type `T` may not live long enough
diff --git a/src/test/ui/regions/regions-close-param-into-object.stderr b/src/test/ui/regions/regions-close-param-into-object.stderr
index ef226073de6..7f2c646c121 100644
--- a/src/test/ui/regions/regions-close-param-into-object.stderr
+++ b/src/test/ui/regions/regions-close-param-into-object.stderr
@@ -1,7 +1,7 @@
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:6:5
    |
-LL | fn p1<T>(v: T) -> Box<X+'static>
+LL | fn p1<T>(v: T) -> Box<dyn X + 'static>
    |       - help: consider adding an explicit lifetime bound `T: 'static`...
 ...
 LL |     Box::new(v)
@@ -16,7 +16,7 @@ LL |     Box::new(v)
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:12:5
    |
-LL | fn p2<T>(v: Box<T>) -> Box<X+'static>
+LL | fn p2<T>(v: Box<T>) -> Box<dyn X + 'static>
    |       - help: consider adding an explicit lifetime bound `T: 'static`...
 ...
 LL |     Box::new(v)
@@ -31,7 +31,7 @@ LL |     Box::new(v)
 error[E0309]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:18:5
    |
-LL | fn p3<'a,T>(v: T) -> Box<X+'a>
+LL | fn p3<'a,T>(v: T) -> Box<dyn X + 'a>
    |          - help: consider adding an explicit lifetime bound `T: 'a`...
 ...
 LL |     Box::new(v)
@@ -46,7 +46,7 @@ LL |     Box::new(v)
 error[E0309]: the parameter type `T` may not live long enough
   --> $DIR/regions-close-param-into-object.rs:24:5
    |
-LL | fn p4<'a,T>(v: Box<T>) -> Box<X+'a>
+LL | fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a>
    |          - help: consider adding an explicit lifetime bound `T: 'a`...
 ...
 LL |     Box::new(v)
diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs
index 7e04b6782eb..a4272802af5 100644
--- a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs
+++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs
@@ -18,7 +18,7 @@ trait Trait2<'a, 'b> {
 // this argument `t` is not automatically considered well-formed,
 // since for it to be WF, we would need to know that `'y: 'x`, but we
 // do not infer that.
-fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
+fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
     //~^ ERROR reference has a longer lifetime than the data it references
 {
 }
diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
index ca86eb7edae..b3390bcc4d5 100644
--- a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
+++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
@@ -1,7 +1,7 @@
 error[E0491]: in type `&'x (dyn for<'z> Trait1<<T as Trait2<'y, 'z>>::Foo> + 'x)`, reference has a longer lifetime than the data it references
   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:1
    |
-LL | / fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
+LL | / fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
 LL | |
 LL | | {
 LL | | }
@@ -10,12 +10,12 @@ LL | | }
 note: the pointer is valid for the lifetime 'x as defined on the function body at 21:11
   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:11
    |
-LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
+LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
    |           ^^
 note: but the referenced data is only valid for the lifetime 'y as defined on the function body at 21:15
   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:15
    |
-LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
+LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
    |               ^^
 
 error: aborting due to previous error
diff --git a/src/test/ui/regions/regions-infer-at-fn-not-param.rs b/src/test/ui/regions/regions-infer-at-fn-not-param.rs
index 0fd734d57b5..fb9c5d5c210 100644
--- a/src/test/ui/regions/regions-infer-at-fn-not-param.rs
+++ b/src/test/ui/regions/regions-infer-at-fn-not-param.rs
@@ -1,13 +1,13 @@
 struct Parameterized1<'a> {
-    g: Box<FnMut() + 'a>
+    g: Box<dyn FnMut() + 'a>
 }
 
 struct NotParameterized1 {
-    g: Box<FnMut() + 'static>
+    g: Box<dyn FnMut() + 'static>
 }
 
 struct NotParameterized2 {
-    g: Box<FnMut() + 'static>
+    g: Box<dyn FnMut() + 'static>
 }
 
 fn take1<'a>(p: Parameterized1) -> Parameterized1<'a> { p }
diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.rs b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.rs
index 168bf0284a1..5843598ab48 100644
--- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.rs
+++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.rs
@@ -1,5 +1,5 @@
 struct Invariant<'a> {
-    f: Box<FnOnce(&mut &'a isize) + 'static>,
+    f: Box<dyn FnOnce(&mut &'a isize) + 'static>,
 }
 
 fn to_same_lifetime<'r>(b_isize: Invariant<'r>) {
diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.rs b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.rs
index 90c86cebce3..f0af18cf618 100644
--- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.rs
+++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.rs
@@ -1,5 +1,5 @@
 struct Invariant<'a> {
-    f: Box<FnOnce() -> *mut &'a isize + 'static>,
+    f: Box<dyn FnOnce() -> *mut &'a isize + 'static>,
 }
 
 fn to_same_lifetime<'r>(b_isize: Invariant<'r>) {
diff --git a/src/test/ui/regions/regions-infer-not-param.rs b/src/test/ui/regions/regions-infer-not-param.rs
index 214402952a3..d1744f8a51e 100644
--- a/src/test/ui/regions/regions-infer-not-param.rs
+++ b/src/test/ui/regions/regions-infer-not-param.rs
@@ -4,12 +4,12 @@ struct Direct<'a> {
 
 struct Indirect1 {
     // Here the lifetime parameter of direct is bound by the fn()
-    g: Box<FnOnce(Direct) + 'static>
+    g: Box<dyn FnOnce(Direct) + 'static>
 }
 
 struct Indirect2<'a> {
     // But here it is set to 'a
-    g: Box<FnOnce(Direct<'a>) + 'static>
+    g: Box<dyn FnOnce(Direct<'a>) + 'static>
 }
 
 fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types
diff --git a/src/test/ui/regions/regions-name-undeclared.rs b/src/test/ui/regions/regions-name-undeclared.rs
index 230a97a04b6..044c6889772 100644
--- a/src/test/ui/regions/regions-name-undeclared.rs
+++ b/src/test/ui/regions/regions-name-undeclared.rs
@@ -33,14 +33,14 @@ fn bar<'a>(x: &'a isize) {
 
     // &'a CAN be declared on functions and used then:
     fn g<'a>(a: &'a isize) { } // OK
-    fn h(a: Box<for<'a> FnOnce(&'a isize)>) { } // OK
+    fn h(a: Box<dyn for<'a> FnOnce(&'a isize)>) { } // OK
 }
 
 // Test nesting of lifetimes in fn type declarations
 fn fn_types(a: &'a isize, //~ ERROR undeclared lifetime
-            b: Box<for<'a> FnOnce(&'a isize,
+            b: Box<dyn for<'a> FnOnce(&'a isize,
                                   &'b isize, //~ ERROR undeclared lifetime
-                                  Box<for<'b> FnOnce(&'a isize,
+                                  Box<dyn for<'b> FnOnce(&'a isize,
                                                      &'b isize)>,
                                   &'b isize)>, //~ ERROR undeclared lifetime
             c: &'a isize) //~ ERROR undeclared lifetime
diff --git a/src/test/ui/regions/regions-nested-fns.nll.stderr b/src/test/ui/regions/regions-nested-fns.nll.stderr
index c11c09b6d0d..97650636cb6 100644
--- a/src/test/ui/regions/regions-nested-fns.nll.stderr
+++ b/src/test/ui/regions/regions-nested-fns.nll.stderr
@@ -4,8 +4,8 @@ error[E0521]: borrowed data escapes outside of closure
 LL |     let mut ay = &y;
    |         ------ `ay` is declared here, outside of the closure body
 LL | 
-LL |     ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
-   |                                                       - `z` is a reference that is only valid in the closure body
+LL |     ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
+   |                                                           - `z` is a reference that is only valid in the closure body
 ...
 LL |         ay = z;
    |         ^^^^^^ `z` escapes the closure body here
@@ -25,8 +25,8 @@ LL | }
 error[E0597]: `y` does not live long enough
   --> $DIR/regions-nested-fns.rs:9:15
    |
-LL |     ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
-   |                                                      --- value captured here
+LL |     ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
+   |                                                          --- value captured here
 LL |         ay = x;
 LL |         ay = &y;
    |               ^ borrowed value does not live long enough
diff --git a/src/test/ui/regions/regions-nested-fns.rs b/src/test/ui/regions/regions-nested-fns.rs
index 161d812f016..c02d4e0ce45 100644
--- a/src/test/ui/regions/regions-nested-fns.rs
+++ b/src/test/ui/regions/regions-nested-fns.rs
@@ -4,13 +4,13 @@ fn nested<'x>(x: &'x isize) {
     let y = 3;
     let mut ay = &y; //~ ERROR E0495
 
-    ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
+    ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
         ay = x;
         ay = &y;
         ay = z;
     }));
 
-    ignore::< Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+    ignore::< Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
         if false { return x; } //~ ERROR E0312
         if false { return ay; }
         return z;
diff --git a/src/test/ui/regions/regions-nested-fns.stderr b/src/test/ui/regions/regions-nested-fns.stderr
index 702254a0ac4..15c9c9ca4dd 100644
--- a/src/test/ui/regions/regions-nested-fns.stderr
+++ b/src/test/ui/regions/regions-nested-fns.stderr
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
 LL |     let mut ay = &y;
    |                  ^^
    |
-note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 7:54...
-  --> $DIR/regions-nested-fns.rs:7:54
+note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 7:58...
+  --> $DIR/regions-nested-fns.rs:7:58
    |
-LL |       ignore::<Box<for<'z> FnMut(&'z isize)>>(Box::new(|z| {
-   |  ______________________________________________________^
+LL |       ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
+   |  __________________________________________________________^
 LL | |         ay = x;
 LL | |         ay = &y;
 LL | |         ay = z;
@@ -19,11 +19,11 @@ note: ...so that reference does not outlive borrowed content
    |
 LL |         ay = z;
    |              ^
-note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the body at 13:68...
-  --> $DIR/regions-nested-fns.rs:13:68
+note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the body at 13:72...
+  --> $DIR/regions-nested-fns.rs:13:72
    |
-LL |       ignore::< Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
-   |  ____________________________________________________________________^
+LL |       ignore::< Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+   |  ________________________________________________________________________^
 LL | |         if false { return x; }
 LL | |         if false { return ay; }
 LL | |         return z;
@@ -39,11 +39,11 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content...
 LL |         if false { return x; }
    |                           ^
    |
-note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 13:68...
-  --> $DIR/regions-nested-fns.rs:13:68
+note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 13:72...
+  --> $DIR/regions-nested-fns.rs:13:72
    |
-LL |       ignore::< Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
-   |  ____________________________________________________________________^
+LL |       ignore::< Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
+   |  ________________________________________________________________________^
 LL | |         if false { return x; }
 LL | |         if false { return ay; }
 LL | |         return z;
diff --git a/src/test/ui/regions/regions-proc-bound-capture.rs b/src/test/ui/regions/regions-proc-bound-capture.rs
index f2010dbe62d..0c903b73849 100644
--- a/src/test/ui/regions/regions-proc-bound-capture.rs
+++ b/src/test/ui/regions/regions-proc-bound-capture.rs
@@ -1,10 +1,10 @@
-fn borrowed_proc<'a>(x: &'a isize) -> Box<FnMut()->(isize) + 'a> {
+fn borrowed_proc<'a>(x: &'a isize) -> Box<dyn FnMut()->(isize) + 'a> {
     // This is legal, because the region bound on `proc`
     // states that it captures `x`.
     Box::new(move|| { *x })
 }
 
-fn static_proc(x: &isize) -> Box<FnMut()->(isize) + 'static> {
+fn static_proc(x: &isize) -> Box<dyn FnMut()->(isize) + 'static> {
     // This is illegal, because the region bound on `proc` is 'static.
     Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621]
 }
diff --git a/src/test/ui/regions/regions-proc-bound-capture.stderr b/src/test/ui/regions/regions-proc-bound-capture.stderr
index aea7347d53c..c53af34456e 100644
--- a/src/test/ui/regions/regions-proc-bound-capture.stderr
+++ b/src/test/ui/regions/regions-proc-bound-capture.stderr
@@ -1,7 +1,7 @@
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/regions-proc-bound-capture.rs:9:5
    |
-LL | fn static_proc(x: &isize) -> Box<FnMut()->(isize) + 'static> {
+LL | fn static_proc(x: &isize) -> Box<dyn FnMut()->(isize) + 'static> {
    |                   ------ help: add explicit lifetime `'static` to the type of `x`: `&'static isize`
 LL |     // This is illegal, because the region bound on `proc` is 'static.
 LL |     Box::new(move|| { *x })
diff --git a/src/test/ui/regions/regions-steal-closure.rs b/src/test/ui/regions/regions-steal-closure.rs
index e6b34510bb5..83e93522c94 100644
--- a/src/test/ui/regions/regions-steal-closure.rs
+++ b/src/test/ui/regions/regions-steal-closure.rs
@@ -1,10 +1,10 @@
 #![feature(fn_traits)]
 
 struct ClosureBox<'a> {
-    cl: Box<FnMut() + 'a>,
+    cl: Box<dyn FnMut() + 'a>,
 }
 
-fn box_it<'r>(x: Box<FnMut() + 'r>) -> ClosureBox<'r> {
+fn box_it<'r>(x: Box<dyn FnMut() + 'r>) -> ClosureBox<'r> {
     ClosureBox {cl: x}
 }
 
diff --git a/src/test/ui/regions/regions-trait-1.rs b/src/test/ui/regions/regions-trait-1.rs
index 72738871936..0da8ac53695 100644
--- a/src/test/ui/regions/regions-trait-1.rs
+++ b/src/test/ui/regions/regions-trait-1.rs
@@ -19,12 +19,12 @@ impl<'a> GetCtxt for HasCtxt<'a> {
 
 }
 
-fn get_v(gc: Box<GetCtxt>) -> usize {
+fn get_v(gc: Box<dyn GetCtxt>) -> usize {
     gc.get_ctxt().v
 }
 
 fn main() {
     let ctxt = Ctxt { v: 22 };
     let hc = HasCtxt { c: &ctxt };
-    assert_eq!(get_v(box hc as Box<GetCtxt>), 22);
+    assert_eq!(get_v(box hc as Box<dyn GetCtxt>), 22);
 }
diff --git a/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr
index eccf1b5e8cf..f4b1a89db9a 100644
--- a/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr
+++ b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/regions-trait-object-subtyping.rs:15:5
    |
-LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
    |         -- -- lifetime `'b` defined here
    |         |
    |         lifetime `'a` defined here
@@ -12,7 +12,7 @@ LL |     x
 error: lifetime may not live long enough
   --> $DIR/regions-trait-object-subtyping.rs:22:5
    |
-LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
+LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
    |         --    -- lifetime `'b` defined here
    |         |
    |         lifetime `'a` defined here
diff --git a/src/test/ui/regions/regions-trait-object-subtyping.rs b/src/test/ui/regions/regions-trait-object-subtyping.rs
index eb262354456..5b36194870e 100644
--- a/src/test/ui/regions/regions-trait-object-subtyping.rs
+++ b/src/test/ui/regions/regions-trait-object-subtyping.rs
@@ -1,23 +1,23 @@
 trait Dummy { fn dummy(&self); }
 
-fn foo1<'a:'b,'b>(x: &'a mut (Dummy+'a)) -> &'b mut (Dummy+'b) {
+fn foo1<'a:'b,'b>(x: &'a mut (dyn Dummy+'a)) -> &'b mut (dyn Dummy+'b) {
     // Here, we are able to coerce
     x
 }
 
-fn foo2<'a:'b,'b>(x: &'b mut (Dummy+'a)) -> &'b mut (Dummy+'b) {
+fn foo2<'a:'b,'b>(x: &'b mut (dyn Dummy+'a)) -> &'b mut (dyn Dummy+'b) {
     // Here, we are able to coerce
     x
 }
 
-fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
     // Without knowing 'a:'b, we can't coerce
     x //~ ERROR lifetime bound not satisfied
      //~^ ERROR cannot infer an appropriate lifetime
 }
 
 struct Wrapper<T>(T);
-fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
+fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
     // We can't coerce because it is packed in `Wrapper`
     x //~ ERROR mismatched types
 }
diff --git a/src/test/ui/regions/regions-trait-object-subtyping.stderr b/src/test/ui/regions/regions-trait-object-subtyping.stderr
index f2d2b37d907..6de92f13840 100644
--- a/src/test/ui/regions/regions-trait-object-subtyping.stderr
+++ b/src/test/ui/regions/regions-trait-object-subtyping.stderr
@@ -7,12 +7,12 @@ LL |     x
 note: lifetime parameter instantiated with the lifetime 'a as defined on the function body at 13:9
   --> $DIR/regions-trait-object-subtyping.rs:13:9
    |
-LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
    |         ^^
 note: but lifetime parameter must outlive the lifetime 'b as defined on the function body at 13:12
   --> $DIR/regions-trait-object-subtyping.rs:13:12
    |
-LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
    |            ^^
 
 error[E0495]: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements
@@ -24,7 +24,7 @@ LL |     x
 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 13:9...
   --> $DIR/regions-trait-object-subtyping.rs:13:9
    |
-LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
    |         ^^
 note: ...so that reference does not outlive borrowed content
   --> $DIR/regions-trait-object-subtyping.rs:15:5
@@ -34,7 +34,7 @@ LL |     x
 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 13:12...
   --> $DIR/regions-trait-object-subtyping.rs:13:12
    |
-LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
+LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
    |            ^^
    = note: ...so that the expression is assignable:
            expected &'b mut (dyn Dummy + 'b)
@@ -51,12 +51,12 @@ LL |     x
 note: the lifetime 'b as defined on the function body at 20:15...
   --> $DIR/regions-trait-object-subtyping.rs:20:15
    |
-LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
+LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
    |               ^^
 note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 20:9
   --> $DIR/regions-trait-object-subtyping.rs:20:9
    |
-LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
+LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
    |         ^^
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/regions/regions-trait-variance.rs b/src/test/ui/regions/regions-trait-variance.rs
index 73baa84ec90..9169d457d40 100644
--- a/src/test/ui/regions/regions-trait-variance.rs
+++ b/src/test/ui/regions/regions-trait-variance.rs
@@ -23,10 +23,10 @@ impl Drop for B {
 }
 
 struct A<'r> {
-    p: &'r (X+'r)
+    p: &'r (dyn X + 'r)
 }
 
-fn make_a(p:&X) -> A {
+fn make_a(p: &dyn X) -> A {
     A{p:p}
 }
 
diff --git a/src/test/ui/regions/regions-wf-trait-object.rs b/src/test/ui/regions/regions-wf-trait-object.rs
index 61bab359f9a..d0053b20234 100644
--- a/src/test/ui/regions/regions-wf-trait-object.rs
+++ b/src/test/ui/regions/regions-wf-trait-object.rs
@@ -4,7 +4,7 @@
 trait TheTrait<'t>: 't { }
 
 struct Foo<'a,'b> {
-    x: Box<TheTrait<'a>+'b> //~ ERROR E0478
+    x: Box<dyn TheTrait<'a>+'b> //~ ERROR E0478
 }
 
 fn main() { }
diff --git a/src/test/ui/regions/regions-wf-trait-object.stderr b/src/test/ui/regions/regions-wf-trait-object.stderr
index 3dc1c4dcd22..4e12478c36d 100644
--- a/src/test/ui/regions/regions-wf-trait-object.stderr
+++ b/src/test/ui/regions/regions-wf-trait-object.stderr
@@ -1,8 +1,8 @@
 error[E0478]: lifetime bound not satisfied
   --> $DIR/regions-wf-trait-object.rs:7:5
    |
-LL |     x: Box<TheTrait<'a>+'b>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+LL |     x: Box<dyn TheTrait<'a>+'b>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime 'b as defined on the struct at 6:15
   --> $DIR/regions-wf-trait-object.rs:6:15
diff --git a/src/test/ui/resolve/issue-23305.rs b/src/test/ui/resolve/issue-23305.rs
index af335acd41b..95635e12a63 100644
--- a/src/test/ui/resolve/issue-23305.rs
+++ b/src/test/ui/resolve/issue-23305.rs
@@ -2,7 +2,7 @@ pub trait ToNbt<T> {
     fn new(val: T) -> Self;
 }
 
-impl ToNbt<Self> {}
+impl dyn ToNbt<Self> {}
 //~^ ERROR cycle detected
 
 fn main() {}
diff --git a/src/test/ui/resolve/issue-23305.stderr b/src/test/ui/resolve/issue-23305.stderr
index 1da56ad05d2..0ed3af81d56 100644
--- a/src/test/ui/resolve/issue-23305.stderr
+++ b/src/test/ui/resolve/issue-23305.stderr
@@ -1,10 +1,10 @@
-error[E0391]: cycle detected when processing `<impl at $DIR/issue-23305.rs:5:1: 5:20>`
-  --> $DIR/issue-23305.rs:5:12
+error[E0391]: cycle detected when processing `<impl at $DIR/issue-23305.rs:5:1: 5:24>`
+  --> $DIR/issue-23305.rs:5:16
    |
-LL | impl ToNbt<Self> {}
-   |            ^^^^
+LL | impl dyn ToNbt<Self> {}
+   |                ^^^^
    |
-   = note: ...which again requires processing `<impl at $DIR/issue-23305.rs:5:1: 5:20>`, completing the cycle
+   = note: ...which again requires processing `<impl at $DIR/issue-23305.rs:5:1: 5:24>`, completing the cycle
 note: cycle used when collecting item types in top-level module
   --> $DIR/issue-23305.rs:1:1
    |
diff --git a/src/test/ui/resolve/issue-33876.rs b/src/test/ui/resolve/issue-33876.rs
index dd31fc231cf..e233ec631cc 100644
--- a/src/test/ui/resolve/issue-33876.rs
+++ b/src/test/ui/resolve/issue-33876.rs
@@ -7,6 +7,6 @@ trait Bar {}
 impl Bar for Foo {}
 
 fn main() {
-    let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar`
+    let any: &dyn Any = &Bar; //~ ERROR expected value, found trait `Bar`
     if any.is::<u32>() { println!("u32"); }
 }
diff --git a/src/test/ui/resolve/issue-33876.stderr b/src/test/ui/resolve/issue-33876.stderr
index 29a63fdd11f..52308f2a7f0 100644
--- a/src/test/ui/resolve/issue-33876.stderr
+++ b/src/test/ui/resolve/issue-33876.stderr
@@ -1,8 +1,8 @@
 error[E0423]: expected value, found trait `Bar`
-  --> $DIR/issue-33876.rs:10:22
+  --> $DIR/issue-33876.rs:10:26
    |
-LL |     let any: &Any = &Bar;
-   |                      ^^^ not a value
+LL |     let any: &dyn Any = &Bar;
+   |                          ^^^ not a value
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/issue-3907-2.rs b/src/test/ui/resolve/issue-3907-2.rs
index dc9624698df..46f145e63e1 100644
--- a/src/test/ui/resolve/issue-3907-2.rs
+++ b/src/test/ui/resolve/issue-3907-2.rs
@@ -2,7 +2,7 @@
 
 extern crate issue_3907;
 
-type Foo = issue_3907::Foo+'static;
+type Foo = dyn issue_3907::Foo + 'static;
 
 struct S {
     name: isize
diff --git a/src/test/ui/resolve/issue-3907.rs b/src/test/ui/resolve/issue-3907.rs
index 87e465489a4..6211de42717 100644
--- a/src/test/ui/resolve/issue-3907.rs
+++ b/src/test/ui/resolve/issue-3907.rs
@@ -2,7 +2,7 @@
 
 extern crate issue_3907;
 
-type Foo = issue_3907::Foo;
+type Foo = dyn issue_3907::Foo;
 
 struct S {
     name: isize
diff --git a/src/test/ui/resolve/issue-5035-2.rs b/src/test/ui/resolve/issue-5035-2.rs
index f88a2375a43..b831bb4be34 100644
--- a/src/test/ui/resolve/issue-5035-2.rs
+++ b/src/test/ui/resolve/issue-5035-2.rs
@@ -1,5 +1,5 @@
 trait I {}
-type K = I+'static;
+type K = dyn I + 'static;
 
 fn foo(_x: K) {}
 //~^ ERROR the size for values of type
diff --git a/src/test/ui/resolve/issue-5035.rs b/src/test/ui/resolve/issue-5035.rs
index c00567a75b7..49fa312f9d2 100644
--- a/src/test/ui/resolve/issue-5035.rs
+++ b/src/test/ui/resolve/issue-5035.rs
@@ -1,5 +1,5 @@
 trait I {}
-type K = I;
+type K = dyn I;
 impl K for isize {} //~ ERROR expected trait, found type alias `K`
 
 use ImportError; //~ ERROR unresolved import `ImportError` [E0432]
diff --git a/src/test/ui/rfc-2093-infer-outlives/self-structs.rs b/src/test/ui/rfc-2093-infer-outlives/self-structs.rs
index d2550a99e81..8f2d29d6f17 100644
--- a/src/test/ui/rfc-2093-infer-outlives/self-structs.rs
+++ b/src/test/ui/rfc-2093-infer-outlives/self-structs.rs
@@ -2,7 +2,7 @@
 
 #[rustc_outlives]
 struct Foo<'a, 'b, T> { //~ ERROR rustc_outlives
-    field1: Bar<'a, 'b, T>
+    field1: dyn Bar<'a, 'b, T>
 }
 
 trait Bar<'x, 's, U>
diff --git a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
index 9ae05dab74d..b32c9743e9e 100644
--- a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
@@ -2,7 +2,7 @@ error: rustc_outlives
   --> $DIR/self-structs.rs:4:1
    |
 LL | / struct Foo<'a, 'b, T> {
-LL | |     field1: Bar<'a, 'b, T>
+LL | |     field1: dyn Bar<'a, 'b, T>
 LL | | }
    | |_^
    |
diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
index b0d1fa1a74f..01daf307c00 100644
--- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
+++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
@@ -9,7 +9,7 @@ trait Foo {
     type Assoc where Self: Sized;
     type Assoc2<T> where T: Display;
     type Assoc3<T>;
-    type WithDefault<T> where T: Debug = Iterator<Item=T>;
+    type WithDefault<T> where T: Debug = dyn Iterator<Item=T>;
     type NoGenerics;
 }
 
@@ -19,7 +19,7 @@ impl Foo for Bar {
     type Assoc = usize;
     type Assoc2<T> = Vec<T>;
     type Assoc3<T> where T: Iterator = Vec<T>;
-    type WithDefault<'a, T> = &'a Iterator<T>;
+    type WithDefault<'a, T> = &'a dyn Iterator<T>;
     type NoGenerics = ::std::cell::Cell<i32>;
 }
 
diff --git a/src/test/ui/rfc1623.rs b/src/test/ui/rfc1623.rs
index 5920446dbc2..ebb4d56af9e 100644
--- a/src/test/ui/rfc1623.rs
+++ b/src/test/ui/rfc1623.rs
@@ -13,7 +13,7 @@ static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
 struct SomeStruct<'x, 'y, 'z: 'x> {
     foo: &'x Foo<'z>,
     bar: &'x Bar<'z>,
-    f: &'y for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Bar<'b>,
+    f: &'y dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Bar<'b>,
 }
 
 fn id<T>(t: T) -> T {
diff --git a/src/test/ui/save-analysis/issue-59134-0.rs b/src/test/ui/save-analysis/issue-59134-0.rs
index 3158328b3ff..a0871ca1809 100644
--- a/src/test/ui/save-analysis/issue-59134-0.rs
+++ b/src/test/ui/save-analysis/issue-59134-0.rs
@@ -4,7 +4,7 @@
 
 pub fn f() {
     trait Trait {}
-    impl Trait {
+    impl dyn Trait {
         const FLAG: u32 = bogus.field; //~ ERROR cannot find value `bogus`
     }
 }
diff --git a/src/test/ui/self/arbitrary-self-types-not-object-safe.rs b/src/test/ui/self/arbitrary-self-types-not-object-safe.rs
index 2c1fd937a65..7443d888c9e 100644
--- a/src/test/ui/self/arbitrary-self-types-not-object-safe.rs
+++ b/src/test/ui/self/arbitrary-self-types-not-object-safe.rs
@@ -28,13 +28,13 @@ impl Bar for usize {
 }
 
 fn make_foo() {
-    let x = Rc::new(5usize) as Rc<Foo>;
+    let x = Rc::new(5usize) as Rc<dyn Foo>;
     //~^ ERROR E0038
     //~| ERROR E0038
 }
 
 fn make_bar() {
-    let x = Rc::new(5usize) as Rc<Bar>;
+    let x = Rc::new(5usize) as Rc<dyn Bar>;
     x.bar();
 }
 
diff --git a/src/test/ui/self/arbitrary-self-types-not-object-safe.stderr b/src/test/ui/self/arbitrary-self-types-not-object-safe.stderr
index dacab1222ab..e45bc2657f1 100644
--- a/src/test/ui/self/arbitrary-self-types-not-object-safe.stderr
+++ b/src/test/ui/self/arbitrary-self-types-not-object-safe.stderr
@@ -1,15 +1,15 @@
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/arbitrary-self-types-not-object-safe.rs:31:32
    |
-LL |     let x = Rc::new(5usize) as Rc<Foo>;
-   |                                ^^^^^^^ the trait `Foo` cannot be made into an object
+LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
+   |                                ^^^^^^^^^^^ the trait `Foo` cannot be made into an object
    |
    = note: method `foo`'s receiver cannot be dispatched on
 
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/arbitrary-self-types-not-object-safe.rs:31:13
    |
-LL |     let x = Rc::new(5usize) as Rc<Foo>;
+LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |             ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
    |
    = note: method `foo`'s receiver cannot be dispatched on
diff --git a/src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs b/src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs
index acbe896eebe..0a9370e6f5a 100644
--- a/src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs
+++ b/src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs
@@ -34,8 +34,8 @@ impl Foo for u32 {
 }
 
 fn main() {
-    let null_i32 = ptr::null::<i32>() as *const Foo;
-    let null_u32 = ptr::null::<u32>() as *const Foo;
+    let null_i32 = ptr::null::<i32>() as *const dyn Foo;
+    let null_u32 = ptr::null::<u32>() as *const dyn Foo;
 
     assert_eq!("I'm an i32!", null_i32.foo());
     assert_eq!("I'm a u32!", null_u32.foo());
@@ -45,7 +45,7 @@ fn main() {
     assert_eq!("I'm an i32!", valid_i32_thin.foo());
     assert_eq!(5, unsafe { valid_i32_thin.bar() });
     assert_eq!(5, unsafe { (&valid_i32_thin as *const *const i32).complicated() });
-    let valid_i32_fat = valid_i32_thin as *const Foo;
+    let valid_i32_fat = valid_i32_thin as *const dyn Foo;
     assert_eq!("I'm an i32!", valid_i32_fat.foo());
     assert_eq!(5, unsafe { valid_i32_fat.bar() });
 
@@ -54,7 +54,7 @@ fn main() {
     assert_eq!("I'm a u32!", valid_u32_thin.foo());
     assert_eq!(18, unsafe { valid_u32_thin.bar() });
     assert_eq!(18, unsafe { (&valid_u32_thin as *const *const u32).complicated() });
-    let valid_u32_fat = valid_u32_thin as *const Foo;
+    let valid_u32_fat = valid_u32_thin as *const dyn Foo;
     assert_eq!("I'm a u32!", valid_u32_fat.foo());
     assert_eq!(18, unsafe { valid_u32_fat.bar() });
 
diff --git a/src/test/ui/self/explicit-self-objects-uniq.rs b/src/test/ui/self/explicit-self-objects-uniq.rs
index f95686cf112..0050bc7124d 100644
--- a/src/test/ui/self/explicit-self-objects-uniq.rs
+++ b/src/test/ui/self/explicit-self-objects-uniq.rs
@@ -17,6 +17,6 @@ impl Foo for S {
 
 pub fn main() {
     let x = box S { x: 3 };
-    let y = x as Box<Foo>;
+    let y = x as Box<dyn Foo>;
     y.f();
 }
diff --git a/src/test/ui/self/object-safety-sized-self-by-value-self.rs b/src/test/ui/self/object-safety-sized-self-by-value-self.rs
index ae0512666ce..43b1d8b9149 100644
--- a/src/test/ui/self/object-safety-sized-self-by-value-self.rs
+++ b/src/test/ui/self/object-safety-sized-self-by-value-self.rs
@@ -23,7 +23,7 @@ fn tick1<C:Counter>(mut c: C) -> u32 {
     c.get()
 }
 
-fn tick2(c: &mut Counter) {
+fn tick2(c: &mut dyn Counter) {
     tick3(c);
 }
 
diff --git a/src/test/ui/self/object-safety-sized-self-generic-method.rs b/src/test/ui/self/object-safety-sized-self-generic-method.rs
index 0b3f6633737..e0b0526a333 100644
--- a/src/test/ui/self/object-safety-sized-self-generic-method.rs
+++ b/src/test/ui/self/object-safety-sized-self-generic-method.rs
@@ -23,7 +23,7 @@ fn tick1<C:Counter>(c: &mut C) {
     c.with(|i| ());
 }
 
-fn tick2(c: &mut Counter) {
+fn tick2(c: &mut dyn Counter) {
     tick3(c);
 }
 
diff --git a/src/test/ui/self/object-safety-sized-self-return-Self.rs b/src/test/ui/self/object-safety-sized-self-return-Self.rs
index e88dba0a4e8..222c7543945 100644
--- a/src/test/ui/self/object-safety-sized-self-return-Self.rs
+++ b/src/test/ui/self/object-safety-sized-self-return-Self.rs
@@ -23,7 +23,7 @@ fn preticked<C:Counter>() -> C {
     c
 }
 
-fn tick(c: &mut Counter) {
+fn tick(c: &mut dyn Counter) {
     tick_generic(c);
 }
 
diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs
index db48bdf4c01..6099263ccd0 100644
--- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs
+++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs
@@ -2,10 +2,10 @@
 
 // Ensure that invoking a closure counts as a unique immutable borrow
 
-type Fn<'a> = Box<FnMut() + 'a>;
+type Fn<'a> = Box<dyn FnMut() + 'a>;
 
 struct Test<'a> {
-    f: Box<FnMut() + 'a>
+    f: Box<dyn FnMut() + 'a>
 }
 
 fn call<F>(mut f: F) where F: FnMut(Fn) {
@@ -47,9 +47,9 @@ fn test6() {
 }
 
 fn test7() {
-    fn foo<F>(_: F) where F: FnMut(Box<FnMut(isize)>, isize) {}
+    fn foo<F>(_: F) where F: FnMut(Box<dyn FnMut(isize)>, isize) {}
     let s = String::new();  // Capture to make f !Copy
-    let mut f = move |g: Box<FnMut(isize)>, b: isize| {
+    let mut f = move |g: Box<dyn FnMut(isize)>, b: isize| {
         let _ = s.len();
     };
     f(Box::new(|a| {
diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr
index 847f6865624..72f979e8d3c 100644
--- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr
+++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr
@@ -29,7 +29,7 @@ LL |     f.f.call_mut(())
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
   --> $DIR/borrowck-call-is-borrow-issue-12224.rs:57:13
    |
-LL |     let mut f = move |g: Box<FnMut(isize)>, b: isize| {
+LL |     let mut f = move |g: Box<dyn FnMut(isize)>, b: isize| {
    |         ----- captured outer variable
 ...
 LL |         foo(f);
diff --git a/src/test/ui/span/borrowck-object-mutability.rs b/src/test/ui/span/borrowck-object-mutability.rs
index e672c464535..f5adc2cc141 100644
--- a/src/test/ui/span/borrowck-object-mutability.rs
+++ b/src/test/ui/span/borrowck-object-mutability.rs
@@ -3,22 +3,22 @@ trait Foo {
     fn borrowed_mut(&mut self);
 }
 
-fn borrowed_receiver(x: &Foo) {
+fn borrowed_receiver(x: &dyn Foo) {
     x.borrowed();
     x.borrowed_mut(); //~ ERROR cannot borrow
 }
 
-fn borrowed_mut_receiver(x: &mut Foo) {
+fn borrowed_mut_receiver(x: &mut dyn Foo) {
     x.borrowed();
     x.borrowed_mut();
 }
 
-fn owned_receiver(x: Box<Foo>) {
+fn owned_receiver(x: Box<dyn Foo>) {
     x.borrowed();
     x.borrowed_mut(); //~ ERROR cannot borrow
 }
 
-fn mut_owned_receiver(mut x: Box<Foo>) {
+fn mut_owned_receiver(mut x: Box<dyn Foo>) {
     x.borrowed();
     x.borrowed_mut();
 }
diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr
index fe6014cd5ad..fe6d05c588f 100644
--- a/src/test/ui/span/borrowck-object-mutability.stderr
+++ b/src/test/ui/span/borrowck-object-mutability.stderr
@@ -1,8 +1,8 @@
 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
   --> $DIR/borrowck-object-mutability.rs:8:5
    |
-LL | fn borrowed_receiver(x: &Foo) {
-   |                         ---- help: consider changing this to be a mutable reference: `&mut dyn Foo`
+LL | fn borrowed_receiver(x: &dyn Foo) {
+   |                         -------- help: consider changing this to be a mutable reference: `&mut dyn Foo`
 LL |     x.borrowed();
 LL |     x.borrowed_mut();
    |     ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
@@ -10,7 +10,7 @@ LL |     x.borrowed_mut();
 error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable
   --> $DIR/borrowck-object-mutability.rs:18:5
    |
-LL | fn owned_receiver(x: Box<Foo>) {
+LL | fn owned_receiver(x: Box<dyn Foo>) {
    |                   - help: consider changing this to be mutable: `mut x`
 LL |     x.borrowed();
 LL |     x.borrowed_mut();
diff --git a/src/test/ui/span/dropck-object-cycle.rs b/src/test/ui/span/dropck-object-cycle.rs
index 8dc70ea252b..a26123d5246 100644
--- a/src/test/ui/span/dropck-object-cycle.rs
+++ b/src/test/ui/span/dropck-object-cycle.rs
@@ -8,7 +8,7 @@ trait Trait<'a> {
     fn short<'b>(&'b self) -> isize;
 }
 
-fn object_invoke1<'d>(x: &'d Trait<'d>) -> (isize, isize) { loop { } }
+fn object_invoke1<'d>(x: &'d dyn Trait<'d>) -> (isize, isize) { loop { } }
 
 trait MakerTrait {
     fn mk() -> Self;
@@ -18,12 +18,12 @@ fn make_val<T:MakerTrait>() -> T {
     MakerTrait::mk()
 }
 
-impl<'t> MakerTrait for Box<Trait<'t>+'static> {
-    fn mk() -> Box<Trait<'t>+'static> { loop { } }
+impl<'t> MakerTrait for Box<dyn Trait<'t>+'static> {
+    fn mk() -> Box<dyn Trait<'t>+'static> { loop { } }
 }
 
 pub fn main() {
-    let m : Box<Trait+'static> = make_val();
+    let m : Box<dyn Trait+'static> = make_val();
     assert_eq!(object_invoke1(&*m), (4,5));
     //~^ ERROR `*m` does not live long enough
 
diff --git a/src/test/ui/span/issue-25199.rs b/src/test/ui/span/issue-25199.rs
index ed690443d4d..dbc3b190068 100644
--- a/src/test/ui/span/issue-25199.rs
+++ b/src/test/ui/span/issue-25199.rs
@@ -34,7 +34,7 @@ impl Drop for VecHolder {
 
 struct Container<'a> {
     v: VecHolder,
-    d: RefCell<Vec<Box<Obj+'a>>>,
+    d: RefCell<Vec<Box<dyn Obj+'a>>>,
 }
 
 impl<'a> Container<'a> {
diff --git a/src/test/ui/span/issue-26656.rs b/src/test/ui/span/issue-26656.rs
index c5a70c87ed8..cde68da1897 100644
--- a/src/test/ui/span/issue-26656.rs
+++ b/src/test/ui/span/issue-26656.rs
@@ -10,7 +10,7 @@ impl<B: Button> Trigger<B> for () {
 
 // Still unsound Zook
 trait Button { fn push(&self); }
-struct Zook<B> { button: B, trigger: Box<Trigger<B>+'static> }
+struct Zook<B> { button: B, trigger: Box<dyn Trigger<B>+'static> }
 
 impl<B> Drop for Zook<B> {
     fn drop(&mut self) {
diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs
index 13e651fa56b..e34f84683bb 100644
--- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs
+++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs
@@ -11,6 +11,6 @@ fn main() {
     {
         let ss: &isize = &id(1);
         //~^ ERROR temporary value dropped while borrowed
-        blah = box ss as Box<Foo>;
+        blah = box ss as Box<dyn Foo>;
     }
 }
diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.rs b/src/test/ui/span/regions-close-over-type-parameter-2.rs
index 11187b74c42..29083154b89 100644
--- a/src/test/ui/span/regions-close-over-type-parameter-2.rs
+++ b/src/test/ui/span/regions-close-over-type-parameter-2.rs
@@ -10,8 +10,8 @@ impl<A> Foo for A {
     fn get(&self) { }
 }
 
-fn repeater3<'a,A:'a>(v: A) -> Box<Foo+'a> {
-    box v as Box<Foo+'a>
+fn repeater3<'a,A:'a>(v: A) -> Box<dyn Foo + 'a> {
+    box v as Box<dyn Foo+'a>
 }
 
 fn main() {
diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.rs b/src/test/ui/span/send-is-not-static-ensures-scoping.rs
index ac07420ee36..2aecc2a7e0d 100644
--- a/src/test/ui/span/send-is-not-static-ensures-scoping.rs
+++ b/src/test/ui/span/send-is-not-static-ensures-scoping.rs
@@ -1,5 +1,5 @@
 struct Guard<'a> {
-    f: Box<Fn() + Send + 'a>,
+    f: Box<dyn Fn() + Send + 'a>,
 }
 
 fn scoped<'a, F: Fn() + Send + 'a>(f: F) -> Guard<'a> {
diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
index a3cc53e69e2..78487bd7bb5 100644
--- a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
+++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
@@ -4,7 +4,7 @@ pub trait T<X, Y> {
     type C;
 }
 pub struct Foo {
-    i: Box<T<usize, usize, usize, usize, B=usize>>,
+    i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
     //~^ ERROR must be specified
     //~| ERROR wrong number of type arguments
 }
diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
index 5e333187e3d..d273ec3fca5 100644
--- a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
+++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
@@ -1,10 +1,10 @@
 error[E0107]: wrong number of type arguments: expected 2, found 4
-  --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:28
+  --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:32
    |
-LL |     i: Box<T<usize, usize, usize, usize, B=usize>>,
-   |                            ^^^^^  ^^^^^ unexpected type argument
-   |                            |
-   |                            unexpected type argument
+LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
+   |                                ^^^^^  ^^^^^ unexpected type argument
+   |                                |
+   |                                unexpected type argument
 
 error[E0191]: the value of the associated types `A` (from the trait `T`), `C` (from the trait `T`) must be specified
   --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:12
@@ -15,15 +15,15 @@ LL |     type B;
 LL |     type C;
    |     ------- `C` defined here
 ...
-LL |     i: Box<T<usize, usize, usize, usize, B=usize>>,
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |            |
    |            associated type `A` must be specified
    |            associated type `C` must be specified
 help: if you meant to specify the associated types, write
    |
-LL |     i: Box<T<usize, usize, A = usize, C = usize, B=usize>>,
-   |                            ^^^^^^^^^  ^^^^^^^^^
+LL |     i: Box<dyn T<usize, usize, A = usize, C = usize, B=usize>>,
+   |                                ^^^^^^^^^  ^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/traits/trait-alias/trait-alias-bounds.rs b/src/test/ui/traits/trait-alias/trait-alias-bounds.rs
index 428ce5102ba..b97eb38c5af 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-bounds.rs
+++ b/src/test/ui/traits/trait-alias/trait-alias-bounds.rs
@@ -17,7 +17,7 @@ struct Foo<T: SendSyncAlias>(PhantomData<T>);
 #[allow(dead_code)]
 struct Bar<T>(PhantomData<T>) where T: SendSyncAlias;
 
-impl EmptyAlias {}
+impl dyn EmptyAlias {}
 
 impl<T: SendSyncAlias> Empty for T {}
 
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs b/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs
index afd8400e230..88feb89170d 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs
+++ b/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs
@@ -114,13 +114,13 @@ type _T44 = dyn _4 + Send + Sync + _8;
 trait ObjL<'l> {}
 trait _9 = for<'a> ObjL<'a>;
 trait _10 = for<'b> ObjL<'b>;
-type _T50 = _9 + _10;
+type _T50 = dyn _9 + _10;
 //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
 
 trait ObjT<T> {}
 trait _11 = ObjT<for<'a> fn(&'a u8)>;
 trait _12 = ObjT<for<'b> fn(&'b u8)>;
-type _T60 = _11 + _12;
+type _T60 = dyn _11 + _12;
 //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
 
 fn main() {}
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr b/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr
index eb667c9522c..6df1df86508 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr
+++ b/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr
@@ -430,28 +430,28 @@ LL | type _T44 = dyn _4 + Send + Sync + _8;
    |                 trait alias used in trait object type (first use)
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:117:18
+  --> $DIR/trait-alias-no-duplicates.rs:117:22
    |
 LL | trait _9 = for<'a> ObjL<'a>;
    |            ---------------- first non-auto trait
 LL | trait _10 = for<'b> ObjL<'b>;
    |             ---------------- additional non-auto trait
-LL | type _T50 = _9 + _10;
-   |             --   ^^^ trait alias used in trait object type (additional use)
-   |             |
-   |             trait alias used in trait object type (first use)
+LL | type _T50 = dyn _9 + _10;
+   |                 --   ^^^ trait alias used in trait object type (additional use)
+   |                 |
+   |                 trait alias used in trait object type (first use)
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:123:19
+  --> $DIR/trait-alias-no-duplicates.rs:123:23
    |
 LL | trait _11 = ObjT<for<'a> fn(&'a u8)>;
    |             ------------------------ first non-auto trait
 LL | trait _12 = ObjT<for<'b> fn(&'b u8)>;
    |             ------------------------ additional non-auto trait
-LL | type _T60 = _11 + _12;
-   |             ---   ^^^ trait alias used in trait object type (additional use)
-   |             |
-   |             trait alias used in trait object type (first use)
+LL | type _T60 = dyn _11 + _12;
+   |                 ---   ^^^ trait alias used in trait object type (additional use)
+   |                 |
+   |                 trait alias used in trait object type (first use)
 
 error: aborting due to 27 previous errors
 
diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs b/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs
index fd3af6f3a9a..33c9f2f00cf 100644
--- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs
+++ b/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs
@@ -6,6 +6,7 @@ trait Foo {
 
 fn foo(_x: Foo + Send) {
     //~^ ERROR the size for values of type
+    //~| WARN trait objects without an explicit `dyn` are deprecated
 }
 
 fn main() { }
diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr
index 5aee1e7e982..250ea4b1c32 100644
--- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr
+++ b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr
@@ -1,3 +1,11 @@
+warning: trait objects without an explicit `dyn` are deprecated
+  --> $DIR/trait-bounds-not-on-bare-trait.rs:7:12
+   |
+LL | fn foo(_x: Foo + Send) {
+   |            ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send`
+   |
+   = note: #[warn(bare_trait_objects)] on by default
+
 error[E0277]: the size for values of type `(dyn Foo + std::marker::Send + 'static)` cannot be known at compilation time
   --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8
    |
diff --git a/src/test/ui/traits/trait-bounds-sugar.rs b/src/test/ui/traits/trait-bounds-sugar.rs
index 0892153c0cf..65b6f6faa42 100644
--- a/src/test/ui/traits/trait-bounds-sugar.rs
+++ b/src/test/ui/traits/trait-bounds-sugar.rs
@@ -2,17 +2,17 @@
 
 trait Foo {}
 
-fn a(_x: Box<Foo+Send>) {
+fn a(_x: Box<dyn Foo + Send>) {
 }
 
-fn b(_x: &'static (Foo+'static)) {
+fn b(_x: &'static (dyn Foo + 'static)) {
 }
 
-fn c(x: Box<Foo+Sync>) {
+fn c(x: Box<dyn Foo + Sync>) {
     a(x); //~ ERROR mismatched types
 }
 
-fn d(x: &'static (Foo+Sync)) {
+fn d(x: &'static (dyn Foo + Sync)) {
     b(x);
 }
 
diff --git a/src/test/ui/traits/trait-coercion-generic-bad.rs b/src/test/ui/traits/trait-coercion-generic-bad.rs
index 5aa21834148..2e115c732b9 100644
--- a/src/test/ui/traits/trait-coercion-generic-bad.rs
+++ b/src/test/ui/traits/trait-coercion-generic-bad.rs
@@ -13,7 +13,7 @@ impl Trait<&'static str> for Struct {
 }
 
 fn main() {
-    let s: Box<Trait<isize>> = Box::new(Struct { person: "Fred" });
+    let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
     //~^ ERROR `Struct: Trait<isize>` is not satisfied
     s.f(1);
 }
diff --git a/src/test/ui/traits/trait-coercion-generic-bad.stderr b/src/test/ui/traits/trait-coercion-generic-bad.stderr
index 7f3b46b8ae5..f2710dea095 100644
--- a/src/test/ui/traits/trait-coercion-generic-bad.stderr
+++ b/src/test/ui/traits/trait-coercion-generic-bad.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `Struct: Trait<isize>` is not satisfied
-  --> $DIR/trait-coercion-generic-bad.rs:16:32
+  --> $DIR/trait-coercion-generic-bad.rs:16:36
    |
-LL |     let s: Box<Trait<isize>> = Box::new(Struct { person: "Fred" });
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<isize>` is not implemented for `Struct`
+LL |     let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<isize>` is not implemented for `Struct`
    |
    = help: the following implementations were found:
              <Struct as Trait<&'static str>>
diff --git a/src/test/ui/traits/trait-coercion-generic-regions.rs b/src/test/ui/traits/trait-coercion-generic-regions.rs
index 148b7dd5c43..af478df6dfa 100644
--- a/src/test/ui/traits/trait-coercion-generic-regions.rs
+++ b/src/test/ui/traits/trait-coercion-generic-regions.rs
@@ -15,5 +15,5 @@ impl Trait<&'static str> for Struct {
 fn main() {
     let person = "Fred".to_string();
     let person: &str = &person;  //~ ERROR `person` does not live long enough
-    let s: Box<Trait<&'static str>> = Box::new(Struct { person: person });
+    let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person });
 }
diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/trait-coercion-generic-regions.stderr
index 4ee3e4cacc3..d21b48e571d 100644
--- a/src/test/ui/traits/trait-coercion-generic-regions.stderr
+++ b/src/test/ui/traits/trait-coercion-generic-regions.stderr
@@ -6,7 +6,7 @@ LL |     let person: &str = &person;
    |                        |
    |                        borrowed value does not live long enough
    |                        assignment requires that `person` is borrowed for `'static`
-LL |     let s: Box<Trait<&'static str>> = Box::new(Struct { person: person });
+LL |     let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person });
 LL | }
    | - `person` dropped here while still borrowed
 
diff --git a/src/test/ui/traits/trait-impl-1.rs b/src/test/ui/traits/trait-impl-1.rs
index 29f58a6a9cb..43b82221835 100644
--- a/src/test/ui/traits/trait-impl-1.rs
+++ b/src/test/ui/traits/trait-impl-1.rs
@@ -4,7 +4,7 @@
 
 trait T {}
 
-impl<'a> T+'a {
+impl<'a> dyn T + 'a {
     fn foo(&self) {}
 }
 
diff --git a/src/test/ui/traits/trait-item-privacy.rs b/src/test/ui/traits/trait-item-privacy.rs
index dfc8c8f4f6c..d58bbef38c4 100644
--- a/src/test/ui/traits/trait-item-privacy.rs
+++ b/src/test/ui/traits/trait-item-privacy.rs
@@ -68,7 +68,7 @@ fn check_method() {
     S.b(); //~ ERROR no method named `b` found for type `S` in the current scope
     S.c(); // OK
     // a, b, c are resolved as inherent items, their traits don't need to be in scope
-    let c = &S as &C;
+    let c = &S as &dyn C;
     c.a(); //~ ERROR method `a` is private
     c.b(); // OK
     c.c(); // OK
@@ -121,10 +121,10 @@ fn check_assoc_ty<T: assoc_ty::C>() {
     let _: T::C; // OK
 
     // Associated types, bindings
-    let _: assoc_ty::B<
+    let _: dyn assoc_ty::B<
         B = u8, // OK
     >;
-    let _: C<
+    let _: dyn C<
         A = u8, //~ ERROR associated type `A` is private
         B = u8, // OK
         C = u8, // OK
diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs b/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs
index 6ba5d28a6c4..85698f19489 100644
--- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs
+++ b/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs
@@ -5,15 +5,15 @@ struct Struct;
 impl Trait for Struct {}
 trait Trait {}
 
-type Send1 = Trait + Send;
-type Send2 = Trait + Send + Send;
+type Send1 = dyn Trait + Send;
+type Send2 = dyn Trait + Send + Send;
 
 fn main () {}
 
-impl Trait + Send {
+impl dyn Trait + Send {
     fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
 }
 
-impl Trait + Send + Send {
+impl dyn Trait + Send + Send {
     fn test(&self) { println!("two"); }
 }
diff --git a/src/test/ui/traits/trait-object-macro-matcher.rs b/src/test/ui/traits/trait-object-macro-matcher.rs
index 0f55e2dc4f2..5ec157275a6 100644
--- a/src/test/ui/traits/trait-object-macro-matcher.rs
+++ b/src/test/ui/traits/trait-object-macro-matcher.rs
@@ -5,7 +5,8 @@ macro_rules! m {
 }
 
 fn main() {
-    m!(Copy + Send + 'static); //~ ERROR the trait `std::marker::Copy` cannot be made into an object
-    m!('static + Send);
-    m!('static +); //~ ERROR at least one non-builtin trait is required for an object type
+    m!(dyn Copy + Send + 'static);
+    //~^ ERROR the trait `std::marker::Copy` cannot be made into an object
+    m!(dyn 'static + Send);
+    m!(dyn 'static +); //~ ERROR at least one non-builtin trait is required for an object type
 }
diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/trait-object-macro-matcher.stderr
index 57a529ebc57..0b84c3dfcb0 100644
--- a/src/test/ui/traits/trait-object-macro-matcher.stderr
+++ b/src/test/ui/traits/trait-object-macro-matcher.stderr
@@ -1,14 +1,14 @@
 error[E0224]: at least one non-builtin trait is required for an object type
-  --> $DIR/trait-object-macro-matcher.rs:10:8
+  --> $DIR/trait-object-macro-matcher.rs:11:8
    |
-LL |     m!('static +);
-   |        ^^^^^^^^^
+LL |     m!(dyn 'static +);
+   |        ^^^^^^^^^^^^^
 
 error[E0038]: the trait `std::marker::Copy` cannot be made into an object
   --> $DIR/trait-object-macro-matcher.rs:8:8
    |
-LL |     m!(Copy + Send + 'static);
-   |        ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
+LL |     m!(dyn Copy + Send + 'static);
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`
 
diff --git a/src/test/ui/traits/trait-object-safety.rs b/src/test/ui/traits/trait-object-safety.rs
index e333bf6bfe5..f43d332d696 100644
--- a/src/test/ui/traits/trait-object-safety.rs
+++ b/src/test/ui/traits/trait-object-safety.rs
@@ -12,6 +12,6 @@ impl Tr for St {
 }
 
 fn main() {
-    let _: &Tr = &St; //~ ERROR E0038
+    let _: &dyn Tr = &St; //~ ERROR E0038
     //~^ ERROR E0038
 }
diff --git a/src/test/ui/traits/trait-object-safety.stderr b/src/test/ui/traits/trait-object-safety.stderr
index a7fe83cb756..68edc178705 100644
--- a/src/test/ui/traits/trait-object-safety.stderr
+++ b/src/test/ui/traits/trait-object-safety.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Tr` cannot be made into an object
-  --> $DIR/trait-object-safety.rs:15:18
+  --> $DIR/trait-object-safety.rs:15:22
    |
-LL |     let _: &Tr = &St;
-   |                  ^^^ the trait `Tr` cannot be made into an object
+LL |     let _: &dyn Tr = &St;
+   |                      ^^^ the trait `Tr` cannot be made into an object
    |
    = note: method `foo` has no receiver
    = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Tr>` for `&St`
@@ -10,8 +10,8 @@ LL |     let _: &Tr = &St;
 error[E0038]: the trait `Tr` cannot be made into an object
   --> $DIR/trait-object-safety.rs:15:12
    |
-LL |     let _: &Tr = &St;
-   |            ^^^ the trait `Tr` cannot be made into an object
+LL |     let _: &dyn Tr = &St;
+   |            ^^^^^^^ the trait `Tr` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.rs b/src/test/ui/traits/trait-object-vs-lifetime-2.rs
index 2579a0056f1..4d56fcf11e3 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime-2.rs
+++ b/src/test/ui/traits/trait-object-vs-lifetime-2.rs
@@ -6,7 +6,7 @@
 // `'static` is a lifetime, `'static +` is a type, `'a` is a type
 fn g() where
     'static: 'static,
-    'static +: 'static + Copy,
+    dyn 'static +: 'static + Copy,
     //~^ ERROR at least one non-builtin trait is required for an object type
 {}
 
diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr b/src/test/ui/traits/trait-object-vs-lifetime-2.stderr
index 057f587a7b6..24162c920be 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr
+++ b/src/test/ui/traits/trait-object-vs-lifetime-2.stderr
@@ -1,8 +1,8 @@
 error[E0224]: at least one non-builtin trait is required for an object type
   --> $DIR/trait-object-vs-lifetime-2.rs:9:5
    |
-LL |     'static +: 'static + Copy,
-   |     ^^^^^^^^^
+LL |     dyn 'static +: 'static + Copy,
+   |     ^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/trait-object-vs-lifetime.rs b/src/test/ui/traits/trait-object-vs-lifetime.rs
index 36dec21be05..803b29367c8 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime.rs
+++ b/src/test/ui/traits/trait-object-vs-lifetime.rs
@@ -6,12 +6,12 @@ struct S<'a, T>(&'a u8, T);
 fn main() {
     // `'static` is a lifetime argument, `'static +` is a type argument
     let _: S<'static, u8>;
-    let _: S<'static, 'static +>;
+    let _: S<'static, dyn 'static +>;
     //~^ at least one non-builtin trait is required for an object type
     let _: S<'static, 'static>;
     //~^ ERROR wrong number of lifetime arguments: expected 1, found 2
     //~| ERROR wrong number of type arguments: expected 1, found 0
-    let _: S<'static +, 'static>;
+    let _: S<dyn 'static +, 'static>;
     //~^ ERROR lifetime arguments must be declared prior to type arguments
     //~| ERROR at least one non-builtin trait is required for an object type
 }
diff --git a/src/test/ui/traits/trait-object-vs-lifetime.stderr b/src/test/ui/traits/trait-object-vs-lifetime.stderr
index c13d0e3f293..be1af59ed4f 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime.stderr
+++ b/src/test/ui/traits/trait-object-vs-lifetime.stderr
@@ -1,14 +1,14 @@
 error: lifetime arguments must be declared prior to type arguments
-  --> $DIR/trait-object-vs-lifetime.rs:14:25
+  --> $DIR/trait-object-vs-lifetime.rs:14:29
    |
-LL |     let _: S<'static +, 'static>;
-   |                         ^^^^^^^
+LL |     let _: S<dyn 'static +, 'static>;
+   |                             ^^^^^^^
 
 error[E0224]: at least one non-builtin trait is required for an object type
   --> $DIR/trait-object-vs-lifetime.rs:9:23
    |
-LL |     let _: S<'static, 'static +>;
-   |                       ^^^^^^^^^
+LL |     let _: S<'static, dyn 'static +>;
+   |                       ^^^^^^^^^^^^^
 
 error[E0107]: wrong number of lifetime arguments: expected 1, found 2
   --> $DIR/trait-object-vs-lifetime.rs:11:23
@@ -25,8 +25,8 @@ LL |     let _: S<'static, 'static>;
 error[E0224]: at least one non-builtin trait is required for an object type
   --> $DIR/trait-object-vs-lifetime.rs:14:14
    |
-LL |     let _: S<'static +, 'static>;
-   |              ^^^^^^^^^
+LL |     let _: S<dyn 'static +, 'static>;
+   |              ^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/traits/trait-test-2.rs b/src/test/ui/traits/trait-test-2.rs
index 20d979df4bf..86570f1152e 100644
--- a/src/test/ui/traits/trait-test-2.rs
+++ b/src/test/ui/traits/trait-test-2.rs
@@ -8,7 +8,7 @@ impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah<X>(&self) {} }
 fn main() {
     10.dup::<i32>(); //~ ERROR wrong number of type arguments: expected 0, found 1
     10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2
-    (box 10 as Box<bar>).dup();
+    (box 10 as Box<dyn bar>).dup();
     //~^ ERROR E0038
     //~| ERROR E0038
 }
diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/trait-test-2.stderr
index 0e3446e0d23..5d5251925a1 100644
--- a/src/test/ui/traits/trait-test-2.stderr
+++ b/src/test/ui/traits/trait-test-2.stderr
@@ -13,8 +13,8 @@ LL |     10.blah::<i32, i32>();
 error[E0038]: the trait `bar` cannot be made into an object
   --> $DIR/trait-test-2.rs:11:16
    |
-LL |     (box 10 as Box<bar>).dup();
-   |                ^^^^^^^^ the trait `bar` cannot be made into an object
+LL |     (box 10 as Box<dyn bar>).dup();
+   |                ^^^^^^^^^^^^ the trait `bar` cannot be made into an object
    |
    = note: method `dup` references the `Self` type in its arguments or return type
    = note: method `blah` has generic type parameters
@@ -22,7 +22,7 @@ LL |     (box 10 as Box<bar>).dup();
 error[E0038]: the trait `bar` cannot be made into an object
   --> $DIR/trait-test-2.rs:11:6
    |
-LL |     (box 10 as Box<bar>).dup();
+LL |     (box 10 as Box<dyn bar>).dup();
    |      ^^^^^^ the trait `bar` cannot be made into an object
    |
    = note: method `dup` references the `Self` type in its arguments or return type
diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.rs b/src/test/ui/traits/traits-repeated-supertrait-ambig.rs
index 5fa7e87aa4b..6aaef8a305b 100644
--- a/src/test/ui/traits/traits-repeated-supertrait-ambig.rs
+++ b/src/test/ui/traits/traits-repeated-supertrait-ambig.rs
@@ -22,7 +22,7 @@ impl CompareTo<u64> for i64 {
 
 impl CompareToInts for i64 { }
 
-fn with_obj(c: &CompareToInts) -> bool {
+fn with_obj(c: &dyn CompareToInts) -> bool {
     c.same_as(22) //~ ERROR `dyn CompareToInts: CompareTo<i32>` is not satisfied
 }
 
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs
index a5d5b937726..d411807673c 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs
@@ -13,8 +13,8 @@ struct T<X: ?Sized> {
 
 struct S(str, str) where str: Sized;
 
-fn unsized_local() where for<'a> T<A + 'a>: Sized {
-    let x: T<A> = *(Box::new(T { x: 1 }) as Box<T<A>>);
+fn unsized_local() where for<'a> T<dyn A + 'a>: Sized {
+    let x: T<dyn A> = *(Box::new(T { x: 1 }) as Box<T<dyn A>>);
 }
 
 fn return_str() -> str where str: Sized {
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr
index a9d2634c1ad..fda1d6d70ac 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr
@@ -7,10 +7,10 @@ LL | struct S(str, str) where str: Sized;
    = note: #[warn(trivial_bounds)] on by default
 
 warning: Trait bound for<'a> T<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent-sized.rs:16:45
+  --> $DIR/trivial-bounds-inconsistent-sized.rs:16:49
    |
-LL | fn unsized_local() where for<'a> T<A + 'a>: Sized {
-   |                                             ^^^^^
+LL | fn unsized_local() where for<'a> T<dyn A + 'a>: Sized {
+   |                                                 ^^^^^
 
 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-inconsistent-sized.rs:20:35
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.rs b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.rs
index fdbaec9a5c7..f6538b14d17 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.rs
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.rs
@@ -52,8 +52,8 @@ struct Dst<X: ?Sized> {
 
 struct TwoStrs(str, str) where str: Sized;
 
-fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
-    let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
+fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
+    let x: Dst<dyn A> = *(Box::new(Dst { x: 1 }) as Box<Dst<dyn A>>);
 }
 
 fn return_str() -> str where str: Sized {
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
index 744e146f830..a0d638f1714 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
@@ -64,10 +64,10 @@ LL | struct TwoStrs(str, str) where str: Sized;
    |                                     ^^^^^
 
 warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent.rs:55:47
+  --> $DIR/trivial-bounds-inconsistent.rs:55:51
    |
-LL | fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
-   |                                               ^^^^^
+LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
+   |                                                   ^^^^^
 
 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-inconsistent.rs:59:35
diff --git a/src/test/ui/trivial_casts.rs b/src/test/ui/trivial_casts.rs
index c1f5441a36b..dd578e074fd 100644
--- a/src/test/ui/trivial_casts.rs
+++ b/src/test/ui/trivial_casts.rs
@@ -49,29 +49,29 @@ pub fn main() {
 
     // unsize trait
     let x: &Bar = &Bar;
-    let _ = x as &Foo; //~ERROR trivial cast: `&Bar` as `&dyn Foo`
-    let _ = x as *const Foo; //~ERROR trivial cast: `&Bar` as `*const dyn Foo`
-    let _: &Foo = x;
-    let _: *const Foo = x;
+    let _ = x as &dyn Foo; //~ERROR trivial cast: `&Bar` as `&dyn Foo`
+    let _ = x as *const dyn Foo; //~ERROR trivial cast: `&Bar` as `*const dyn Foo`
+    let _: &dyn Foo = x;
+    let _: *const dyn Foo = x;
 
     let x: &mut Bar = &mut Bar;
-    let _ = x as &mut Foo; //~ERROR trivial cast: `&mut Bar` as `&mut dyn Foo`
-    let _ = x as *mut Foo; //~ERROR trivial cast: `&mut Bar` as `*mut dyn Foo`
-    let _: &mut Foo = x;
-    let _: *mut Foo = x;
+    let _ = x as &mut dyn Foo; //~ERROR trivial cast: `&mut Bar` as `&mut dyn Foo`
+    let _ = x as *mut dyn Foo; //~ERROR trivial cast: `&mut Bar` as `*mut dyn Foo`
+    let _: &mut dyn Foo = x;
+    let _: *mut dyn Foo = x;
 
     let x: Box<Bar> = Box::new(Bar);
-    let _ = x as Box<Foo>; //~ERROR `std::boxed::Box<Bar>` as `std::boxed::Box<dyn Foo>`
+    let _ = x as Box<dyn Foo>; //~ERROR `std::boxed::Box<Bar>` as `std::boxed::Box<dyn Foo>`
     let x: Box<Bar> = Box::new(Bar);
-    let _: Box<Foo> = x;
+    let _: Box<dyn Foo> = x;
 
     // functions
     fn baz(_x: i32) {}
-    let _ = &baz as &Fn(i32); //~ERROR `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)`
-    let _: &Fn(i32) = &baz;
+    let _ = &baz as &dyn Fn(i32); //~ERROR `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)`
+    let _: &dyn Fn(i32) = &baz;
     let x = |_x: i32| {};
-    let _ = &x as &Fn(i32); //~ERROR trivial cast
-    let _: &Fn(i32) = &x;
+    let _ = &x as &dyn Fn(i32); //~ERROR trivial cast
+    let _: &dyn Fn(i32) = &x;
 }
 
 // subtyping
diff --git a/src/test/ui/trivial_casts.stderr b/src/test/ui/trivial_casts.stderr
index 524eb7feaaf..8fa44372f0b 100644
--- a/src/test/ui/trivial_casts.stderr
+++ b/src/test/ui/trivial_casts.stderr
@@ -83,56 +83,56 @@ LL |     let _ = x as Box<[u32]>;
 error: trivial cast: `&Bar` as `&dyn Foo`
   --> $DIR/trivial_casts.rs:52:13
    |
-LL |     let _ = x as &Foo;
-   |             ^^^^^^^^^
+LL |     let _ = x as &dyn Foo;
+   |             ^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&Bar` as `*const dyn Foo`
   --> $DIR/trivial_casts.rs:53:13
    |
-LL |     let _ = x as *const Foo;
-   |             ^^^^^^^^^^^^^^^
+LL |     let _ = x as *const dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&mut Bar` as `&mut dyn Foo`
   --> $DIR/trivial_casts.rs:58:13
    |
-LL |     let _ = x as &mut Foo;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as &mut dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&mut Bar` as `*mut dyn Foo`
   --> $DIR/trivial_casts.rs:59:13
    |
-LL |     let _ = x as *mut Foo;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as *mut dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `std::boxed::Box<Bar>` as `std::boxed::Box<dyn Foo>`
   --> $DIR/trivial_casts.rs:64:13
    |
-LL |     let _ = x as Box<Foo>;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as Box<dyn Foo>;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)`
   --> $DIR/trivial_casts.rs:70:13
    |
-LL |     let _ = &baz as &Fn(i32);
-   |             ^^^^^^^^^^^^^^^^
+LL |     let _ = &baz as &dyn Fn(i32);
+   |             ^^^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&[closure@$DIR/trivial_casts.rs:72:13: 72:25]` as `&dyn std::ops::Fn(i32)`
   --> $DIR/trivial_casts.rs:73:13
    |
-LL |     let _ = &x as &Fn(i32);
-   |             ^^^^^^^^^^^^^^
+LL |     let _ = &x as &dyn Fn(i32);
+   |             ^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
diff --git a/src/test/ui/type/type-arg-out-of-scope.rs b/src/test/ui/type/type-arg-out-of-scope.rs
index d5b815f6a95..02aad007707 100644
--- a/src/test/ui/type/type-arg-out-of-scope.rs
+++ b/src/test/ui/type/type-arg-out-of-scope.rs
@@ -1,5 +1,5 @@
 // error-pattern:can't use generic parameters from outer function
 fn foo<T>(x: T) {
-    fn bar(f: Box<FnMut(T) -> T>) { }
+    fn bar(f: Box<dyn FnMut(T) -> T>) { }
 }
 fn main() { foo(1); }
diff --git a/src/test/ui/type/type-arg-out-of-scope.stderr b/src/test/ui/type/type-arg-out-of-scope.stderr
index ea991069c08..0b6283fbc51 100644
--- a/src/test/ui/type/type-arg-out-of-scope.stderr
+++ b/src/test/ui/type/type-arg-out-of-scope.stderr
@@ -1,20 +1,20 @@
 error[E0401]: can't use generic parameters from outer function
-  --> $DIR/type-arg-out-of-scope.rs:3:25
+  --> $DIR/type-arg-out-of-scope.rs:3:29
    |
 LL | fn foo<T>(x: T) {
    |        - type parameter from outer function
-LL |     fn bar(f: Box<FnMut(T) -> T>) { }
-   |        ---              ^ use of generic parameter from outer function
+LL |     fn bar(f: Box<dyn FnMut(T) -> T>) { }
+   |        ---                  ^ use of generic parameter from outer function
    |        |
    |        help: try using a local generic parameter instead: `bar<T>`
 
 error[E0401]: can't use generic parameters from outer function
-  --> $DIR/type-arg-out-of-scope.rs:3:31
+  --> $DIR/type-arg-out-of-scope.rs:3:35
    |
 LL | fn foo<T>(x: T) {
    |        - type parameter from outer function
-LL |     fn bar(f: Box<FnMut(T) -> T>) { }
-   |        ---                    ^ use of generic parameter from outer function
+LL |     fn bar(f: Box<dyn FnMut(T) -> T>) { }
+   |        ---                        ^ use of generic parameter from outer function
    |        |
    |        help: try using a local generic parameter instead: `bar<T>`
 
diff --git a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
index 3e1c876c76b..444453dc694 100644
--- a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
+++ b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
@@ -11,7 +11,7 @@ impl MyAdd for i32 {
 
 fn main() {
     let x: i32 = 5;
-    let y = x as MyAdd<i32>;
+    let y = x as dyn MyAdd<i32>;
     //~^ ERROR E0038
     //~| ERROR cast to unsized type: `i32` as `dyn MyAdd<i32>`
 }
diff --git a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
index 0beb9e9eb4b..58727ea0fef 100644
--- a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
+++ b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
@@ -1,20 +1,20 @@
 error[E0620]: cast to unsized type: `i32` as `dyn MyAdd<i32>`
   --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:13
    |
-LL |     let y = x as MyAdd<i32>;
-   |             ^^^^^^^^^^^^^^^
+LL |     let y = x as dyn MyAdd<i32>;
+   |             ^^^^^^^^^^^^^^^^^^^
    |
 help: consider using a box or reference as appropriate
   --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:13
    |
-LL |     let y = x as MyAdd<i32>;
+LL |     let y = x as dyn MyAdd<i32>;
    |             ^
 
 error[E0038]: the trait `MyAdd` cannot be made into an object
   --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:18
    |
-LL |     let y = x as MyAdd<i32>;
-   |                  ^^^^^^^^^^ the trait `MyAdd` cannot be made into an object
+LL |     let y = x as dyn MyAdd<i32>;
+   |                  ^^^^^^^^^^^^^^ the trait `MyAdd` cannot be made into an object
    |
    = note: method `add` references the `Self` type in its arguments or return type
 
diff --git a/src/test/ui/type/type-parameter-defaults-referencing-Self.rs b/src/test/ui/type/type-parameter-defaults-referencing-Self.rs
index 721bf960a55..a4c59dced02 100644
--- a/src/test/ui/type/type-parameter-defaults-referencing-Self.rs
+++ b/src/test/ui/type/type-parameter-defaults-referencing-Self.rs
@@ -7,7 +7,7 @@ trait Foo<T=Self> {
     fn method(&self);
 }
 
-fn foo(x: &Foo) { }
+fn foo(x: &dyn Foo) { }
 //~^ ERROR the type parameter `T` must be explicitly specified
 
 fn main() { }
diff --git a/src/test/ui/type/type-parameter-defaults-referencing-Self.stderr b/src/test/ui/type/type-parameter-defaults-referencing-Self.stderr
index 70093b61f25..0d6ca9d9dcd 100644
--- a/src/test/ui/type/type-parameter-defaults-referencing-Self.stderr
+++ b/src/test/ui/type/type-parameter-defaults-referencing-Self.stderr
@@ -1,8 +1,8 @@
 error[E0393]: the type parameter `T` must be explicitly specified
-  --> $DIR/type-parameter-defaults-referencing-Self.rs:10:12
+  --> $DIR/type-parameter-defaults-referencing-Self.rs:10:16
    |
-LL | fn foo(x: &Foo) { }
-   |            ^^^ missing reference to `T`
+LL | fn foo(x: &dyn Foo) { }
+   |                ^^^ missing reference to `T`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
diff --git a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
index 77608664362..f466c19e051 100644
--- a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
+++ b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
@@ -1,7 +1,7 @@
 fn foo1<T:Copy<U>, U>(x: T) {}
 //~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
 
-trait Trait: Copy<Send> {}
+trait Trait: Copy<dyn Send> {}
 //~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
 
 struct MyStruct1<T: Copy<T>>;
diff --git a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr
index 0242287a3e5..0be1c8ef3bc 100644
--- a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr
+++ b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr
@@ -7,8 +7,8 @@ LL | fn foo1<T:Copy<U>, U>(x: T) {}
 error[E0107]: wrong number of type arguments: expected 0, found 1
   --> $DIR/typeck-builtin-bound-type-parameters.rs:4:19
    |
-LL | trait Trait: Copy<Send> {}
-   |                   ^^^^ unexpected type argument
+LL | trait Trait: Copy<dyn Send> {}
+   |                   ^^^^^^^^ unexpected type argument
 
 error[E0107]: wrong number of type arguments: expected 0, found 1
   --> $DIR/typeck-builtin-bound-type-parameters.rs:7:26
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs
index 1eb9de778e8..d8b201bf82d 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs
@@ -10,11 +10,11 @@ trait Foo<A> {
 }
 
 fn main() {
-    let x: Box<Foo(isize)>;
+    let x: Box<dyn Foo(isize)>;
     //~^ ERROR parenthetical notation is only stable when used with `Fn`-family
 
     // No errors with these:
-    let x: Box<Fn(isize)>;
-    let x: Box<FnMut(isize)>;
-    let x: Box<FnOnce(isize)>;
+    let x: Box<dyn Fn(isize)>;
+    let x: Box<dyn FnMut(isize)>;
+    let x: Box<dyn FnOnce(isize)>;
 }
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
index 1604aa4a0f7..c23acbcb311 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
@@ -1,8 +1,8 @@
 error[E0658]: parenthetical notation is only stable when used with `Fn`-family traits
-  --> $DIR/unboxed-closure-feature-gate.rs:13:16
+  --> $DIR/unboxed-closure-feature-gate.rs:13:20
    |
-LL |     let x: Box<Foo(isize)>;
-   |                ^^^^^^^^^^
+LL |     let x: Box<dyn Foo(isize)>;
+   |                    ^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/29625
    = help: add #![feature(unboxed_closures)] to the crate attributes to enable
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.rs
index 044859de6a4..f1c83f0606f 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.rs
@@ -15,14 +15,14 @@ fn eq<A: ?Sized,B: ?Sized>() where A : Eq<B> { }
 
 fn test<'a,'b>() {
     // Parens are equivalent to omitting default in angle.
-    eq::< Foo<(isize,),Output=()>,                   Foo(isize)                      >();
+    eq::<dyn Foo<(isize,), Output=()>, dyn Foo(isize)>();
 
     // In angle version, we supply something other than the default
-    eq::< Foo<(isize,),isize,Output=()>,      Foo(isize)                      >();
+    eq::<dyn Foo<(isize,), isize, Output=()>, dyn Foo(isize)>();
     //~^ ERROR E0277
 
     // Supply default explicitly.
-    eq::< Foo<(isize,),(isize,),Output=()>,   Foo(isize)                      >();
+    eq::<dyn Foo<(isize,), (isize,), Output=()>, dyn Foo(isize)>();
 }
 
 fn main() { }
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
index ce90f5b9d24..fd5ef4b9df1 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `dyn Foo<(isize,), isize, Output = ()>: Eq<dyn Foo<(isize,), Output = ()>>` is not satisfied
   --> $DIR/unboxed-closure-sugar-default.rs:21:5
    |
-LL |     eq::< Foo<(isize,),isize,Output=()>,      Foo(isize)                      >();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>`
+LL |     eq::<dyn Foo<(isize,), isize, Output=()>, dyn Foo(isize)>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>`
    |
 note: required by `eq`
   --> $DIR/unboxed-closure-sugar-default.rs:14:1
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs
index 95bd391f251..0fc3e23ec73 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs
@@ -17,31 +17,31 @@ fn eq<A: ?Sized,B: ?Sized +Eq<A>>() { }
 
 fn test<'a,'b>() {
     // No errors expected:
-    eq::< Foo<(),Output=()>,                       Foo()                         >();
-    eq::< Foo<(isize,),Output=()>,                 Foo(isize)                      >();
-    eq::< Foo<(isize,usize),Output=()>,            Foo(isize,usize)                 >();
-    eq::< Foo<(isize,usize),Output=usize>,         Foo(isize,usize) -> usize         >();
-    eq::< Foo<(&'a isize,&'b usize),Output=usize>, Foo(&'a isize,&'b usize) -> usize >();
+    eq::< dyn Foo<(),Output=()>,                       dyn Foo()                         >();
+    eq::< dyn Foo<(isize,),Output=()>,                 dyn Foo(isize)                      >();
+    eq::< dyn Foo<(isize,usize),Output=()>,            dyn Foo(isize,usize)                 >();
+    eq::< dyn Foo<(isize,usize),Output=usize>,         dyn Foo(isize,usize) -> usize         >();
+    eq::< dyn Foo<(&'a isize,&'b usize),Output=usize>, dyn Foo(&'a isize,&'b usize) -> usize >();
 
     // Test that anonymous regions in `()` form are equivalent
     // to fresh bound regions, and that we can intermingle
     // named and anonymous as we choose:
-    eq::< for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
-          for<'x,'y> Foo(&'x isize,&'y usize) -> usize            >();
-    eq::< for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
-          for<'x> Foo(&'x isize,&usize) -> usize                  >();
-    eq::< for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
-          for<'y> Foo(&isize,&'y usize) -> usize                  >();
-    eq::< for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
-          Foo(&isize,&usize) -> usize                             >();
+    eq::< dyn for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
+          dyn for<'x,'y> Foo(&'x isize,&'y usize) -> usize            >();
+    eq::< dyn for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
+          dyn for<'x> Foo(&'x isize,&usize) -> usize                  >();
+    eq::< dyn for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
+          dyn for<'y> Foo(&isize,&'y usize) -> usize                  >();
+    eq::< dyn for<'x,'y> Foo<(&'x isize,&'y usize),Output=usize>,
+          dyn Foo(&isize,&usize) -> usize                             >();
 
     // lifetime elision
-    eq::< for<'x> Foo<(&'x isize,), Output=&'x isize>,
-          Foo(&isize) -> &isize                                   >();
+    eq::< dyn for<'x> Foo<(&'x isize,), Output=&'x isize>,
+          dyn Foo(&isize) -> &isize                                   >();
 
     // Errors expected:
-    eq::< Foo<(),Output=()>,
-          Foo(char)                                               >();
+    eq::< dyn Foo<(),Output=()>,
+          dyn Foo(char)                                               >();
     //~^^ ERROR E0277
 }
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
index 857a32ca69e..005a86bc217 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
@@ -1,9 +1,9 @@
 error[E0277]: the trait bound `dyn Foo<(char,), Output = ()>: Eq<dyn Foo<(), Output = ()>>` is not satisfied
   --> $DIR/unboxed-closure-sugar-equiv.rs:43:5
    |
-LL | /     eq::< Foo<(),Output=()>,
-LL | |           Foo(char)                                               >();
-   | |___________________________________________________________________^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>`
+LL | /     eq::< dyn Foo<(),Output=()>,
+LL | |           dyn Foo(char)                                               >();
+   | |_______________________________________________________________________^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>`
    |
 note: required by `eq`
   --> $DIR/unboxed-closure-sugar-equiv.rs:16:1
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.rs
index b61d8b8c8c7..d11d663f172 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.rs
@@ -18,10 +18,10 @@ impl<X: ?Sized> Eq<X> for X { }
 fn eq<A: ?Sized,B: ?Sized +Eq<A>>() { }
 
 fn main() {
-    eq::< for<'a> Foo<(&'a isize,), Output=&'a isize>,
-          Foo(&isize) -> &isize                                   >();
-    eq::< for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>,
-          Foo(&isize) -> (&isize, &isize)                           >();
+    eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
+          dyn Foo(&isize) -> &isize                                   >();
+    eq::< dyn for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>,
+          dyn Foo(&isize) -> (&isize, &isize)                           >();
 
-    let _: Foo(&isize, &usize) -> &usize; //~ ERROR missing lifetime specifier
+    let _: dyn Foo(&isize, &usize) -> &usize; //~ ERROR missing lifetime specifier
 }
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
index 8c3480744fe..9fb9a07166f 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
@@ -1,8 +1,8 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:35
+  --> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:39
    |
-LL |     let _: Foo(&isize, &usize) -> &usize;
-   |                                   ^ expected lifetime parameter
+LL |     let _: dyn Foo(&isize, &usize) -> &usize;
+   |                                       ^ expected lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs
index 09927a94019..6d6ed4b568f 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs
@@ -1,6 +1,6 @@
 // Test that the `Fn` traits require `()` form without a feature gate.
 
-fn bar1(x: &Fn<(), Output=()>) {
+fn bar1(x: &dyn Fn<(), Output=()>) {
     //~^ ERROR of `Fn`-family traits' type parameters is subject to change
 }
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr
index 0901126a3fe..e1ed85d4f46 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr
@@ -1,8 +1,8 @@
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead
-  --> $DIR/unboxed-closure-sugar-not-used-on-fn.rs:3:13
+  --> $DIR/unboxed-closure-sugar-not-used-on-fn.rs:3:17
    |
-LL | fn bar1(x: &Fn<(), Output=()>) {
-   |             ^^^^^^^^^^^^^^^^^
+LL | fn bar1(x: &dyn Fn<(), Output=()>) {
+   |                 ^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/29625
    = help: add #![feature(unboxed_closures)] to the crate attributes to enable
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.rs
index 799d9f33e2e..76c928d7b6a 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.rs
@@ -20,14 +20,14 @@ fn same_type<A,B:Eq<A>>(a: A, b: B) { }
 
 fn test<'a,'b>() {
     // Parens are equivalent to omitting default in angle.
-    eq::< Foo<(isize,),Output=()>,               Foo(isize)                      >();
+    eq::< dyn Foo<(isize,),Output=()>,               dyn Foo(isize)                      >();
 
     // Here we specify 'static explicitly in angle-bracket version.
     // Parenthesized winds up getting inferred.
-    eq::< Foo<'static, (isize,),Output=()>,      Foo(isize)                      >();
+    eq::< dyn Foo<'static, (isize,),Output=()>,      dyn Foo(isize)                      >();
 }
 
-fn test2(x: &Foo<(isize,),Output=()>, y: &Foo(isize)) {
+fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
 //~^ ERROR wrong number of lifetime arguments: expected 1, found 0
     // Here, the omitted lifetimes are expanded to distinct things.
     same_type(x, y)
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
index 8eed7d58c46..e9d51983a7a 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
@@ -1,8 +1,8 @@
 error[E0107]: wrong number of lifetime arguments: expected 1, found 0
-  --> $DIR/unboxed-closure-sugar-region.rs:30:43
+  --> $DIR/unboxed-closure-sugar-region.rs:30:51
    |
-LL | fn test2(x: &Foo<(isize,),Output=()>, y: &Foo(isize)) {
-   |                                           ^^^^^^^^^^ expected 1 lifetime argument
+LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
+   |                                                   ^^^^^^^^^^ expected 1 lifetime argument
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs
index df0c495a11c..a6c86311b37 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs
@@ -2,7 +2,7 @@
 
 trait One<A> { fn foo(&self) -> A; }
 
-fn foo(_: &One()) //~ ERROR associated type `Output` not found for `One<()>`
+fn foo(_: &dyn One()) //~ ERROR associated type `Output` not found for `One<()>`
 {}
 
 fn main() { }
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
index 304339c89e6..c59082932dd 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
@@ -1,8 +1,8 @@
 error[E0220]: associated type `Output` not found for `One<()>`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs:5:15
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs:5:19
    |
-LL | fn foo(_: &One())
-   |               ^^ associated type `Output` not found
+LL | fn foo(_: &dyn One())
+   |                   ^^ associated type `Output` not found
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
index 5f5ad7902aa..01c76d64c6b 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
@@ -2,7 +2,7 @@
 
 trait Three<A,B,C> { fn dummy(&self) -> (A,B,C); }
 
-fn foo(_: &Three())
+fn foo(_: &dyn Three())
 //~^ ERROR wrong number of type arguments
 //~| ERROR associated type `Output` not found
 {}
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
index 62b3a254430..6c61e74584a 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
@@ -1,14 +1,14 @@
 error[E0107]: wrong number of type arguments: expected 3, found 1
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:12
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:16
    |
-LL | fn foo(_: &Three())
-   |            ^^^^^^^ expected 3 type arguments
+LL | fn foo(_: &dyn Three())
+   |                ^^^^^^^ expected 3 type arguments
 
 error[E0220]: associated type `Output` not found for `Three<(), [type error], [type error]>`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:17
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:21
    |
-LL | fn foo(_: &Three())
-   |                 ^^ associated type `Output` not found
+LL | fn foo(_: &dyn Three())
+   |                     ^^ associated type `Output` not found
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
index 2e87d91f8bd..bc9901c795b 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
@@ -2,7 +2,7 @@
 
 trait Zero { fn dummy(&self); }
 
-fn foo(_: Zero())
+fn foo(_: dyn Zero())
     //~^ ERROR wrong number of type arguments
     //~| ERROR associated type `Output` not found for `Zero`
 {}
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
index b64fc61cc85..b96e2cbc36b 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
@@ -1,14 +1,14 @@
 error[E0107]: wrong number of type arguments: expected 0, found 1
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:15
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:19
    |
-LL | fn foo(_: Zero())
-   |               ^^ unexpected type argument
+LL | fn foo(_: dyn Zero())
+   |                   ^^ unexpected type argument
 
 error[E0220]: associated type `Output` not found for `Zero`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:15
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:19
    |
-LL | fn foo(_: Zero())
-   |               ^^ associated type `Output` not found
+LL | fn foo(_: dyn Zero())
+   |                   ^^ associated type `Output` not found
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs
index 82dc536bb56..1358ba0f953 100644
--- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs
@@ -9,7 +9,7 @@ fn a() {
     // iteration, but it still doesn't work. The weird structure with
     // the `Option` is to avoid giving any useful hints about the `Fn`
     // kind via the expected type.
-    let mut factorial: Option<Box<Fn(u32) -> u32>> = None;
+    let mut factorial: Option<Box<dyn Fn(u32) -> u32>> = None;
 
     let f = |x: u32| -> u32 {
         let g = factorial.as_ref().unwrap();
@@ -22,7 +22,7 @@ fn a() {
 }
 
 fn b() {
-    let mut factorial: Option<Box<Fn(u32) -> u32 + 'static>> = None;
+    let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
 
     let f = |x: u32| -> u32 {
         let g = factorial.as_ref().unwrap();
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
index 8d39fb026b3..0466887e371 100644
--- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
@@ -29,8 +29,8 @@ LL |     factorial = Some(Box::new(f));
 error[E0597]: `factorial` does not live long enough
   --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:28:17
    |
-LL |     let mut factorial: Option<Box<Fn(u32) -> u32 + 'static>> = None;
-   |                        ------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
+LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
+   |                        ----------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
 LL | 
 LL |     let f = |x: u32| -> u32 {
    |             --------------- value captured here
@@ -43,8 +43,8 @@ LL | }
 error[E0506]: cannot assign to `factorial` because it is borrowed
   --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:33:5
    |
-LL |     let mut factorial: Option<Box<Fn(u32) -> u32 + 'static>> = None;
-   |                        ------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
+LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
+   |                        ----------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
 LL | 
 LL |     let f = |x: u32| -> u32 {
    |             --------------- borrow of `factorial` occurs here
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.rs b/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.rs
index 0beead1ad92..6a707b2096d 100644
--- a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.rs
+++ b/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.rs
@@ -17,14 +17,14 @@ impl<F,A,R> YCombinator<F,A,R> {
     }
 }
 
-impl<A,R,F : FnMut(&mut FnMut(A) -> R, A) -> R> FnMut<(A,)> for YCombinator<F,A,R> {
+impl<A,R,F : FnMut(&mut dyn FnMut(A) -> R, A) -> R> FnMut<(A,)> for YCombinator<F,A,R> {
     extern "rust-call" fn call_mut(&mut self, (arg,): (A,)) -> R {
         (self.func)(self, arg)
             //~^ ERROR cannot borrow `*self` as mutable more than once at a time
     }
 }
 
-impl<A,R,F : FnMut(&mut FnMut(A) -> R, A) -> R> FnOnce<(A,)> for YCombinator<F,A,R> {
+impl<A,R,F : FnMut(&mut dyn FnMut(A) -> R, A) -> R> FnOnce<(A,)> for YCombinator<F,A,R> {
     type Output = R;
     extern "rust-call" fn call_once(mut self, args: (A,)) -> R {
         self.call_mut(args)
@@ -33,7 +33,7 @@ impl<A,R,F : FnMut(&mut FnMut(A) -> R, A) -> R> FnOnce<(A,)> for YCombinator<F,A
 
 fn main() {
     let mut counter = 0;
-    let factorial = |recur: &mut FnMut(u32) -> u32, arg: u32| -> u32 {
+    let factorial = |recur: &mut dyn FnMut(u32) -> u32, arg: u32| -> u32 {
         counter += 1;
         if arg == 0 {1} else {arg * recur(arg-1)}
     };
diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs
index 614f7e49f87..3d049cc5639 100644
--- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs
+++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.rs
@@ -7,7 +7,7 @@ fn foo<'_> //~ ERROR cannot be used here
 trait Meh<'a> {}
 impl<'a> Meh<'a> for u8 {}
 
-fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR cannot be used here
+fn meh() -> Box<dyn for<'_> Meh<'_>> //~ ERROR cannot be used here
 //~^ ERROR missing lifetime specifier
 {
   Box::new(5u8)
diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
index 936e3ba55fe..654f4285f65 100644
--- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
+++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
@@ -5,10 +5,10 @@ LL | fn foo<'_>
    |        ^^ `'_` is a reserved lifetime name
 
 error[E0637]: `'_` cannot be used here
-  --> $DIR/underscore-lifetime-binders.rs:10:21
+  --> $DIR/underscore-lifetime-binders.rs:10:25
    |
-LL | fn meh() -> Box<for<'_> Meh<'_>>
-   |                     ^^ `'_` is a reserved lifetime name
+LL | fn meh() -> Box<dyn for<'_> Meh<'_>>
+   |                         ^^ `'_` is a reserved lifetime name
 
 error[E0106]: missing lifetime specifier
   --> $DIR/underscore-lifetime-binders.rs:2:17
@@ -17,10 +17,10 @@ LL | struct Baz<'a>(&'_ &'a u8);
    |                 ^^ expected lifetime parameter
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/underscore-lifetime-binders.rs:10:29
+  --> $DIR/underscore-lifetime-binders.rs:10:33
    |
-LL | fn meh() -> Box<for<'_> Meh<'_>>
-   |                             ^^ help: consider giving it a 'static lifetime: `'static`
+LL | fn meh() -> Box<dyn for<'_> Meh<'_>>
+   |                                 ^^ help: consider giving it a 'static lifetime: `'static`
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
 
diff --git a/src/test/ui/unique-object-noncopyable.rs b/src/test/ui/unique-object-noncopyable.rs
index 1c467a2421a..dd38a7190aa 100644
--- a/src/test/ui/unique-object-noncopyable.rs
+++ b/src/test/ui/unique-object-noncopyable.rs
@@ -20,6 +20,6 @@ impl Foo for Bar {
 
 fn main() {
     let x = box Bar { x: 10 };
-    let y: Box<Foo> = x as Box<Foo>;
+    let y: Box<dyn Foo> = x as Box<dyn Foo>;
     let _z = y.clone(); //~ ERROR no method named `clone` found
 }
diff --git a/src/test/ui/unsized/unsized-enum2.rs b/src/test/ui/unsized/unsized-enum2.rs
index 60bfb5cb640..d589f5ae582 100644
--- a/src/test/ui/unsized/unsized-enum2.rs
+++ b/src/test/ui/unsized/unsized-enum2.rs
@@ -13,10 +13,10 @@ trait PathHelper2 {}
 trait PathHelper3 {}
 trait PathHelper4 {}
 
-struct Path1(PathHelper1);
-struct Path2(PathHelper2);
-struct Path3(PathHelper3);
-struct Path4(PathHelper4);
+struct Path1(dyn PathHelper1);
+struct Path2(dyn PathHelper2);
+struct Path3(dyn PathHelper3);
+struct Path4(dyn PathHelper4);
 
 enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
     // parameter
@@ -50,13 +50,13 @@ enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
     //~^ ERROR the size for values of type
 
     // plain trait
-    VM(Foo),
+    VM(dyn Foo),
     //~^ ERROR the size for values of type
-    VN{x: Bar},
+    VN{x: dyn Bar},
     //~^ ERROR the size for values of type
-    VO(isize, FooBar),
+    VO(isize, dyn FooBar),
     //~^ ERROR the size for values of type
-    VP{u: isize, x: BarFoo},
+    VP{u: isize, x: dyn BarFoo},
     //~^ ERROR the size for values of type
 
     // projected
diff --git a/src/test/ui/unsized/unsized-enum2.stderr b/src/test/ui/unsized/unsized-enum2.stderr
index 9109366e4fc..cdd5747d86b 100644
--- a/src/test/ui/unsized/unsized-enum2.stderr
+++ b/src/test/ui/unsized/unsized-enum2.stderr
@@ -85,8 +85,8 @@ LL |     VH{u: isize, x: [u32]},
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:53:8
    |
-LL |     VM(Foo),
-   |        ^^^ doesn't have a size known at compile-time
+LL |     VM(dyn Foo),
+   |        ^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -95,8 +95,8 @@ LL |     VM(Foo),
 error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:55:8
    |
-LL |     VN{x: Bar},
-   |        ^^^^^^ doesn't have a size known at compile-time
+LL |     VN{x: dyn Bar},
+   |        ^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn Bar + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -105,8 +105,8 @@ LL |     VN{x: Bar},
 error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:57:15
    |
-LL |     VO(isize, FooBar),
-   |               ^^^^^^ doesn't have a size known at compile-time
+LL |     VO(isize, dyn FooBar),
+   |               ^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn FooBar + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@@ -115,8 +115,8 @@ LL |     VO(isize, FooBar),
 error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:59:18
    |
-LL |     VP{u: isize, x: BarFoo},
-   |                  ^^^^^^^^^ doesn't have a size known at compile-time
+LL |     VP{u: isize, x: dyn BarFoo},
+   |                  ^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn BarFoo + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.rs b/src/test/ui/use/use-after-move-implicity-coerced-object.rs
index 2e465ee8962..76487ef1c14 100644
--- a/src/test/ui/use/use-after-move-implicity-coerced-object.rs
+++ b/src/test/ui/use/use-after-move-implicity-coerced-object.rs
@@ -13,10 +13,10 @@ impl fmt::Display for Number {
 }
 
 struct List {
-    list: Vec<Box<ToString+'static>> }
+    list: Vec<Box<dyn ToString + 'static>> }
 
 impl List {
-    fn push(&mut self, n: Box<ToString+'static>) {
+    fn push(&mut self, n: Box<dyn ToString + 'static>) {
         self.list.push(n);
     }
 }
diff --git a/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr
index 8b5ecbe56ff..69818aedd15 100644
--- a/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr
+++ b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/variance-contravariant-arg-object.rs:14:5
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
@@ -12,7 +12,7 @@ LL |     v
 error: lifetime may not live long enough
   --> $DIR/variance-contravariant-arg-object.rs:22:5
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
diff --git a/src/test/ui/variance/variance-contravariant-arg-object.rs b/src/test/ui/variance/variance-contravariant-arg-object.rs
index 27e5675dcde..947f4cd8b8f 100644
--- a/src/test/ui/variance/variance-contravariant-arg-object.rs
+++ b/src/test/ui/variance/variance-contravariant-arg-object.rs
@@ -7,15 +7,15 @@ trait Get<T> : 'static {
     fn get(&self, t: T);
 }
 
-fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
-                                -> Box<Get<&'min i32>>
+fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
+                                -> Box<dyn Get<&'min i32>>
     where 'max : 'min
 {
     v //~ ERROR mismatched types
 }
 
-fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
-                                   -> Box<Get<&'max i32>>
+fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+                                   -> Box<dyn Get<&'max i32>>
     where 'max : 'min
 {
     // Previously OK:
diff --git a/src/test/ui/variance/variance-contravariant-arg-object.stderr b/src/test/ui/variance/variance-contravariant-arg-object.stderr
index beac05e04a8..263c849e199 100644
--- a/src/test/ui/variance/variance-contravariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-contravariant-arg-object.stderr
@@ -9,12 +9,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 10:21...
   --> $DIR/variance-contravariant-arg-object.rs:10:21
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 10:27
   --> $DIR/variance-contravariant-arg-object.rs:10:27
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                           ^^^^
 
 error[E0308]: mismatched types
@@ -28,12 +28,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 17:21...
   --> $DIR/variance-contravariant-arg-object.rs:17:21
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 17:27
   --> $DIR/variance-contravariant-arg-object.rs:17:27
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                           ^^^^
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/variance/variance-covariant-arg-object.nll.stderr b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr
index acf9f2e060c..63ab7fe9651 100644
--- a/src/test/ui/variance/variance-covariant-arg-object.nll.stderr
+++ b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/variance-covariant-arg-object.rs:15:5
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
@@ -12,7 +12,7 @@ LL |     v
 error: lifetime may not live long enough
   --> $DIR/variance-covariant-arg-object.rs:22:5
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
diff --git a/src/test/ui/variance/variance-covariant-arg-object.rs b/src/test/ui/variance/variance-covariant-arg-object.rs
index 4b371841654..7cbf65ae3d9 100644
--- a/src/test/ui/variance/variance-covariant-arg-object.rs
+++ b/src/test/ui/variance/variance-covariant-arg-object.rs
@@ -7,16 +7,16 @@ trait Get<T> : 'static {
     fn get(&self) -> T;
 }
 
-fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
-                                -> Box<Get<&'min i32>>
+fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
+                                -> Box<dyn Get<&'min i32>>
     where 'max : 'min
 {
     // Previously OK, now an error as traits are invariant.
     v //~ ERROR mismatched types
 }
 
-fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
-                                   -> Box<Get<&'max i32>>
+fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+                                   -> Box<dyn Get<&'max i32>>
     where 'max : 'min
 {
     v //~ ERROR mismatched types
diff --git a/src/test/ui/variance/variance-covariant-arg-object.stderr b/src/test/ui/variance/variance-covariant-arg-object.stderr
index cdcc7a6fd55..94f80c2b657 100644
--- a/src/test/ui/variance/variance-covariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-covariant-arg-object.stderr
@@ -9,12 +9,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 10:21...
   --> $DIR/variance-covariant-arg-object.rs:10:21
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 10:27
   --> $DIR/variance-covariant-arg-object.rs:10:27
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                           ^^^^
 
 error[E0308]: mismatched types
@@ -28,12 +28,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 18:21...
   --> $DIR/variance-covariant-arg-object.rs:18:21
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 18:27
   --> $DIR/variance-covariant-arg-object.rs:18:27
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                           ^^^^
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/variance/variance-invariant-arg-object.nll.stderr b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr
index 3c1ee7fc707..fe2f35b63b5 100644
--- a/src/test/ui/variance/variance-invariant-arg-object.nll.stderr
+++ b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
   --> $DIR/variance-invariant-arg-object.rs:11:5
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
@@ -12,7 +12,7 @@ LL |     v
 error: lifetime may not live long enough
   --> $DIR/variance-invariant-arg-object.rs:18:5
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ----  ---- lifetime `'max` defined here
    |                     |
    |                     lifetime `'min` defined here
diff --git a/src/test/ui/variance/variance-invariant-arg-object.rs b/src/test/ui/variance/variance-invariant-arg-object.rs
index 91f5982e533..886d263c457 100644
--- a/src/test/ui/variance/variance-invariant-arg-object.rs
+++ b/src/test/ui/variance/variance-invariant-arg-object.rs
@@ -4,15 +4,15 @@ trait Get<T> : 'static {
     fn get(&self, t: T) -> T;
 }
 
-fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
-                                -> Box<Get<&'min i32>>
+fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
+                                -> Box<dyn Get<&'min i32>>
     where 'max : 'min
 {
     v //~ ERROR mismatched types
 }
 
-fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
-                                   -> Box<Get<&'max i32>>
+fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
+                                   -> Box<dyn Get<&'max i32>>
     where 'max : 'min
 {
     v //~ ERROR mismatched types
diff --git a/src/test/ui/variance/variance-invariant-arg-object.stderr b/src/test/ui/variance/variance-invariant-arg-object.stderr
index e2ee35de1a2..50a8697d439 100644
--- a/src/test/ui/variance/variance-invariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-invariant-arg-object.stderr
@@ -9,12 +9,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 7:21...
   --> $DIR/variance-invariant-arg-object.rs:7:21
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 7:27
   --> $DIR/variance-invariant-arg-object.rs:7:27
    |
-LL | fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
+LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
    |                           ^^^^
 
 error[E0308]: mismatched types
@@ -28,12 +28,12 @@ LL |     v
 note: the lifetime 'min as defined on the function body at 14:21...
   --> $DIR/variance-invariant-arg-object.rs:14:21
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                     ^^^^
 note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 14:27
   --> $DIR/variance-invariant-arg-object.rs:14:27
    |
-LL | fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
+LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
    |                           ^^^^
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/variance/variance-object-types.rs b/src/test/ui/variance/variance-object-types.rs
index 12af7ae8c5b..14e11f681b1 100644
--- a/src/test/ui/variance/variance-object-types.rs
+++ b/src/test/ui/variance/variance-object-types.rs
@@ -9,7 +9,7 @@ use std::cell::Cell;
 // get an invariant result for `'a`.
 #[rustc_variance]
 struct Foo<'a> { //~ ERROR [o]
-    x: Box<Fn(i32) -> &'a i32 + 'static>
+    x: Box<dyn Fn(i32) -> &'a i32 + 'static>
 }
 
 fn main() {
diff --git a/src/test/ui/variance/variance-object-types.stderr b/src/test/ui/variance/variance-object-types.stderr
index be94a727a8d..d97d222e711 100644
--- a/src/test/ui/variance/variance-object-types.stderr
+++ b/src/test/ui/variance/variance-object-types.stderr
@@ -2,7 +2,7 @@ error[E0208]: [o]
   --> $DIR/variance-object-types.rs:11:1
    |
 LL | / struct Foo<'a> {
-LL | |     x: Box<Fn(i32) -> &'a i32 + 'static>
+LL | |     x: Box<dyn Fn(i32) -> &'a i32 + 'static>
 LL | | }
    | |_^
 
diff --git a/src/test/ui/variance/variance-trait-object-bound.rs b/src/test/ui/variance/variance-trait-object-bound.rs
index ada93b7f6ef..ec3c973bc76 100644
--- a/src/test/ui/variance/variance-trait-object-bound.rs
+++ b/src/test/ui/variance/variance-trait-object-bound.rs
@@ -12,7 +12,7 @@ trait T { fn foo(&self); }
 
 #[rustc_variance]
 struct TOption<'a> { //~ ERROR [-]
-    v: Option<Box<T + 'a>>,
+    v: Option<Box<dyn T + 'a>>,
 }
 
 fn main() { }
diff --git a/src/test/ui/variance/variance-trait-object-bound.stderr b/src/test/ui/variance/variance-trait-object-bound.stderr
index 503c087fb4d..fb0fab1950c 100644
--- a/src/test/ui/variance/variance-trait-object-bound.stderr
+++ b/src/test/ui/variance/variance-trait-object-bound.stderr
@@ -2,7 +2,7 @@ error[E0208]: [-]
   --> $DIR/variance-trait-object-bound.rs:14:1
    |
 LL | / struct TOption<'a> {
-LL | |     v: Option<Box<T + 'a>>,
+LL | |     v: Option<Box<dyn T + 'a>>,
 LL | | }
    | |_^
 
diff --git a/src/test/ui/variance/variance-types-bounds.rs b/src/test/ui/variance/variance-types-bounds.rs
index 5cbda10fbde..d1814dd97a0 100644
--- a/src/test/ui/variance/variance-types-bounds.rs
+++ b/src/test/ui/variance/variance-types-bounds.rs
@@ -36,8 +36,8 @@ trait Setter<A> {
 
 #[rustc_variance]
 struct TestObject<A, R> { //~ ERROR [o, o]
-    n: Box<Setter<A>+Send>,
-    m: Box<Getter<R>+Send>,
+    n: Box<dyn Setter<A>+Send>,
+    m: Box<dyn Getter<R>+Send>,
 }
 
 fn main() {}
diff --git a/src/test/ui/variance/variance-types-bounds.stderr b/src/test/ui/variance/variance-types-bounds.stderr
index 8e3e0515aec..5cffdffc7f2 100644
--- a/src/test/ui/variance/variance-types-bounds.stderr
+++ b/src/test/ui/variance/variance-types-bounds.stderr
@@ -37,8 +37,8 @@ error[E0208]: [o, o]
   --> $DIR/variance-types-bounds.rs:38:1
    |
 LL | / struct TestObject<A, R> {
-LL | |     n: Box<Setter<A>+Send>,
-LL | |     m: Box<Getter<R>+Send>,
+LL | |     n: Box<dyn Setter<A>+Send>,
+LL | |     m: Box<dyn Getter<R>+Send>,
 LL | | }
    | |_^
 
diff --git a/src/test/ui/wf/wf-in-obj-type-static.rs b/src/test/ui/wf/wf-in-obj-type-static.rs
index 858a75ab1ab..1ad2fd1edb3 100644
--- a/src/test/ui/wf/wf-in-obj-type-static.rs
+++ b/src/test/ui/wf/wf-in-obj-type-static.rs
@@ -11,7 +11,7 @@ struct MustBeCopy<T:Copy> {
 
 struct Foo<T> {
     // needs T: 'static
-    x: Object<&'static T> //~ ERROR E0310
+    x: dyn Object<&'static T> //~ ERROR E0310
 }
 
 
diff --git a/src/test/ui/wf/wf-in-obj-type-static.stderr b/src/test/ui/wf/wf-in-obj-type-static.stderr
index cc06b9243f7..c461da76a25 100644
--- a/src/test/ui/wf/wf-in-obj-type-static.stderr
+++ b/src/test/ui/wf/wf-in-obj-type-static.stderr
@@ -4,14 +4,14 @@ error[E0310]: the parameter type `T` may not live long enough
 LL | struct Foo<T> {
    |            - help: consider adding an explicit lifetime bound `T: 'static`...
 LL |     // needs T: 'static
-LL |     x: Object<&'static T>
-   |     ^^^^^^^^^^^^^^^^^^^^^
+LL |     x: dyn Object<&'static T>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...so that the reference type `&'static T` does not outlive the data it points at
   --> $DIR/wf-in-obj-type-static.rs:14:5
    |
-LL |     x: Object<&'static T>
-   |     ^^^^^^^^^^^^^^^^^^^^^
+LL |     x: dyn Object<&'static T>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/wf/wf-in-obj-type-trait.rs b/src/test/ui/wf/wf-in-obj-type-trait.rs
index fad1da199ea..170fad55f8f 100644
--- a/src/test/ui/wf/wf-in-obj-type-trait.rs
+++ b/src/test/ui/wf/wf-in-obj-type-trait.rs
@@ -8,7 +8,7 @@ struct MustBeCopy<T:Copy> {
 
 struct Bar<T> {
     // needs T: Copy
-    x: Object<MustBeCopy<T>> //~ ERROR E0277
+    x: dyn Object<MustBeCopy<T>> //~ ERROR E0277
 }
 
 fn main() { }
diff --git a/src/test/ui/wf/wf-in-obj-type-trait.stderr b/src/test/ui/wf/wf-in-obj-type-trait.stderr
index 94b3de78898..2c85dd042e7 100644
--- a/src/test/ui/wf/wf-in-obj-type-trait.stderr
+++ b/src/test/ui/wf/wf-in-obj-type-trait.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
   --> $DIR/wf-in-obj-type-trait.rs:11:5
    |
-LL |     x: Object<MustBeCopy<T>>
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
+LL |     x: dyn Object<MustBeCopy<T>>
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
    |
    = help: consider adding a `where T: std::marker::Copy` bound
 note: required by `MustBeCopy`
diff --git a/src/test/ui/wf/wf-object-safe.rs b/src/test/ui/wf/wf-object-safe.rs
index 08f68f6c004..42e6917551f 100644
--- a/src/test/ui/wf/wf-object-safe.rs
+++ b/src/test/ui/wf/wf-object-safe.rs
@@ -6,5 +6,5 @@ trait A {
 }
 
 fn main() {
-    let _x: &A; //~ ERROR E0038
+    let _x: &dyn A; //~ ERROR E0038
 }
diff --git a/src/test/ui/wf/wf-object-safe.stderr b/src/test/ui/wf/wf-object-safe.stderr
index 87e8105d4af..3b264ecd580 100644
--- a/src/test/ui/wf/wf-object-safe.stderr
+++ b/src/test/ui/wf/wf-object-safe.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `A` cannot be made into an object
   --> $DIR/wf-object-safe.rs:9:13
    |
-LL |     let _x: &A;
-   |             ^^ the trait `A` cannot be made into an object
+LL |     let _x: &dyn A;
+   |             ^^^^^^ the trait `A` cannot be made into an object
    |
    = note: method `foo` references the `Self` type in its arguments or return type
 
diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs
index ac95cbab1f7..85a332e244f 100644
--- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs
+++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs
@@ -16,7 +16,7 @@ struct Foo<'a,T> {
 trait Baz<T> { }
 
 impl<'a, T> Trait<'a, T> for u32 {
-    type Out = &'a Baz<T>; //~ ERROR `T` may not live long enough
+    type Out = &'a dyn Baz<T>; //~ ERROR `T` may not live long enough
 }
 
 fn main() { }
diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
index 8649506c870..f1cf514e6b2 100644
--- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
+++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
@@ -17,14 +17,14 @@ error[E0309]: the parameter type `T` may not live long enough
    |
 LL | impl<'a, T> Trait<'a, T> for u32 {
    |          - help: consider adding an explicit lifetime bound `T: 'a`...
-LL |     type Out = &'a Baz<T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+LL |     type Out = &'a dyn Baz<T>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
   --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5
    |
-LL |     type Out = &'a Baz<T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+LL |     type Out = &'a dyn Baz<T>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/where-clauses/where-lifetime-resolution.rs b/src/test/ui/where-clauses/where-lifetime-resolution.rs
index 4c46a77ae29..0d426386768 100644
--- a/src/test/ui/where-clauses/where-lifetime-resolution.rs
+++ b/src/test/ui/where-clauses/where-lifetime-resolution.rs
@@ -2,10 +2,10 @@ trait Trait1<'a> {}
 trait Trait2<'a, 'b> {}
 
 fn f() where
-    for<'a> Trait1<'a>: Trait1<'a>, // OK
-    (for<'a> Trait1<'a>): Trait1<'a>,
+    for<'a> dyn Trait1<'a>: Trait1<'a>, // OK
+    (dyn for<'a> Trait1<'a>): Trait1<'a>,
     //~^ ERROR use of undeclared lifetime name `'a`
-    for<'a> for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
+    for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
     //~^ ERROR use of undeclared lifetime name `'b`
     //~| ERROR nested quantification of lifetimes
 {}
diff --git a/src/test/ui/where-clauses/where-lifetime-resolution.stderr b/src/test/ui/where-clauses/where-lifetime-resolution.stderr
index babf8efc23f..0081ae07163 100644
--- a/src/test/ui/where-clauses/where-lifetime-resolution.stderr
+++ b/src/test/ui/where-clauses/where-lifetime-resolution.stderr
@@ -1,20 +1,20 @@
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/where-lifetime-resolution.rs:6:34
+  --> $DIR/where-lifetime-resolution.rs:6:38
    |
-LL |     (for<'a> Trait1<'a>): Trait1<'a>,
-   |                                  ^^ undeclared lifetime
+LL |     (dyn for<'a> Trait1<'a>): Trait1<'a>,
+   |                                      ^^ undeclared lifetime
 
 error[E0316]: nested quantification of lifetimes
-  --> $DIR/where-lifetime-resolution.rs:8:13
+  --> $DIR/where-lifetime-resolution.rs:8:17
    |
-LL |     for<'a> for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
-   |             ^^^^^^^^^^^^^^^^^^^^^^
+LL |     for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
+   |                 ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/where-lifetime-resolution.rs:8:48
+  --> $DIR/where-lifetime-resolution.rs:8:52
    |
-LL |     for<'a> for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
-   |                                                ^^ undeclared lifetime
+LL |     for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
+   |                                                    ^^ undeclared lifetime
 
 error: aborting due to 3 previous errors