summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/ordering.rs
blob: 2bace798c570206aed2900a7a28d2486138cab2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(precise_capturing)]
//~^ WARN the feature `precise_capturing` is incomplete

fn lt<'a>() -> impl use<'a, 'a> Sized {}
//~^ ERROR cannot capture parameter `'a` twice

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

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

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

fn main() {}