]> git.lizzy.rs Git - rust.git/blob - tests/ui/attributes/attrs-with-no-formal-in-generics-3.rs
Move /src/test to /tests
[rust.git] / tests / ui / attributes / attrs-with-no-formal-in-generics-3.rs
1 // This test checks variations on `<#[attr] 'a, #[oops]>`, where
2 // `#[oops]` is left dangling (that is, it is unattached, with no
3 // formal binding following it).
4
5 struct RefIntPair<'a, 'b>(&'a u32, &'b u32);
6
7 fn hof_lt<Q>(_: Q)
8     where Q: for <#[allow(unused)] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
9     //~^ ERROR trailing attribute after generic parameter
10 {}
11
12 fn main() {}