rust/tests/ui/impl-trait/precise-capturing/ordering.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
424 B
Rust
Raw Permalink Normal View History

2024-06-05 20:18:52 +00:00
fn lt<'a>() -> impl Sized + use<'a, 'a> {}
2024-04-04 19:06:30 +00:00
//~^ ERROR cannot capture parameter `'a` twice
2024-06-05 20:18:52 +00:00
fn ty<T>() -> impl Sized + use<T, T> {}
2024-04-04 19:06:30 +00:00
//~^ ERROR cannot capture parameter `T` twice
2024-06-05 20:18:52 +00:00
fn ct<const N: usize>() -> impl Sized + use<N, N> {}
2024-04-04 19:06:30 +00:00
//~^ ERROR cannot capture parameter `N` twice
2024-06-05 20:18:52 +00:00
fn ordering<'a, T>() -> impl Sized + use<T, 'a> {}
2024-04-04 19:06:30 +00:00
//~^ ERROR lifetime parameter `'a` must be listed before non-lifetime parameters
fn main() {}