Skip to content

Commit 952fd0c

Browse files
committed
update tests
1 parent 33a05b4 commit 952fd0c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
66
// FIXME(const_generics:defaults): We still don't know how to we deal with type defaults.
77
struct Bar<T = [u8; N], const N: usize>(T);
88
//~^ ERROR constant values inside of type parameter defaults
9+
//~| ERROR type parameters with a default
910

1011
fn main() {}

src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
error: type parameters with a default must be trailing
2+
--> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:7:12
3+
|
4+
LL | struct Bar<T = [u8; N], const N: usize>(T);
5+
| ^
6+
|
7+
= note: using type defaults and const parameters in the same parameter list is currently not permitted
8+
19
error: constant values inside of type parameter defaults must not depend on generic parameters
210
--> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:3:44
311
|
@@ -19,5 +27,5 @@ LL | #![feature(const_generics)]
1927
= note: `#[warn(incomplete_features)]` on by default
2028
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
2129

22-
error: aborting due to 2 previous errors; 1 warning emitted
30+
error: aborting due to 3 previous errors; 1 warning emitted
2331

0 commit comments

Comments
 (0)