about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/ordering.rs
blob: 20638e0a623eae62808c28e2ad470265e19bfe11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn lt<'a>() -> impl Sized + use<'a, 'a> {}
//~^ ERROR cannot capture parameter `'a` twice

fn ty<T>() -> impl Sized + use<T, T> {}
//~^ ERROR cannot capture parameter `T` twice

fn ct<const N: usize>() -> impl Sized + use<N, N> {}
//~^ ERROR cannot capture parameter `N` twice

fn ordering<'a, T>() -> impl Sized + use<T, 'a> {}
//~^ ERROR lifetime parameter `'a` must be listed before non-lifetime parameters

fn main() {}