about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-07-27 16:41:27 +0200
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-07-27 16:41:27 +0200
commit952fd0ce5867ea65c8d760ae66e900d49669a719 (patch)
treeeb39f3d0065561c4caf916f2502765ce17632459 /src
parent33a05b40f7bb077221e567243ada983deabd2261 (diff)
downloadrust-952fd0ce5867ea65c8d760ae66e900d49669a719.tar.gz
rust-952fd0ce5867ea65c8d760ae66e900d49669a719.zip
update tests
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs1
-rw-r--r--src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs
index c118fa7acc4..84bbea5b880 100644
--- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs
+++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs
@@ -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() {}
diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr
index 8e6676b01f1..571be91683b 100644
--- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr
+++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.stderr
@@ -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