From e75c019419b064c10e9937dc22f432ea3f284977 Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Thu, 13 Oct 2022 23:08:59 +0800 Subject: [PATCH] make test err annotations formatting uniform --- src/test/rustdoc-ui/intra-doc/ambiguity.rs | 10 +- src/test/rustdoc-ui/intra-doc/field-ice.rs | 8 +- .../reference-link-reports-error-once.rs | 8 +- .../html-as-generics-no-suggestions.rs | 20 +-- .../suggestions/html-as-generics.fixed | 48 ++--- .../suggestions/html-as-generics.rs | 48 ++--- .../lint_pass_impl_without_macro.rs | 4 +- src/test/ui/array-slice-vec/slice-mut-2.rs | 2 +- src/test/ui/assoc-inherent.rs | 2 +- .../associated-const-private-impl.rs | 2 +- .../associated-type-bounds/issue-71443-1.rs | 2 +- .../associated-types-path-1.rs | 4 +- ...rrowck-slice-pattern-element-loan-array.rs | 16 +- ...rrowck-slice-pattern-element-loan-slice.rs | 22 +-- src/test/ui/borrowck/borrowck-storage-dead.rs | 2 +- src/test/ui/borrowck/issue-82462.rs | 2 +- src/test/ui/cast/unsupported-cast.rs | 2 +- src/test/ui/cfg/cfg-path-error.rs | 8 +- ...-compat-crate-attributes-using-cfg_attr.rs | 8 +- src/test/ui/chalkify/chalk_initial_program.rs | 2 +- src/test/ui/coherence/issue-85026.rs | 4 +- .../object-safety-err-ret.rs | 2 +- .../min_const_generics/self-ty-in-const-1.rs | 4 +- .../min_const_generics/self-ty-in-const-2.rs | 2 +- .../occurs-check/unused-substs-1.rs | 2 +- .../issue-89013-no-assoc.rs | 2 +- .../parser-error-recovery/issue-89013-type.rs | 2 +- src/test/ui/consts/assert-type-intrinsics.rs | 6 +- .../const-eval/const-eval-query-stack.rs | 2 +- .../ui/consts/const-eval/erroneous-const.rs | 4 +- .../ui/consts/const-eval/erroneous-const2.rs | 4 +- src/test/ui/consts/const-eval/issue-44578.rs | 2 +- src/test/ui/consts/const-unwrap.rs | 2 +- .../miri_unleashed/const_refers_to_static.rs | 6 +- src/test/ui/consts/offset_from_ub.rs | 24 +-- src/test/ui/consts/offset_ub.rs | 24 +-- src/test/ui/dyn-drop/dyn-drop.rs | 2 +- src/test/ui/enum/enum-discrim-autosizing.rs | 4 +- src/test/ui/enum/enum-in-scope.rs | 2 +- .../feature-gate-inherent_associated_types.rs | 2 +- ...rojection-mismatch-in-impl-where-clause.rs | 2 +- src/test/ui/imports/import-prefix-macro-1.rs | 2 +- src/test/ui/imports/import-prefix-macro-2.rs | 2 +- src/test/ui/imports/issue-47623.rs | 2 +- src/test/ui/impossible_range.fixed | 8 +- src/test/ui/impossible_range.rs | 8 +- .../inherent-impls-overlap-check/overlap.rs | 10 +- src/test/ui/integral-indexing.rs | 16 +- src/test/ui/issues/issue-10969.rs | 4 +- src/test/ui/issues/issue-22312.rs | 2 +- src/test/ui/issues/issue-23189.rs | 2 +- src/test/ui/issues/issue-26905.rs | 2 +- src/test/ui/issues/issue-64620.rs | 2 +- .../ui/let-else/let-else-destructuring.rs | 2 +- .../allowed-cli-deny-by-default-lint.rs | 2 +- .../allowed-deny-by-default-lint.rs | 2 +- .../lint/force-warn/deny-by-default-lint.rs | 2 +- .../let_underscore/let_underscore_drop.rs | 2 +- .../let_underscore/let_underscore_lock.rs | 2 +- src/test/ui/lint/trivial_casts.rs | 32 ++-- src/test/ui/lint/type-overflow.rs | 12 +- .../unaligned_references_external_macro.rs | 2 +- .../unused/issue-90807-unused-paren-error.rs | 4 +- src/test/ui/lint/unused_braces.fixed | 2 +- src/test/ui/lint/unused_braces.rs | 2 +- .../lint/unused_parens_json_suggestion.fixed | 2 +- .../ui/lint/unused_parens_json_suggestion.rs | 2 +- .../ui/macros/issue-61053-different-kleene.rs | 4 +- .../ui/macros/macro-at-most-once-rep-2015.rs | 10 +- .../ui/macros/macro-at-most-once-rep-2018.rs | 10 +- src/test/ui/macros/macro-follow.rs | 170 +++++++++--------- .../macros/macro-multiple-matcher-bindings.rs | 8 +- src/test/ui/macros/macros-nonfatal-errors.rs | 4 +- src/test/ui/macros/must-use-in-macro-55516.rs | 2 +- src/test/ui/macros/same-sequence-span.rs | 8 +- src/test/ui/methods/issues/issue-90315.rs | 2 +- src/test/ui/methods/method-self-arg-2.rs | 4 +- src/test/ui/nll/issue-55394.rs | 2 +- src/test/ui/nll/outlives-suggestion-more.rs | 14 +- src/test/ui/nll/outlives-suggestion-simple.rs | 18 +- .../less-than-greater-than.rs | 2 +- src/test/ui/operator-recovery/spaceship.rs | 2 +- .../nested-undelimited-precedence.rs | 10 +- .../packed-struct-borrow-element-64bit.rs | 2 +- .../ui/packed/packed-struct-borrow-element.rs | 4 +- src/test/ui/parser/attr-before-eof.rs | 2 +- src/test/ui/parser/attr-with-a-semicolon.rs | 2 +- src/test/ui/parser/doc-before-attr.rs | 2 +- src/test/ui/parser/doc-before-eof.rs | 2 +- src/test/ui/parser/doc-before-eof.stderr | 2 +- .../ui/parser/extern-expected-fn-or-brace.rs | 2 +- src/test/ui/parser/extern-foreign-crate.rs | 2 +- src/test/ui/parser/issues/issue-87635.rs | 2 +- src/test/ui/parser/issues/issue-87812-path.rs | 2 +- src/test/ui/parser/issues/issue-87812.rs | 2 +- .../ui/parser/range-inclusive-extra-equals.rs | 6 +- src/test/ui/parser/range_inclusive.fixed | 4 +- src/test/ui/parser/range_inclusive.rs | 4 +- .../ui/parser/range_inclusive_dotdotdot.rs | 24 +-- src/test/ui/path-lookahead.fixed | 2 +- src/test/ui/path-lookahead.rs | 2 +- src/test/ui/privacy/privacy-in-paths.rs | 6 +- src/test/ui/privacy/privacy-ufcs.rs | 2 +- src/test/ui/repr/invalid_repr_list_help.rs | 8 +- .../ui/rust-2018/dyn-trait-compatibility.rs | 4 +- src/test/ui/self/self-infer.rs | 4 +- .../simd/portable-intrinsics-arent-exposed.rs | 4 +- .../ui/specialization/issue-50452-fail.rs | 2 +- .../stability-in-private-module.rs | 2 +- src/test/ui/static/static-lifetime-bound.rs | 4 +- src/test/ui/suggestions/as-ref-2.rs | 2 +- ...as-arg-where-it-should-have-been-called.rs | 4 +- src/test/ui/suggestions/count2len.rs | 6 +- .../dont-suggest-pin-array-dot-set.rs | 2 +- ...as-arg-where-it-should-have-been-called.rs | 4 +- src/test/ui/suggestions/issue-101065.fixed | 2 +- src/test/ui/suggestions/issue-101065.rs | 2 +- src/test/ui/suggestions/issue-88730.rs | 4 +- src/test/ui/suggestions/issue-90974.rs | 2 +- src/test/ui/suggestions/issue-96223.rs | 2 +- ...-lifetimes-in-signature-before-const.fixed | 2 +- ...ing-lifetimes-in-signature-before-const.rs | 2 +- src/test/ui/suggestions/suggest-ref-macro.rs | 2 +- ...est-semicolon-for-fn-in-extern-block.fixed | 2 +- ...uggest-semicolon-for-fn-in-extern-block.rs | 2 +- src/test/ui/traits/alias/style_lint.rs | 2 +- src/test/ui/traits/impl-1.rs | 2 +- src/test/ui/traits/issue-71136.rs | 2 +- .../ui/type/type-dependent-def-issue-49241.rs | 2 +- ...g-missing-zero-to-floating-point-number.rs | 16 +- src/test/ui/typeck/issue-100246.rs | 2 +- ...-52082-type-param-shadows-existing-type.rs | 12 +- src/test/ui/typeck/issue-81943.rs | 6 +- src/test/ui/typeck/issue-84160.rs | 2 +- .../typeck/issue-88803-call-expr-method.fixed | 2 +- .../ui/typeck/issue-88803-call-expr-method.rs | 2 +- .../issue-89044-wrapped-expr-method.fixed | 2 +- .../typeck/issue-89044-wrapped-expr-method.rs | 2 +- src/test/ui/typeck/issue-89275.rs | 6 +- src/test/ui/typeck/issue-90319.rs | 2 +- ...issing-zero-to-floating-point-number.fixed | 14 +- ...g-missing-zero-to-floating-point-number.rs | 14 +- .../union/union-borrow-move-parent-sibling.rs | 4 +- src/test/ui/union/union-deref.rs | 12 +- .../ui/unsized-locals/borrow-after-move.rs | 10 +- .../by-value-trait-object-safety.rs | 2 +- src/test/ui/unsized-locals/double-move.rs | 12 +- .../issue-50940-with-feature.rs | 2 +- src/test/ui/unsized-locals/issue-50940.rs | 2 +- src/test/ui/unsized-locals/unsized-exprs.rs | 6 +- src/test/ui/unsized-locals/unsized-exprs2.rs | 2 +- src/test/ui/unsized-locals/unsized-exprs3.rs | 2 +- 152 files changed, 506 insertions(+), 506 deletions(-) diff --git a/src/test/rustdoc-ui/intra-doc/ambiguity.rs b/src/test/rustdoc-ui/intra-doc/ambiguity.rs index 1f3dc722eff8d..80523dd031874 100644 --- a/src/test/rustdoc-ui/intra-doc/ambiguity.rs +++ b/src/test/rustdoc-ui/intra-doc/ambiguity.rs @@ -24,15 +24,15 @@ pub mod foo { pub fn bar() {} } -/// [`ambiguous`] is ambiguous. //~ERROR `ambiguous` +/// [`ambiguous`] is ambiguous. //~ ERROR `ambiguous` /// -/// [ambiguous] is ambiguous. //~ERROR ambiguous +/// [ambiguous] is ambiguous. //~ ERROR ambiguous /// -/// [`multi_conflict`] is a three-way conflict. //~ERROR `multi_conflict` +/// [`multi_conflict`] is a three-way conflict. //~ ERROR `multi_conflict` /// -/// Ambiguous [type_and_value]. //~ERROR type_and_value +/// Ambiguous [type_and_value]. //~ ERROR type_and_value /// -/// Ambiguous non-implied shortcut link [`foo::bar`]. //~ERROR `foo::bar` +/// Ambiguous non-implied shortcut link [`foo::bar`]. //~ ERROR `foo::bar` pub struct Docs {} /// [true] //~ ERROR `true` is both a module and a builtin type diff --git a/src/test/rustdoc-ui/intra-doc/field-ice.rs b/src/test/rustdoc-ui/intra-doc/field-ice.rs index c5d501e38daf5..8f7dff08deb78 100644 --- a/src/test/rustdoc-ui/intra-doc/field-ice.rs +++ b/src/test/rustdoc-ui/intra-doc/field-ice.rs @@ -1,11 +1,11 @@ #![deny(rustdoc::broken_intra_doc_links)] -//~^NOTE the lint level is defined here +//~^ NOTE the lint level is defined here /// [`Foo::bar`] /// [`Foo::bar()`] -//~^ERROR incompatible link kind for `Foo::bar` -//~|HELP to link to the field, remove the disambiguator -//~|NOTE this link resolved to a field, which is not a function +//~^ ERROR incompatible link kind for `Foo::bar` +//~| HELP to link to the field, remove the disambiguator +//~| NOTE this link resolved to a field, which is not a function pub struct Foo { pub bar: u8 } diff --git a/src/test/rustdoc-ui/reference-link-reports-error-once.rs b/src/test/rustdoc-ui/reference-link-reports-error-once.rs index 71bd2c522ff86..3bf7d2098488a 100644 --- a/src/test/rustdoc-ui/reference-link-reports-error-once.rs +++ b/src/test/rustdoc-ui/reference-link-reports-error-once.rs @@ -4,11 +4,11 @@ /// And also a [third link][a] /// And also a [reference link][b] /// -/// Other links to the same target should still emit error: [ref] //~ERROR unresolved link to `ref` -/// Duplicate [ref] //~ERROR unresolved link to `ref` +/// Other links to the same target should still emit error: [ref] //~ ERROR unresolved link to `ref` +/// Duplicate [ref] //~ ERROR unresolved link to `ref` /// -/// Other links to other targets should still emit error: [ref2] //~ERROR unresolved link to `ref2` -/// Duplicate [ref2] //~ERROR unresolved link to `ref2` +/// Other links to other targets should still emit error: [ref2] //~ ERROR unresolved link to `ref2` +/// Duplicate [ref2] //~ ERROR unresolved link to `ref2` /// /// [a]: ref //~^ ERROR unresolved link to `ref` diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs b/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs index 476e3b2d43e4a..f5ca6a6065dc7 100644 --- a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs +++ b/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs @@ -9,7 +9,7 @@ pub struct ConstGeneric; pub struct MultipleGenerics; /// This <[u32] as Iterator> thing! -//~^ERROR unclosed HTML tag `Item` +//~^ ERROR unclosed HTML tag `Item` // Some forms of fully-qualified path are simultaneously valid HTML tags // with attributes. They produce an error, but no suggestion, because figuring // out if this is valid would require parsing the entire path grammar. @@ -23,35 +23,35 @@ pub struct MultipleGenerics; pub struct FullyQualifiedPathsDoNotCount; /// This ::Iter thing! -//~^ERROR unclosed HTML tag `Vec` +//~^ ERROR unclosed HTML tag `Vec` // Some forms of fully-qualified path are simultaneously valid HTML tags // with attributes. They produce an error, but no suggestion, because figuring // out if this is valid would require parsing the entire path grammar. pub struct FullyQualifiedPathsDoNotCount1; /// This Vec::Iter thing! -//~^ERROR unclosed HTML tag `Vec` +//~^ ERROR unclosed HTML tag `Vec` // Some forms of fully-qualified path are simultaneously valid HTML tags // with attributes. They produce an error, but no suggestion, because figuring // out if this is valid would require parsing the entire path grammar. pub struct FullyQualifiedPathsDoNotCount2; /// This Vec thing! -//~^ERROR unclosed HTML tag `Vec` +//~^ ERROR unclosed HTML tag `Vec` // Some forms of fully-qualified path are simultaneously valid HTML tags // with attributes. They produce an error, but no suggestion, because figuring // out if this is valid would require parsing the entire path grammar. pub struct FullyQualifiedPathsDoNotCount3; /// This Vec as IntoIter> thing! -//~^ERROR unclosed HTML tag `i32` +//~^ ERROR unclosed HTML tag `i32` // Some forms of fully-qualified path are simultaneously valid HTML tags // with attributes. They produce an error, but no suggestion, because figuring // out if this is valid would require parsing the entire path grammar. pub struct FullyQualifiedPathsDoNotCount4; /// This Vec thing! -//~^ERROR unclosed HTML tag `i32` +//~^ ERROR unclosed HTML tag `i32` // HTML attributes shouldn't be treated as Rust syntax, so no suggestions. pub struct TagWithAttributes; @@ -60,21 +60,21 @@ pub struct TagWithAttributes; pub struct DoNotWarnOnMatchingTags; /// This Vec thing! -//~^ERROR unopened HTML tag `i32` +//~^ ERROR unopened HTML tag `i32` // This should produce an error, but no suggestion. pub struct EndTagsAreNotValidRustSyntax; /// This 123 thing! -//~^ERROR unclosed HTML tag `i32` +//~^ ERROR unclosed HTML tag `i32` // This should produce an error, but no suggestion. pub struct NumbersAreNotPaths; /// This Vec: thing! -//~^ERROR unclosed HTML tag `i32` +//~^ ERROR unclosed HTML tag `i32` // This should produce an error, but no suggestion. pub struct InvalidTurbofish; /// This [link](https://rust-lang.org) thing! -//~^ERROR unclosed HTML tag `i32` +//~^ ERROR unclosed HTML tag `i32` // This should produce an error, but no suggestion. pub struct BareTurbofish; diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed b/src/test/rustdoc-ui/suggestions/html-as-generics.fixed index 003542d3855a4..71c49bfabd216 100644 --- a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed +++ b/src/test/rustdoc-ui/suggestions/html-as-generics.fixed @@ -2,81 +2,81 @@ #![deny(rustdoc::invalid_html_tags)] /// This `Vec` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Generic; /// This `vec::Vec` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct GenericPath; /// This `i32` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct PathsCanContainTrailingNumbers; /// This `Vec::` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Turbofish; /// This [link](https://rust-lang.org)`::` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct BareTurbofish; /// This `Vec::` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Nested; /// Nested generics `Vec>` //~^ ERROR unclosed HTML tag `u32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenerics; /// Generics with path `Vec::Iter` //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct GenericsWithPath; /// Generics with path `>::Iter` //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPath; /// Generics with path `Vec>::Iter` //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPath2; /// Generics with bump `>`s //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithBump; /// Generics with bump `Vec>`s //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithBump2; /// Generics with punct `>`! //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPunct; /// Generics with punct `Vec>`! //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPunct2; /// This [`Vec`] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct IntraDocLink; /// This [`Vec::`] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct IntraDocLinkTurbofish; diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.rs b/src/test/rustdoc-ui/suggestions/html-as-generics.rs index 4254a660b19ec..a80f7cf716fba 100644 --- a/src/test/rustdoc-ui/suggestions/html-as-generics.rs +++ b/src/test/rustdoc-ui/suggestions/html-as-generics.rs @@ -2,81 +2,81 @@ #![deny(rustdoc::invalid_html_tags)] /// This Vec thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Generic; /// This vec::Vec thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct GenericPath; /// This i32 thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct PathsCanContainTrailingNumbers; /// This Vec:: thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Turbofish; /// This [link](https://rust-lang.org):: thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct BareTurbofish; /// This Vec:: thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct Nested; /// Nested generics Vec> //~^ ERROR unclosed HTML tag `u32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenerics; /// Generics with path Vec::Iter //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct GenericsWithPath; /// Generics with path >::Iter //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPath; /// Generics with path Vec>::Iter //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPath2; /// Generics with bump >s //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithBump; /// Generics with bump Vec>s //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithBump2; /// Generics with punct >! //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPunct; /// Generics with punct Vec>! //~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~| HELP try marking as source pub struct NestedGenericsWithPunct2; /// This [Vec] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct IntraDocLink; /// This [Vec::] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source +//~^ ERROR unclosed HTML tag `i32` +//~| HELP try marking as source pub struct IntraDocLinkTurbofish; diff --git a/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs b/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs index f6f0c038536c8..6c6eacb25d298 100644 --- a/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs +++ b/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs @@ -17,7 +17,7 @@ declare_lint! { struct Foo; -impl LintPass for Foo { //~ERROR implementing `LintPass` by hand +impl LintPass for Foo { //~ ERROR implementing `LintPass` by hand fn name(&self) -> &'static str { "Foo" } @@ -27,7 +27,7 @@ macro_rules! custom_lint_pass_macro { () => { struct Custom; - impl LintPass for Custom { //~ERROR implementing `LintPass` by hand + impl LintPass for Custom { //~ ERROR implementing `LintPass` by hand fn name(&self) -> &'static str { "Custom" } diff --git a/src/test/ui/array-slice-vec/slice-mut-2.rs b/src/test/ui/array-slice-vec/slice-mut-2.rs index 216edbb780886..6a777a6822a42 100644 --- a/src/test/ui/array-slice-vec/slice-mut-2.rs +++ b/src/test/ui/array-slice-vec/slice-mut-2.rs @@ -4,5 +4,5 @@ fn main() { let x: &[isize] = &[1, 2, 3, 4, 5]; // Can't mutably slice an immutable slice let slice: &mut [isize] = &mut [0, 1]; - let _ = &mut x[2..4]; //~ERROR cannot borrow `*x` as mutable, as it is behind a `&` reference + let _ = &mut x[2..4]; //~ ERROR cannot borrow `*x` as mutable, as it is behind a `&` reference } diff --git a/src/test/ui/assoc-inherent.rs b/src/test/ui/assoc-inherent.rs index c579c962ffcc1..e075acbbf320a 100644 --- a/src/test/ui/assoc-inherent.rs +++ b/src/test/ui/assoc-inherent.rs @@ -15,6 +15,6 @@ impl Foo { } fn main() { - let x : Foo::Bar; //~ERROR ambiguous associated type + let x : Foo::Bar; //~ ERROR ambiguous associated type x = 0isize; } diff --git a/src/test/ui/associated-consts/associated-const-private-impl.rs b/src/test/ui/associated-consts/associated-const-private-impl.rs index 3ee3134acc42d..c0ee950e23380 100644 --- a/src/test/ui/associated-consts/associated-const-private-impl.rs +++ b/src/test/ui/associated-consts/associated-const-private-impl.rs @@ -11,5 +11,5 @@ mod bar1 { fn main() { assert_eq!(1, bar1::Foo::ID); - //~^ERROR associated constant `ID` is private + //~^ ERROR associated constant `ID` is private } diff --git a/src/test/ui/associated-type-bounds/issue-71443-1.rs b/src/test/ui/associated-type-bounds/issue-71443-1.rs index 5d2a3e6cbad12..467dc2a4918d2 100644 --- a/src/test/ui/associated-type-bounds/issue-71443-1.rs +++ b/src/test/ui/associated-type-bounds/issue-71443-1.rs @@ -3,7 +3,7 @@ struct Incorrect; fn hello Iterator>() { - Incorrect //~ERROR: mismatched types + Incorrect //~ ERROR: mismatched types } fn main() {} diff --git a/src/test/ui/associated-types/associated-types-path-1.rs b/src/test/ui/associated-types/associated-types-path-1.rs index 46a5c9e7ca01e..00c6c298a1b59 100644 --- a/src/test/ui/associated-types/associated-types-path-1.rs +++ b/src/test/ui/associated-types/associated-types-path-1.rs @@ -7,7 +7,7 @@ pub trait Bar { type A; } -pub fn f1(a: T, x: T::A) {} //~ERROR associated type `A` not found -pub fn f2(a: T, x: T::A) {} //~ERROR ambiguous associated type `A` +pub fn f1(a: T, x: T::A) {} //~ ERROR associated type `A` not found +pub fn f2(a: T, x: T::A) {} //~ ERROR ambiguous associated type `A` pub fn main() {} diff --git a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-array.rs b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-array.rs index 6b210d73228f8..cabc92212e26a 100644 --- a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-array.rs +++ b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-array.rs @@ -3,47 +3,47 @@ fn nop_subslice(_s: &[i32]) {} fn const_index_err(s: &mut [i32; 4]) { let [ref first, ref second, ..] = *s; - let [_, ref mut second2, ref mut third, ..] = *s; //~ERROR + let [_, ref mut second2, ref mut third, ..] = *s; //~ ERROR nop(&[first, second, second2, third]); } fn const_index_from_end_err(s: &mut [i32; 4]) { let [.., ref fourth, ref third, _, ref first] = *s; - let [.., ref mut third2, _, _] = *s; //~ERROR + let [.., ref mut third2, _, _] = *s; //~ ERROR nop(&[first, third, third2, fourth]); } fn const_index_mixed(s: &mut [i32; 6]) { let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s; - let [_, _, ref mut from_begin2, ..] = *s; //~ERROR + let [_, _, ref mut from_begin2, ..] = *s; //~ ERROR nop(&[from_begin2, from_end1, from_end3, from_end4]); - let [_, _, _, ref mut from_begin3, ..] = *s; //~ERROR + let [_, _, _, ref mut from_begin3, ..] = *s; //~ ERROR nop(&[from_begin3, from_end1, from_end3, from_end4]); let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s; - let [.., ref mut from_end3, _, _] = *s; //~ERROR + let [.., ref mut from_end3, _, _] = *s; //~ ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end3]); } fn const_index_and_subslice_err(s: &mut [i32; 4]) { let [ref first, ref second, ..] = *s; - let [_, ref mut tail @ ..] = *s; //~ERROR + let [_, ref mut tail @ ..] = *s; //~ ERROR nop(&[first, second]); nop_subslice(tail); } fn const_index_and_subslice_from_end_err(s: &mut [i32; 4]) { let [.., ref second, ref first] = *s; - let [ref mut tail @ .., _] = *s; //~ERROR + let [ref mut tail @ .., _] = *s; //~ ERROR nop(&[first, second]); nop_subslice(tail); } fn subslices_overlap(s: &mut [i32; 4]) { let [_, ref s1 @ ..] = *s; - let [ref mut s2 @ .., _, _] = *s; //~ERROR + let [ref mut s2 @ .., _, _] = *s; //~ ERROR nop_subslice(s1); nop_subslice(s2); } diff --git a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-slice.rs b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-slice.rs index 0e1c90a1cd83d..4f5c179d068eb 100644 --- a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-slice.rs +++ b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan-slice.rs @@ -3,7 +3,7 @@ fn nop_subslice(_s: &[i32]) {} fn const_index_err(s: &mut [i32]) { if let [ref first, ref second, ..] = *s { - if let [_, ref mut second2, ref mut third, ..] = *s { //~ERROR + if let [_, ref mut second2, ref mut third, ..] = *s { //~ ERROR nop(&[first, second, second2, third]); } } @@ -11,7 +11,7 @@ fn const_index_err(s: &mut [i32]) { fn const_index_from_end_err(s: &mut [i32]) { if let [.., ref fourth, ref third, _, ref first] = *s { - if let [.., ref mut third2, _, _] = *s { //~ERROR + if let [.., ref mut third2, _, _] = *s { //~ ERROR nop(&[first, third, third2, fourth]); } } @@ -19,24 +19,24 @@ fn const_index_from_end_err(s: &mut [i32]) { fn const_index_mixed(s: &mut [i32]) { if let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s { - if let [_, ref mut from_begin1, ..] = *s { //~ERROR + if let [_, ref mut from_begin1, ..] = *s { //~ ERROR nop(&[from_begin1, from_end1, from_end3, from_end4]); } - if let [_, _, ref mut from_begin2, ..] = *s { //~ERROR + if let [_, _, ref mut from_begin2, ..] = *s { //~ ERROR nop(&[from_begin2, from_end1, from_end3, from_end4]); } - if let [_, _, _, ref mut from_begin3, ..] = *s { //~ERROR + if let [_, _, _, ref mut from_begin3, ..] = *s { //~ ERROR nop(&[from_begin3, from_end1, from_end3, from_end4]); } } if let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s { - if let [.., ref mut from_end2, _] = *s { //~ERROR + if let [.., ref mut from_end2, _] = *s { //~ ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end2]); } - if let [.., ref mut from_end3, _, _] = *s { //~ERROR + if let [.., ref mut from_end3, _, _] = *s { //~ ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end3]); } - if let [.., ref mut from_end4, _, _, _] = *s { //~ERROR + if let [.., ref mut from_end4, _, _, _] = *s { //~ ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end4]); } } @@ -44,7 +44,7 @@ fn const_index_mixed(s: &mut [i32]) { fn const_index_and_subslice_err(s: &mut [i32]) { if let [ref first, ref second, ..] = *s { - if let [_, ref mut tail @ ..] = *s { //~ERROR + if let [_, ref mut tail @ ..] = *s { //~ ERROR nop(&[first, second]); nop_subslice(tail); } @@ -53,7 +53,7 @@ fn const_index_and_subslice_err(s: &mut [i32]) { fn const_index_and_subslice_from_end_err(s: &mut [i32]) { if let [.., ref second, ref first] = *s { - if let [ref mut tail @ .., _] = *s { //~ERROR + if let [ref mut tail @ .., _] = *s { //~ ERROR nop(&[first, second]); nop_subslice(tail); } @@ -62,7 +62,7 @@ fn const_index_and_subslice_from_end_err(s: &mut [i32]) { fn subslices(s: &mut [i32]) { if let [_, _, _, ref s1 @ ..] = *s { - if let [ref mut s2 @ .., _, _, _] = *s { //~ERROR + if let [ref mut s2 @ .., _, _, _] = *s { //~ ERROR nop_subslice(s1); nop_subslice(s2); } diff --git a/src/test/ui/borrowck/borrowck-storage-dead.rs b/src/test/ui/borrowck/borrowck-storage-dead.rs index fe9844610425e..f08fe365a9120 100644 --- a/src/test/ui/borrowck/borrowck-storage-dead.rs +++ b/src/test/ui/borrowck/borrowck-storage-dead.rs @@ -13,7 +13,7 @@ fn also_ok() { fn fail() { loop { let x: i32; - let _ = x + 1; //~ERROR [E0381] + let _ = x + 1; //~ ERROR [E0381] } } diff --git a/src/test/ui/borrowck/issue-82462.rs b/src/test/ui/borrowck/issue-82462.rs index 5a3c64255cc64..78285c8986986 100644 --- a/src/test/ui/borrowck/issue-82462.rs +++ b/src/test/ui/borrowck/issue-82462.rs @@ -15,7 +15,7 @@ impl DroppingSlice<'_> { fn main() { let mut v = vec![1, 2, 3, 4]; for x in DroppingSlice(&*v).iter() { - v.push(*x); //~ERROR + v.push(*x); //~ ERROR break; } } diff --git a/src/test/ui/cast/unsupported-cast.rs b/src/test/ui/cast/unsupported-cast.rs index 1384ecc6ef251..603c202131dee 100644 --- a/src/test/ui/cast/unsupported-cast.rs +++ b/src/test/ui/cast/unsupported-cast.rs @@ -1,5 +1,5 @@ struct A; fn main() { - println!("{:?}", 1.0 as *const A); //~ERROR casting `f64` as `*const A` is invalid + println!("{:?}", 1.0 as *const A); //~ ERROR casting `f64` as `*const A` is invalid } diff --git a/src/test/ui/cfg/cfg-path-error.rs b/src/test/ui/cfg/cfg-path-error.rs index 5bf80bd74b843..947c20ed7761f 100644 --- a/src/test/ui/cfg/cfg-path-error.rs +++ b/src/test/ui/cfg/cfg-path-error.rs @@ -1,19 +1,19 @@ // check-fail #[cfg(any(foo, foo::bar))] -//~^ERROR `cfg` predicate key must be an identifier +//~^ ERROR `cfg` predicate key must be an identifier fn foo1() {} #[cfg(any(foo::bar, foo))] -//~^ERROR `cfg` predicate key must be an identifier +//~^ ERROR `cfg` predicate key must be an identifier fn foo2() {} #[cfg(all(foo, foo::bar))] -//~^ERROR `cfg` predicate key must be an identifier +//~^ ERROR `cfg` predicate key must be an identifier fn foo3() {} #[cfg(all(foo::bar, foo))] -//~^ERROR `cfg` predicate key must be an identifier +//~^ ERROR `cfg` predicate key must be an identifier fn foo4() {} fn main() {} diff --git a/src/test/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs b/src/test/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs index 1f23dadc43226..1d73d9f7e13c5 100644 --- a/src/test/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs +++ b/src/test/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs @@ -2,14 +2,14 @@ // compile-flags:--cfg foo #![cfg_attr(foo, crate_type="bin")] -//~^ERROR `crate_type` within +//~^ ERROR `crate_type` within //~| WARN this was previously accepted -//~|ERROR `crate_type` within +//~| ERROR `crate_type` within //~| WARN this was previously accepted #![cfg_attr(foo, crate_name="bar")] -//~^ERROR `crate_name` within +//~^ ERROR `crate_name` within //~| WARN this was previously accepted -//~|ERROR `crate_name` within +//~| ERROR `crate_name` within //~| WARN this was previously accepted fn main() {} diff --git a/src/test/ui/chalkify/chalk_initial_program.rs b/src/test/ui/chalkify/chalk_initial_program.rs index df25bad622b3d..bea967c069e86 100644 --- a/src/test/ui/chalkify/chalk_initial_program.rs +++ b/src/test/ui/chalkify/chalk_initial_program.rs @@ -12,5 +12,5 @@ fn gimme() { } fn main() { gimme::(); gimme::(); - gimme::(); //~ERROR the trait bound `f32: Foo` is not satisfied + gimme::(); //~ ERROR the trait bound `f32: Foo` is not satisfied } diff --git a/src/test/ui/coherence/issue-85026.rs b/src/test/ui/coherence/issue-85026.rs index 8b116545aa696..68e7e189953aa 100644 --- a/src/test/ui/coherence/issue-85026.rs +++ b/src/test/ui/coherence/issue-85026.rs @@ -2,9 +2,9 @@ auto trait AutoTrait {} // You cannot impl your own `dyn AutoTrait`. -impl dyn AutoTrait {} //~ERROR E0785 +impl dyn AutoTrait {} //~ ERROR E0785 // You cannot impl someone else's `dyn AutoTrait` -impl dyn Unpin {} //~ERROR E0785 +impl dyn Unpin {} //~ ERROR E0785 fn main() {} diff --git a/src/test/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs b/src/test/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs index 24d333aba0fde..6e9bbbd1ab6b9 100644 --- a/src/test/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs +++ b/src/test/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs @@ -14,7 +14,7 @@ impl Foo for () { } } -fn use_dyn(v: &dyn Foo) { //~ERROR the trait `Foo` cannot be made into an object +fn use_dyn(v: &dyn Foo) { //~ ERROR the trait `Foo` cannot be made into an object v.test(); } diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs index 9ef619365a08c..3f4d99a721dc5 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs @@ -1,5 +1,5 @@ trait Foo { - fn t1() -> [u8; std::mem::size_of::()]; //~ERROR generic parameters + fn t1() -> [u8; std::mem::size_of::()]; //~ ERROR generic parameters } struct Bar(T); @@ -9,7 +9,7 @@ impl Bar { } impl Bar { - fn t3() -> [u8; std::mem::size_of::()] {} //~ERROR generic `Self` + fn t3() -> [u8; std::mem::size_of::()] {} //~ ERROR generic `Self` } trait Baz { diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs index 286ec2d245084..6a52003e43479 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs @@ -12,7 +12,7 @@ impl Baz for u16 { impl Baz for Bar { fn hey() { - let _: [u8; std::mem::size_of::()]; //~ERROR generic `Self` + let _: [u8; std::mem::size_of::()]; //~ ERROR generic `Self` } } diff --git a/src/test/ui/const-generics/occurs-check/unused-substs-1.rs b/src/test/ui/const-generics/occurs-check/unused-substs-1.rs index 9d12250c91433..f46a46c0b496a 100644 --- a/src/test/ui/const-generics/occurs-check/unused-substs-1.rs +++ b/src/test/ui/const-generics/occurs-check/unused-substs-1.rs @@ -9,5 +9,5 @@ where A: Bar; fn main() { - let _ = A; //~ERROR the trait bound + let _ = A; //~ ERROR the trait bound } diff --git a/src/test/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.rs b/src/test/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.rs index 99d8e9dea910d..560a61bf52398 100644 --- a/src/test/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.rs +++ b/src/test/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.rs @@ -7,7 +7,7 @@ struct Bar; const T: usize = 42; impl Foo for Bar { -//~^ERROR expected lifetime, type, or constant, found keyword `const` +//~^ ERROR expected lifetime, type, or constant, found keyword `const` fn do_x(&self) -> [u8; 3] { [0u8; 3] } diff --git a/src/test/ui/const-generics/parser-error-recovery/issue-89013-type.rs b/src/test/ui/const-generics/parser-error-recovery/issue-89013-type.rs index 0ec6762b6e282..6f26dfdf0ed1b 100644 --- a/src/test/ui/const-generics/parser-error-recovery/issue-89013-type.rs +++ b/src/test/ui/const-generics/parser-error-recovery/issue-89013-type.rs @@ -7,7 +7,7 @@ struct Bar; const T: usize = 42; impl Foo for Bar { -//~^ERROR missing type to the right of `=` +//~^ ERROR missing type to the right of `=` fn do_x(&self) -> [u8; 3] { [0u8; 3] } diff --git a/src/test/ui/consts/assert-type-intrinsics.rs b/src/test/ui/consts/assert-type-intrinsics.rs index 263d1ae6a3ec7..1441ca3773629 100644 --- a/src/test/ui/consts/assert-type-intrinsics.rs +++ b/src/test/ui/consts/assert-type-intrinsics.rs @@ -10,14 +10,14 @@ fn main() { const _BAD1: () = unsafe { MaybeUninit::::uninit().assume_init(); - //~^ERROR: evaluation of constant value failed + //~^ ERROR: evaluation of constant value failed }; const _BAD2: () = { intrinsics::assert_uninit_valid::<&'static i32>(); - //~^ERROR: evaluation of constant value failed + //~^ ERROR: evaluation of constant value failed }; const _BAD3: () = { intrinsics::assert_zero_valid::<&'static i32>(); - //~^ERROR: evaluation of constant value failed + //~^ ERROR: evaluation of constant value failed }; } diff --git a/src/test/ui/consts/const-eval/const-eval-query-stack.rs b/src/test/ui/consts/const-eval/const-eval-query-stack.rs index 8f8a8cee3a0cc..097c2b97c07c0 100644 --- a/src/test/ui/consts/const-eval/const-eval-query-stack.rs +++ b/src/test/ui/consts/const-eval/const-eval-query-stack.rs @@ -14,7 +14,7 @@ #![allow(unconditional_panic)] -const X: i32 = 1 / 0; //~ERROR constant +const X: i32 = 1 / 0; //~ ERROR constant fn main() { let x: &'static i32 = &X; diff --git a/src/test/ui/consts/const-eval/erroneous-const.rs b/src/test/ui/consts/const-eval/erroneous-const.rs index cf11531ba62ae..b4d5cbb236827 100644 --- a/src/test/ui/consts/const-eval/erroneous-const.rs +++ b/src/test/ui/consts/const-eval/erroneous-const.rs @@ -3,14 +3,14 @@ struct PrintName(T); impl PrintName { - const VOID: () = [()][2]; //~ERROR evaluation of `PrintName::::VOID` failed + const VOID: () = [()][2]; //~ ERROR evaluation of `PrintName::::VOID` failed } const fn no_codegen() { if false { // This bad constant is only used in dead code in a no-codegen function... and yet we still // must make sure that the build fails. - let _ = PrintName::::VOID; //~ERROR could not evaluate static initializer + let _ = PrintName::::VOID; //~ ERROR could not evaluate static initializer } } diff --git a/src/test/ui/consts/const-eval/erroneous-const2.rs b/src/test/ui/consts/const-eval/erroneous-const2.rs index 2fbf7be883535..ecd8c2666c838 100644 --- a/src/test/ui/consts/const-eval/erroneous-const2.rs +++ b/src/test/ui/consts/const-eval/erroneous-const2.rs @@ -3,14 +3,14 @@ struct PrintName(T); impl PrintName { - const VOID: () = [()][2]; //~ERROR evaluation of `PrintName::::VOID` failed + const VOID: () = [()][2]; //~ ERROR evaluation of `PrintName::::VOID` failed } pub static FOO: () = { if false { // This bad constant is only used in dead code in a static initializer... and yet we still // must make sure that the build fails. - let _ = PrintName::::VOID; //~ERROR could not evaluate static initializer + let _ = PrintName::::VOID; //~ ERROR could not evaluate static initializer } }; diff --git a/src/test/ui/consts/const-eval/issue-44578.rs b/src/test/ui/consts/const-eval/issue-44578.rs index 2dbe1c2bd161b..b3cba7ec1682c 100644 --- a/src/test/ui/consts/const-eval/issue-44578.rs +++ b/src/test/ui/consts/const-eval/issue-44578.rs @@ -10,7 +10,7 @@ enum Bar { } impl Foo for Bar { - const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize]; //~ERROR evaluation of ` as Foo>::AMT` failed + const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize]; //~ ERROR evaluation of ` as Foo>::AMT` failed } impl Foo for u8 { diff --git a/src/test/ui/consts/const-unwrap.rs b/src/test/ui/consts/const-unwrap.rs index 729ae535ceff6..b4246cf5a1aeb 100644 --- a/src/test/ui/consts/const-unwrap.rs +++ b/src/test/ui/consts/const-unwrap.rs @@ -5,7 +5,7 @@ const FOO: i32 = Some(42i32).unwrap(); const BAR: i32 = Option::::None.unwrap(); -//~^ERROR: evaluation of constant value failed +//~^ ERROR: evaluation of constant value failed fn main() { println!("{}", FOO); diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs index 7ed5a48d996c6..fb39664a3ee2e 100644 --- a/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs +++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static.rs @@ -6,16 +6,16 @@ use std::sync::atomic::Ordering; const MUTATE_INTERIOR_MUT: usize = { static FOO: AtomicUsize = AtomicUsize::new(0); - FOO.fetch_add(1, Ordering::Relaxed) //~ERROR evaluation of constant value failed + FOO.fetch_add(1, Ordering::Relaxed) //~ ERROR evaluation of constant value failed }; const READ_INTERIOR_MUT: usize = { static FOO: AtomicUsize = AtomicUsize::new(0); - unsafe { *(&FOO as *const _ as *const usize) } //~ERROR evaluation of constant value failed + unsafe { *(&FOO as *const _ as *const usize) } //~ ERROR evaluation of constant value failed }; static mut MUTABLE: u32 = 0; -const READ_MUT: u32 = unsafe { MUTABLE }; //~ERROR evaluation of constant value failed +const READ_MUT: u32 = unsafe { MUTABLE }; //~ ERROR evaluation of constant value failed const REF_INTERIOR_MUT: &usize = { //~ ERROR undefined behavior to use this value //~| encountered a reference pointing to a static variable diff --git a/src/test/ui/consts/offset_from_ub.rs b/src/test/ui/consts/offset_from_ub.rs index 51163e650d6aa..b1cbcfe888a6f 100644 --- a/src/test/ui/consts/offset_from_ub.rs +++ b/src/test/ui/consts/offset_from_ub.rs @@ -15,7 +15,7 @@ pub const DIFFERENT_ALLOC: usize = { let base_ptr: *const Struct = &uninit as *const _ as *const Struct; let uninit2 = std::mem::MaybeUninit::::uninit(); let field_ptr: *const Struct = &uninit2 as *const _ as *const Struct; - let offset = unsafe { ptr_offset_from(field_ptr, base_ptr) }; //~ERROR evaluation of constant value failed + let offset = unsafe { ptr_offset_from(field_ptr, base_ptr) }; //~ ERROR evaluation of constant value failed //~| pointers into different allocations offset as usize }; @@ -28,20 +28,20 @@ pub const NOT_MULTIPLE_OF_SIZE: isize = { let data = [5u8, 6, 7]; let base_ptr = data.as_ptr(); let field_ptr = &data[1] as *const u8 as *const u16; - unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) } //~ ERROR evaluation of constant value failed //~| 1_isize cannot be divided by 2_isize without remainder }; pub const OFFSET_FROM_NULL: isize = { let ptr = 0 as *const u8; - unsafe { ptr_offset_from(ptr, ptr) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(ptr, ptr) } //~ ERROR evaluation of constant value failed //~| null pointer is a dangling pointer }; pub const DIFFERENT_INT: isize = { // offset_from with two different integers: like DIFFERENT_ALLOC let ptr1 = 8 as *const u8; let ptr2 = 16 as *const u8; - unsafe { ptr_offset_from(ptr2, ptr1) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(ptr2, ptr1) } //~ ERROR evaluation of constant value failed //~| 0x8[noalloc] is a dangling pointer }; @@ -50,7 +50,7 @@ const OUT_OF_BOUNDS_1: isize = { let length = 10; let end_ptr = (start_ptr).wrapping_add(length); // First ptr is out of bounds - unsafe { ptr_offset_from(end_ptr, start_ptr) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(end_ptr, start_ptr) } //~ ERROR evaluation of constant value failed //~| pointer to 10 bytes starting at offset 0 is out-of-bounds }; @@ -59,7 +59,7 @@ const OUT_OF_BOUNDS_2: isize = { let length = 10; let end_ptr = (start_ptr).wrapping_add(length); // Second ptr is out of bounds - unsafe { ptr_offset_from(start_ptr, end_ptr) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(start_ptr, end_ptr) } //~ ERROR evaluation of constant value failed //~| pointer to 10 bytes starting at offset 0 is out-of-bounds }; @@ -67,7 +67,7 @@ const OUT_OF_BOUNDS_SAME: isize = { let start_ptr = &4 as *const _ as *const u8; let length = 10; let end_ptr = (start_ptr).wrapping_add(length); - unsafe { ptr_offset_from(end_ptr, end_ptr) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(end_ptr, end_ptr) } //~ ERROR evaluation of constant value failed //~| pointer at offset 10 is out-of-bounds }; @@ -76,34 +76,34 @@ pub const DIFFERENT_ALLOC_UNSIGNED: usize = { let base_ptr: *const Struct = &uninit as *const _ as *const Struct; let uninit2 = std::mem::MaybeUninit::::uninit(); let field_ptr: *const Struct = &uninit2 as *const _ as *const Struct; - unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) } //~ ERROR evaluation of constant value failed //~| pointers into different allocations }; pub const TOO_FAR_APART1: isize = { let ptr1 = ptr::null::(); let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42); - unsafe { ptr_offset_from(ptr2, ptr1) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(ptr2, ptr1) } //~ ERROR evaluation of constant value failed //~| too far ahead }; pub const TOO_FAR_APART2: isize = { let ptr1 = ptr::null::(); let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42); - unsafe { ptr_offset_from(ptr1, ptr2) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from(ptr1, ptr2) } //~ ERROR evaluation of constant value failed //~| too far before }; const WRONG_ORDER_UNSIGNED: usize = { let a = ['a', 'b', 'c']; let p = a.as_ptr(); - unsafe { ptr_offset_from_unsigned(p, p.add(2) ) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from_unsigned(p, p.add(2) ) } //~ ERROR evaluation of constant value failed //~| first pointer has smaller offset than second: 0 < 8 }; pub const TOO_FAR_APART_UNSIGNED: usize = { let ptr1 = ptr::null::(); let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42); // This would fit into a `usize` but we still don't allow it. - unsafe { ptr_offset_from_unsigned(ptr2, ptr1) } //~ERROR evaluation of constant value failed + unsafe { ptr_offset_from_unsigned(ptr2, ptr1) } //~ ERROR evaluation of constant value failed //~| too far ahead }; diff --git a/src/test/ui/consts/offset_ub.rs b/src/test/ui/consts/offset_ub.rs index 1b01e4fd14731..d577231fd27e9 100644 --- a/src/test/ui/consts/offset_ub.rs +++ b/src/test/ui/consts/offset_ub.rs @@ -4,23 +4,23 @@ use std::ptr; // normalize-stderr-test "0x7f+" -> "0x7f..f" -pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~NOTE -pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) }; //~NOTE -pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) }; //~NOTE +pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~ NOTE +pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) }; //~ NOTE +pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) }; //~ NOTE -pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) }; //~NOTE -pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) }; //~NOTE -pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) }; //~NOTE -pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) }; //~NOTE -pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) }; //~NOTE +pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) }; //~ NOTE +pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) }; //~ NOTE +pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) }; //~ NOTE +pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) }; //~ NOTE +pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) }; //~ NOTE -pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) }; //~NOTE -pub const DANGLING: *const u8 = unsafe { ptr::NonNull::::dangling().as_ptr().offset(4) }; //~NOTE +pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) }; //~ NOTE +pub const DANGLING: *const u8 = unsafe { ptr::NonNull::::dangling().as_ptr().offset(4) }; //~ NOTE // Right now, a zero offset from null is UB -pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::().offset(0) }; //~NOTE +pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::().offset(0) }; //~ NOTE // Make sure that we don't panic when computing abs(offset*size_of::()) -pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) }; //~NOTE +pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) }; //~ NOTE fn main() {} diff --git a/src/test/ui/dyn-drop/dyn-drop.rs b/src/test/ui/dyn-drop/dyn-drop.rs index e1668a3f188d5..8d66d64b35ffa 100644 --- a/src/test/ui/dyn-drop/dyn-drop.rs +++ b/src/test/ui/dyn-drop/dyn-drop.rs @@ -1,7 +1,7 @@ #![deny(dyn_drop)] #![allow(bare_trait_objects)] fn foo(_: Box) {} //~ ERROR -fn bar(_: &dyn Drop) {} //~ERROR +fn bar(_: &dyn Drop) {} //~ ERROR fn baz(_: *mut Drop) {} //~ ERROR struct Foo { _x: Box //~ ERROR diff --git a/src/test/ui/enum/enum-discrim-autosizing.rs b/src/test/ui/enum/enum-discrim-autosizing.rs index fc94d281c77e2..555be221004f9 100644 --- a/src/test/ui/enum/enum-discrim-autosizing.rs +++ b/src/test/ui/enum/enum-discrim-autosizing.rs @@ -6,9 +6,9 @@ enum Eu64 { //~^ ERROR discriminant value `0` assigned more than once Au64 = 0, - //~^NOTE `0` assigned here + //~^ NOTE `0` assigned here Bu64 = 0x8000_0000_0000_0000 - //~^NOTE `0` (overflowed from `9223372036854775808`) assigned here + //~^ NOTE `0` (overflowed from `9223372036854775808`) assigned here } fn main() {} diff --git a/src/test/ui/enum/enum-in-scope.rs b/src/test/ui/enum/enum-in-scope.rs index df14bc62e7681..e279f74845173 100644 --- a/src/test/ui/enum/enum-in-scope.rs +++ b/src/test/ui/enum/enum-in-scope.rs @@ -3,5 +3,5 @@ struct hello(isize); fn main() { - let hello = 0; //~ERROR let bindings cannot shadow tuple structs + let hello = 0; //~ ERROR let bindings cannot shadow tuple structs } diff --git a/src/test/ui/feature-gates/feature-gate-inherent_associated_types.rs b/src/test/ui/feature-gates/feature-gate-inherent_associated_types.rs index fc7c6dbc02eef..7d9fd145c5621 100644 --- a/src/test/ui/feature-gates/feature-gate-inherent_associated_types.rs +++ b/src/test/ui/feature-gates/feature-gate-inherent_associated_types.rs @@ -4,7 +4,7 @@ struct Foo; impl Foo { - type Bar = isize; //~ERROR inherent associated types are unstable + type Bar = isize; //~ ERROR inherent associated types are unstable } fn main() {} diff --git a/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs index b4fd6b3e74364..10a3b2539edc0 100644 --- a/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs +++ b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs @@ -11,7 +11,7 @@ pub trait Test {} impl Test for T where T: Super {} fn test() -> impl Test { - //~^ERROR type mismatch resolving `<() as Super>::Assoc == ()` + //~^ ERROR type mismatch resolving `<() as Super>::Assoc == ()` () } diff --git a/src/test/ui/imports/import-prefix-macro-1.rs b/src/test/ui/imports/import-prefix-macro-1.rs index 91cfd376886d8..7fbc800a04d63 100644 --- a/src/test/ui/imports/import-prefix-macro-1.rs +++ b/src/test/ui/imports/import-prefix-macro-1.rs @@ -8,7 +8,7 @@ mod a { } macro_rules! import { - ($p: path) => (use $p {S, Z}); //~ERROR expected one of `::`, `;`, or `as`, found `{` + ($p: path) => (use $p {S, Z}); //~ ERROR expected one of `::`, `;`, or `as`, found `{` } import! { a::b::c } diff --git a/src/test/ui/imports/import-prefix-macro-2.rs b/src/test/ui/imports/import-prefix-macro-2.rs index 952d161e83fac..f23b0ef4ab225 100644 --- a/src/test/ui/imports/import-prefix-macro-2.rs +++ b/src/test/ui/imports/import-prefix-macro-2.rs @@ -8,7 +8,7 @@ mod a { } macro_rules! import { - ($p: path) => (use ::$p {S, Z}); //~ERROR expected identifier, found `a::b::c` + ($p: path) => (use ::$p {S, Z}); //~ ERROR expected identifier, found `a::b::c` } import! { a::b::c } diff --git a/src/test/ui/imports/issue-47623.rs b/src/test/ui/imports/issue-47623.rs index ad8aa4c1a2bd6..c8dc001619709 100644 --- a/src/test/ui/imports/issue-47623.rs +++ b/src/test/ui/imports/issue-47623.rs @@ -1,3 +1,3 @@ -use self; //~ERROR `self` imports are only allowed within a { } list +use self; //~ ERROR `self` imports are only allowed within a { } list fn main() {} diff --git a/src/test/ui/impossible_range.fixed b/src/test/ui/impossible_range.fixed index 3fd950e0dbfc8..d615413889844 100644 --- a/src/test/ui/impossible_range.fixed +++ b/src/test/ui/impossible_range.fixed @@ -8,13 +8,13 @@ pub fn main() { 0..; ..1; 0..1; - ..; //~ERROR inclusive range with no end - //~^HELP use `..` instead + ..; //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } fn _foo1() { ..=1; 0..=1; - 0..; //~ERROR inclusive range with no end - //~^HELP use `..` instead + 0..; //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } diff --git a/src/test/ui/impossible_range.rs b/src/test/ui/impossible_range.rs index 0fe0e17be669a..b54697b99a04b 100644 --- a/src/test/ui/impossible_range.rs +++ b/src/test/ui/impossible_range.rs @@ -8,13 +8,13 @@ pub fn main() { 0..; ..1; 0..1; - ..=; //~ERROR inclusive range with no end - //~^HELP use `..` instead + ..=; //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } fn _foo1() { ..=1; 0..=1; - 0..=; //~ERROR inclusive range with no end - //~^HELP use `..` instead + 0..=; //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } diff --git a/src/test/ui/inherent-impls-overlap-check/overlap.rs b/src/test/ui/inherent-impls-overlap-check/overlap.rs index 6f2801197e90c..7063615d9596e 100644 --- a/src/test/ui/inherent-impls-overlap-check/overlap.rs +++ b/src/test/ui/inherent-impls-overlap-check/overlap.rs @@ -17,7 +17,7 @@ struct Foo {} repeat::repeat_with_idents!(impl Foo { fn IDENT() {} }); -impl Foo { fn hello() {} } //~ERROR duplicate definitions with name `hello` +impl Foo { fn hello() {} } //~ ERROR duplicate definitions with name `hello` impl Foo { fn hello() {} } // Transitive overlap @@ -28,7 +28,7 @@ repeat::repeat_with_idents!(impl Foo2 { fn IDENT() {} }); impl Foo2 { fn bar() {} - fn hello2() {} //~ERROR duplicate definitions with name `hello2` + fn hello2() {} //~ ERROR duplicate definitions with name `hello2` } impl Foo2 { @@ -43,8 +43,8 @@ struct Foo3 {} repeat::repeat_with_idents!(impl Foo3 { fn IDENT() {} }); impl Foo3 { - fn bar() {} //~ERROR duplicate definitions with name `bar` - fn hello3() {} //~ERROR duplicate definitions with name `hello3` + fn bar() {} //~ ERROR duplicate definitions with name `bar` + fn hello3() {} //~ ERROR duplicate definitions with name `hello3` } impl Foo3 { @@ -64,7 +64,7 @@ repeat::repeat_with_idents!(impl Bar { fn IDENT() {} }); impl Bar { fn foo() {} fn bar2() {} } impl Bar { fn foo() {} - fn bar2() {} //~ERROR duplicate definitions with name `bar2` + fn bar2() {} //~ ERROR duplicate definitions with name `bar2` } impl Bar { fn bar2() {} } diff --git a/src/test/ui/integral-indexing.rs b/src/test/ui/integral-indexing.rs index f076dfcb0a42c..a35629facb762 100644 --- a/src/test/ui/integral-indexing.rs +++ b/src/test/ui/integral-indexing.rs @@ -3,14 +3,14 @@ pub fn main() { let s: String = "abcdef".to_string(); v[3_usize]; v[3]; - v[3u8]; //~ERROR : the type `[isize]` cannot be indexed by `u8` - v[3i8]; //~ERROR : the type `[isize]` cannot be indexed by `i8` - v[3u32]; //~ERROR : the type `[isize]` cannot be indexed by `u32` - v[3i32]; //~ERROR : the type `[isize]` cannot be indexed by `i32` + v[3u8]; //~ ERROR : the type `[isize]` cannot be indexed by `u8` + v[3i8]; //~ ERROR : the type `[isize]` cannot be indexed by `i8` + v[3u32]; //~ ERROR : the type `[isize]` cannot be indexed by `u32` + v[3i32]; //~ ERROR : the type `[isize]` cannot be indexed by `i32` s.as_bytes()[3_usize]; s.as_bytes()[3]; - s.as_bytes()[3u8]; //~ERROR : the type `[u8]` cannot be indexed by `u8` - s.as_bytes()[3i8]; //~ERROR : the type `[u8]` cannot be indexed by `i8` - s.as_bytes()[3u32]; //~ERROR : the type `[u8]` cannot be indexed by `u32` - s.as_bytes()[3i32]; //~ERROR : the type `[u8]` cannot be indexed by `i32` + s.as_bytes()[3u8]; //~ ERROR : the type `[u8]` cannot be indexed by `u8` + s.as_bytes()[3i8]; //~ ERROR : the type `[u8]` cannot be indexed by `i8` + s.as_bytes()[3u32]; //~ ERROR : the type `[u8]` cannot be indexed by `u32` + s.as_bytes()[3i32]; //~ ERROR : the type `[u8]` cannot be indexed by `i32` } diff --git a/src/test/ui/issues/issue-10969.rs b/src/test/ui/issues/issue-10969.rs index 0b78fc1bb7fa2..8840c4697877f 100644 --- a/src/test/ui/issues/issue-10969.rs +++ b/src/test/ui/issues/issue-10969.rs @@ -1,7 +1,7 @@ fn func(i: i32) { - i(); //~ERROR expected function, found `i32` + i(); //~ ERROR expected function, found `i32` } fn main() { let i = 0i32; - i(); //~ERROR expected function, found `i32` + i(); //~ ERROR expected function, found `i32` } diff --git a/src/test/ui/issues/issue-22312.rs b/src/test/ui/issues/issue-22312.rs index 4e359b3412a71..db7f4d48b6a66 100644 --- a/src/test/ui/issues/issue-22312.rs +++ b/src/test/ui/issues/issue-22312.rs @@ -9,7 +9,7 @@ pub trait Array2D: Index + Sized { } let i = y * self.columns() + x; let indexer = &(*self as &dyn Index>::Output>); - //~^ERROR non-primitive cast + //~^ ERROR non-primitive cast Some(indexer.index(i)) } } diff --git a/src/test/ui/issues/issue-23189.rs b/src/test/ui/issues/issue-23189.rs index e5526357cb0ef..9aa4f8a2b3834 100644 --- a/src/test/ui/issues/issue-23189.rs +++ b/src/test/ui/issues/issue-23189.rs @@ -1,5 +1,5 @@ mod module {} fn main() { - let _ = module { x: 0 }; //~ERROR expected struct + let _ = module { x: 0 }; //~ ERROR expected struct } diff --git a/src/test/ui/issues/issue-26905.rs b/src/test/ui/issues/issue-26905.rs index 4c5c67d58bc3d..b87dcf32ccca4 100644 --- a/src/test/ui/issues/issue-26905.rs +++ b/src/test/ui/issues/issue-26905.rs @@ -13,7 +13,7 @@ struct MyRc { _boo: NotPhantomData, } -impl, U: ?Sized> CoerceUnsized> for MyRc{ } //~ERROR +impl, U: ?Sized> CoerceUnsized> for MyRc{ } //~ ERROR fn main() { let data = [1, 2, 3]; diff --git a/src/test/ui/issues/issue-64620.rs b/src/test/ui/issues/issue-64620.rs index a62e5bf8d3c62..b0c9d2e8b52af 100644 --- a/src/test/ui/issues/issue-64620.rs +++ b/src/test/ui/issues/issue-64620.rs @@ -1,5 +1,5 @@ enum Bug { - V1 = return [0][0] //~ERROR return statement outside of function body + V1 = return [0][0] //~ ERROR return statement outside of function body } fn main() {} diff --git a/src/test/ui/let-else/let-else-destructuring.rs b/src/test/ui/let-else/let-else-destructuring.rs index d1f1a69bfc254..f12bf629f501b 100644 --- a/src/test/ui/let-else/let-else-destructuring.rs +++ b/src/test/ui/let-else/let-else-destructuring.rs @@ -8,7 +8,7 @@ fn walk(mut value: &Foo) { loop { println!("{:?}", value); &Foo::Nested(Some(value)) = value else { break }; //~ ERROR invalid left-hand side of assignment - //~^ERROR ... else { ... } is not allowed + //~^ ERROR ... else { ... } is not allowed } } diff --git a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs index 257df13efe097..7ffd0d1bd84d4 100644 --- a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs @@ -5,6 +5,6 @@ fn main() { unsafe { - let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior + let y = std::mem::transmute::<&i32, &mut i32>(&5); //~ WARN: undefined behavior } } diff --git a/src/test/ui/lint/force-warn/allowed-deny-by-default-lint.rs b/src/test/ui/lint/force-warn/allowed-deny-by-default-lint.rs index 0d4b468c2b337..09b5dfd17d7cc 100644 --- a/src/test/ui/lint/force-warn/allowed-deny-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/allowed-deny-by-default-lint.rs @@ -6,6 +6,6 @@ #![allow(mutable_transmutes)] fn main() { unsafe { - let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior + let y = std::mem::transmute::<&i32, &mut i32>(&5); //~ WARN: undefined behavior } } diff --git a/src/test/ui/lint/force-warn/deny-by-default-lint.rs b/src/test/ui/lint/force-warn/deny-by-default-lint.rs index c2e9377e90854..3a5308920e317 100644 --- a/src/test/ui/lint/force-warn/deny-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/deny-by-default-lint.rs @@ -4,6 +4,6 @@ fn main() { unsafe { - let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior + let y = std::mem::transmute::<&i32, &mut i32>(&5); //~ WARN: undefined behavior } } diff --git a/src/test/ui/lint/let_underscore/let_underscore_drop.rs b/src/test/ui/lint/let_underscore/let_underscore_drop.rs index f298871f122d3..40cc97f964c09 100644 --- a/src/test/ui/lint/let_underscore/let_underscore_drop.rs +++ b/src/test/ui/lint/let_underscore/let_underscore_drop.rs @@ -10,5 +10,5 @@ impl Drop for NontrivialDrop { } fn main() { - let _ = NontrivialDrop; //~WARNING non-binding let on a type that implements `Drop` + let _ = NontrivialDrop; //~ WARNING non-binding let on a type that implements `Drop` } diff --git a/src/test/ui/lint/let_underscore/let_underscore_lock.rs b/src/test/ui/lint/let_underscore/let_underscore_lock.rs index 7423862cdf05d..19de54770771d 100644 --- a/src/test/ui/lint/let_underscore/let_underscore_lock.rs +++ b/src/test/ui/lint/let_underscore/let_underscore_lock.rs @@ -3,5 +3,5 @@ use std::sync::{Arc, Mutex}; fn main() { let data = Arc::new(Mutex::new(0)); - let _ = data.lock().unwrap(); //~ERROR non-binding let on a synchronization lock + let _ = data.lock().unwrap(); //~ ERROR non-binding let on a synchronization lock } diff --git a/src/test/ui/lint/trivial_casts.rs b/src/test/ui/lint/trivial_casts.rs index 0a8b9de1de3af..906a3fac6eab2 100644 --- a/src/test/ui/lint/trivial_casts.rs +++ b/src/test/ui/lint/trivial_casts.rs @@ -21,23 +21,23 @@ pub fn main() { // & to * pointers let x: &u32 = &42; - let _ = x as *const u32; //~ERROR trivial cast: `&u32` as `*const u32` + let _ = x as *const u32; //~ ERROR trivial cast: `&u32` as `*const u32` let _: *const u32 = x; let x: &mut u32 = &mut 42; - let _ = x as *mut u32; //~ERROR trivial cast: `&mut u32` as `*mut u32` + let _ = x as *mut u32; //~ ERROR trivial cast: `&mut u32` as `*mut u32` let _: *mut u32 = x; // unsize array let x: &[u32; 3] = &[42, 43, 44]; - let _ = x as &[u32]; //~ERROR trivial cast: `&[u32; 3]` as `&[u32]` - let _ = x as *const [u32]; //~ERROR trivial cast: `&[u32; 3]` as `*const [u32]` + let _ = x as &[u32]; //~ ERROR trivial cast: `&[u32; 3]` as `&[u32]` + let _ = x as *const [u32]; //~ ERROR trivial cast: `&[u32; 3]` as `*const [u32]` let _: &[u32] = x; let _: *const [u32] = x; let x: &mut [u32; 3] = &mut [42, 43, 44]; - let _ = x as &mut [u32]; //~ERROR trivial cast: `&mut [u32; 3]` as `&mut [u32]` - let _ = x as *mut [u32]; //~ERROR trivial cast: `&mut [u32; 3]` as `*mut [u32]` + let _ = x as &mut [u32]; //~ ERROR trivial cast: `&mut [u32; 3]` as `&mut [u32]` + let _ = x as *mut [u32]; //~ ERROR trivial cast: `&mut [u32; 3]` as `*mut [u32]` let _: &mut [u32] = x; let _: *mut [u32] = x; @@ -49,37 +49,37 @@ pub fn main() { // unsize trait let x: &Bar = &Bar; - let _ = x as &dyn Foo; //~ERROR trivial cast: `&Bar` as `&dyn Foo` - let _ = x as *const dyn Foo; //~ERROR trivial cast: `&Bar` as `*const dyn Foo` + let _ = x as &dyn Foo; //~ ERROR trivial cast: `&Bar` as `&dyn Foo` + let _ = x as *const dyn Foo; //~ ERROR trivial cast: `&Bar` as `*const dyn Foo` let _: &dyn Foo = x; let _: *const dyn Foo = x; let x: &mut Bar = &mut Bar; - let _ = x as &mut dyn Foo; //~ERROR trivial cast: `&mut Bar` as `&mut dyn Foo` - let _ = x as *mut dyn Foo; //~ERROR trivial cast: `&mut Bar` as `*mut dyn Foo` + let _ = x as &mut dyn Foo; //~ ERROR trivial cast: `&mut Bar` as `&mut dyn Foo` + let _ = x as *mut dyn Foo; //~ ERROR trivial cast: `&mut Bar` as `*mut dyn Foo` let _: &mut dyn Foo = x; let _: *mut dyn Foo = x; let x: Box = Box::new(Bar); - let _ = x as Box; //~ERROR `Box` as `Box` + let _ = x as Box; //~ ERROR `Box` as `Box` let x: Box = Box::new(Bar); let _: Box = x; // functions fn baz(_x: i32) {} - let _ = &baz as &dyn Fn(i32); //~ERROR `&fn(i32) {baz}` as `&dyn Fn(i32)` + let _ = &baz as &dyn Fn(i32); //~ ERROR `&fn(i32) {baz}` as `&dyn Fn(i32)` let _: &dyn Fn(i32) = &baz; let x = |_x: i32| {}; - let _ = &x as &dyn Fn(i32); //~ERROR trivial cast + let _ = &x as &dyn Fn(i32); //~ ERROR trivial cast let _: &dyn Fn(i32) = &x; } // subtyping pub fn test_subtyping<'a, 'b: 'a>(a: &'a Bar, b: &'b Bar) { - let _ = a as &'a Bar; //~ERROR trivial cast + let _ = a as &'a Bar; //~ ERROR trivial cast let _: &'a Bar = a; - let _ = b as &'a Bar; //~ERROR trivial cast + let _ = b as &'a Bar; //~ ERROR trivial cast let _: &'a Bar = b; - let _ = b as &'b Bar; //~ERROR trivial cast + let _ = b as &'b Bar; //~ ERROR trivial cast let _: &'b Bar = b; } diff --git a/src/test/ui/lint/type-overflow.rs b/src/test/ui/lint/type-overflow.rs index 6234b794c1f48..a09a87025c360 100644 --- a/src/test/ui/lint/type-overflow.rs +++ b/src/test/ui/lint/type-overflow.rs @@ -2,21 +2,21 @@ #![warn(overflowing_literals)] fn main() { - let error = 255i8; //~WARNING literal out of range for `i8` + let error = 255i8; //~ WARNING literal out of range for `i8` let ok = 0b1000_0001; // should be ok -> i32 let ok = 0b0111_1111i8; // should be ok -> 127i8 - let fail = 0b1000_0001i8; //~WARNING literal out of range for `i8` + let fail = 0b1000_0001i8; //~ WARNING literal out of range for `i8` - let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for `i64` + let fail = 0x8000_0000_0000_0000i64; //~ WARNING literal out of range for `i64` - let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for `u32` + let fail = 0x1_FFFF_FFFFu32; //~ WARNING literal out of range for `u32` let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000; //~^ WARNING literal out of range for `i128` - let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for `i32` + let fail = 0x8FFF_FFFF_FFFF_FFFE; //~ WARNING literal out of range for `i32` - let fail = -0b1111_1111i8; //~WARNING literal out of range for `i8` + let fail = -0b1111_1111i8; //~ WARNING literal out of range for `i8` } diff --git a/src/test/ui/lint/unaligned_references_external_macro.rs b/src/test/ui/lint/unaligned_references_external_macro.rs index cb597c38e7792..828692d323906 100644 --- a/src/test/ui/lint/unaligned_references_external_macro.rs +++ b/src/test/ui/lint/unaligned_references_external_macro.rs @@ -2,7 +2,7 @@ extern crate unaligned_references_external_crate; -unaligned_references_external_crate::mac! { //~ERROR reference to packed field is unaligned +unaligned_references_external_crate::mac! { //~ ERROR reference to packed field is unaligned //~^ previously accepted #[repr(packed)] pub struct X { diff --git a/src/test/ui/lint/unused/issue-90807-unused-paren-error.rs b/src/test/ui/lint/unused/issue-90807-unused-paren-error.rs index 2fca2e262657e..d2c3a46816cb5 100644 --- a/src/test/ui/lint/unused/issue-90807-unused-paren-error.rs +++ b/src/test/ui/lint/unused/issue-90807-unused-paren-error.rs @@ -4,6 +4,6 @@ #![deny(unused_parens)] fn main() { - for _ in (1..loop { break 2 }) {} //~ERROR - for _ in (1..match () { () => 2 }) {} //~ERROR + for _ in (1..loop { break 2 }) {} //~ ERROR + for _ in (1..match () { () => 2 }) {} //~ ERROR } diff --git a/src/test/ui/lint/unused_braces.fixed b/src/test/ui/lint/unused_braces.fixed index 1a88d985dd86a..1103a21d1f9c6 100644 --- a/src/test/ui/lint/unused_braces.fixed +++ b/src/test/ui/lint/unused_braces.fixed @@ -8,7 +8,7 @@ fn consume(_: T) {} fn main() { let _ = 7; - //~^WARN unnecessary parentheses + //~^ WARN unnecessary parentheses // Do not emit a lint in these cases, // as we have to be careful with diff --git a/src/test/ui/lint/unused_braces.rs b/src/test/ui/lint/unused_braces.rs index 5ca4811fc32d8..b221bdb9ef8ff 100644 --- a/src/test/ui/lint/unused_braces.rs +++ b/src/test/ui/lint/unused_braces.rs @@ -8,7 +8,7 @@ fn consume(_: T) {} fn main() { let _ = (7); - //~^WARN unnecessary parentheses + //~^ WARN unnecessary parentheses // Do not emit a lint in these cases, // as we have to be careful with diff --git a/src/test/ui/lint/unused_parens_json_suggestion.fixed b/src/test/ui/lint/unused_parens_json_suggestion.fixed index c400454046748..5881404c224d7 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.fixed +++ b/src/test/ui/lint/unused_parens_json_suggestion.fixed @@ -13,7 +13,7 @@ fn main() { // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not // the malformed `1 / (2 + 3` - let _a = 1 / (2 + 3); //~ERROR unnecessary parentheses + let _a = 1 / (2 + 3); //~ ERROR unnecessary parentheses f(); } diff --git a/src/test/ui/lint/unused_parens_json_suggestion.rs b/src/test/ui/lint/unused_parens_json_suggestion.rs index 962c8bdd7d789..3dd22c545f7ef 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.rs +++ b/src/test/ui/lint/unused_parens_json_suggestion.rs @@ -13,7 +13,7 @@ fn main() { // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not // the malformed `1 / (2 + 3` - let _a = (1 / (2 + 3)); //~ERROR unnecessary parentheses + let _a = (1 / (2 + 3)); //~ ERROR unnecessary parentheses f(); } diff --git a/src/test/ui/macros/issue-61053-different-kleene.rs b/src/test/ui/macros/issue-61053-different-kleene.rs index 9b7babdbb70ad..2530592402054 100644 --- a/src/test/ui/macros/issue-61053-different-kleene.rs +++ b/src/test/ui/macros/issue-61053-different-kleene.rs @@ -4,7 +4,7 @@ macro_rules! foo { () => {}; ( $( $i:ident = $($j:ident),+ );* ) => { $( $( $i = $j; )* )* }; //~^ ERROR meta-variable repeats with - ( $( $($j:ident),+ );* ) => { $( $( $j; )+ )+ }; //~ERROR meta-variable repeats with + ( $( $($j:ident),+ );* ) => { $( $( $j; )+ )+ }; //~ ERROR meta-variable repeats with } macro_rules! bar { @@ -14,7 +14,7 @@ macro_rules! bar { () => {}; ( $( $i:ident = $($j:ident),+ );* ) => { $( $( $i = $j; )* )* }; //~^ ERROR meta-variable repeats with - ( $( $($j:ident),+ );* ) => { $( $( $j; )+ )+ }; //~ERROR meta-variable repeats with + ( $( $($j:ident),+ );* ) => { $( $( $j; )+ )+ }; //~ ERROR meta-variable repeats with } }; ( $( $i:ident = $($j:ident),+ );* ) => { diff --git a/src/test/ui/macros/macro-at-most-once-rep-2015.rs b/src/test/ui/macros/macro-at-most-once-rep-2015.rs index f68100d4557d6..4fbceaccb47b4 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2015.rs +++ b/src/test/ui/macros/macro-at-most-once-rep-2015.rs @@ -8,7 +8,7 @@ macro_rules! foo { // The Kleene op `?` does not admit a separator before it. macro_rules! baz { - ($(a),?) => {}; //~ERROR the `?` macro repetition operator + ($(a),?) => {}; //~ ERROR the `?` macro repetition operator } macro_rules! barplus { @@ -26,15 +26,15 @@ pub fn main() { foo!(a?a); //~ ERROR no rules expected the token `?` foo!(a?a?a); //~ ERROR no rules expected the token `?` - barplus!(); //~ERROR unexpected end of macro invocation - barplus!(a); //~ERROR unexpected end of macro invocation + barplus!(); //~ ERROR unexpected end of macro invocation + barplus!(a); //~ ERROR unexpected end of macro invocation barplus!(a?); //~ ERROR no rules expected the token `?` barplus!(a?a); //~ ERROR no rules expected the token `?` barplus!(a+); barplus!(+); - barstar!(); //~ERROR unexpected end of macro invocation - barstar!(a); //~ERROR unexpected end of macro invocation + barstar!(); //~ ERROR unexpected end of macro invocation + barstar!(a); //~ ERROR unexpected end of macro invocation barstar!(a?); //~ ERROR no rules expected the token `?` barstar!(a?a); //~ ERROR no rules expected the token `?` barstar!(a*); diff --git a/src/test/ui/macros/macro-at-most-once-rep-2018.rs b/src/test/ui/macros/macro-at-most-once-rep-2018.rs index 886a25bbcbcb2..3a06e34a0a9ad 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2018.rs +++ b/src/test/ui/macros/macro-at-most-once-rep-2018.rs @@ -8,7 +8,7 @@ macro_rules! foo { // The Kleene op `?` does not admit a separator before it. macro_rules! baz { - ($(a),?) => {}; //~ERROR the `?` macro repetition operator + ($(a),?) => {}; //~ ERROR the `?` macro repetition operator } macro_rules! barplus { @@ -26,15 +26,15 @@ pub fn main() { foo!(a?a); //~ ERROR no rules expected the token `?` foo!(a?a?a); //~ ERROR no rules expected the token `?` - barplus!(); //~ERROR unexpected end of macro invocation - barplus!(a); //~ERROR unexpected end of macro invocation + barplus!(); //~ ERROR unexpected end of macro invocation + barplus!(a); //~ ERROR unexpected end of macro invocation barplus!(a?); //~ ERROR no rules expected the token `?` barplus!(a?a); //~ ERROR no rules expected the token `?` barplus!(a+); barplus!(+); - barstar!(); //~ERROR unexpected end of macro invocation - barstar!(a); //~ERROR unexpected end of macro invocation + barstar!(); //~ ERROR unexpected end of macro invocation + barstar!(a); //~ ERROR unexpected end of macro invocation barstar!(a?); //~ ERROR no rules expected the token `?` barstar!(a?a); //~ ERROR no rules expected the token `?` barstar!(a*); diff --git a/src/test/ui/macros/macro-follow.rs b/src/test/ui/macros/macro-follow.rs index 8054418d9b893..21c42ce783bc9 100644 --- a/src/test/ui/macros/macro-follow.rs +++ b/src/test/ui/macros/macro-follow.rs @@ -5,108 +5,108 @@ // FOLLOW(pat) = {FatArrow, Comma, Eq, Or, Ident(if), Ident(in)} macro_rules! follow_pat { - ($p:pat ()) => {}; //~ERROR `$p:pat` is followed by `(` - ($p:pat []) => {}; //~ERROR `$p:pat` is followed by `[` - ($p:pat {}) => {}; //~ERROR `$p:pat` is followed by `{` - ($p:pat :) => {}; //~ERROR `$p:pat` is followed by `:` - ($p:pat >) => {}; //~ERROR `$p:pat` is followed by `>` - ($p:pat +) => {}; //~ERROR `$p:pat` is followed by `+` - ($p:pat ident) => {}; //~ERROR `$p:pat` is followed by `ident` - ($p:pat $q:pat) => {}; //~ERROR `$p:pat` is followed by `$q:pat` - ($p:pat $e:expr) => {}; //~ERROR `$p:pat` is followed by `$e:expr` - ($p:pat $t:ty) => {}; //~ERROR `$p:pat` is followed by `$t:ty` - ($p:pat $s:stmt) => {}; //~ERROR `$p:pat` is followed by `$s:stmt` - ($p:pat $q:path) => {}; //~ERROR `$p:pat` is followed by `$q:path` - ($p:pat $b:block) => {}; //~ERROR `$p:pat` is followed by `$b:block` - ($p:pat $i:ident) => {}; //~ERROR `$p:pat` is followed by `$i:ident` - ($p:pat $t:tt) => {}; //~ERROR `$p:pat` is followed by `$t:tt` - ($p:pat $i:item) => {}; //~ERROR `$p:pat` is followed by `$i:item` - ($p:pat $m:meta) => {}; //~ERROR `$p:pat` is followed by `$m:meta` + ($p:pat ()) => {}; //~ ERROR `$p:pat` is followed by `(` + ($p:pat []) => {}; //~ ERROR `$p:pat` is followed by `[` + ($p:pat {}) => {}; //~ ERROR `$p:pat` is followed by `{` + ($p:pat :) => {}; //~ ERROR `$p:pat` is followed by `:` + ($p:pat >) => {}; //~ ERROR `$p:pat` is followed by `>` + ($p:pat +) => {}; //~ ERROR `$p:pat` is followed by `+` + ($p:pat ident) => {}; //~ ERROR `$p:pat` is followed by `ident` + ($p:pat $q:pat) => {}; //~ ERROR `$p:pat` is followed by `$q:pat` + ($p:pat $e:expr) => {}; //~ ERROR `$p:pat` is followed by `$e:expr` + ($p:pat $t:ty) => {}; //~ ERROR `$p:pat` is followed by `$t:ty` + ($p:pat $s:stmt) => {}; //~ ERROR `$p:pat` is followed by `$s:stmt` + ($p:pat $q:path) => {}; //~ ERROR `$p:pat` is followed by `$q:path` + ($p:pat $b:block) => {}; //~ ERROR `$p:pat` is followed by `$b:block` + ($p:pat $i:ident) => {}; //~ ERROR `$p:pat` is followed by `$i:ident` + ($p:pat $t:tt) => {}; //~ ERROR `$p:pat` is followed by `$t:tt` + ($p:pat $i:item) => {}; //~ ERROR `$p:pat` is followed by `$i:item` + ($p:pat $m:meta) => {}; //~ ERROR `$p:pat` is followed by `$m:meta` } // FOLLOW(expr) = {FatArrow, Comma, Semicolon} macro_rules! follow_expr { - ($e:expr ()) => {}; //~ERROR `$e:expr` is followed by `(` - ($e:expr []) => {}; //~ERROR `$e:expr` is followed by `[` - ($e:expr {}) => {}; //~ERROR `$e:expr` is followed by `{` - ($e:expr =) => {}; //~ERROR `$e:expr` is followed by `=` - ($e:expr |) => {}; //~ERROR `$e:expr` is followed by `|` - ($e:expr :) => {}; //~ERROR `$e:expr` is followed by `:` - ($e:expr >) => {}; //~ERROR `$e:expr` is followed by `>` - ($e:expr +) => {}; //~ERROR `$e:expr` is followed by `+` - ($e:expr ident) => {}; //~ERROR `$e:expr` is followed by `ident` - ($e:expr if) => {}; //~ERROR `$e:expr` is followed by `if` - ($e:expr in) => {}; //~ERROR `$e:expr` is followed by `in` - ($e:expr $p:pat) => {}; //~ERROR `$e:expr` is followed by `$p:pat` - ($e:expr $f:expr) => {}; //~ERROR `$e:expr` is followed by `$f:expr` - ($e:expr $t:ty) => {}; //~ERROR `$e:expr` is followed by `$t:ty` - ($e:expr $s:stmt) => {}; //~ERROR `$e:expr` is followed by `$s:stmt` - ($e:expr $p:path) => {}; //~ERROR `$e:expr` is followed by `$p:path` - ($e:expr $b:block) => {}; //~ERROR `$e:expr` is followed by `$b:block` - ($e:expr $i:ident) => {}; //~ERROR `$e:expr` is followed by `$i:ident` - ($e:expr $t:tt) => {}; //~ERROR `$e:expr` is followed by `$t:tt` - ($e:expr $i:item) => {}; //~ERROR `$e:expr` is followed by `$i:item` - ($e:expr $m:meta) => {}; //~ERROR `$e:expr` is followed by `$m:meta` + ($e:expr ()) => {}; //~ ERROR `$e:expr` is followed by `(` + ($e:expr []) => {}; //~ ERROR `$e:expr` is followed by `[` + ($e:expr {}) => {}; //~ ERROR `$e:expr` is followed by `{` + ($e:expr =) => {}; //~ ERROR `$e:expr` is followed by `=` + ($e:expr |) => {}; //~ ERROR `$e:expr` is followed by `|` + ($e:expr :) => {}; //~ ERROR `$e:expr` is followed by `:` + ($e:expr >) => {}; //~ ERROR `$e:expr` is followed by `>` + ($e:expr +) => {}; //~ ERROR `$e:expr` is followed by `+` + ($e:expr ident) => {}; //~ ERROR `$e:expr` is followed by `ident` + ($e:expr if) => {}; //~ ERROR `$e:expr` is followed by `if` + ($e:expr in) => {}; //~ ERROR `$e:expr` is followed by `in` + ($e:expr $p:pat) => {}; //~ ERROR `$e:expr` is followed by `$p:pat` + ($e:expr $f:expr) => {}; //~ ERROR `$e:expr` is followed by `$f:expr` + ($e:expr $t:ty) => {}; //~ ERROR `$e:expr` is followed by `$t:ty` + ($e:expr $s:stmt) => {}; //~ ERROR `$e:expr` is followed by `$s:stmt` + ($e:expr $p:path) => {}; //~ ERROR `$e:expr` is followed by `$p:path` + ($e:expr $b:block) => {}; //~ ERROR `$e:expr` is followed by `$b:block` + ($e:expr $i:ident) => {}; //~ ERROR `$e:expr` is followed by `$i:ident` + ($e:expr $t:tt) => {}; //~ ERROR `$e:expr` is followed by `$t:tt` + ($e:expr $i:item) => {}; //~ ERROR `$e:expr` is followed by `$i:item` + ($e:expr $m:meta) => {}; //~ ERROR `$e:expr` is followed by `$m:meta` } // FOLLOW(ty) = {OpenDelim(Brace), Comma, FatArrow, Colon, Eq, Gt, Semi, Or, // Ident(as), Ident(where), OpenDelim(Bracket), Nonterminal(Block)} macro_rules! follow_ty { - ($t:ty ()) => {}; //~ERROR `$t:ty` is followed by `(` + ($t:ty ()) => {}; //~ ERROR `$t:ty` is followed by `(` ($t:ty []) => {}; // ok (RFC 1462) - ($t:ty +) => {}; //~ERROR `$t:ty` is followed by `+` - ($t:ty ident) => {}; //~ERROR `$t:ty` is followed by `ident` - ($t:ty if) => {}; //~ERROR `$t:ty` is followed by `if` - ($t:ty $p:pat) => {}; //~ERROR `$t:ty` is followed by `$p:pat` - ($t:ty $e:expr) => {}; //~ERROR `$t:ty` is followed by `$e:expr` - ($t:ty $r:ty) => {}; //~ERROR `$t:ty` is followed by `$r:ty` - ($t:ty $s:stmt) => {}; //~ERROR `$t:ty` is followed by `$s:stmt` - ($t:ty $p:path) => {}; //~ERROR `$t:ty` is followed by `$p:path` + ($t:ty +) => {}; //~ ERROR `$t:ty` is followed by `+` + ($t:ty ident) => {}; //~ ERROR `$t:ty` is followed by `ident` + ($t:ty if) => {}; //~ ERROR `$t:ty` is followed by `if` + ($t:ty $p:pat) => {}; //~ ERROR `$t:ty` is followed by `$p:pat` + ($t:ty $e:expr) => {}; //~ ERROR `$t:ty` is followed by `$e:expr` + ($t:ty $r:ty) => {}; //~ ERROR `$t:ty` is followed by `$r:ty` + ($t:ty $s:stmt) => {}; //~ ERROR `$t:ty` is followed by `$s:stmt` + ($t:ty $p:path) => {}; //~ ERROR `$t:ty` is followed by `$p:path` ($t:ty $b:block) => {}; // ok (RFC 1494) - ($t:ty $i:ident) => {}; //~ERROR `$t:ty` is followed by `$i:ident` - ($t:ty $r:tt) => {}; //~ERROR `$t:ty` is followed by `$r:tt` - ($t:ty $i:item) => {}; //~ERROR `$t:ty` is followed by `$i:item` - ($t:ty $m:meta) => {}; //~ERROR `$t:ty` is followed by `$m:meta` + ($t:ty $i:ident) => {}; //~ ERROR `$t:ty` is followed by `$i:ident` + ($t:ty $r:tt) => {}; //~ ERROR `$t:ty` is followed by `$r:tt` + ($t:ty $i:item) => {}; //~ ERROR `$t:ty` is followed by `$i:item` + ($t:ty $m:meta) => {}; //~ ERROR `$t:ty` is followed by `$m:meta` } // FOLLOW(stmt) = FOLLOW(expr) macro_rules! follow_stmt { - ($s:stmt ()) => {}; //~ERROR `$s:stmt` is followed by `(` - ($s:stmt []) => {}; //~ERROR `$s:stmt` is followed by `[` - ($s:stmt {}) => {}; //~ERROR `$s:stmt` is followed by `{` - ($s:stmt =) => {}; //~ERROR `$s:stmt` is followed by `=` - ($s:stmt |) => {}; //~ERROR `$s:stmt` is followed by `|` - ($s:stmt :) => {}; //~ERROR `$s:stmt` is followed by `:` - ($s:stmt >) => {}; //~ERROR `$s:stmt` is followed by `>` - ($s:stmt +) => {}; //~ERROR `$s:stmt` is followed by `+` - ($s:stmt ident) => {}; //~ERROR `$s:stmt` is followed by `ident` - ($s:stmt if) => {}; //~ERROR `$s:stmt` is followed by `if` - ($s:stmt in) => {}; //~ERROR `$s:stmt` is followed by `in` - ($s:stmt $p:pat) => {}; //~ERROR `$s:stmt` is followed by `$p:pat` - ($s:stmt $e:expr) => {}; //~ERROR `$s:stmt` is followed by `$e:expr` - ($s:stmt $t:ty) => {}; //~ERROR `$s:stmt` is followed by `$t:ty` - ($s:stmt $t:stmt) => {}; //~ERROR `$s:stmt` is followed by `$t:stmt` - ($s:stmt $p:path) => {}; //~ERROR `$s:stmt` is followed by `$p:path` - ($s:stmt $b:block) => {}; //~ERROR `$s:stmt` is followed by `$b:block` - ($s:stmt $i:ident) => {}; //~ERROR `$s:stmt` is followed by `$i:ident` - ($s:stmt $t:tt) => {}; //~ERROR `$s:stmt` is followed by `$t:tt` - ($s:stmt $i:item) => {}; //~ERROR `$s:stmt` is followed by `$i:item` - ($s:stmt $m:meta) => {}; //~ERROR `$s:stmt` is followed by `$m:meta` + ($s:stmt ()) => {}; //~ ERROR `$s:stmt` is followed by `(` + ($s:stmt []) => {}; //~ ERROR `$s:stmt` is followed by `[` + ($s:stmt {}) => {}; //~ ERROR `$s:stmt` is followed by `{` + ($s:stmt =) => {}; //~ ERROR `$s:stmt` is followed by `=` + ($s:stmt |) => {}; //~ ERROR `$s:stmt` is followed by `|` + ($s:stmt :) => {}; //~ ERROR `$s:stmt` is followed by `:` + ($s:stmt >) => {}; //~ ERROR `$s:stmt` is followed by `>` + ($s:stmt +) => {}; //~ ERROR `$s:stmt` is followed by `+` + ($s:stmt ident) => {}; //~ ERROR `$s:stmt` is followed by `ident` + ($s:stmt if) => {}; //~ ERROR `$s:stmt` is followed by `if` + ($s:stmt in) => {}; //~ ERROR `$s:stmt` is followed by `in` + ($s:stmt $p:pat) => {}; //~ ERROR `$s:stmt` is followed by `$p:pat` + ($s:stmt $e:expr) => {}; //~ ERROR `$s:stmt` is followed by `$e:expr` + ($s:stmt $t:ty) => {}; //~ ERROR `$s:stmt` is followed by `$t:ty` + ($s:stmt $t:stmt) => {}; //~ ERROR `$s:stmt` is followed by `$t:stmt` + ($s:stmt $p:path) => {}; //~ ERROR `$s:stmt` is followed by `$p:path` + ($s:stmt $b:block) => {}; //~ ERROR `$s:stmt` is followed by `$b:block` + ($s:stmt $i:ident) => {}; //~ ERROR `$s:stmt` is followed by `$i:ident` + ($s:stmt $t:tt) => {}; //~ ERROR `$s:stmt` is followed by `$t:tt` + ($s:stmt $i:item) => {}; //~ ERROR `$s:stmt` is followed by `$i:item` + ($s:stmt $m:meta) => {}; //~ ERROR `$s:stmt` is followed by `$m:meta` } // FOLLOW(path) = FOLLOW(ty) macro_rules! follow_path { - ($p:path ()) => {}; //~ERROR `$p:path` is followed by `(` + ($p:path ()) => {}; //~ ERROR `$p:path` is followed by `(` ($p:path []) => {}; // ok (RFC 1462) - ($p:path +) => {}; //~ERROR `$p:path` is followed by `+` - ($p:path ident) => {}; //~ERROR `$p:path` is followed by `ident` - ($p:path if) => {}; //~ERROR `$p:path` is followed by `if` - ($p:path $q:pat) => {}; //~ERROR `$p:path` is followed by `$q:pat` - ($p:path $e:expr) => {}; //~ERROR `$p:path` is followed by `$e:expr` - ($p:path $t:ty) => {}; //~ERROR `$p:path` is followed by `$t:ty` - ($p:path $s:stmt) => {}; //~ERROR `$p:path` is followed by `$s:stmt` - ($p:path $q:path) => {}; //~ERROR `$p:path` is followed by `$q:path` + ($p:path +) => {}; //~ ERROR `$p:path` is followed by `+` + ($p:path ident) => {}; //~ ERROR `$p:path` is followed by `ident` + ($p:path if) => {}; //~ ERROR `$p:path` is followed by `if` + ($p:path $q:pat) => {}; //~ ERROR `$p:path` is followed by `$q:pat` + ($p:path $e:expr) => {}; //~ ERROR `$p:path` is followed by `$e:expr` + ($p:path $t:ty) => {}; //~ ERROR `$p:path` is followed by `$t:ty` + ($p:path $s:stmt) => {}; //~ ERROR `$p:path` is followed by `$s:stmt` + ($p:path $q:path) => {}; //~ ERROR `$p:path` is followed by `$q:path` ($p:path $b:block) => {}; // ok (RFC 1494) - ($p:path $i:ident) => {}; //~ERROR `$p:path` is followed by `$i:ident` - ($p:path $t:tt) => {}; //~ERROR `$p:path` is followed by `$t:tt` - ($p:path $i:item) => {}; //~ERROR `$p:path` is followed by `$i:item` - ($p:path $m:meta) => {}; //~ERROR `$p:path` is followed by `$m:meta` + ($p:path $i:ident) => {}; //~ ERROR `$p:path` is followed by `$i:ident` + ($p:path $t:tt) => {}; //~ ERROR `$p:path` is followed by `$t:tt` + ($p:path $i:item) => {}; //~ ERROR `$p:path` is followed by `$i:item` + ($p:path $m:meta) => {}; //~ ERROR `$p:path` is followed by `$m:meta` } // FOLLOW(block) = any token // FOLLOW(ident) = any token diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.rs b/src/test/ui/macros/macro-multiple-matcher-bindings.rs index 7d39dc0a52f2e..f1f38da7cf3ca 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.rs +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.rs @@ -4,8 +4,8 @@ #![allow(unused_macros)] macro_rules! foo1 { - ($a:ident, $a:ident) => {}; //~ERROR duplicate matcher binding - ($a:ident, $a:path) => {}; //~ERROR duplicate matcher binding + ($a:ident, $a:ident) => {}; //~ ERROR duplicate matcher binding + ($a:ident, $a:path) => {}; //~ ERROR duplicate matcher binding } macro_rules! foo2 { @@ -14,8 +14,8 @@ macro_rules! foo2 { } macro_rules! foo3 { - ($a:ident, $($a:ident),*) => {}; //~ERROR duplicate matcher binding - ($($a:ident)+ # $($($a:path),+);*) => {}; //~ERROR duplicate matcher binding + ($a:ident, $($a:ident),*) => {}; //~ ERROR duplicate matcher binding + ($($a:ident)+ # $($($a:path),+);*) => {}; //~ ERROR duplicate matcher binding } fn main() {} diff --git a/src/test/ui/macros/macros-nonfatal-errors.rs b/src/test/ui/macros/macros-nonfatal-errors.rs index 140cc5b0fd808..aae161fed1fde 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.rs +++ b/src/test/ui/macros/macros-nonfatal-errors.rs @@ -65,7 +65,7 @@ enum ExtraDeriveTokens { enum TwoDefaultAttrs { #[default] #[default] - Foo, //~ERROR multiple `#[default]` attributes + Foo, //~ ERROR multiple `#[default]` attributes Bar, } @@ -75,7 +75,7 @@ enum ManyDefaultAttrs { #[default] #[default] #[default] - Foo, //~ERROR multiple `#[default]` attributes + Foo, //~ ERROR multiple `#[default]` attributes Bar, } diff --git a/src/test/ui/macros/must-use-in-macro-55516.rs b/src/test/ui/macros/must-use-in-macro-55516.rs index e7c3462867b59..bf0a89ca2e4ca 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.rs +++ b/src/test/ui/macros/must-use-in-macro-55516.rs @@ -6,5 +6,5 @@ fn main() { use std::fmt::Write; let mut example = String::new(); - write!(&mut example, "{}", 42); //~WARN must be used + write!(&mut example, "{}", 42); //~ WARN must be used } diff --git a/src/test/ui/macros/same-sequence-span.rs b/src/test/ui/macros/same-sequence-span.rs index e0bb4d98525b9..9604faf256b02 100644 --- a/src/test/ui/macros/same-sequence-span.rs +++ b/src/test/ui/macros/same-sequence-span.rs @@ -11,12 +11,12 @@ extern crate proc_macro_sequence; // When ignoring spans, this macro has the same macro definition as `generated_foo` in // `proc_macro_sequence.rs`. macro_rules! manual_foo { - (1 $x:expr $($y:tt,)* //~ERROR `$x:expr` may be followed by `$y:tt` - $(= $z:tt)* //~ERROR `$x:expr` may be followed by `=` + (1 $x:expr $($y:tt,)* //~ ERROR `$x:expr` may be followed by `$y:tt` + $(= $z:tt)* //~ ERROR `$x:expr` may be followed by `=` ) => {}; } -proc_macro_sequence::make_foo!(); //~ERROR `$x:expr` may be followed by `$y:tt` - //~^ERROR `$x:expr` may be followed by `=` +proc_macro_sequence::make_foo!(); //~ ERROR `$x:expr` may be followed by `$y:tt` + //~^ ERROR `$x:expr` may be followed by `=` fn main() {} diff --git a/src/test/ui/methods/issues/issue-90315.rs b/src/test/ui/methods/issues/issue-90315.rs index 01bf9f4840246..58913f0b16be1 100644 --- a/src/test/ui/methods/issues/issue-90315.rs +++ b/src/test/ui/methods/issues/issue-90315.rs @@ -1,6 +1,6 @@ fn main() { let arr = &[0,1,2,3]; - for _i in 0..arr.len().rev() { //~ERROR not an iterator + for _i in 0..arr.len().rev() { //~ ERROR not an iterator // The above error used to say “the method `rev` exists for type `usize`”. // This regression test ensures it doesn't say that any more. } diff --git a/src/test/ui/methods/method-self-arg-2.rs b/src/test/ui/methods/method-self-arg-2.rs index 0f8c048ac989d..8668cfae0c32c 100644 --- a/src/test/ui/methods/method-self-arg-2.rs +++ b/src/test/ui/methods/method-self-arg-2.rs @@ -12,12 +12,12 @@ impl Foo { fn main() { let mut x = Foo; let y = &mut x; - Foo::bar(&x); //~ERROR cannot borrow `x` + Foo::bar(&x); //~ ERROR cannot borrow `x` y.use_mut(); let mut x = Foo; let y = &mut x; - Foo::baz(&mut x); //~ERROR cannot borrow `x` + Foo::baz(&mut x); //~ ERROR cannot borrow `x` y.use_mut(); } diff --git a/src/test/ui/nll/issue-55394.rs b/src/test/ui/nll/issue-55394.rs index f813d1c915cf6..7ffa7669a4033 100644 --- a/src/test/ui/nll/issue-55394.rs +++ b/src/test/ui/nll/issue-55394.rs @@ -6,7 +6,7 @@ struct Foo<'s> { impl Foo<'_> { fn new(bar: &mut Bar) -> Self { - Foo { bar } //~ERROR + Foo { bar } //~ ERROR } } diff --git a/src/test/ui/nll/outlives-suggestion-more.rs b/src/test/ui/nll/outlives-suggestion-more.rs index 2e1359fe5d496..a514293a4ff7f 100644 --- a/src/test/ui/nll/outlives-suggestion-more.rs +++ b/src/test/ui/nll/outlives-suggestion-more.rs @@ -2,14 +2,14 @@ // Should suggest: 'a: 'c, 'b: 'd fn foo1<'a, 'b, 'c, 'd>(x: &'a usize, y: &'b usize) -> (&'c usize, &'d usize) { - (x, y) //~ERROR lifetime may not live long enough - //~^ERROR lifetime may not live long enough + (x, y) //~ ERROR lifetime may not live long enough + //~^ ERROR lifetime may not live long enough } // Should suggest: 'a: 'c and use 'static instead of 'b fn foo2<'a, 'b, 'c>(x: &'a usize, y: &'b usize) -> (&'c usize, &'static usize) { - (x, y) //~ERROR lifetime may not live long enough - //~^ERROR lifetime may not live long enough + (x, y) //~ ERROR lifetime may not live long enough + //~^ ERROR lifetime may not live long enough } // Should suggest: 'a and 'b are the same and use 'static instead of 'c @@ -18,9 +18,9 @@ fn foo3<'a, 'b, 'c, 'd, 'e>( y: &'b usize, z: &'c usize, ) -> (&'b usize, &'a usize, &'static usize) { - (x, y, z) //~ERROR lifetime may not live long enough - //~^ERROR lifetime may not live long enough - //~^^ERROR lifetime may not live long enough + (x, y, z) //~ ERROR lifetime may not live long enough + //~^ ERROR lifetime may not live long enough + //~^^ ERROR lifetime may not live long enough } fn main() {} diff --git a/src/test/ui/nll/outlives-suggestion-simple.rs b/src/test/ui/nll/outlives-suggestion-simple.rs index 2a5c31e3a6468..68cbec0b04a38 100644 --- a/src/test/ui/nll/outlives-suggestion-simple.rs +++ b/src/test/ui/nll/outlives-suggestion-simple.rs @@ -1,23 +1,23 @@ // Test the simplest of outlives suggestions. fn foo1<'a, 'b>(x: &'a usize) -> &'b usize { - x //~ERROR lifetime may not live long enough + x //~ ERROR lifetime may not live long enough } fn foo2<'a>(x: &'a usize) -> &'static usize { - x //~ERROR lifetime may not live long enough + x //~ ERROR lifetime may not live long enough } fn foo3<'a, 'b>(x: &'a usize, y: &'b usize) -> (&'b usize, &'a usize) { - (x, y) //~ERROR lifetime may not live long enough - //~^ERROR lifetime may not live long enough + (x, y) //~ ERROR lifetime may not live long enough + //~^ ERROR lifetime may not live long enough } fn foo4<'a, 'b, 'c>(x: &'a usize) -> (&'b usize, &'c usize) { // FIXME: ideally, we suggest 'a: 'b + 'c, but as of today (may 04, 2019), the null error // reporting stops after the first error in a MIR def so as not to produce too many errors, so // currently we only report 'a: 'b. The user would then re-run and get another error. - (x, x) //~ERROR lifetime may not live long enough + (x, x) //~ ERROR lifetime may not live long enough } struct Foo<'a> { @@ -26,7 +26,7 @@ struct Foo<'a> { impl Foo<'static> { pub fn foo<'a>(x: &'a usize) -> Self { - Foo { x } //~ERROR lifetime may not live long enough + Foo { x } //~ ERROR lifetime may not live long enough } } @@ -36,7 +36,7 @@ struct Bar<'a> { impl<'a> Bar<'a> { pub fn get<'b>(&self) -> &'b usize { - self.x //~ERROR lifetime may not live long enough + self.x //~ ERROR lifetime may not live long enough } } @@ -47,7 +47,7 @@ struct Baz<'a> { impl<'a> Baz<'a> { fn get<'b>(&'b self) -> &'a i32 { - self.x //~ERROR lifetime may not live long enough + self.x //~ ERROR lifetime may not live long enough } } @@ -68,7 +68,7 @@ pub struct Foo2<'a> { impl<'a> Foo2<'a> { // should not produce outlives suggestions to name 'self fn get_bar(&self) -> Bar2 { - Bar2::new(&self) //~ERROR lifetime may not live long enough + Bar2::new(&self) //~ ERROR lifetime may not live long enough } } diff --git a/src/test/ui/operator-recovery/less-than-greater-than.rs b/src/test/ui/operator-recovery/less-than-greater-than.rs index 2beed528ff1c1..f1bfd791c288d 100644 --- a/src/test/ui/operator-recovery/less-than-greater-than.rs +++ b/src/test/ui/operator-recovery/less-than-greater-than.rs @@ -1,4 +1,4 @@ fn main() { println!("{}", 1 <> 2); - //~^ERROR invalid comparison operator `<>` + //~^ ERROR invalid comparison operator `<>` } diff --git a/src/test/ui/operator-recovery/spaceship.rs b/src/test/ui/operator-recovery/spaceship.rs index a65f9389625fc..75a37098c94cc 100644 --- a/src/test/ui/operator-recovery/spaceship.rs +++ b/src/test/ui/operator-recovery/spaceship.rs @@ -1,4 +1,4 @@ fn main() { println!("{}", 1 <=> 2); - //~^ERROR invalid comparison operator `<=>` + //~^ ERROR invalid comparison operator `<=>` } diff --git a/src/test/ui/or-patterns/nested-undelimited-precedence.rs b/src/test/ui/or-patterns/nested-undelimited-precedence.rs index 047836203575f..1d3ae2029a65d 100644 --- a/src/test/ui/or-patterns/nested-undelimited-precedence.rs +++ b/src/test/ui/or-patterns/nested-undelimited-precedence.rs @@ -16,7 +16,7 @@ fn foo() { // ok let b @ (A | B): E = A; - let b @ A | B: E = A; //~ERROR `b` is not bound in all patterns + let b @ A | B: E = A; //~ ERROR `b` is not bound in all patterns //~^ ERROR top-level or-patterns are not allowed } @@ -31,13 +31,13 @@ fn bar() { // ok let (A(x) | B(x)): F = A(3); - let &A(_) | B(_): F = A(3); //~ERROR mismatched types + let &A(_) | B(_): F = A(3); //~ ERROR mismatched types //~^ ERROR top-level or-patterns are not allowed - let &&A(_) | B(_): F = A(3); //~ERROR mismatched types + let &&A(_) | B(_): F = A(3); //~ ERROR mismatched types //~^ ERROR top-level or-patterns are not allowed - let &mut A(_) | B(_): F = A(3); //~ERROR mismatched types + let &mut A(_) | B(_): F = A(3); //~ ERROR mismatched types //~^ ERROR top-level or-patterns are not allowed - let &&mut A(_) | B(_): F = A(3); //~ERROR mismatched types + let &&mut A(_) | B(_): F = A(3); //~ ERROR mismatched types //~^ ERROR top-level or-patterns are not allowed } diff --git a/src/test/ui/packed/packed-struct-borrow-element-64bit.rs b/src/test/ui/packed/packed-struct-borrow-element-64bit.rs index 00bddfe40b25b..9a127d6bc30f9 100644 --- a/src/test/ui/packed/packed-struct-borrow-element-64bit.rs +++ b/src/test/ui/packed/packed-struct-borrow-element-64bit.rs @@ -12,7 +12,7 @@ struct Foo4C { #[warn(unaligned_references)] pub fn main() { let foo = Foo4C { bar: 1, baz: 2 }; - let brw = &foo.baz; //~WARN reference to packed field is unaligned + let brw = &foo.baz; //~ WARN reference to packed field is unaligned //~^ previously accepted assert_eq!(*brw, 2); } diff --git a/src/test/ui/packed/packed-struct-borrow-element.rs b/src/test/ui/packed/packed-struct-borrow-element.rs index a6ee90cef44f0..f1edf4de06a49 100644 --- a/src/test/ui/packed/packed-struct-borrow-element.rs +++ b/src/test/ui/packed/packed-struct-borrow-element.rs @@ -23,12 +23,12 @@ struct Foo4C { #[warn(unaligned_references)] pub fn main() { let foo = Foo1 { bar: 1, baz: 2 }; - let brw = &foo.baz; //~WARN reference to packed field is unaligned + let brw = &foo.baz; //~ WARN reference to packed field is unaligned //~^ previously accepted assert_eq!(*brw, 2); let foo = Foo2 { bar: 1, baz: 2 }; - let brw = &foo.baz; //~WARN reference to packed field is unaligned + let brw = &foo.baz; //~ WARN reference to packed field is unaligned //~^ previously accepted assert_eq!(*brw, 2); } diff --git a/src/test/ui/parser/attr-before-eof.rs b/src/test/ui/parser/attr-before-eof.rs index 6af1783e630fc..6d8e4f427107a 100644 --- a/src/test/ui/parser/attr-before-eof.rs +++ b/src/test/ui/parser/attr-before-eof.rs @@ -1,3 +1,3 @@ fn main() {} -#[derive(Debug)] //~ERROR expected item after attributes +#[derive(Debug)] //~ ERROR expected item after attributes diff --git a/src/test/ui/parser/attr-with-a-semicolon.rs b/src/test/ui/parser/attr-with-a-semicolon.rs index 56fe40b916baf..ea66c7f3486aa 100644 --- a/src/test/ui/parser/attr-with-a-semicolon.rs +++ b/src/test/ui/parser/attr-with-a-semicolon.rs @@ -1,4 +1,4 @@ -#[derive(Debug, Clone)]; //~ERROR expected item after attributes +#[derive(Debug, Clone)]; //~ ERROR expected item after attributes struct Foo; fn main() {} diff --git a/src/test/ui/parser/doc-before-attr.rs b/src/test/ui/parser/doc-before-attr.rs index c4125a09fd2fd..ec5f83ee7cacb 100644 --- a/src/test/ui/parser/doc-before-attr.rs +++ b/src/test/ui/parser/doc-before-attr.rs @@ -1,4 +1,4 @@ fn main() {} /// hi -#[derive(Debug)] //~ERROR expected item after attributes +#[derive(Debug)] //~ ERROR expected item after attributes diff --git a/src/test/ui/parser/doc-before-eof.rs b/src/test/ui/parser/doc-before-eof.rs index b31836e95e880..d6aa3c4a7c304 100644 --- a/src/test/ui/parser/doc-before-eof.rs +++ b/src/test/ui/parser/doc-before-eof.rs @@ -1,3 +1,3 @@ fn main() {} -/// hi //~ERROR expected item after doc comment +/// hi //~ ERROR expected item after doc comment diff --git a/src/test/ui/parser/doc-before-eof.stderr b/src/test/ui/parser/doc-before-eof.stderr index 82756626765b0..3df9fd4b703b3 100644 --- a/src/test/ui/parser/doc-before-eof.stderr +++ b/src/test/ui/parser/doc-before-eof.stderr @@ -2,7 +2,7 @@ error: expected item after doc comment --> $DIR/doc-before-eof.rs:3:1 | LL | /// hi - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything error: aborting due to previous error diff --git a/src/test/ui/parser/extern-expected-fn-or-brace.rs b/src/test/ui/parser/extern-expected-fn-or-brace.rs index 1dcea17445e7a..759efe88c13bb 100644 --- a/src/test/ui/parser/extern-expected-fn-or-brace.rs +++ b/src/test/ui/parser/extern-expected-fn-or-brace.rs @@ -1,3 +1,3 @@ // Verifies that the expected token errors for `extern crate` are raised. -extern "C" mod foo; //~ERROR expected `{`, found keyword `mod` +extern "C" mod foo; //~ ERROR expected `{`, found keyword `mod` diff --git a/src/test/ui/parser/extern-foreign-crate.rs b/src/test/ui/parser/extern-foreign-crate.rs index a5da77dc76361..8022300391d38 100644 --- a/src/test/ui/parser/extern-foreign-crate.rs +++ b/src/test/ui/parser/extern-foreign-crate.rs @@ -1,4 +1,4 @@ // Verifies that the expected token errors for `extern crate` are // raised -extern crate foo {} //~ERROR expected one of `;` or `as`, found `{` +extern crate foo {} //~ ERROR expected one of `;` or `as`, found `{` diff --git a/src/test/ui/parser/issues/issue-87635.rs b/src/test/ui/parser/issues/issue-87635.rs index f70a87fb0e8fb..9c068394c6da4 100644 --- a/src/test/ui/parser/issues/issue-87635.rs +++ b/src/test/ui/parser/issues/issue-87635.rs @@ -4,6 +4,6 @@ impl Foo { pub fn bar() //~^ ERROR: associated function in `impl` without body } -//~^ERROR expected one of `->`, `where`, or `{`, found `}` +//~^ ERROR expected one of `->`, `where`, or `{`, found `}` fn main() {} diff --git a/src/test/ui/parser/issues/issue-87812-path.rs b/src/test/ui/parser/issues/issue-87812-path.rs index b88780876db06..2434c6c0a8f2e 100644 --- a/src/test/ui/parser/issues/issue-87812-path.rs +++ b/src/test/ui/parser/issues/issue-87812-path.rs @@ -1,6 +1,6 @@ macro_rules! foo { ( $f:path ) => {{ - let _: usize = $f; //~ERROR + let _: usize = $f; //~ ERROR }}; } diff --git a/src/test/ui/parser/issues/issue-87812.rs b/src/test/ui/parser/issues/issue-87812.rs index 0ba87b995443f..ed7a1434e8214 100644 --- a/src/test/ui/parser/issues/issue-87812.rs +++ b/src/test/ui/parser/issues/issue-87812.rs @@ -3,7 +3,7 @@ macro_rules! foo { ( $f:block ) => { '_l: loop { - break '_l $f; //~ERROR + break '_l $f; //~ ERROR } }; } diff --git a/src/test/ui/parser/range-inclusive-extra-equals.rs b/src/test/ui/parser/range-inclusive-extra-equals.rs index d41c0699cf7fb..53a2f2277f01e 100644 --- a/src/test/ui/parser/range-inclusive-extra-equals.rs +++ b/src/test/ui/parser/range-inclusive-extra-equals.rs @@ -4,7 +4,7 @@ // See #86395 for a bit of background. pub fn main() { - if let 1..==3 = 1 {} //~ERROR unexpected `=` after inclusive range - //~|HELP use `..=` instead - //~|NOTE inclusive ranges end with a single equals sign + if let 1..==3 = 1 {} //~ ERROR unexpected `=` after inclusive range + //~| HELP use `..=` instead + //~| NOTE inclusive ranges end with a single equals sign } diff --git a/src/test/ui/parser/range_inclusive.fixed b/src/test/ui/parser/range_inclusive.fixed index fe23880d1d48a..3bdf224899550 100644 --- a/src/test/ui/parser/range_inclusive.fixed +++ b/src/test/ui/parser/range_inclusive.fixed @@ -2,6 +2,6 @@ // Make sure that inclusive ranges with no end point don't parse. pub fn main() { - for _ in 1.. {} //~ERROR inclusive range with no end - //~^HELP use `..` instead + for _ in 1.. {} //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } diff --git a/src/test/ui/parser/range_inclusive.rs b/src/test/ui/parser/range_inclusive.rs index bc6d2413d2623..459e8d3d33611 100644 --- a/src/test/ui/parser/range_inclusive.rs +++ b/src/test/ui/parser/range_inclusive.rs @@ -2,6 +2,6 @@ // Make sure that inclusive ranges with no end point don't parse. pub fn main() { - for _ in 1..= {} //~ERROR inclusive range with no end - //~^HELP use `..` instead + for _ in 1..= {} //~ ERROR inclusive range with no end + //~^ HELP use `..` instead } diff --git a/src/test/ui/parser/range_inclusive_dotdotdot.rs b/src/test/ui/parser/range_inclusive_dotdotdot.rs index c3e600e771bdf..642021646f8cf 100644 --- a/src/test/ui/parser/range_inclusive_dotdotdot.rs +++ b/src/test/ui/parser/range_inclusive_dotdotdot.rs @@ -3,21 +3,21 @@ use std::ops::RangeToInclusive; fn return_range_to() -> RangeToInclusive { - return ...1; //~ERROR unexpected token: `...` - //~^HELP use `..` for an exclusive range - //~^^HELP or `..=` for an inclusive range + return ...1; //~ ERROR unexpected token: `...` + //~^ HELP use `..` for an exclusive range + //~^^ HELP or `..=` for an inclusive range } pub fn main() { - let x = ...0; //~ERROR unexpected token: `...` - //~^HELP use `..` for an exclusive range - //~^^HELP or `..=` for an inclusive range + let x = ...0; //~ ERROR unexpected token: `...` + //~^ HELP use `..` for an exclusive range + //~^^ HELP or `..=` for an inclusive range - let x = 5...5; //~ERROR unexpected token: `...` - //~^HELP use `..` for an exclusive range - //~^^HELP or `..=` for an inclusive range + let x = 5...5; //~ ERROR unexpected token: `...` + //~^ HELP use `..` for an exclusive range + //~^^ HELP or `..=` for an inclusive range - for _ in 0...1 {} //~ERROR unexpected token: `...` - //~^HELP use `..` for an exclusive range - //~^^HELP or `..=` for an inclusive range + for _ in 0...1 {} //~ ERROR unexpected token: `...` + //~^ HELP use `..` for an exclusive range + //~^^ HELP or `..=` for an inclusive range } diff --git a/src/test/ui/path-lookahead.fixed b/src/test/ui/path-lookahead.fixed index 928955630e9ff..7ae03b82fe51b 100644 --- a/src/test/ui/path-lookahead.fixed +++ b/src/test/ui/path-lookahead.fixed @@ -7,7 +7,7 @@ // Parser test for #37765 fn with_parens(arg: T) -> String { - return ::to_string(&arg); //~WARN unnecessary parentheses around `return` value + return ::to_string(&arg); //~ WARN unnecessary parentheses around `return` value } fn no_parens(arg: T) -> String { diff --git a/src/test/ui/path-lookahead.rs b/src/test/ui/path-lookahead.rs index d05c75fe8d8e0..fd268affa070f 100644 --- a/src/test/ui/path-lookahead.rs +++ b/src/test/ui/path-lookahead.rs @@ -7,7 +7,7 @@ // Parser test for #37765 fn with_parens(arg: T) -> String { - return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value + return (::to_string(&arg)); //~ WARN unnecessary parentheses around `return` value } fn no_parens(arg: T) -> String { diff --git a/src/test/ui/privacy/privacy-in-paths.rs b/src/test/ui/privacy/privacy-in-paths.rs index 9cee2b89dd536..3fcfc326492d0 100644 --- a/src/test/ui/privacy/privacy-in-paths.rs +++ b/src/test/ui/privacy/privacy-in-paths.rs @@ -21,9 +21,9 @@ pub mod baz { fn f() {} fn g() { - ::foo::bar::baz::f(); //~ERROR module `bar` is private - ::foo::bar::S::f(); //~ERROR module `bar` is private - <() as ::foo::T>::Assoc::f(); //~ERROR trait `T` is private + ::foo::bar::baz::f(); //~ ERROR module `bar` is private + ::foo::bar::S::f(); //~ ERROR module `bar` is private + <() as ::foo::T>::Assoc::f(); //~ ERROR trait `T` is private } } diff --git a/src/test/ui/privacy/privacy-ufcs.rs b/src/test/ui/privacy/privacy-ufcs.rs index fec7f41340ae9..0accd4c807393 100644 --- a/src/test/ui/privacy/privacy-ufcs.rs +++ b/src/test/ui/privacy/privacy-ufcs.rs @@ -9,5 +9,5 @@ mod foo { } fn main() { - ::baz(); //~ERROR trait `Bar` is private + ::baz(); //~ ERROR trait `Bar` is private } diff --git a/src/test/ui/repr/invalid_repr_list_help.rs b/src/test/ui/repr/invalid_repr_list_help.rs index c320984536cac..2bc873e39f967 100644 --- a/src/test/ui/repr/invalid_repr_list_help.rs +++ b/src/test/ui/repr/invalid_repr_list_help.rs @@ -1,17 +1,17 @@ #![crate_type = "lib"] -#[repr(uwu)] //~ERROR: unrecognized representation hint +#[repr(uwu)] //~ ERROR: unrecognized representation hint pub struct OwO; -#[repr(uwu = "a")] //~ERROR: unrecognized representation hint +#[repr(uwu = "a")] //~ ERROR: unrecognized representation hint pub struct OwO2(i32); -#[repr(uwu(4))] //~ERROR: unrecognized representation hint +#[repr(uwu(4))] //~ ERROR: unrecognized representation hint pub struct OwO3 { x: i32, } -#[repr(uwu, u8)] //~ERROR: unrecognized representation hint +#[repr(uwu, u8)] //~ ERROR: unrecognized representation hint pub enum OwO4 { UwU = 1, } diff --git a/src/test/ui/rust-2018/dyn-trait-compatibility.rs b/src/test/ui/rust-2018/dyn-trait-compatibility.rs index 377c85fef490a..0c84dde49f402 100644 --- a/src/test/ui/rust-2018/dyn-trait-compatibility.rs +++ b/src/test/ui/rust-2018/dyn-trait-compatibility.rs @@ -1,8 +1,8 @@ // edition:2018 type A0 = dyn; -type A1 = dyn::dyn; //~ERROR expected identifier, found keyword `dyn` -type A2 = dyn; //~ERROR expected identifier, found `<` +type A1 = dyn::dyn; //~ ERROR expected identifier, found keyword `dyn` +type A2 = dyn; //~ ERROR expected identifier, found `<` type A3 = dyn<::dyn>; fn main() {} diff --git a/src/test/ui/self/self-infer.rs b/src/test/ui/self/self-infer.rs index 9839b8880e9e1..3a519a054ae5f 100644 --- a/src/test/ui/self/self-infer.rs +++ b/src/test/ui/self/self-infer.rs @@ -1,8 +1,8 @@ struct S; impl S { - fn f(self: _) {} //~ERROR the placeholder `_` is not allowed within types on item signatures for functions - fn g(self: &_) {} //~ERROR the placeholder `_` is not allowed within types on item signatures for functions + fn f(self: _) {} //~ ERROR the placeholder `_` is not allowed within types on item signatures for functions + fn g(self: &_) {} //~ ERROR the placeholder `_` is not allowed within types on item signatures for functions } fn main() {} diff --git a/src/test/ui/simd/portable-intrinsics-arent-exposed.rs b/src/test/ui/simd/portable-intrinsics-arent-exposed.rs index 667c8b67b1d46..264e26ad5a46d 100644 --- a/src/test/ui/simd/portable-intrinsics-arent-exposed.rs +++ b/src/test/ui/simd/portable-intrinsics-arent-exposed.rs @@ -1,8 +1,8 @@ // May not matter, since people can use them with a nightly feature. // However this tests to guarantee they don't leak out via portable_simd, // and thus don't accidentally get stabilized. -use core::simd::intrinsics; //~ERROR E0433 -use std::simd::intrinsics; //~ERROR E0432 +use core::simd::intrinsics; //~ ERROR E0433 +use std::simd::intrinsics; //~ ERROR E0432 fn main() { () diff --git a/src/test/ui/specialization/issue-50452-fail.rs b/src/test/ui/specialization/issue-50452-fail.rs index fe21e9b6ede58..a0a0e9eccda59 100644 --- a/src/test/ui/specialization/issue-50452-fail.rs +++ b/src/test/ui/specialization/issue-50452-fail.rs @@ -8,7 +8,7 @@ pub trait Foo { impl Foo for i32 {} impl Foo for i64 { fn foo() {} - //~^ERROR `foo` specializes an item from a parent `impl` + //~^ ERROR `foo` specializes an item from a parent `impl` } impl Foo for T { fn foo() {} diff --git a/src/test/ui/stability-attribute/stability-in-private-module.rs b/src/test/ui/stability-attribute/stability-in-private-module.rs index f12e9198b0d7c..cf463c966d937 100644 --- a/src/test/ui/stability-attribute/stability-in-private-module.rs +++ b/src/test/ui/stability-attribute/stability-in-private-module.rs @@ -1,4 +1,4 @@ fn main() { let _ = std::thread::thread_info::current_thread(); - //~^ERROR module `thread_info` is private + //~^ ERROR module `thread_info` is private } diff --git a/src/test/ui/static/static-lifetime-bound.rs b/src/test/ui/static/static-lifetime-bound.rs index b5da91ec3b6b0..4a0e5e94d7af5 100644 --- a/src/test/ui/static/static-lifetime-bound.rs +++ b/src/test/ui/static/static-lifetime-bound.rs @@ -1,6 +1,6 @@ -fn f<'a: 'static>(_: &'a i32) {} //~WARN unnecessary lifetime parameter `'a` +fn f<'a: 'static>(_: &'a i32) {} //~ WARN unnecessary lifetime parameter `'a` fn main() { let x = 0; - f(&x); //~ERROR does not live long enough + f(&x); //~ ERROR does not live long enough } diff --git a/src/test/ui/suggestions/as-ref-2.rs b/src/test/ui/suggestions/as-ref-2.rs index b22f409b44a93..0850e7820a4c8 100644 --- a/src/test/ui/suggestions/as-ref-2.rs +++ b/src/test/ui/suggestions/as-ref-2.rs @@ -7,5 +7,5 @@ fn bar(_: &Struct) -> Struct { fn main() { let foo = Some(Struct); let _x: Option = foo.map(|s| bar(&s)); - let _y = foo; //~ERROR use of moved value: `foo` + let _y = foo; //~ ERROR use of moved value: `foo` } diff --git a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 156162c9027c3..09c3b3e12aead 100644 --- a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -7,7 +7,7 @@ async fn foo() {} fn bar(f: impl Future) {} fn main() { - bar(foo); //~ERROR E0277 + bar(foo); //~ ERROR E0277 let async_closure = async || (); - bar(async_closure); //~ERROR E0277 + bar(async_closure); //~ ERROR E0277 } diff --git a/src/test/ui/suggestions/count2len.rs b/src/test/ui/suggestions/count2len.rs index f11a789efbc5b..a96adfc514a1a 100644 --- a/src/test/ui/suggestions/count2len.rs +++ b/src/test/ui/suggestions/count2len.rs @@ -2,7 +2,7 @@ fn main() { let slice = [1,2,3,4]; let vec = vec![1,2,3,4]; - slice.count(); //~ERROR: E0599 - vec.count(); //~ERROR: E0599 - vec.as_slice().count(); //~ERROR: E0599 + slice.count(); //~ ERROR: E0599 + vec.count(); //~ ERROR: E0599 + vec.as_slice().count(); //~ ERROR: E0599 } diff --git a/src/test/ui/suggestions/dont-suggest-pin-array-dot-set.rs b/src/test/ui/suggestions/dont-suggest-pin-array-dot-set.rs index acb897571d64e..d94262e8c35bf 100644 --- a/src/test/ui/suggestions/dont-suggest-pin-array-dot-set.rs +++ b/src/test/ui/suggestions/dont-suggest-pin-array-dot-set.rs @@ -11,5 +11,5 @@ // the receiver), but the function call on line 14 supplies three. fn main() { let mut a = [0u8; 1]; - a.set(0, 3); //~ERROR + a.set(0, 3); //~ ERROR } diff --git a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 4303e5c540569..bc48f99e87bb2 100644 --- a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -14,7 +14,7 @@ fn foo() -> impl T { S } fn bar(f: impl T) {} fn main() { - bar(foo); //~ERROR E0277 + bar(foo); //~ ERROR E0277 let closure = || S; - bar(closure); //~ERROR E0277 + bar(closure); //~ ERROR E0277 } diff --git a/src/test/ui/suggestions/issue-101065.fixed b/src/test/ui/suggestions/issue-101065.fixed index 88c716cc86ce8..1a5dca35ecaae 100644 --- a/src/test/ui/suggestions/issue-101065.fixed +++ b/src/test/ui/suggestions/issue-101065.fixed @@ -9,6 +9,6 @@ fn main() { let _x = if true { FakeResult::Ok(FakeResult::Ok(())) } else { - FakeResult::Ok(FakeResult::Ok(())) //~ERROR E0308 + FakeResult::Ok(FakeResult::Ok(())) //~ ERROR E0308 }; } diff --git a/src/test/ui/suggestions/issue-101065.rs b/src/test/ui/suggestions/issue-101065.rs index 2715f1027082f..33f89aa36020b 100644 --- a/src/test/ui/suggestions/issue-101065.rs +++ b/src/test/ui/suggestions/issue-101065.rs @@ -9,6 +9,6 @@ fn main() { let _x = if true { FakeResult::Ok(FakeResult::Ok(())) } else { - FakeResult::Ok(()) //~ERROR E0308 + FakeResult::Ok(()) //~ ERROR E0308 }; } diff --git a/src/test/ui/suggestions/issue-88730.rs b/src/test/ui/suggestions/issue-88730.rs index e63210a3e987e..3034733cb0ca5 100644 --- a/src/test/ui/suggestions/issue-88730.rs +++ b/src/test/ui/suggestions/issue-88730.rs @@ -9,8 +9,8 @@ enum Foo { D, } -fn foo(C: Foo) {} //~ERROR +fn foo(C: Foo) {} //~ ERROR fn main() { - let C = Foo::D; //~ERROR + let C = Foo::D; //~ ERROR } diff --git a/src/test/ui/suggestions/issue-90974.rs b/src/test/ui/suggestions/issue-90974.rs index 83590dbf7ace7..e606dcb55b222 100644 --- a/src/test/ui/suggestions/issue-90974.rs +++ b/src/test/ui/suggestions/issue-90974.rs @@ -1,3 +1,3 @@ fn main() { - println!("{}", (3.).recip()); //~ERROR + println!("{}", (3.).recip()); //~ ERROR } diff --git a/src/test/ui/suggestions/issue-96223.rs b/src/test/ui/suggestions/issue-96223.rs index 85667bb849bd4..ceff6df701f97 100644 --- a/src/test/ui/suggestions/issue-96223.rs +++ b/src/test/ui/suggestions/issue-96223.rs @@ -46,7 +46,7 @@ fn icey_bounds>(p: &D) {} fn trigger_ice() { let p = Empty; - icey_bounds(&p); //~ERROR the trait bound + icey_bounds(&p); //~ ERROR the trait bound } fn main() {} diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed index 3c06f4f88c1f9..aabd4ec6873e5 100644 --- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed @@ -1,7 +1,7 @@ // run-rustfix // https://github.com/rust-lang/rust/issues/95616 -fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str { //~ERROR [E0106] +fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str { //~ ERROR [E0106] return ""; } diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs index 110468cbbc52e..f515cc07a9302 100644 --- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs @@ -1,7 +1,7 @@ // run-rustfix // https://github.com/rust-lang/rust/issues/95616 -fn buggy_const(_a: &Option<[u8; N]>, _f: &str) -> &str { //~ERROR [E0106] +fn buggy_const(_a: &Option<[u8; N]>, _f: &str) -> &str { //~ ERROR [E0106] return ""; } diff --git a/src/test/ui/suggestions/suggest-ref-macro.rs b/src/test/ui/suggestions/suggest-ref-macro.rs index 6f780f32a147b..1dae3762c9c9e 100644 --- a/src/test/ui/suggestions/suggest-ref-macro.rs +++ b/src/test/ui/suggestions/suggest-ref-macro.rs @@ -5,7 +5,7 @@ extern crate proc_macro_type_error; use proc_macro_type_error::hello; -#[hello] //~ERROR mismatched types +#[hello] //~ ERROR mismatched types fn abc() {} fn x(_: &mut i32) {} diff --git a/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed b/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed index 5c55566ffe92f..d0cf936ea8d85 100644 --- a/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed +++ b/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed @@ -3,7 +3,7 @@ #[allow(dead_code)] extern "C" { - fn foo(); //~ERROR expected `;` + fn foo(); //~ ERROR expected `;` } fn main() {} diff --git a/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs b/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs index 91971cba3e863..a1a7aabab740e 100644 --- a/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs +++ b/src/test/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs @@ -3,7 +3,7 @@ #[allow(dead_code)] extern "C" { - fn foo() //~ERROR expected `;` + fn foo() //~ ERROR expected `;` } fn main() {} diff --git a/src/test/ui/traits/alias/style_lint.rs b/src/test/ui/traits/alias/style_lint.rs index 33be20054b5d3..bc32f95b8eba6 100644 --- a/src/test/ui/traits/alias/style_lint.rs +++ b/src/test/ui/traits/alias/style_lint.rs @@ -3,6 +3,6 @@ #![feature(trait_alias)] trait Foo = std::fmt::Display + std::fmt::Debug; -trait bar = std::fmt::Display + std::fmt::Debug; //~WARN trait alias `bar` should have an upper camel case name +trait bar = std::fmt::Display + std::fmt::Debug; //~ WARN trait alias `bar` should have an upper camel case name fn main() {} diff --git a/src/test/ui/traits/impl-1.rs b/src/test/ui/traits/impl-1.rs index d22ac72d1cc4d..3c3fcfe0ab335 100644 --- a/src/test/ui/traits/impl-1.rs +++ b/src/test/ui/traits/impl-1.rs @@ -12,5 +12,5 @@ impl T for i32 {} fn main() { let x = &42i32; - x.foo(); //~ERROR: no method named `foo` found + x.foo(); //~ ERROR: no method named `foo` found } diff --git a/src/test/ui/traits/issue-71136.rs b/src/test/ui/traits/issue-71136.rs index b21756e2b637f..737a6490913bd 100644 --- a/src/test/ui/traits/issue-71136.rs +++ b/src/test/ui/traits/issue-71136.rs @@ -2,7 +2,7 @@ struct Foo(u8); #[derive(Clone)] struct FooHolster { - the_foos: Vec, //~ERROR Clone + the_foos: Vec, //~ ERROR Clone } fn main() {} diff --git a/src/test/ui/type/type-dependent-def-issue-49241.rs b/src/test/ui/type/type-dependent-def-issue-49241.rs index f37f093d9ede7..51bd116fbd61c 100644 --- a/src/test/ui/type/type-dependent-def-issue-49241.rs +++ b/src/test/ui/type/type-dependent-def-issue-49241.rs @@ -2,5 +2,5 @@ fn main() { let v = vec![0]; const l: usize = v.count(); //~ ERROR attempt to use a non-constant value in a constant let s: [u32; l] = v.into_iter().collect(); - //~^ERROR evaluation of constant value failed + //~^ ERROR evaluation of constant value failed } diff --git a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs b/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs index 501f4b6ef9ebc..2a1d112ff5b08 100644 --- a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs +++ b/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs @@ -2,20 +2,20 @@ macro_rules! num { () => { 1 } } fn main() { let x = 1i32; - x.e10; //~ERROR `i32` is a primitive type and therefore doesn't have fields + x.e10; //~ ERROR `i32` is a primitive type and therefore doesn't have fields let y = 1; - y.e10; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + y.e10; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2u32.e10; //~ERROR `u32` is a primitive type and therefore doesn't have fields + 2u32.e10; //~ ERROR `u32` is a primitive type and therefore doesn't have fields - num!().e10; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + num!().e10; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.e10foo; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.e10foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields 42._; - //~^ERROR expected identifier, found reserved identifier `_` - //~|ERROR `{integer}` is a primitive type and therefore doesn't have fields + //~^ ERROR expected identifier, found reserved identifier `_` + //~| ERROR `{integer}` is a primitive type and therefore doesn't have fields - 42.a; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + 42.a; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields } diff --git a/src/test/ui/typeck/issue-100246.rs b/src/test/ui/typeck/issue-100246.rs index 8f0b34bab0c87..d247c5615957e 100644 --- a/src/test/ui/typeck/issue-100246.rs +++ b/src/test/ui/typeck/issue-100246.rs @@ -25,6 +25,6 @@ fn downcast<'a, W: ?Sized>() -> std::io::Result<&'a W> { struct Other; fn main() -> std::io::Result<()> { - let other: Other = downcast()?;//~ERROR 28:24: 28:35: `?` operator has incompatible types + let other: Other = downcast()?;//~ ERROR 28:24: 28:35: `?` operator has incompatible types Ok(()) } diff --git a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs b/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs index 7bf151514c3dd..4833346df04b9 100644 --- a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs +++ b/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs @@ -29,17 +29,17 @@ impl Eq for Point fn equals_ref(a: &Point, b: &Point) -> bool { a.x == b.x && a.y == b.y //~ ERROR no field `x` on type `&Point` [E0609] - //~|ERROR no field `x` on type `&Point` [E0609] - //~|ERROR no field `y` on type `&Point` [E0609] - //~|ERROR no field `y` on type `&Point` [E0609] + //~| ERROR no field `x` on type `&Point` [E0609] + //~| ERROR no field `y` on type `&Point` [E0609] + //~| ERROR no field `y` on type `&Point` [E0609] } fn equals_val(a: Point, b: Point) -> bool { a.x == b.x && a.y == b.y //~ ERROR no field `x` on type `Point` [E0609] - //~|ERROR no field `x` on type `Point` [E0609] - //~|ERROR no field `y` on type `Point` [E0609] - //~|ERROR no field `y` on type `Point` [E0609] + //~| ERROR no field `x` on type `Point` [E0609] + //~| ERROR no field `y` on type `Point` [E0609] + //~| ERROR no field `y` on type `Point` [E0609] } } diff --git a/src/test/ui/typeck/issue-81943.rs b/src/test/ui/typeck/issue-81943.rs index 18f5970a350a2..496be9e63042f 100644 --- a/src/test/ui/typeck/issue-81943.rs +++ b/src/test/ui/typeck/issue-81943.rs @@ -4,10 +4,10 @@ extern crate issue_81943_lib as lib; fn f(f: F) { f(0); } fn g(t: i32) -> i32 { t } fn main() { - f(|x| lib::d!(x)); //~ERROR - f(|x| match x { tmp => { g(tmp) } }); //~ERROR + f(|x| lib::d!(x)); //~ ERROR + f(|x| match x { tmp => { g(tmp) } }); //~ ERROR macro_rules! d { - ($e:expr) => { match $e { x => { g(x) } } } //~ERROR + ($e:expr) => { match $e { x => { g(x) } } } //~ ERROR } f(|x| d!(x)); } diff --git a/src/test/ui/typeck/issue-84160.rs b/src/test/ui/typeck/issue-84160.rs index 7b444df85282a..7194dab11f85f 100644 --- a/src/test/ui/typeck/issue-84160.rs +++ b/src/test/ui/typeck/issue-84160.rs @@ -3,7 +3,7 @@ fn mismatched_types_with_reference(x: &u32) -> &u32 { return x; } return "test"; - //~^ERROR mismatched types + //~^ ERROR mismatched types } fn main() {} diff --git a/src/test/ui/typeck/issue-88803-call-expr-method.fixed b/src/test/ui/typeck/issue-88803-call-expr-method.fixed index 19b96ecf3fc3a..382f64fc77f1d 100644 --- a/src/test/ui/typeck/issue-88803-call-expr-method.fixed +++ b/src/test/ui/typeck/issue-88803-call-expr-method.fixed @@ -4,6 +4,6 @@ fn main() { let a = Some(42); println!( "The value is {}.", - a.unwrap() //~ERROR [E0615] + a.unwrap() //~ ERROR [E0615] ); } diff --git a/src/test/ui/typeck/issue-88803-call-expr-method.rs b/src/test/ui/typeck/issue-88803-call-expr-method.rs index a061994663749..24b37105bbe47 100644 --- a/src/test/ui/typeck/issue-88803-call-expr-method.rs +++ b/src/test/ui/typeck/issue-88803-call-expr-method.rs @@ -4,6 +4,6 @@ fn main() { let a = Some(42); println!( "The value is {}.", - (a.unwrap)() //~ERROR [E0615] + (a.unwrap)() //~ ERROR [E0615] ); } diff --git a/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed b/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed index 0a3086a345dda..c2482843eea89 100644 --- a/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed +++ b/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed @@ -4,6 +4,6 @@ fn main() { let a = Some(42); println!( "The value is {}.", - (a.unwrap()) //~ERROR [E0615] + (a.unwrap()) //~ ERROR [E0615] ); } diff --git a/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs b/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs index 83617e035e9ef..bee083f234d62 100644 --- a/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs +++ b/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs @@ -4,6 +4,6 @@ fn main() { let a = Some(42); println!( "The value is {}.", - (a.unwrap) //~ERROR [E0615] + (a.unwrap) //~ ERROR [E0615] ); } diff --git a/src/test/ui/typeck/issue-89275.rs b/src/test/ui/typeck/issue-89275.rs index b91c001754872..e05de418836bd 100644 --- a/src/test/ui/typeck/issue-89275.rs +++ b/src/test/ui/typeck/issue-89275.rs @@ -1,7 +1,7 @@ #![recursion_limit = "5"] // To reduce noise -//expect mutability error when ambiguous traits are in scope -//and not an overflow error on the span in the main function. +// expect mutability error when ambiguous traits are in scope +// and not an overflow error on the span in the main function. struct Ratio(T); @@ -25,5 +25,5 @@ fn downcast<'a, W: ?Sized>() -> &'a W { struct Other; fn main() { - let other: &mut Other = downcast();//~ERROR 28:29: 28:39: mismatched types [E0308] + let other: &mut Other = downcast(); //~ ERROR 28:29: 28:39: mismatched types [E0308] } diff --git a/src/test/ui/typeck/issue-90319.rs b/src/test/ui/typeck/issue-90319.rs index 57e6ac7cf34f5..34beae5594e11 100644 --- a/src/test/ui/typeck/issue-90319.rs +++ b/src/test/ui/typeck/issue-90319.rs @@ -11,7 +11,7 @@ fn get() -> T { } fn main() { - let thing = get::();//~ERROR cannot find type `Thing` in this scope [E0412] + let thing = get::(); //~ ERROR cannot find type `Thing` in this scope [E0412] let wrapper = Wrapper(thing); Trait::method(&wrapper); } diff --git a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed index ba83e79005b33..264c01fd22460 100644 --- a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed +++ b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed @@ -1,11 +1,11 @@ // run-rustfix fn main() { - 2.0e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0E1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0f64; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0e+12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0e-12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.0e1f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0e1; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0E1; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0f32; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0f64; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0e+12; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0e-12; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.0e1f32; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields } diff --git a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs index c102447f60288..ce4ebd84e2681 100644 --- a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs +++ b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs @@ -1,11 +1,11 @@ // run-rustfix fn main() { - 2.e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.E1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.f64; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.e+12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.e-12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields - 2.e1f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.e1; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.E1; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.f32; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.f64; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.e+12; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.e-12; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields + 2.e1f32; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields } diff --git a/src/test/ui/union/union-borrow-move-parent-sibling.rs b/src/test/ui/union/union-borrow-move-parent-sibling.rs index 83781c5e55092..5c335b2ec5703 100644 --- a/src/test/ui/union/union-borrow-move-parent-sibling.rs +++ b/src/test/ui/union/union-borrow-move-parent-sibling.rs @@ -59,7 +59,7 @@ unsafe fn parent_sibling_borrow() { unsafe fn parent_sibling_move() { let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) }; - let a = u.x.0; //~ERROR cannot move out of dereference + let a = u.x.0; //~ ERROR cannot move out of dereference let a = u.x; let b = u.y; //~ ERROR use of moved value: `u` } @@ -73,7 +73,7 @@ unsafe fn grandparent_sibling_borrow() { unsafe fn grandparent_sibling_move() { let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) }; - let a = (u.x.0).0; //~ERROR cannot move out of dereference + let a = (u.x.0).0; //~ ERROR cannot move out of dereference let a = u.x; let b = u.y; //~ ERROR use of moved value: `u` } diff --git a/src/test/ui/union/union-deref.rs b/src/test/ui/union/union-deref.rs index 5aa28d93f96ed..459b97f46beca 100644 --- a/src/test/ui/union/union-deref.rs +++ b/src/test/ui/union/union-deref.rs @@ -13,17 +13,17 @@ union U2 { x:(), f: (ManuallyDrop<(T,)>,) } fn main() { let mut u : U1> = U1 { x: () }; unsafe { (*u.f).0 = Vec::new() }; // explicit deref, this compiles - unsafe { u.f.0 = Vec::new() }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { u.f.0 = Vec::new() }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field unsafe { &mut (*u.f).0 }; // explicit deref, this compiles - unsafe { &mut u.f.0 }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { &mut u.f.0 }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field unsafe { (*u.f).0.push(0) }; // explicit deref, this compiles - unsafe { u.f.0.push(0) }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { u.f.0.push(0) }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field let mut u : U2> = U2 { x: () }; unsafe { (*u.f.0).0 = Vec::new() }; // explicit deref, this compiles - unsafe { u.f.0.0 = Vec::new() }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { u.f.0.0 = Vec::new() }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field unsafe { &mut (*u.f.0).0 }; // explicit deref, this compiles - unsafe { &mut u.f.0.0 }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { &mut u.f.0.0 }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field unsafe { (*u.f.0).0.push(0) }; // explicit deref, this compiles - unsafe { u.f.0.0.push(0) }; //~ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field + unsafe { u.f.0.0.push(0) }; //~ ERROR not automatically applying `DerefMut` on `ManuallyDrop` union field } diff --git a/src/test/ui/unsized-locals/borrow-after-move.rs b/src/test/ui/unsized-locals/borrow-after-move.rs index ad73b720fa39d..78ae600a8896c 100644 --- a/src/test/ui/unsized-locals/borrow-after-move.rs +++ b/src/test/ui/unsized-locals/borrow-after-move.rs @@ -19,9 +19,9 @@ fn main() { let y = *x; drop_unsized(y); println!("{}", &x); - //~^ERROR borrow of moved value + //~^ ERROR borrow of moved value println!("{}", &y); - //~^ERROR borrow of moved value + //~^ ERROR borrow of moved value } { @@ -29,15 +29,15 @@ fn main() { let y = *x; y.foo(); println!("{}", &x); - //~^ERROR borrow of moved value + //~^ ERROR borrow of moved value println!("{}", &y); - //~^ERROR borrow of moved value + //~^ ERROR borrow of moved value } { let x = "hello".to_owned().into_boxed_str(); x.foo(); println!("{}", &x); - //~^ERROR borrow of moved value + //~^ ERROR borrow of moved value } } diff --git a/src/test/ui/unsized-locals/by-value-trait-object-safety.rs b/src/test/ui/unsized-locals/by-value-trait-object-safety.rs index d0ba6944a1e81..bff38f96f0d46 100644 --- a/src/test/ui/unsized-locals/by-value-trait-object-safety.rs +++ b/src/test/ui/unsized-locals/by-value-trait-object-safety.rs @@ -18,5 +18,5 @@ impl Foo for A { fn main() { let x = *(Box::new(A) as Box); x.foo(); - //~^ERROR the `foo` method cannot be invoked on a trait object + //~^ ERROR the `foo` method cannot be invoked on a trait object } diff --git a/src/test/ui/unsized-locals/double-move.rs b/src/test/ui/unsized-locals/double-move.rs index 9e46ef9be487c..2765fb47a1236 100644 --- a/src/test/ui/unsized-locals/double-move.rs +++ b/src/test/ui/unsized-locals/double-move.rs @@ -18,37 +18,37 @@ fn main() { let x = "hello".to_owned().into_boxed_str(); let y = *x; drop_unsized(y); - drop_unsized(y); //~ERROR use of moved value + drop_unsized(y); //~ ERROR use of moved value } { let x = "hello".to_owned().into_boxed_str(); let _y = *x; - drop_unsized(x); //~ERROR use of moved value + drop_unsized(x); //~ ERROR use of moved value } { let x = "hello".to_owned().into_boxed_str(); drop_unsized(x); - let _y = *x; //~ERROR use of moved value + let _y = *x; //~ ERROR use of moved value } { let x = "hello".to_owned().into_boxed_str(); let y = *x; y.foo(); - y.foo(); //~ERROR use of moved value + y.foo(); //~ ERROR use of moved value } { let x = "hello".to_owned().into_boxed_str(); let _y = *x; - x.foo(); //~ERROR use of moved value + x.foo(); //~ ERROR use of moved value } { let x = "hello".to_owned().into_boxed_str(); x.foo(); - let _y = *x; //~ERROR use of moved value + let _y = *x; //~ ERROR use of moved value } } diff --git a/src/test/ui/unsized-locals/issue-50940-with-feature.rs b/src/test/ui/unsized-locals/issue-50940-with-feature.rs index 63b0e830be4ed..e679dde9a64e0 100644 --- a/src/test/ui/unsized-locals/issue-50940-with-feature.rs +++ b/src/test/ui/unsized-locals/issue-50940-with-feature.rs @@ -4,5 +4,5 @@ fn main() { struct A(X); A as fn(str) -> A; - //~^ERROR the size for values of type `str` cannot be known at compilation time + //~^ ERROR the size for values of type `str` cannot be known at compilation time } diff --git a/src/test/ui/unsized-locals/issue-50940.rs b/src/test/ui/unsized-locals/issue-50940.rs index 7ba809b7e83e3..798f1188a3b6c 100644 --- a/src/test/ui/unsized-locals/issue-50940.rs +++ b/src/test/ui/unsized-locals/issue-50940.rs @@ -1,5 +1,5 @@ fn main() { struct A(X); A as fn(str) -> A; - //~^ERROR the size for values of type `str` cannot be known at compilation time + //~^ ERROR the size for values of type `str` cannot be known at compilation time } diff --git a/src/test/ui/unsized-locals/unsized-exprs.rs b/src/test/ui/unsized-locals/unsized-exprs.rs index 1729b9ffa8670..0389f6a19b13f 100644 --- a/src/test/ui/unsized-locals/unsized-exprs.rs +++ b/src/test/ui/unsized-locals/unsized-exprs.rs @@ -20,9 +20,9 @@ impl std::ops::Add for A<[u8]> { fn main() { udrop::<(i32, [u8])>((42, *foo())); - //~^ERROR E0277 + //~^ ERROR E0277 udrop::>(A { 0: *foo() }); - //~^ERROR E0277 + //~^ ERROR E0277 udrop::>(A(*foo())); - //~^ERROR E0277 + //~^ ERROR E0277 } diff --git a/src/test/ui/unsized-locals/unsized-exprs2.rs b/src/test/ui/unsized-locals/unsized-exprs2.rs index 127d8717e5806..aa9d9a26c02d0 100644 --- a/src/test/ui/unsized-locals/unsized-exprs2.rs +++ b/src/test/ui/unsized-locals/unsized-exprs2.rs @@ -20,5 +20,5 @@ impl std::ops::Add for A<[u8]> { fn main() { udrop::<[u8]>(foo()[..]); - //~^ERROR cannot move out of type `[u8]`, a non-copy slice + //~^ ERROR cannot move out of type `[u8]`, a non-copy slice } diff --git a/src/test/ui/unsized-locals/unsized-exprs3.rs b/src/test/ui/unsized-locals/unsized-exprs3.rs index 2133b01e09480..7526da3283d08 100644 --- a/src/test/ui/unsized-locals/unsized-exprs3.rs +++ b/src/test/ui/unsized-locals/unsized-exprs3.rs @@ -6,5 +6,5 @@ use ufuncs::udrop; fn main() { udrop as fn([u8]); - //~^ERROR E0277 + //~^ ERROR E0277 }