Skip to content

Commit f4d4faa

Browse files
committed
Fixing tests from anon -> opaque
1 parent 6c14360 commit f4d4faa

9 files changed

+10
-18
lines changed

src/librustc_mir/transform/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn check_ty(
100100
span,
101101
"mutable references in const fn are unstable".into(),
102102
)),
103-
ty::Anon(..) => return Err((span, "`impl Trait` in const fn is unstable".into())),
103+
ty::Opaque(..) => return Err((span, "`impl Trait` in const fn is unstable".into())),
104104
ty::FnPtr(..) => {
105105
return Err((span, "function pointers in const fn are unstable".into()))
106106
}

src/librustc_typeck/collect.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1646,21 +1646,13 @@ fn explicit_predicates_of<'a, 'tcx>(
16461646
let opaque_ty = tcx.mk_opaque(def_id, substs);
16471647

16481648
// Collect the bounds, i.e. the `A+B+'c` in `impl A+B+'c`.
1649-
<<<<<<< HEAD
16501649
let bounds = compute_bounds(
16511650
&icx,
1652-
anon_ty,
1651+
opaque_ty,
16531652
bounds,
16541653
SizedByDefault::Yes,
16551654
tcx.def_span(def_id),
16561655
);
1657-
=======
1658-
let bounds = compute_bounds(&icx,
1659-
opaque_ty,
1660-
bounds,
1661-
SizedByDefault::Yes,
1662-
tcx.def_span(def_id));
1663-
>>>>>>> ca386bc20a... Changing TyAnon -> TyOpaque and relevant functions
16641656

16651657
predicates.extend(bounds.predicates(tcx, opaque_ty));
16661658
&item.generics

src/librustc_typeck/constrained_type_params.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//n Copyright 2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//

src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/generic_type_does_not_live_long_enough.rs:16:18
33
|
44
LL | let z: i32 = x; //~ ERROR mismatched types
5-
| ^ expected i32, found anonymized type
5+
| ^ expected i32, found opaque type
66
|
77
= note: expected type `i32`
88
found type `WrongGeneric::<&{integer}>`

src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/generic_type_does_not_live_long_enough.rs:16:18
33
|
44
LL | let z: i32 = x; //~ ERROR mismatched types
5-
| ^ expected i32, found anonymized type
5+
| ^ expected i32, found opaque type
66
|
77
= note: expected type `i32`
88
found type `WrongGeneric::<&{integer}>`

src/test/ui/existential_types/never_reveal_concrete_type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/never_reveal_concrete_type.rs:24:27
33
|
44
LL | let _: &'static str = x; //~ mismatched types
5-
| ^ expected reference, found anonymized type
5+
| ^ expected reference, found opaque type
66
|
77
= note: expected type `&'static str`
88
found type `NoReveal`

src/test/ui/existential_types/no_revealing_outside_defining_module.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/no_revealing_outside_defining_module.rs:26:19
33
|
44
LL | let _: &str = bomp(); //~ ERROR mismatched types
5-
| ^^^^^^ expected &str, found anonymized type
5+
| ^^^^^^ expected &str, found opaque type
66
|
77
= note: expected type `&str`
88
found type `Boo`
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
1313
LL | fn bomp() -> boo::Boo {
1414
| -------- expected `Boo` because of return type
1515
LL | "" //~ ERROR mismatched types
16-
| ^^ expected anonymized type, found reference
16+
| ^^ expected opaque type, found reference
1717
|
1818
= note: expected type `Boo`
1919
found type `&'static str`

src/test/ui/impl-trait/equality2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn main() {
3636
//~^ ERROR mismatched types
3737
//~| expected type `u32`
3838
//~| found type `impl Foo`
39-
//~| expected u32, found anonymized type
39+
//~| expected u32, found opaque type
4040

4141
let _: i32 = Leak::leak(hide(0_i32));
4242
//~^ ERROR mismatched types

src/test/ui/impl-trait/equality2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/equality2.rs:35:18
33
|
44
LL | let _: u32 = hide(0_u32);
5-
| ^^^^^^^^^^^ expected u32, found anonymized type
5+
| ^^^^^^^^^^^ expected u32, found opaque type
66
|
77
= note: expected type `u32`
88
found type `impl Foo`

0 commit comments

Comments
 (0)