From 19003517cea93d337df071e191ecd57259543cd4 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Fri, 4 Dec 2020 12:21:33 +0100 Subject: [PATCH] Fix UI tests for 'const expression' change --- .../parse/trait-path-missing-gen_arg.rs | 4 ++-- .../parse/trait-path-missing-gen_arg.stderr | 8 ++++---- src/test/ui/issues/issue-20616-3.rs | 2 +- src/test/ui/issues/issue-20616-3.stderr | 4 ++-- src/test/ui/issues/issue-20616-4.rs | 2 +- src/test/ui/issues/issue-20616-4.stderr | 4 ++-- src/test/ui/issues/issue-20616-5.rs | 2 +- src/test/ui/issues/issue-20616-5.stderr | 4 ++-- src/test/ui/issues/issue-20616-6.rs | 2 +- src/test/ui/issues/issue-20616-6.stderr | 4 ++-- src/test/ui/issues/issue-20616-7.rs | 2 +- src/test/ui/issues/issue-20616-7.stderr | 4 ++-- src/test/ui/parser/removed-syntax-uniq-mut-ty.rs | 2 +- src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr | 4 ++-- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs index dad8c2a2909..94dda17aad7 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs @@ -7,7 +7,7 @@ trait X { const _: () = { fn f1<'a>(arg : Box>) {} - //~^ ERROR: expected one of `>`, const, lifetime, or type, found `:` + //~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `:` //~| ERROR: expected parameter name, found `>` //~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>` //~| ERROR: constant provided when a type was expected @@ -15,7 +15,7 @@ const _: () = { const _: () = { fn f1<'a>(arg : Box>) {} - //~^ ERROR: expected one of `>`, const, lifetime, or type, found `=` + //~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `=` }; fn main() {} diff --git a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr index 583697f0b67..8a5e2c29c36 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `:` +error: expected one of `>`, a const expression, lifetime, or type, found `:` --> $DIR/trait-path-missing-gen_arg.rs:9:30 | LL | fn f1<'a>(arg : Box>) {} - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type | help: expressions must be enclosed in braces to be used as const generic arguments | @@ -24,11 +24,11 @@ LL | fn f1<'a>(arg : Box>) {} | expected one of `!`, `)`, `+`, `,`, or `::` | help: missing `,` -error: expected one of `>`, const, lifetime, or type, found `=` +error: expected one of `>`, a const expression, lifetime, or type, found `=` --> $DIR/trait-path-missing-gen_arg.rs:17:30 | LL | fn f1<'a>(arg : Box>) {} - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/trait-path-missing-gen_arg.rs:1:12 diff --git a/src/test/ui/issues/issue-20616-3.rs b/src/test/ui/issues/issue-20616-3.rs index 780038c11b8..b2371051c78 100644 --- a/src/test/ui/issues/issue-20616-3.rs +++ b/src/test/ui/issues/issue-20616-3.rs @@ -11,7 +11,7 @@ type Type_1_<'a, T> = &'a T; type Type_3 = Box; -//~^ error: expected one of `>`, const, lifetime, or type, found `,` +//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,` //type Type_4 = Type_1_<'static,, T>; // error: expected type, found `,` diff --git a/src/test/ui/issues/issue-20616-3.stderr b/src/test/ui/issues/issue-20616-3.stderr index 2f8cf8a79ed..b535c7a3267 100644 --- a/src/test/ui/issues/issue-20616-3.stderr +++ b/src/test/ui/issues/issue-20616-3.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `,` +error: expected one of `>`, a const expression, lifetime, or type, found `,` --> $DIR/issue-20616-3.rs:13:24 | LL | type Type_3 = Box; - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20616-4.rs b/src/test/ui/issues/issue-20616-4.rs index 85aa9c1146d..a71f47ca4bf 100644 --- a/src/test/ui/issues/issue-20616-4.rs +++ b/src/test/ui/issues/issue-20616-4.rs @@ -14,7 +14,7 @@ type Type_1_<'a, T> = &'a T; type Type_4 = Type_1_<'static,, T>; -//~^ error: expected one of `>`, const, lifetime, or type, found `,` +//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,` type Type_5_<'a> = Type_1_<'a, ()>; diff --git a/src/test/ui/issues/issue-20616-4.stderr b/src/test/ui/issues/issue-20616-4.stderr index 3be6c2e78ce..2b3b75f3119 100644 --- a/src/test/ui/issues/issue-20616-4.stderr +++ b/src/test/ui/issues/issue-20616-4.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `,` +error: expected one of `>`, a const expression, lifetime, or type, found `,` --> $DIR/issue-20616-4.rs:16:34 | LL | type Type_4 = Type_1_<'static,, T>; - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20616-5.rs b/src/test/ui/issues/issue-20616-5.rs index c0c6bc6dd97..b96d09d59ae 100644 --- a/src/test/ui/issues/issue-20616-5.rs +++ b/src/test/ui/issues/issue-20616-5.rs @@ -20,7 +20,7 @@ type Type_5_<'a> = Type_1_<'a, ()>; type Type_5<'a> = Type_1_<'a, (),,>; -//~^ error: expected one of `>`, const, lifetime, or type, found `,` +//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,` //type Type_6 = Type_5_<'a,,>; // error: expected type, found `,` diff --git a/src/test/ui/issues/issue-20616-5.stderr b/src/test/ui/issues/issue-20616-5.stderr index b90fbf60051..1ec1dbde695 100644 --- a/src/test/ui/issues/issue-20616-5.stderr +++ b/src/test/ui/issues/issue-20616-5.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `,` +error: expected one of `>`, a const expression, lifetime, or type, found `,` --> $DIR/issue-20616-5.rs:22:34 | LL | type Type_5<'a> = Type_1_<'a, (),,>; - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20616-6.rs b/src/test/ui/issues/issue-20616-6.rs index 73c75bdc45f..a2c45ecec7a 100644 --- a/src/test/ui/issues/issue-20616-6.rs +++ b/src/test/ui/issues/issue-20616-6.rs @@ -23,7 +23,7 @@ type Type_5_<'a> = Type_1_<'a, ()>; type Type_6 = Type_5_<'a,,>; -//~^ error: expected one of `>`, const, lifetime, or type, found `,` +//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,` //type Type_7 = Box<(),,>; // error: expected type, found `,` diff --git a/src/test/ui/issues/issue-20616-6.stderr b/src/test/ui/issues/issue-20616-6.stderr index ea1c15ba423..7401abdd091 100644 --- a/src/test/ui/issues/issue-20616-6.stderr +++ b/src/test/ui/issues/issue-20616-6.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `,` +error: expected one of `>`, a const expression, lifetime, or type, found `,` --> $DIR/issue-20616-6.rs:25:26 | LL | type Type_6 = Type_5_<'a,,>; - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20616-7.rs b/src/test/ui/issues/issue-20616-7.rs index 8beeebd7a95..67209c02adf 100644 --- a/src/test/ui/issues/issue-20616-7.rs +++ b/src/test/ui/issues/issue-20616-7.rs @@ -26,7 +26,7 @@ type Type_5_<'a> = Type_1_<'a, ()>; type Type_7 = Box<(),,>; -//~^ error: expected one of `>`, const, lifetime, or type, found `,` +//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,` //type Type_8<'a,,> = &'a (); // error: expected ident, found `,` diff --git a/src/test/ui/issues/issue-20616-7.stderr b/src/test/ui/issues/issue-20616-7.stderr index dcd199902fc..e2c3efe8447 100644 --- a/src/test/ui/issues/issue-20616-7.stderr +++ b/src/test/ui/issues/issue-20616-7.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found `,` +error: expected one of `>`, a const expression, lifetime, or type, found `,` --> $DIR/issue-20616-7.rs:28:22 | LL | type Type_7 = Box<(),,>; - | ^ expected one of `>`, const, lifetime, or type + | ^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs b/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs index f9a9d071a3d..a8dee5bbda4 100644 --- a/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs +++ b/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs @@ -1,2 +1,2 @@ type mut_box = Box; -//~^ ERROR expected one of `>`, const, lifetime, or type, found keyword `mut` +//~^ ERROR expected one of `>`, a const expression, lifetime, or type, found keyword `mut` diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr b/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr index 0703caf5bed..39db0be9fbb 100644 --- a/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr +++ b/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr @@ -1,8 +1,8 @@ -error: expected one of `>`, const, lifetime, or type, found keyword `mut` +error: expected one of `>`, a const expression, lifetime, or type, found keyword `mut` --> $DIR/removed-syntax-uniq-mut-ty.rs:1:20 | LL | type mut_box = Box; - | ^^^ expected one of `>`, const, lifetime, or type + | ^^^ expected one of `>`, a const expression, lifetime, or type error: aborting due to previous error