2023-01-14 03:03:25 -06:00
|
|
|
#![warn(unused)]
|
|
|
|
#![deny(warnings)]
|
|
|
|
|
|
|
|
struct Inv<'a>(&'a mut &'a ());
|
|
|
|
|
|
|
|
trait Trait<'a> {}
|
|
|
|
impl<'b> Trait<'b> for for<'a> fn(Inv<'a>) {}
|
|
|
|
|
|
|
|
fn with_bound()
|
|
|
|
where
|
|
|
|
for<'b> (for<'a> fn(Inv<'a>)): Trait<'b>, //~ ERROR unnecessary parentheses around type
|
|
|
|
{}
|
|
|
|
|
2023-01-16 06:44:14 -06:00
|
|
|
trait Hello<T> {}
|
|
|
|
fn with_dyn_bound<T>()
|
|
|
|
where
|
|
|
|
(dyn Hello<(for<'b> fn(&'b ()))>): Hello<T> //~ ERROR unnecessary parentheses around type
|
|
|
|
{}
|
|
|
|
|
2023-01-14 03:03:25 -06:00
|
|
|
fn main() {
|
|
|
|
with_bound();
|
2023-01-16 06:44:14 -06:00
|
|
|
with_dyn_bound();
|
2023-01-14 03:03:25 -06:00
|
|
|
}
|