From 18ec4e9bcd7ac13e51c521c9be127e98bdb58faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Tue, 3 Oct 2023 21:31:10 +0000 Subject: [PATCH] Move some tests around --- compiler/rustc_parse/messages.ftl | 8 ++++---- .../{ => assoc}/assoc-const-underscore-semantic-fail.rs | 0 .../assoc-const-underscore-semantic-fail.stderr | 0 .../{ => assoc}/assoc-const-underscore-syntactic-pass.rs | 0 tests/ui/parser/{ => assoc}/assoc-oddities-1.rs | 0 tests/ui/parser/{ => assoc}/assoc-oddities-1.stderr | 0 tests/ui/parser/{ => assoc}/assoc-oddities-2.rs | 0 tests/ui/parser/{ => assoc}/assoc-oddities-2.stderr | 0 tests/ui/parser/{ => assoc}/assoc-static-semantic-fail.rs | 0 .../parser/{ => assoc}/assoc-static-semantic-fail.stderr | 0 .../ui/parser/{ => assoc}/assoc-static-syntactic-fail.rs | 0 .../parser/{ => assoc}/assoc-static-syntactic-fail.stderr | 0 tests/ui/parser/{ => assoc}/assoc-type-in-type-arg.rs | 0 tests/ui/parser/{ => assoc}/assoc-type-in-type-arg.stderr | 0 .../associated-types-project-from-hrtb-explicit.rs | 0 .../associated-types-project-from-hrtb-explicit.stderr | 0 16 files changed, 4 insertions(+), 4 deletions(-) rename tests/ui/parser/{ => assoc}/assoc-const-underscore-semantic-fail.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-const-underscore-semantic-fail.stderr (100%) rename tests/ui/parser/{ => assoc}/assoc-const-underscore-syntactic-pass.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-oddities-1.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-oddities-1.stderr (100%) rename tests/ui/parser/{ => assoc}/assoc-oddities-2.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-oddities-2.stderr (100%) rename tests/ui/parser/{ => assoc}/assoc-static-semantic-fail.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-static-semantic-fail.stderr (100%) rename tests/ui/parser/{ => assoc}/assoc-static-syntactic-fail.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-static-syntactic-fail.stderr (100%) rename tests/ui/parser/{ => assoc}/assoc-type-in-type-arg.rs (100%) rename tests/ui/parser/{ => assoc}/assoc-type-in-type-arg.stderr (100%) rename tests/ui/parser/{ => assoc}/associated-types-project-from-hrtb-explicit.rs (100%) rename tests/ui/parser/{ => assoc}/associated-types-project-from-hrtb-explicit.stderr (100%) diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl index 452c24efff3..abe5ce79a03 100644 --- a/compiler/rustc_parse/messages.ftl +++ b/compiler/rustc_parse/messages.ftl @@ -195,10 +195,6 @@ parse_expected_else_block = expected `{"{"}`, found {$first_tok} .label = expected an `if` or a block after this `else` .suggestion = add an `if` if this is the condition of a chained `else if` statement -parse_expected_struct_field = expected one of `,`, `:`, or `{"}"}`, found `{$token}` - .label = expected one of `,`, `:`, or `{"}"}` - .ident_label = while parsing this struct field - parse_expected_expression_found_let = expected expression, found `let` statement .note = only supported directly in conditions of `if` and `while` expressions .not_supported_or = `||` operators are not supported in let chain expressions @@ -230,6 +226,10 @@ parse_expected_semi_found_str = expected `;`, found `{$token}` parse_expected_statement_after_outer_attr = expected statement after outer attribute +parse_expected_struct_field = expected one of `,`, `:`, or `{"}"}`, found `{$token}` + .label = expected one of `,`, `:`, or `{"}"}` + .ident_label = while parsing this struct field + parse_expected_trait_in_trait_impl_found_type = expected a trait, found type parse_extern_crate_name_with_dashes = crate name using dashes are not valid in `extern crate` statements diff --git a/tests/ui/parser/assoc-const-underscore-semantic-fail.rs b/tests/ui/parser/assoc/assoc-const-underscore-semantic-fail.rs similarity index 100% rename from tests/ui/parser/assoc-const-underscore-semantic-fail.rs rename to tests/ui/parser/assoc/assoc-const-underscore-semantic-fail.rs diff --git a/tests/ui/parser/assoc-const-underscore-semantic-fail.stderr b/tests/ui/parser/assoc/assoc-const-underscore-semantic-fail.stderr similarity index 100% rename from tests/ui/parser/assoc-const-underscore-semantic-fail.stderr rename to tests/ui/parser/assoc/assoc-const-underscore-semantic-fail.stderr diff --git a/tests/ui/parser/assoc-const-underscore-syntactic-pass.rs b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs similarity index 100% rename from tests/ui/parser/assoc-const-underscore-syntactic-pass.rs rename to tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs diff --git a/tests/ui/parser/assoc-oddities-1.rs b/tests/ui/parser/assoc/assoc-oddities-1.rs similarity index 100% rename from tests/ui/parser/assoc-oddities-1.rs rename to tests/ui/parser/assoc/assoc-oddities-1.rs diff --git a/tests/ui/parser/assoc-oddities-1.stderr b/tests/ui/parser/assoc/assoc-oddities-1.stderr similarity index 100% rename from tests/ui/parser/assoc-oddities-1.stderr rename to tests/ui/parser/assoc/assoc-oddities-1.stderr diff --git a/tests/ui/parser/assoc-oddities-2.rs b/tests/ui/parser/assoc/assoc-oddities-2.rs similarity index 100% rename from tests/ui/parser/assoc-oddities-2.rs rename to tests/ui/parser/assoc/assoc-oddities-2.rs diff --git a/tests/ui/parser/assoc-oddities-2.stderr b/tests/ui/parser/assoc/assoc-oddities-2.stderr similarity index 100% rename from tests/ui/parser/assoc-oddities-2.stderr rename to tests/ui/parser/assoc/assoc-oddities-2.stderr diff --git a/tests/ui/parser/assoc-static-semantic-fail.rs b/tests/ui/parser/assoc/assoc-static-semantic-fail.rs similarity index 100% rename from tests/ui/parser/assoc-static-semantic-fail.rs rename to tests/ui/parser/assoc/assoc-static-semantic-fail.rs diff --git a/tests/ui/parser/assoc-static-semantic-fail.stderr b/tests/ui/parser/assoc/assoc-static-semantic-fail.stderr similarity index 100% rename from tests/ui/parser/assoc-static-semantic-fail.stderr rename to tests/ui/parser/assoc/assoc-static-semantic-fail.stderr diff --git a/tests/ui/parser/assoc-static-syntactic-fail.rs b/tests/ui/parser/assoc/assoc-static-syntactic-fail.rs similarity index 100% rename from tests/ui/parser/assoc-static-syntactic-fail.rs rename to tests/ui/parser/assoc/assoc-static-syntactic-fail.rs diff --git a/tests/ui/parser/assoc-static-syntactic-fail.stderr b/tests/ui/parser/assoc/assoc-static-syntactic-fail.stderr similarity index 100% rename from tests/ui/parser/assoc-static-syntactic-fail.stderr rename to tests/ui/parser/assoc/assoc-static-syntactic-fail.stderr diff --git a/tests/ui/parser/assoc-type-in-type-arg.rs b/tests/ui/parser/assoc/assoc-type-in-type-arg.rs similarity index 100% rename from tests/ui/parser/assoc-type-in-type-arg.rs rename to tests/ui/parser/assoc/assoc-type-in-type-arg.rs diff --git a/tests/ui/parser/assoc-type-in-type-arg.stderr b/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr similarity index 100% rename from tests/ui/parser/assoc-type-in-type-arg.stderr rename to tests/ui/parser/assoc/assoc-type-in-type-arg.stderr diff --git a/tests/ui/parser/associated-types-project-from-hrtb-explicit.rs b/tests/ui/parser/assoc/associated-types-project-from-hrtb-explicit.rs similarity index 100% rename from tests/ui/parser/associated-types-project-from-hrtb-explicit.rs rename to tests/ui/parser/assoc/associated-types-project-from-hrtb-explicit.rs diff --git a/tests/ui/parser/associated-types-project-from-hrtb-explicit.stderr b/tests/ui/parser/assoc/associated-types-project-from-hrtb-explicit.stderr similarity index 100% rename from tests/ui/parser/associated-types-project-from-hrtb-explicit.stderr rename to tests/ui/parser/assoc/associated-types-project-from-hrtb-explicit.stderr