diff options
Diffstat (limited to 'tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs')
| -rw-r--r-- | tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs new file mode 100644 index 00000000000..dfdb816652c --- /dev/null +++ b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs @@ -0,0 +1,12 @@ +//@ compile-flags: -Zdeduplicate-diagnostics=yes + +// Regression test for #146467. +trait Trait { type Assoc; } + +impl Trait for fn(&()) { type Assoc = (); } + +fn f(_: for<'a> fn(<fn(&'a ()) as Trait>::Assoc)) {} +//~^ ERROR implementation of `Trait` is not general enough +//~| ERROR higher-ranked subtype error + +fn main() {} |
