Skip to content

Commit

Permalink
Fixing tests from anon -> opaque
Browse files Browse the repository at this point in the history
  • Loading branch information
ms2300 committed Sep 5, 2018
1 parent 6c14360 commit 5648d07
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
Expand Down
10 changes: 1 addition & 9 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/constrained_type_params.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion src/llvm
Submodule llvm updated 2350 files
Original file line number Diff line number Diff line change
Expand Up @@ -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}>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/impl-trait/equality2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/impl-trait/equality2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 5648d07

Please sign in to comment.