From 3818981ca12ca79dc446fad849d48ebe1257cbc7 Mon Sep 17 00:00:00 2001 From: Hirochika Matsumoto Date: Sun, 3 Oct 2021 15:53:02 +0900 Subject: [PATCH] Practice diagnostic message convention --- .../rustc_ast_passes/src/ast_validation.rs | 2 +- .../rustc_builtin_macros/src/concat_idents.rs | 6 ++--- compiler/rustc_builtin_macros/src/test.rs | 2 +- .../src/transform/check_consts/ops.rs | 4 +-- compiler/rustc_lint/src/array_into_iter.rs | 2 +- compiler/rustc_lint/src/builtin.rs | 6 ++--- compiler/rustc_lint/src/non_ascii_idents.rs | 7 +++-- compiler/rustc_metadata/src/creader.rs | 2 +- compiler/rustc_metadata/src/native_libs.rs | 4 +-- compiler/rustc_passes/src/weak_lang_items.rs | 4 +-- compiler/rustc_resolve/src/imports.rs | 2 +- compiler/rustc_session/src/session.rs | 2 +- .../src/traits/error_reporting/mod.rs | 2 +- .../rustc_trait_selection/src/traits/mod.rs | 2 +- library/core/src/cell.rs | 4 +-- library/std/src/sync/mutex.rs | 2 +- library/std/src/sync/rwlock.rs | 4 +-- .../anon-params/anon-params-deprecated.stderr | 6 ++--- .../const-eval/const_raw_ptr_ops.stderr | 4 +-- .../const-eval/match-test-ptr-null.stderr | 2 +- .../const-extern-fn-min-const-fn.stderr | 2 +- src/test/ui/consts/issue-17458.stderr | 2 +- src/test/ui/consts/issue-25826.stderr | 2 +- ...issue-52023-array-size-pointer-cast.stderr | 2 +- .../min_const_fn/cmp_fn_pointers.stderr | 2 +- .../consts/min_const_fn/min_const_fn.stderr | 8 +++--- src/test/ui/error-codes/E0395.stderr | 2 +- .../ui/future-incompatible-lint-group.stderr | 2 +- src/test/ui/imports/issue-30560.stderr | 2 +- src/test/ui/issues/issue-18294.stderr | 2 +- src/test/ui/issues/issue-50403.stderr | 2 +- .../iterators/into-iter-on-arrays-2018.stderr | 10 +++---- .../iterators/into-iter-on-arrays-lint.stderr | 24 ++++++++--------- src/test/ui/lang-items/issue-83471.stderr | 2 +- .../ui/lint/must_not_suspend/mutex.stderr | 2 +- .../lint-mixed-script-confusables.rs | 6 ++--- .../lint-mixed-script-confusables.stderr | 18 ++++++------- .../ui/macros/macros-nonfatal-errors.stderr | 2 +- .../missing-alloc_error_handler.stderr | 4 +-- src/test/ui/missing/missing-allocator.stderr | 2 +- .../defaulted-never-note.fallback.stderr | 2 +- ...diverging-fallback-no-leak.fallback.stderr | 2 +- .../missing-link-attr.stderr | 2 +- .../multiple-renames.stderr | 2 +- .../extern_block_nonascii_forbidden.stderr | 6 ++--- src/test/ui/sanitize/crt-static.stderr | 2 +- .../test-attrs/test-should-panic-attr.stderr | 8 +++--- src/test/ui/traits/vtable/vtable-diamond.rs | 4 +-- .../ui/traits/vtable/vtable-diamond.stderr | 4 +-- .../ui/traits/vtable/vtable-multi-level.rs | 24 ++++++++--------- .../traits/vtable/vtable-multi-level.stderr | 24 ++++++++--------- src/test/ui/traits/vtable/vtable-multiple.rs | 4 +-- .../ui/traits/vtable/vtable-multiple.stderr | 4 +-- .../traits/vtable/vtable-non-object-safe.rs | 2 +- .../vtable/vtable-non-object-safe.stderr | 2 +- src/test/ui/traits/vtable/vtable-vacant.rs | 2 +- .../ui/traits/vtable/vtable-vacant.stderr | 2 +- .../trivial-bounds-inconsistent-copy.stderr | 8 +++--- ...vial-bounds-inconsistent-projection.stderr | 14 +++++----- .../trivial-bounds-inconsistent-sized.stderr | 6 ++--- ...ial-bounds-inconsistent-well-formed.stderr | 4 +-- .../trivial-bounds-inconsistent.stderr | 26 +++++++++---------- .../trivial-bounds/trivial-bounds-lint.stderr | 14 +++++----- 63 files changed, 167 insertions(+), 168 deletions(-) diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index 24108f779c818..dea2a0e2a4399 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -590,7 +590,7 @@ impl<'a> AstValidator<'a> { ) .span_label(self.current_extern_span(), "in this `extern` block") .note(&format!( - "This limitation may be lifted in the future; see issue #{} for more information", + "this limitation may be lifted in the future; see issue #{} for more information", n, n, )) .emit(); diff --git a/compiler/rustc_builtin_macros/src/concat_idents.rs b/compiler/rustc_builtin_macros/src/concat_idents.rs index 209158ce39206..53a456b69acfd 100644 --- a/compiler/rustc_builtin_macros/src/concat_idents.rs +++ b/compiler/rustc_builtin_macros/src/concat_idents.rs @@ -12,7 +12,7 @@ pub fn expand_concat_idents<'cx>( tts: TokenStream, ) -> Box { if tts.is_empty() { - cx.span_err(sp, "concat_idents! takes 1 or more arguments."); + cx.span_err(sp, "concat_idents! takes 1 or more arguments"); return DummyResult::any(sp); } @@ -22,7 +22,7 @@ pub fn expand_concat_idents<'cx>( match e { TokenTree::Token(Token { kind: token::Comma, .. }) => {} _ => { - cx.span_err(sp, "concat_idents! expecting comma."); + cx.span_err(sp, "concat_idents! expecting comma"); return DummyResult::any(sp); } } @@ -34,7 +34,7 @@ pub fn expand_concat_idents<'cx>( } } - cx.span_err(sp, "concat_idents! requires ident args."); + cx.span_err(sp, "concat_idents! requires ident args"); return DummyResult::any(sp); } } diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index 99544ddb66e66..bbca07085ea36 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -382,7 +382,7 @@ fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic { .note( "errors in this attribute were erroneously \ allowed and will become a hard error in a \ - future release.", + future release", ) .emit(); ShouldPanic::Yes(None) diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 1d0ee949a221b..a39fca0d8be9b 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -407,7 +407,7 @@ impl NonConstOp for RawPtrComparison { let mut err = ccx .tcx .sess - .struct_span_err(span, "pointers cannot be reliably compared during const eval."); + .struct_span_err(span, "pointers cannot be reliably compared during const eval"); err.note( "see issue #53020 \ for more information", @@ -443,7 +443,7 @@ impl NonConstOp for RawPtrToIntCast { let mut err = ccx .tcx .sess - .struct_span_err(span, "pointers cannot be cast to integers during const eval."); + .struct_span_err(span, "pointers cannot be cast to integers during const eval"); err.note("at compile-time, pointers do not have an integer value"); err.note( "avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior", diff --git a/compiler/rustc_lint/src/array_into_iter.rs b/compiler/rustc_lint/src/array_into_iter.rs index 1facd97375433..d147148ac7136 100644 --- a/compiler/rustc_lint/src/array_into_iter.rs +++ b/compiler/rustc_lint/src/array_into_iter.rs @@ -124,7 +124,7 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter { let mut diag = lint.build(&format!( "this method call resolves to `<&{} as IntoIterator>::into_iter` \ (due to backwards compatibility), \ - but will resolve to <{} as IntoIterator>::into_iter in Rust 2021.", + but will resolve to <{} as IntoIterator>::into_iter in Rust 2021", target, target, )); diag.span_suggestion( diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 9b6493222e675..5656fff2fcb72 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -918,7 +918,7 @@ impl EarlyLintPass for AnonymousParameters { lint.build( "anonymous parameters are deprecated and will be \ - removed in the next edition.", + removed in the next edition", ) .span_suggestion( arg.pat.span, @@ -1629,9 +1629,9 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints { let predicates = cx.tcx.predicates_of(item.def_id); for &(predicate, span) in predicates.predicates { let predicate_kind_name = match predicate.kind().skip_binder() { - Trait(..) => "Trait", + Trait(..) => "trait", TypeOutlives(..) | - RegionOutlives(..) => "Lifetime", + RegionOutlives(..) => "lifetime", // Ignore projections, as they can only be global // if the trait bound is global diff --git a/compiler/rustc_lint/src/non_ascii_idents.rs b/compiler/rustc_lint/src/non_ascii_idents.rs index 301e607fc58ad..9b4ee148df48a 100644 --- a/compiler/rustc_lint/src/non_ascii_idents.rs +++ b/compiler/rustc_lint/src/non_ascii_idents.rs @@ -331,9 +331,9 @@ impl EarlyLintPass for NonAsciiIdents { for ((sp, ch_list), script_set) in lint_reports { cx.struct_span_lint(MIXED_SCRIPT_CONFUSABLES, sp, |lint| { let message = format!( - "The usage of Script Group `{}` in this crate consists solely of mixed script confusables", + "the usage of Script Group `{}` in this crate consists solely of mixed script confusables", script_set); - let mut note = "The usage includes ".to_string(); + let mut note = "the usage includes ".to_string(); for (idx, ch) in ch_list.into_iter().enumerate() { if idx != 0 { note += ", "; @@ -341,8 +341,7 @@ impl EarlyLintPass for NonAsciiIdents { let char_info = format!("'{}' (U+{:04X})", ch, ch as u32); note += &char_info; } - note += "."; - lint.build(&message).note(¬e).note("Please recheck to make sure their usages are indeed what you want.").emit() + lint.build(&message).note(¬e).note("please recheck to make sure their usages are indeed what you want").emit() }); } } diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index 48d8cdf57dcfc..3a05020c0b55b 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -878,7 +878,7 @@ impl<'a> CrateLoader<'a> { "no global memory allocator found but one is \ required; link to std or \ add `#[global_allocator]` to a static item \ - that implements the GlobalAlloc trait.", + that implements the GlobalAlloc trait", ); } self.cstore.allocator_kind = Some(AllocatorKind::Default); diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs index 39709e1bd0716..93226b6a2f2d7 100644 --- a/compiler/rustc_metadata/src/native_libs.rs +++ b/compiler/rustc_metadata/src/native_libs.rs @@ -319,13 +319,13 @@ impl Collector<'tcx> { self.tcx.sess.err(&format!( "renaming of the library `{}` was specified, \ however this crate contains no `#[link(...)]` \ - attributes referencing this library.", + attributes referencing this library", lib.name )); } else if !renames.insert(&lib.name) { self.tcx.sess.err(&format!( "multiple renamings were \ - specified for library `{}` .", + specified for library `{}`", lib.name )); } diff --git a/compiler/rustc_passes/src/weak_lang_items.rs b/compiler/rustc_passes/src/weak_lang_items.rs index bb5be90cd404b..c6c32e69aab77 100644 --- a/compiler/rustc_passes/src/weak_lang_items.rs +++ b/compiler/rustc_passes/src/weak_lang_items.rs @@ -66,8 +66,8 @@ fn verify<'tcx>(tcx: TyCtxt<'tcx>, items: &lang_items::LanguageItems) { tcx.sess.err("`#[panic_handler]` function required, but not found"); } else if item == LangItem::Oom { if !tcx.features().default_alloc_error_handler { - tcx.sess.err("`#[alloc_error_handler]` function required, but not found."); - tcx.sess.note_without_error("Use `#![feature(default_alloc_error_handler)]` for a default error handler."); + tcx.sess.err("`#[alloc_error_handler]` function required, but not found"); + tcx.sess.note_without_error("Use `#![feature(default_alloc_error_handler)]` for a default error handler"); } } else { tcx.sess.err(&format!("language item required, but not found: `{}`", name)); diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index bb34776f0b02d..9be568b2cf145 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -1339,7 +1339,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> { }; if module.is_trait() { - self.r.session.span_err(import.span, "items in traits are not importable."); + self.r.session.span_err(import.span, "items in traits are not importable"); return; } else if ptr::eq(module, import.parent_scope.module) { return; diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index fbcc3bf2c4815..bf04154a3dafe 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -1384,7 +1384,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) { // Cannot enable crt-static with sanitizers on Linux if sess.crt_static(None) && !sess.opts.debugging_opts.sanitizer.is_empty() { sess.err( - "Sanitizer is incompatible with statically linked libc, \ + "sanitizer is incompatible with statically linked libc, \ disable it using `-C target-feature=-crt-static`", ); } diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 93ddec61dc4a1..6447e4cbf2bf6 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -516,7 +516,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { }); let unit_obligation = obligation.with(predicate.to_predicate(tcx)); if self.predicate_may_hold(&unit_obligation) { - err.note("this trait is implemented for `()`."); + err.note("this trait is implemented for `()`"); err.note( "this error might have been caused by changes to \ Rust's type-inference algorithm (see issue #48950 \ diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index b3c9cf4c173ec..be438f02a9710 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -623,7 +623,7 @@ fn dump_vtable_entries<'tcx>( trait_ref: ty::PolyTraitRef<'tcx>, entries: &[VtblEntry<'tcx>], ) { - let msg = format!("Vtable entries for `{}`: {:#?}", trait_ref, entries); + let msg = format!("vtable entries for `{}`: {:#?}", trait_ref, entries); tcx.sess.struct_span_err(sp, &msg).emit(); } diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index c0121eebb7fef..025ad54b539f5 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1305,7 +1305,7 @@ impl Clone for BorrowRef<'_> { #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a Ref across suspend \ + must_not_suspend = "holding a Ref across suspend \ points can cause BorrowErrors" )] pub struct Ref<'b, T: ?Sized + 'b> { @@ -1686,7 +1686,7 @@ impl<'b> BorrowRefMut<'b> { #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a RefMut across suspend \ + must_not_suspend = "holding a RefMut across suspend \ points can cause BorrowErrors" )] pub struct RefMut<'b, T: ?Sized + 'b> { diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs index 0d844547376b2..57f1dcca30e0a 100644 --- a/library/std/src/sync/mutex.rs +++ b/library/std/src/sync/mutex.rs @@ -190,7 +190,7 @@ unsafe impl Sync for Mutex {} #[must_use = "if unused the Mutex will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a MutexGuard across suspend \ + must_not_suspend = "holding a MutexGuard across suspend \ points can cause deadlocks, delays, \ and cause Futures to not implement `Send`" )] diff --git a/library/std/src/sync/rwlock.rs b/library/std/src/sync/rwlock.rs index aa1ce82d96799..2f4395ceefd13 100644 --- a/library/std/src/sync/rwlock.rs +++ b/library/std/src/sync/rwlock.rs @@ -97,7 +97,7 @@ unsafe impl Sync for RwLock {} #[must_use = "if unused the RwLock will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a RwLockReadGuard across suspend \ + must_not_suspend = "holding a RwLockReadGuard across suspend \ points can cause deadlocks, delays, \ and cause Futures to not implement `Send`" )] @@ -123,7 +123,7 @@ unsafe impl Sync for RwLockReadGuard<'_, T> {} #[must_use = "if unused the RwLock will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a RwLockWriteGuard across suspend \ + must_not_suspend = "holding a RwLockWriteGuard across suspend \ points can cause deadlocks, delays, \ and cause Future's to not implement `Send`" )] diff --git a/src/test/ui/anon-params/anon-params-deprecated.stderr b/src/test/ui/anon-params/anon-params-deprecated.stderr index 98d52d659a9d3..474b14f59e3ab 100644 --- a/src/test/ui/anon-params/anon-params-deprecated.stderr +++ b/src/test/ui/anon-params/anon-params-deprecated.stderr @@ -1,4 +1,4 @@ -warning: anonymous parameters are deprecated and will be removed in the next edition. +warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/anon-params-deprecated.rs:9:12 | LL | fn foo(i32); @@ -12,7 +12,7 @@ LL | #![warn(anonymous_parameters)] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 -warning: anonymous parameters are deprecated and will be removed in the next edition. +warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/anon-params-deprecated.rs:12:30 | LL | fn bar_with_default_impl(String, String) {} @@ -21,7 +21,7 @@ LL | fn bar_with_default_impl(String, String) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 -warning: anonymous parameters are deprecated and will be removed in the next edition. +warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/anon-params-deprecated.rs:12:38 | LL | fn bar_with_default_impl(String, String) {} diff --git a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr index 21d3f5e7e8536..1f5bca273d3b0 100644 --- a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be reliably compared during const eval. +error: pointers cannot be reliably compared during const eval --> $DIR/const_raw_ptr_ops.rs:4:26 | LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; @@ -6,7 +6,7 @@ LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; | = note: see issue #53020 for more information -error: pointers cannot be reliably compared during const eval. +error: pointers cannot be reliably compared during const eval --> $DIR/const_raw_ptr_ops.rs:6:27 | LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; diff --git a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr index 4e55b36da7392..05c3951c1284b 100644 --- a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr +++ b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/match-test-ptr-null.rs:6:15 | LL | match &1 as *const i32 as usize { diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr index 2e52bae2b676c..2b2d23477f681 100644 --- a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr +++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr @@ -25,7 +25,7 @@ LL | const unsafe extern "C" fn use_float() { 1.0 + 1.0; } = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/const-extern-fn-min-const-fn.rs:9:48 | LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; } diff --git a/src/test/ui/consts/issue-17458.stderr b/src/test/ui/consts/issue-17458.stderr index aab7d798db2e7..8936c8d84ecff 100644 --- a/src/test/ui/consts/issue-17458.stderr +++ b/src/test/ui/consts/issue-17458.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/issue-17458.rs:1:28 | LL | static X: usize = unsafe { core::ptr::null::() as usize }; diff --git a/src/test/ui/consts/issue-25826.stderr b/src/test/ui/consts/issue-25826.stderr index 67d1b3ab9bed6..780edd2149fe1 100644 --- a/src/test/ui/consts/issue-25826.stderr +++ b/src/test/ui/consts/issue-25826.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be reliably compared during const eval. +error: pointers cannot be reliably compared during const eval --> $DIR/issue-25826.rs:3:30 | LL | const A: bool = unsafe { id:: as *const () < id:: as *const () }; diff --git a/src/test/ui/consts/issue-52023-array-size-pointer-cast.stderr b/src/test/ui/consts/issue-52023-array-size-pointer-cast.stderr index 363c7b2c8e462..9a3d5716e001b 100644 --- a/src/test/ui/consts/issue-52023-array-size-pointer-cast.stderr +++ b/src/test/ui/consts/issue-52023-array-size-pointer-cast.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/issue-52023-array-size-pointer-cast.rs:2:17 | LL | let _ = [0; (&0 as *const i32) as usize]; diff --git a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr index 04c2febeb9768..5d8483cd111bf 100644 --- a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr +++ b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr @@ -16,7 +16,7 @@ LL | const fn cmp(x: fn(), y: fn()) -> bool { = note: see issue #57563 for more information = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable -error: pointers cannot be reliably compared during const eval. +error: pointers cannot be reliably compared during const eval --> $DIR/cmp_fn_pointers.rs:4:14 | LL | unsafe { x == y } diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr index 1e275d77bac67..fd1ab6f64bf56 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr @@ -164,7 +164,7 @@ LL | const fn foo26() -> &'static u32 { &BAR } | = help: consider extracting the value of the `static` to a `const`, and referring to that -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/min_const_fn.rs:92:42 | LL | const fn foo30(x: *const u32) -> usize { x as usize } @@ -173,7 +173,7 @@ LL | const fn foo30(x: *const u32) -> usize { x as usize } = note: at compile-time, pointers do not have an integer value = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/min_const_fn.rs:94:63 | LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } } @@ -182,7 +182,7 @@ LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } = note: at compile-time, pointers do not have an integer value = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/min_const_fn.rs:96:42 | LL | const fn foo30_2(x: *mut u32) -> usize { x as usize } @@ -191,7 +191,7 @@ LL | const fn foo30_2(x: *mut u32) -> usize { x as usize } = note: at compile-time, pointers do not have an integer value = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/min_const_fn.rs:98:63 | LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } } diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr index 674cc69645029..ea17e95a719af 100644 --- a/src/test/ui/error-codes/E0395.stderr +++ b/src/test/ui/error-codes/E0395.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be reliably compared during const eval. +error: pointers cannot be reliably compared during const eval --> $DIR/E0395.rs:4:29 | LL | static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index cb9be88c9ee44..d822847a7a589 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -1,4 +1,4 @@ -warning: anonymous parameters are deprecated and will be removed in the next edition. +warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/future-incompatible-lint-group.rs:7:10 | LL | fn f(u8) {} diff --git a/src/test/ui/imports/issue-30560.stderr b/src/test/ui/imports/issue-30560.stderr index b74134aaccc0d..69cfd4c06a8b8 100644 --- a/src/test/ui/imports/issue-30560.stderr +++ b/src/test/ui/imports/issue-30560.stderr @@ -1,4 +1,4 @@ -error: items in traits are not importable. +error: items in traits are not importable --> $DIR/issue-30560.rs:7:5 | LL | use T::*; diff --git a/src/test/ui/issues/issue-18294.stderr b/src/test/ui/issues/issue-18294.stderr index 432e9a6518765..e0cbd2a216dbb 100644 --- a/src/test/ui/issues/issue-18294.stderr +++ b/src/test/ui/issues/issue-18294.stderr @@ -1,4 +1,4 @@ -error: pointers cannot be cast to integers during const eval. +error: pointers cannot be cast to integers during const eval --> $DIR/issue-18294.rs:3:31 | LL | const Y: usize = unsafe { &X as *const u32 as usize }; diff --git a/src/test/ui/issues/issue-50403.stderr b/src/test/ui/issues/issue-50403.stderr index d20a98ecc6ad5..a3a2ed044db3e 100644 --- a/src/test/ui/issues/issue-50403.stderr +++ b/src/test/ui/issues/issue-50403.stderr @@ -1,4 +1,4 @@ -error: concat_idents! takes 1 or more arguments. +error: concat_idents! takes 1 or more arguments --> $DIR/issue-50403.rs:4:13 | LL | let x = concat_idents!(); diff --git a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr index bc08fdcafa08d..e994d69110698 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr @@ -1,4 +1,4 @@ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-2018.rs:14:34 | LL | let _: Iter<'_, i32> = array.into_iter(); @@ -16,7 +16,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit LL | let _: Iter<'_, i32> = IntoIterator::into_iter(array); | ++++++++++++++++++++++++ ~ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-2018.rs:18:44 | LL | let _: Iter<'_, i32> = Box::new(array).into_iter(); @@ -25,7 +25,7 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-2018.rs:22:43 | LL | let _: Iter<'_, i32> = Rc::new(array).into_iter(); @@ -34,7 +34,7 @@ LL | let _: Iter<'_, i32> = Rc::new(array).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-2018.rs:25:41 | LL | let _: Iter<'_, i32> = Array(array).into_iter(); @@ -43,7 +43,7 @@ LL | let _: Iter<'_, i32> = Array(array).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-2018.rs:32:24 | LL | for _ in [1, 2, 3].into_iter() {} diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr index 2df1a06df20ab..634728096ed69 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr @@ -1,4 +1,4 @@ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:10:11 | LL | small.into_iter(); @@ -16,7 +16,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit LL | IntoIterator::into_iter(small); | ++++++++++++++++++++++++ ~ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:13:12 | LL | [1, 2].into_iter(); @@ -33,7 +33,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit LL | IntoIterator::into_iter([1, 2]); | ++++++++++++++++++++++++ ~ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:16:9 | LL | big.into_iter(); @@ -50,7 +50,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit LL | IntoIterator::into_iter(big); | ++++++++++++++++++++++++ ~ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:19:15 | LL | [0u8; 33].into_iter(); @@ -67,7 +67,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit LL | IntoIterator::into_iter([0u8; 33]); | ++++++++++++++++++++++++ ~ -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:23:21 | LL | Box::new(small).into_iter(); @@ -76,7 +76,7 @@ LL | Box::new(small).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:26:22 | LL | Box::new([1, 2]).into_iter(); @@ -85,7 +85,7 @@ LL | Box::new([1, 2]).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:29:19 | LL | Box::new(big).into_iter(); @@ -94,7 +94,7 @@ LL | Box::new(big).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:32:25 | LL | Box::new([0u8; 33]).into_iter(); @@ -103,7 +103,7 @@ LL | Box::new([0u8; 33]).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:36:31 | LL | Box::new(Box::new(small)).into_iter(); @@ -112,7 +112,7 @@ LL | Box::new(Box::new(small)).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:39:32 | LL | Box::new(Box::new([1, 2])).into_iter(); @@ -121,7 +121,7 @@ LL | Box::new(Box::new([1, 2])).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:42:29 | LL | Box::new(Box::new(big)).into_iter(); @@ -130,7 +130,7 @@ LL | Box::new(Box::new(big)).into_iter(); = warning: this changes meaning in Rust 2021 = note: for more information, see -warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021. +warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021 --> $DIR/into-iter-on-arrays-lint.rs:45:35 | LL | Box::new(Box::new([0u8; 33])).into_iter(); diff --git a/src/test/ui/lang-items/issue-83471.stderr b/src/test/ui/lang-items/issue-83471.stderr index c6130bb3370be..6d796fe7f500b 100644 --- a/src/test/ui/lang-items/issue-83471.stderr +++ b/src/test/ui/lang-items/issue-83471.stderr @@ -26,7 +26,7 @@ LL | #[lang = "fn"] | = help: add `#![feature(lang_items)]` to the crate attributes to enable -warning: anonymous parameters are deprecated and will be removed in the next edition. +warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/issue-83471.rs:15:13 | LL | fn call(export_name); diff --git a/src/test/ui/lint/must_not_suspend/mutex.stderr b/src/test/ui/lint/must_not_suspend/mutex.stderr index 4e0d9343c2c71..093f581264f36 100644 --- a/src/test/ui/lint/must_not_suspend/mutex.stderr +++ b/src/test/ui/lint/must_not_suspend/mutex.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(must_not_suspend)] | ^^^^^^^^^^^^^^^^ -note: Holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Futures to not implement `Send` +note: holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Futures to not implement `Send` --> $DIR/mutex.rs:7:9 | LL | let _guard = m.lock().unwrap(); diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs index 7ee9c41f6a091..9d837d41f101f 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs @@ -1,14 +1,14 @@ #![deny(mixed_script_confusables)] struct ΑctuallyNotLatin; -//~^ ERROR The usage of Script Group `Greek` in this crate consists solely of +//~^ ERROR the usage of Script Group `Greek` in this crate consists solely of fn main() { let v = ΑctuallyNotLatin; } mod роре { -//~^ ERROR The usage of Script Group `Cyrillic` in this crate consists solely of +//~^ ERROR the usage of Script Group `Cyrillic` in this crate consists solely of const エ: &'static str = "アイウ"; - //~^ ERROR The usage of Script Group `Japanese, Katakana` in this crate consists solely of + //~^ ERROR the usage of Script Group `Japanese, Katakana` in this crate consists solely of } diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr index 4018b381fb8c5..9ca034b71b2a7 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr @@ -1,4 +1,4 @@ -error: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables +error: the usage of Script Group `Greek` in this crate consists solely of mixed script confusables --> $DIR/lint-mixed-script-confusables.rs:3:8 | LL | struct ΑctuallyNotLatin; @@ -9,26 +9,26 @@ note: the lint level is defined here | LL | #![deny(mixed_script_confusables)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = note: The usage includes 'Α' (U+0391). - = note: Please recheck to make sure their usages are indeed what you want. + = note: the usage includes 'Α' (U+0391) + = note: please recheck to make sure their usages are indeed what you want -error: The usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables +error: the usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables --> $DIR/lint-mixed-script-confusables.rs:10:5 | LL | mod роре { | ^^^^ | - = note: The usage includes 'е' (U+0435), 'о' (U+043E), 'р' (U+0440). - = note: Please recheck to make sure their usages are indeed what you want. + = note: the usage includes 'е' (U+0435), 'о' (U+043E), 'р' (U+0440) + = note: please recheck to make sure their usages are indeed what you want -error: The usage of Script Group `Japanese, Katakana` in this crate consists solely of mixed script confusables +error: the usage of Script Group `Japanese, Katakana` in this crate consists solely of mixed script confusables --> $DIR/lint-mixed-script-confusables.rs:12:11 | LL | const エ: &'static str = "アイウ"; | ^^ | - = note: The usage includes 'エ' (U+30A8). - = note: Please recheck to make sure their usages are indeed what you want. + = note: the usage includes 'エ' (U+30A8) + = note: please recheck to make sure their usages are indeed what you want error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr index 00c23d501a1c5..a52f415dcac51 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.stderr +++ b/src/test/ui/macros/macros-nonfatal-errors.stderr @@ -138,7 +138,7 @@ error: inline assembly must be a string literal LL | llvm_asm!(invalid); | ^^^^^^^ -error: concat_idents! requires ident args. +error: concat_idents! requires ident args --> $DIR/macros-nonfatal-errors.rs:102:5 | LL | concat_idents!("not", "idents"); diff --git a/src/test/ui/missing/missing-alloc_error_handler.stderr b/src/test/ui/missing/missing-alloc_error_handler.stderr index 511d0788b40a7..ed84493deb563 100644 --- a/src/test/ui/missing/missing-alloc_error_handler.stderr +++ b/src/test/ui/missing/missing-alloc_error_handler.stderr @@ -1,6 +1,6 @@ -error: `#[alloc_error_handler]` function required, but not found. +error: `#[alloc_error_handler]` function required, but not found -note: Use `#![feature(default_alloc_error_handler)]` for a default error handler. +note: Use `#![feature(default_alloc_error_handler)]` for a default error handler error: aborting due to previous error diff --git a/src/test/ui/missing/missing-allocator.stderr b/src/test/ui/missing/missing-allocator.stderr index 59648c42a5f31..0da5651c18cb1 100644 --- a/src/test/ui/missing/missing-allocator.stderr +++ b/src/test/ui/missing/missing-allocator.stderr @@ -1,4 +1,4 @@ -error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait. +error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait error: aborting due to previous error diff --git a/src/test/ui/never_type/defaulted-never-note.fallback.stderr b/src/test/ui/never_type/defaulted-never-note.fallback.stderr index 588d644c77b0d..a51edb1f09a94 100644 --- a/src/test/ui/never_type/defaulted-never-note.fallback.stderr +++ b/src/test/ui/never_type/defaulted-never-note.fallback.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfie LL | foo(_x); | ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!` | - = note: this trait is implemented for `()`. + = note: this trait is implemented for `()` = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 for more information). = help: did you intend to use the type `()` here instead? note: required by a bound in `foo` diff --git a/src/test/ui/never_type/diverging-fallback-no-leak.fallback.stderr b/src/test/ui/never_type/diverging-fallback-no-leak.fallback.stderr index 3a5b602f1118f..ce5bbfc249ebc 100644 --- a/src/test/ui/never_type/diverging-fallback-no-leak.fallback.stderr +++ b/src/test/ui/never_type/diverging-fallback-no-leak.fallback.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `!: Test` is not satisfied LL | unconstrained_arg(return); | ^^^^^^^^^^^^^^^^^ the trait `Test` is not implemented for `!` | - = note: this trait is implemented for `()`. + = note: this trait is implemented for `()` = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 for more information). = help: did you intend to use the type `()` here instead? note: required by a bound in `unconstrained_arg` diff --git a/src/test/ui/rfc-1717-dllimport/missing-link-attr.stderr b/src/test/ui/rfc-1717-dllimport/missing-link-attr.stderr index d836741f9eddf..d4410e147503a 100644 --- a/src/test/ui/rfc-1717-dllimport/missing-link-attr.stderr +++ b/src/test/ui/rfc-1717-dllimport/missing-link-attr.stderr @@ -1,4 +1,4 @@ -error: renaming of the library `foo` was specified, however this crate contains no `#[link(...)]` attributes referencing this library. +error: renaming of the library `foo` was specified, however this crate contains no `#[link(...)]` attributes referencing this library error: aborting due to previous error diff --git a/src/test/ui/rfc-1717-dllimport/multiple-renames.stderr b/src/test/ui/rfc-1717-dllimport/multiple-renames.stderr index 4e5a3647fa2d2..a6fec9c4e2b5f 100644 --- a/src/test/ui/rfc-1717-dllimport/multiple-renames.stderr +++ b/src/test/ui/rfc-1717-dllimport/multiple-renames.stderr @@ -1,4 +1,4 @@ -error: multiple renamings were specified for library `foo` . +error: multiple renamings were specified for library `foo` error: aborting due to previous error diff --git a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr index ab8832e916315..ca1b8a6e7b9b2 100644 --- a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr +++ b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr @@ -6,7 +6,7 @@ LL | extern "C" { LL | type 一; | ^^ | - = note: This limitation may be lifted in the future; see issue #83942 for more information + = note: this limitation may be lifted in the future; see issue #83942 for more information error: items in `extern` blocks cannot use non-ascii identifiers --> $DIR/extern_block_nonascii_forbidden.rs:5:8 @@ -17,7 +17,7 @@ LL | type 一; LL | fn 二(); | ^^ | - = note: This limitation may be lifted in the future; see issue #83942 for more information + = note: this limitation may be lifted in the future; see issue #83942 for more information error: items in `extern` blocks cannot use non-ascii identifiers --> $DIR/extern_block_nonascii_forbidden.rs:6:12 @@ -28,7 +28,7 @@ LL | extern "C" { LL | static 三: usize; | ^^ | - = note: This limitation may be lifted in the future; see issue #83942 for more information + = note: this limitation may be lifted in the future; see issue #83942 for more information error: aborting due to 3 previous errors diff --git a/src/test/ui/sanitize/crt-static.stderr b/src/test/ui/sanitize/crt-static.stderr index 3a9c636d76046..9f74235fea5d2 100644 --- a/src/test/ui/sanitize/crt-static.stderr +++ b/src/test/ui/sanitize/crt-static.stderr @@ -1,4 +1,4 @@ -error: Sanitizer is incompatible with statically linked libc, disable it using `-C target-feature=-crt-static` +error: sanitizer is incompatible with statically linked libc, disable it using `-C target-feature=-crt-static` error: aborting due to previous error diff --git a/src/test/ui/test-attrs/test-should-panic-attr.stderr b/src/test/ui/test-attrs/test-should-panic-attr.stderr index 375ee79ca5ab7..492d1d5e03a4b 100644 --- a/src/test/ui/test-attrs/test-should-panic-attr.stderr +++ b/src/test/ui/test-attrs/test-should-panic-attr.stderr @@ -4,7 +4,7 @@ warning: argument must be of the form: `expected = "error message"` LL | #[should_panic(expected)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release. + = note: errors in this attribute were erroneously allowed and will become a hard error in a future release warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:18:1 @@ -12,7 +12,7 @@ warning: argument must be of the form: `expected = "error message"` LL | #[should_panic(expect)] | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release. + = note: errors in this attribute were erroneously allowed and will become a hard error in a future release warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:25:1 @@ -20,7 +20,7 @@ warning: argument must be of the form: `expected = "error message"` LL | #[should_panic(expected(foo, bar))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release. + = note: errors in this attribute were erroneously allowed and will become a hard error in a future release warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:32:1 @@ -28,7 +28,7 @@ warning: argument must be of the form: `expected = "error message"` LL | #[should_panic(expected = "foo", bar)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release. + = note: errors in this attribute were erroneously allowed and will become a hard error in a future release warning: 4 warnings emitted diff --git a/src/test/ui/traits/vtable/vtable-diamond.rs b/src/test/ui/traits/vtable/vtable-diamond.rs index f64ae95f1d4dd..ec25e8a707111 100644 --- a/src/test/ui/traits/vtable/vtable-diamond.rs +++ b/src/test/ui/traits/vtable/vtable-diamond.rs @@ -13,13 +13,13 @@ trait B: A { #[rustc_dump_vtable] trait C: A { - //~^ error Vtable + //~^ error vtable fn foo_c(&self) {} } #[rustc_dump_vtable] trait D: B + C { - //~^ error Vtable + //~^ error vtable fn foo_d(&self) {} } diff --git a/src/test/ui/traits/vtable/vtable-diamond.stderr b/src/test/ui/traits/vtable/vtable-diamond.stderr index 92a7f29536e3d..f2b64fac3b75e 100644 --- a/src/test/ui/traits/vtable/vtable-diamond.stderr +++ b/src/test/ui/traits/vtable/vtable-diamond.stderr @@ -1,4 +1,4 @@ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -16,7 +16,7 @@ LL | | fn foo_d(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, diff --git a/src/test/ui/traits/vtable/vtable-multi-level.rs b/src/test/ui/traits/vtable/vtable-multi-level.rs index 33112b4eaaade..fcb5fd5274be4 100644 --- a/src/test/ui/traits/vtable/vtable-multi-level.rs +++ b/src/test/ui/traits/vtable/vtable-multi-level.rs @@ -17,7 +17,7 @@ trait A { #[rustc_dump_vtable] trait B { - //~^ error Vtable + //~^ error vtable fn foo_b(&self) {} } @@ -28,19 +28,19 @@ trait C: A + B { #[rustc_dump_vtable] trait D { - //~^ error Vtable + //~^ error vtable fn foo_d(&self) {} } #[rustc_dump_vtable] trait E { - //~^ error Vtable + //~^ error vtable fn foo_e(&self) {} } #[rustc_dump_vtable] trait F: D + E { - //~^ error Vtable + //~^ error vtable fn foo_f(&self) {} } @@ -51,49 +51,49 @@ trait G: C + F { #[rustc_dump_vtable] trait H { - //~^ error Vtable + //~^ error vtable fn foo_h(&self) {} } #[rustc_dump_vtable] trait I { - //~^ error Vtable + //~^ error vtable fn foo_i(&self) {} } #[rustc_dump_vtable] trait J: H + I { - //~^ error Vtable + //~^ error vtable fn foo_j(&self) {} } #[rustc_dump_vtable] trait K { - //~^ error Vtable + //~^ error vtable fn foo_k(&self) {} } #[rustc_dump_vtable] trait L { - //~^ error Vtable + //~^ error vtable fn foo_l(&self) {} } #[rustc_dump_vtable] trait M: K + L { - //~^ error Vtable + //~^ error vtable fn foo_m(&self) {} } #[rustc_dump_vtable] trait N: J + M { - //~^ error Vtable + //~^ error vtable fn foo_n(&self) {} } #[rustc_dump_vtable] trait O: G + N { - //~^ error Vtable + //~^ error vtable fn foo_o(&self) {} } diff --git a/src/test/ui/traits/vtable/vtable-multi-level.stderr b/src/test/ui/traits/vtable/vtable-multi-level.stderr index 7700db98e0bf1..742b88ea8a9c9 100644 --- a/src/test/ui/traits/vtable/vtable-multi-level.stderr +++ b/src/test/ui/traits/vtable/vtable-multi-level.stderr @@ -1,4 +1,4 @@ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -37,7 +37,7 @@ LL | | fn foo_o(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -51,7 +51,7 @@ LL | | fn foo_b(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -65,7 +65,7 @@ LL | | fn foo_d(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -79,7 +79,7 @@ LL | | fn foo_e(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -96,7 +96,7 @@ LL | | fn foo_f(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -110,7 +110,7 @@ LL | | fn foo_h(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -124,7 +124,7 @@ LL | | fn foo_i(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -141,7 +141,7 @@ LL | | fn foo_j(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -155,7 +155,7 @@ LL | | fn foo_k(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -169,7 +169,7 @@ LL | | fn foo_l(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -186,7 +186,7 @@ LL | | fn foo_m(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, diff --git a/src/test/ui/traits/vtable/vtable-multiple.rs b/src/test/ui/traits/vtable/vtable-multiple.rs index cb0d0b7248190..8e7098a495ed1 100644 --- a/src/test/ui/traits/vtable/vtable-multiple.rs +++ b/src/test/ui/traits/vtable/vtable-multiple.rs @@ -8,13 +8,13 @@ trait A { #[rustc_dump_vtable] trait B { - //~^ error Vtable + //~^ error vtable fn foo_b(&self) {} } #[rustc_dump_vtable] trait C: A + B { - //~^ error Vtable + //~^ error vtable fn foo_c(&self) {} } diff --git a/src/test/ui/traits/vtable/vtable-multiple.stderr b/src/test/ui/traits/vtable/vtable-multiple.stderr index f51b083de2515..f25ac76fbe069 100644 --- a/src/test/ui/traits/vtable/vtable-multiple.stderr +++ b/src/test/ui/traits/vtable/vtable-multiple.stderr @@ -1,4 +1,4 @@ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, @@ -15,7 +15,7 @@ LL | | fn foo_c(&self) {} LL | | } | |_^ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, diff --git a/src/test/ui/traits/vtable/vtable-non-object-safe.rs b/src/test/ui/traits/vtable/vtable-non-object-safe.rs index 45b6a8a98a79f..7661bb574613b 100644 --- a/src/test/ui/traits/vtable/vtable-non-object-safe.rs +++ b/src/test/ui/traits/vtable/vtable-non-object-safe.rs @@ -6,7 +6,7 @@ #[rustc_dump_vtable] trait A: Iterator {} -//~^ error Vtable +//~^ error vtable impl A for T where T: Iterator {} diff --git a/src/test/ui/traits/vtable/vtable-non-object-safe.stderr b/src/test/ui/traits/vtable/vtable-non-object-safe.stderr index f3175b805d1b6..34fe910525be1 100644 --- a/src/test/ui/traits/vtable/vtable-non-object-safe.stderr +++ b/src/test/ui/traits/vtable/vtable-non-object-safe.stderr @@ -1,4 +1,4 @@ -error: Vtable entries for ` as A>`: [ +error: vtable entries for ` as A>`: [ MetadataDropInPlace, MetadataSize, MetadataAlign, diff --git a/src/test/ui/traits/vtable/vtable-vacant.rs b/src/test/ui/traits/vtable/vtable-vacant.rs index 429ce523799f3..a64796358345f 100644 --- a/src/test/ui/traits/vtable/vtable-vacant.rs +++ b/src/test/ui/traits/vtable/vtable-vacant.rs @@ -13,7 +13,7 @@ trait A { #[rustc_dump_vtable] trait B: A { - //~^ error Vtable + //~^ error vtable fn foo_b1(&self) {} fn foo_b2(&self) where Self: Send {} } diff --git a/src/test/ui/traits/vtable/vtable-vacant.stderr b/src/test/ui/traits/vtable/vtable-vacant.stderr index f5cd36264fcff..e3b75e7cf33f3 100644 --- a/src/test/ui/traits/vtable/vtable-vacant.stderr +++ b/src/test/ui/traits/vtable/vtable-vacant.stderr @@ -1,4 +1,4 @@ -error: Vtable entries for ``: [ +error: vtable entries for ``: [ MetadataDropInPlace, MetadataSize, MetadataAlign, diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr index 7bd951febf5c5..1e26623899bad 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr @@ -1,4 +1,4 @@ -warning: Trait bound String: Copy does not depend on any type or lifetime parameters +warning: trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:5:51 | LL | fn copy_string(t: String) -> String where String: Copy { @@ -6,19 +6,19 @@ LL | fn copy_string(t: String) -> String where String: Copy { | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound String: Copy does not depend on any type or lifetime parameters +warning: trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:12:56 | LL | fn copy_out_string(t: &String) -> String where String: Copy { | ^^^^ -warning: Trait bound String: Copy does not depend on any type or lifetime parameters +warning: trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:16:55 | LL | fn copy_string_with_param(x: String) where String: Copy { | ^^^^ -warning: Trait bound for<'b> &'b mut i32: Copy does not depend on any type or lifetime parameters +warning: trait bound for<'b> &'b mut i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:22:76 | LL | fn copy_mut<'a>(t: &&'a mut i32) -> &'a mut i32 where for<'b> &'b mut i32: Copy { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr index e7835814cb83e..ddc13c512f60f 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr @@ -1,4 +1,4 @@ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:21:8 | LL | B: A @@ -6,37 +6,37 @@ LL | B: A | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:28:8 | LL | B: A | ^^^^^^^^^^ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:35:8 | LL | B: A | ^^^^^^^^^ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:42:8 | LL | B: A + A | ^^^^^^^^^^ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:42:21 | LL | B: A + A | ^ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:51:8 | LL | B: A + A | ^^^^^^^^^ -warning: Trait bound B: A does not depend on any type or lifetime parameters +warning: trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:51:20 | LL | B: A + A diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr index ff254edbd7b0c..cf24d811c04e3 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr @@ -1,4 +1,4 @@ -warning: Trait bound str: Sized does not depend on any type or lifetime parameters +warning: trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:14:31 | LL | struct S(str, str) where str: Sized; @@ -6,13 +6,13 @@ LL | struct S(str, str) where str: Sized; | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound for<'a> T<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters +warning: trait bound for<'a> T<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:17:49 | LL | fn unsized_local() where for<'a> T: Sized { | ^^^^^ -warning: Trait bound str: Sized does not depend on any type or lifetime parameters +warning: trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:22:35 | LL | fn return_str() -> str where str: Sized { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr index a9905052ffdfb..8f58a99a86f91 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr @@ -1,4 +1,4 @@ -warning: Trait bound Vec: Debug does not depend on any type or lifetime parameters +warning: trait bound Vec: Debug does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-well-formed.rs:7:30 | LL | pub fn foo() where Vec: Debug, str: Copy { @@ -6,7 +6,7 @@ LL | pub fn foo() where Vec: Debug, str: Copy { | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound str: Copy does not depend on any type or lifetime parameters +warning: trait bound str: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-well-formed.rs:7:42 | LL | pub fn foo() where Vec: Debug, str: Copy { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr index 94c51c5788a32..16f32e043d500 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr @@ -1,4 +1,4 @@ -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:14:19 | LL | enum E where i32: Foo { V } @@ -6,19 +6,19 @@ LL | enum E where i32: Foo { V } | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:16:21 | LL | struct S where i32: Foo; | ^^^ -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:18:20 | LL | trait T where i32: Foo {} | ^^^ -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:20:20 | LL | union U where i32: Foo { f: i32 } @@ -37,55 +37,55 @@ LL - type Y where i32: Foo = (); LL + type Y = (); | -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:22:19 | LL | type Y where i32: Foo = (); | ^^^ -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:26:28 | LL | impl Foo for () where i32: Foo { | ^^^ -warning: Trait bound i32: Foo does not depend on any type or lifetime parameters +warning: trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:34:19 | LL | fn f() where i32: Foo { | ^^^ -warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters +warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:41:28 | LL | fn g() where &'static str: Foo { | ^^^ -warning: Trait bound str: Sized does not depend on any type or lifetime parameters +warning: trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:55:37 | LL | struct TwoStrs(str, str) where str: Sized; | ^^^^^ -warning: Trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters +warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:57:51 | LL | fn unsized_local() where for<'a> Dst: Sized { | ^^^^^ -warning: Trait bound str: Sized does not depend on any type or lifetime parameters +warning: trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:61:35 | LL | fn return_str() -> str where str: Sized { | ^^^^^ -warning: Trait bound String: Neg does not depend on any type or lifetime parameters +warning: trait bound String: Neg does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:65:46 | LL | fn use_op(s: String) -> String where String: ::std::ops::Neg { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: Trait bound i32: Iterator does not depend on any type or lifetime parameters +warning: trait bound i32: Iterator does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:70:25 | LL | fn use_for() where i32: Iterator { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr index c685d9e740919..20e0ddfc29b36 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr @@ -1,4 +1,4 @@ -error: Trait bound i32: Copy does not depend on any type or lifetime parameters +error: trait bound i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:5:21 | LL | struct A where i32: Copy; @@ -10,37 +10,37 @@ note: the lint level is defined here LL | #![deny(trivial_bounds)] | ^^^^^^^^^^^^^^ -error: Trait bound i32: X<()> does not depend on any type or lifetime parameters +error: trait bound i32: X<()> does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:18:30 | LL | fn global_param() where i32: X<()> {} | ^^^^^ -error: Trait bound i32: Z does not depend on any type or lifetime parameters +error: trait bound i32: Z does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:22:35 | LL | fn global_projection() where i32: Z {} | ^^^^^^^^^^ -error: Lifetime bound i32: 'static does not depend on any type or lifetime parameters +error: lifetime bound i32: 'static does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:29:34 | LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {} | ^^^^^^^ -error: Lifetime bound &'static str: 'static does not depend on any type or lifetime parameters +error: lifetime bound &'static str: 'static does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:29:57 | LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {} | ^^^^^^^ -error: Lifetime bound 'static: 'static does not depend on any type or lifetime parameters +error: lifetime bound 'static: 'static does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:35:37 | LL | fn global_outlives() where 'static: 'static {} | ^^^^^^^ -error: Trait bound i32: Copy does not depend on any type or lifetime parameters +error: trait bound i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:38:46 | LL | fn mixed_bounds() where i32: X + Copy {}