about summary refs log tree commit diff
diff options
context:
space:
mode:
authorms2300 <matt.sewall@gmail.com>2018-08-25 11:53:26 -0600
committerms2300 <matt.sewall@gmail.com>2018-09-06 11:43:31 -0600
commitf4d4faaeedbdb7271221c9b48fd809a5e8469445 (patch)
tree447f78248766e0a86184b2e22d2382136b41e8a1
parent6c14360c327a2513560fd8a238bc42ded011bb51 (diff)
downloadrust-f4d4faaeedbdb7271221c9b48fd809a5e8469445.tar.gz
rust-f4d4faaeedbdb7271221c9b48fd809a5e8469445.zip
Fixing tests from anon -> opaque
-rw-r--r--src/librustc_mir/transform/qualify_min_const_fn.rs2
-rw-r--r--src/librustc_typeck/collect.rs10
-rw-r--r--src/librustc_typeck/constrained_type_params.rs2
-rw-r--r--src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr2
-rw-r--r--src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr2
-rw-r--r--src/test/ui/existential_types/never_reveal_concrete_type.stderr2
-rw-r--r--src/test/ui/existential_types/no_revealing_outside_defining_module.stderr4
-rw-r--r--src/test/ui/impl-trait/equality2.rs2
-rw-r--r--src/test/ui/impl-trait/equality2.stderr2
9 files changed, 10 insertions, 18 deletions
diff --git a/src/librustc_mir/transform/qualify_min_const_fn.rs b/src/librustc_mir/transform/qualify_min_const_fn.rs
index 56e32ea5d1a..eacc23c9c4f 100644
--- a/src/librustc_mir/transform/qualify_min_const_fn.rs
+++ b/src/librustc_mir/transform/qualify_min_const_fn.rs
@@ -100,7 +100,7 @@ fn check_ty(
                 span,
                 "mutable references in const fn are unstable".into(),
             )),
-            ty::Anon(..) => return Err((span, "`impl Trait` in const fn is unstable".into())),
+            ty::Opaque(..) => return Err((span, "`impl Trait` in const fn is unstable".into())),
             ty::FnPtr(..) => {
                 return Err((span, "function pointers in const fn are unstable".into()))
             }
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 2a01ac555ae..702af3d221b 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -1646,21 +1646,13 @@ fn explicit_predicates_of<'a, 'tcx>(
                 let opaque_ty = tcx.mk_opaque(def_id, substs);
 
                 // Collect the bounds, i.e. the `A+B+'c` in `impl A+B+'c`.
-<<<<<<< HEAD
                 let bounds = compute_bounds(
                     &icx,
-                    anon_ty,
+                    opaque_ty,
                     bounds,
                     SizedByDefault::Yes,
                     tcx.def_span(def_id),
                 );
-=======
-                let bounds = compute_bounds(&icx,
-                                            opaque_ty,
-                                            bounds,
-                                            SizedByDefault::Yes,
-                                            tcx.def_span(def_id));
->>>>>>> ca386bc20a... Changing TyAnon -> TyOpaque and relevant functions
 
                 predicates.extend(bounds.predicates(tcx, opaque_ty));
                 &item.generics
diff --git a/src/librustc_typeck/constrained_type_params.rs b/src/librustc_typeck/constrained_type_params.rs
index 07f6fa5e8ad..1b481fc5a7d 100644
--- a/src/librustc_typeck/constrained_type_params.rs
+++ b/src/librustc_typeck/constrained_type_params.rs
@@ -1,4 +1,4 @@
-//n Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr
index a480f54ac18..471eda45daf 100644
--- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr
+++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/generic_type_does_not_live_long_enough.rs:16:18
    |
 LL |     let z: i32 = x; //~ ERROR mismatched types
-   |                  ^ expected i32, found anonymized type
+   |                  ^ expected i32, found opaque type
    |
    = note: expected type `i32`
               found type `WrongGeneric::<&{integer}>`
diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr
index 189ad7d49a4..f1773b7c2fc 100644
--- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr
+++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/generic_type_does_not_live_long_enough.rs:16:18
    |
 LL |     let z: i32 = x; //~ ERROR mismatched types
-   |                  ^ expected i32, found anonymized type
+   |                  ^ expected i32, found opaque type
    |
    = note: expected type `i32`
               found type `WrongGeneric::<&{integer}>`
diff --git a/src/test/ui/existential_types/never_reveal_concrete_type.stderr b/src/test/ui/existential_types/never_reveal_concrete_type.stderr
index 449799c91b7..ab937a9483c 100644
--- a/src/test/ui/existential_types/never_reveal_concrete_type.stderr
+++ b/src/test/ui/existential_types/never_reveal_concrete_type.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/never_reveal_concrete_type.rs:24:27
    |
 LL |     let _: &'static str = x; //~ mismatched types
-   |                           ^ expected reference, found anonymized type
+   |                           ^ expected reference, found opaque type
    |
    = note: expected type `&'static str`
               found type `NoReveal`
diff --git a/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr b/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr
index a1c98c6d4b8..3f03174a491 100644
--- a/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr
+++ b/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/no_revealing_outside_defining_module.rs:26:19
    |
 LL |     let _: &str = bomp(); //~ ERROR mismatched types
-   |                   ^^^^^^ expected &str, found anonymized type
+   |                   ^^^^^^ expected &str, found opaque type
    |
    = note: expected type `&str`
               found type `Boo`
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
 LL | fn bomp() -> boo::Boo {
    |              -------- expected `Boo` because of return type
 LL |     "" //~ ERROR mismatched types
-   |     ^^ expected anonymized type, found reference
+   |     ^^ expected opaque type, found reference
    |
    = note: expected type `Boo`
               found type `&'static str`
diff --git a/src/test/ui/impl-trait/equality2.rs b/src/test/ui/impl-trait/equality2.rs
index ec3dc15d846..2ce24cf789d 100644
--- a/src/test/ui/impl-trait/equality2.rs
+++ b/src/test/ui/impl-trait/equality2.rs
@@ -36,7 +36,7 @@ fn main() {
     //~^ ERROR mismatched types
     //~| expected type `u32`
     //~| found type `impl Foo`
-    //~| expected u32, found anonymized type
+    //~| expected u32, found opaque type
 
     let _: i32 = Leak::leak(hide(0_i32));
     //~^ ERROR mismatched types
diff --git a/src/test/ui/impl-trait/equality2.stderr b/src/test/ui/impl-trait/equality2.stderr
index e4ff2f68247..da51e35947a 100644
--- a/src/test/ui/impl-trait/equality2.stderr
+++ b/src/test/ui/impl-trait/equality2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/equality2.rs:35:18
    |
 LL |     let _: u32 = hide(0_u32);
-   |                  ^^^^^^^^^^^ expected u32, found anonymized type
+   |                  ^^^^^^^^^^^ expected u32, found opaque type
    |
    = note: expected type `u32`
               found type `impl Foo`