From 952fd0ce5867ea65c8d760ae66e900d49669a719 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Mon, 27 Jul 2020 16:41:27 +0200 Subject: [PATCH] update tests --- .../params-in-ct-in-ty-param-lazy-norm.rs | 1 + .../params-in-ct-in-ty-param-lazy-norm.stderr | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 c118fa7acc4e..84bbea5b8805 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); // FIXME(const_generics:defaults): We still don't know how to we deal with type defaults. struct Bar(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 8e6676b01f11..571be91683b7 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); + | ^ + | + = 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 for more information -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 3 previous errors; 1 warning emitted