2023-01-14 09:03:25 +00:00
|
|
|
#![warn(unused)]
|
|
|
|
#![deny(warnings)]
|
|
|
|
|
2023-12-27 22:11:58 +00:00
|
|
|
struct Inv<'a>(#[allow(dead_code)] &'a mut &'a ());
|
2023-01-14 09:03:25 +00:00
|
|
|
|
|
|
|
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 12:44:14 +00: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 09:03:25 +00:00
|
|
|
fn main() {
|
|
|
|
with_bound();
|
2023-01-16 12:44:14 +00:00
|
|
|
with_dyn_bound();
|
2023-01-14 09:03:25 +00:00
|
|
|
}
|