about summary refs log tree commit diff
diff options
context:
space:
mode:
authormemoryruins <memoryruinsmusic@gmail.com>2019-05-28 14:47:21 -0400
committermemoryruins <memoryruinsmusic@gmail.com>2019-05-29 00:57:42 -0400
commitf19f4545b1674e6d16b9ec81a2358d615bb6a786 (patch)
tree8f679f2bb281ddd6d89fc614dc466f865b502ccd
parenteb4580a570069175e1290b294d91042a09f9fde3 (diff)
downloadrust-f19f4545b1674e6d16b9ec81a2358d615bb6a786.tar.gz
rust-f19f4545b1674e6d16b9ec81a2358d615bb6a786.zip
Update run-pass test suite to use dyn
-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
208 files changed, 502 insertions, 502 deletions
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) {
 }