mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Add a test
This commit is contained in:
parent
fef38a6337
commit
dc050f6d5b
22
tests/ui/traits/next-solver/normalize-region-obligations.rs
Normal file
22
tests/ui/traits/next-solver/normalize-region-obligations.rs
Normal file
@ -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() {}
|
Loading…
Reference in New Issue
Block a user