Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jan 30, 2024
1 parent fef38a6 commit dc050f6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/ui/traits/next-solver/normalize-region-obligations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// revisions: normalize_param_env normalize_obligation
// check-pass
// compile-flags: -Znext-solver

trait Foo {
#[cfg(normalize_param_env)]
type Gat<'a> where <Self as Mirror>::Assoc: 'a;
#[cfg(normalize_obligation)]
type Gat<'a> where Self: 'a;
}

trait Mirror { type Assoc: ?Sized; }
impl<T: ?Sized> Mirror for T { type Assoc = T; }

impl<T> Foo for T {
#[cfg(normalize_param_env)]
type Gat<'a> = i32 where T: 'a;
#[cfg(normalize_obligation)]
type Gat<'a> = i32 where <T as Mirror>::Assoc: 'a;
}

fn main() {}

0 comments on commit dc050f6

Please sign in to comment.