update tests

This commit is contained in:
Bastian Kauschke 2020-07-27 16:41:27 +02:00
parent 33a05b40f7
commit 952fd0ce58
2 changed files with 10 additions and 1 deletions

View file

@ -6,5 +6,6 @@ struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
// FIXME(const_generics:defaults): We still don't know how to we deal with type defaults.
struct Bar<T = [u8; N], const N: usize>(T);
//~^ ERROR constant values inside of type parameter defaults
//~| ERROR type parameters with a default
fn main() {}

View file

@ -1,3 +1,11 @@
error: type parameters with a default must be trailing
--> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:7:12
|
LL | struct Bar<T = [u8; N], const N: usize>(T);
| ^
|
= note: using type defaults and const parameters in the same parameter list is currently not permitted
error: constant values inside of type parameter defaults must not depend on generic parameters
--> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:3:44
|
@ -19,5 +27,5 @@ 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 2 previous errors; 1 warning emitted
error: aborting due to 3 previous errors; 1 warning emitted