test usage

This commit is contained in:
Bastian Kauschke 2020-07-23 14:30:01 +02:00
parent 9910f156df
commit 5f1eea93a9
2 changed files with 15 additions and 2 deletions

View file

@ -13,4 +13,7 @@ struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
b: &'b U,
}
fn main() { }
fn main() {
let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
//~^ ERROR lifetime provided when a type was expected
}

View file

@ -25,5 +25,15 @@ LL | #![feature(const_generics)]
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: aborting due to 3 previous errors; 1 warning emitted
error[E0747]: lifetime provided when a type was expected
--> $DIR/argument_order.rs:17:23
|
LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
| ^^^^^^^
|
= note: lifetime arguments must be provided before type arguments
= help: reorder the arguments: lifetimes, then types, then consts: `<'a, 'b, T, U, N, M>`
error: aborting due to 4 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0747`.