Skip to content

Commit

Permalink
Some test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 23, 2022
1 parent e9d219e commit e237aae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/outlives/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub(crate) fn insert_outlives_predicate<'tcx>(
// struct Ss<'a, T>(&'a Opaque<T>);
// ```
//
// Here we want to require an explicit `where Opaque<T>: 'a`
// Here we want to have an implied bound `Opaque<T>: 'a`

let ty = tcx.mk_opaque(def_id, substs);
required_predicates
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/generic-associated-types/issue-86218-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ trait Yay<AdditionalValue> {

impl<T> Yay<T> for () {
type InnerStream<'s> = impl Stream<Item = i32> + 's;
//^ ERROR does not fulfill the required lifetime
fn foo<'s>() -> Self::InnerStream<'s> { () }
}

Expand Down
13 changes: 0 additions & 13 deletions src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check2.rs

This file was deleted.

6 changes: 6 additions & 0 deletions src/test/ui/type-alias-impl-trait/unbounded_opaque_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ type Opaque<T> = impl Sized;
fn defining<T>() -> Opaque<T> {}
struct Ss<'a, T>(&'a Opaque<T>);


fn test<'a, T>(_: Ss<'a, T>) {
// test that we have an implied bound `Opaque<T>: 'a` from fn signature
None::<&'a Opaque<T>>;
}

fn main() {}

0 comments on commit e237aae

Please sign in to comment.