Practice diagnostic message convention

This commit is contained in:
Hirochika Matsumoto 2021-10-03 15:53:02 +09:00
parent 77f1e504a9
commit 3818981ca1
63 changed files with 167 additions and 168 deletions

View File

@ -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 #{} <https://github.com/rust-lang/rust/issues/{}> for more information",
"this limitation may be lifted in the future; see issue #{} <https://github.com/rust-lang/rust/issues/{}> for more information",
n, n,
))
.emit();

View File

@ -12,7 +12,7 @@ pub fn expand_concat_idents<'cx>(
tts: TokenStream,
) -> Box<dyn base::MacResult + 'cx> {
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);
}
}

View File

@ -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)

View File

@ -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 <https://github.com/rust-lang/rust/issues/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",

View File

@ -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(

View File

@ -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

View File

@ -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(&note).note("Please recheck to make sure their usages are indeed what you want.").emit()
lint.build(&message).note(&note).note("please recheck to make sure their usages are indeed what you want").emit()
});
}
}

View File

@ -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);

View File

@ -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
));
}

View File

@ -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));

View File

@ -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;

View File

@ -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`",
);
}

View File

@ -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 \

View File

@ -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();
}

View File

@ -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> {

View File

@ -190,7 +190,7 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {}
#[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`"
)]

View File

@ -97,7 +97,7 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
#[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<T: ?Sized + Sync> 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`"
)]

View File

@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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) {}

View File

@ -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 <https://github.com/rust-lang/rust/issues/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 };

View File

@ -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 {

View File

@ -25,7 +25,7 @@ LL | const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
= note: see issue #57241 <https://github.com/rust-lang/rust/issues/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; }

View File

@ -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::<usize>() as usize };

View File

@ -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::<u8> as *const () < id::<u16> as *const () };

View File

@ -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];

View File

@ -16,7 +16,7 @@ LL | const fn cmp(x: fn(), y: fn()) -> bool {
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/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 }

View File

@ -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 } }

View File

@ -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) };

View File

@ -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) {}

View File

@ -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::*;

View File

@ -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 };

View File

@ -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!();

View File

@ -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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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() {}

View File

@ -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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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 <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
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();

View File

@ -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);

View File

@ -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();

View File

@ -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
}

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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

View File

@ -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 <https://github.com/rust-lang/rust/issues/48950> for more information).
= help: did you intend to use the type `()` here instead?
note: required by a bound in `foo`

View File

@ -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 <https://github.com/rust-lang/rust/issues/48950> for more information).
= help: did you intend to use the type `()` here instead?
note: required by a bound in `unconstrained_arg`

View File

@ -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

View File

@ -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

View File

@ -6,7 +6,7 @@ LL | extern "C" {
LL | type 一;
| ^^
|
= note: This limitation may be lifted in the future; see issue #83942 <https://github.com/rust-lang/rust/issues/83942> for more information
= note: this limitation may be lifted in the future; see issue #83942 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/83942> for more information
= note: this limitation may be lifted in the future; see issue #83942 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/83942> for more information
= note: this limitation may be lifted in the future; see issue #83942 <https://github.com/rust-lang/rust/issues/83942> for more information
error: aborting due to 3 previous errors

View File

@ -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

View File

@ -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

View File

@ -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) {}
}

View File

@ -1,4 +1,4 @@
error: Vtable entries for `<S as D>`: [
error: vtable entries for `<S as D>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -16,7 +16,7 @@ LL | | fn foo_d(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as C>`: [
error: vtable entries for `<S as C>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,

View File

@ -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) {}
}

View File

@ -1,4 +1,4 @@
error: Vtable entries for `<S as O>`: [
error: vtable entries for `<S as O>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -37,7 +37,7 @@ LL | | fn foo_o(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as B>`: [
error: vtable entries for `<S as B>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -51,7 +51,7 @@ LL | | fn foo_b(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as D>`: [
error: vtable entries for `<S as D>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -65,7 +65,7 @@ LL | | fn foo_d(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as E>`: [
error: vtable entries for `<S as E>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -79,7 +79,7 @@ LL | | fn foo_e(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as F>`: [
error: vtable entries for `<S as F>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -96,7 +96,7 @@ LL | | fn foo_f(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as H>`: [
error: vtable entries for `<S as H>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -110,7 +110,7 @@ LL | | fn foo_h(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as I>`: [
error: vtable entries for `<S as I>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -124,7 +124,7 @@ LL | | fn foo_i(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as J>`: [
error: vtable entries for `<S as J>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -141,7 +141,7 @@ LL | | fn foo_j(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as K>`: [
error: vtable entries for `<S as K>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -155,7 +155,7 @@ LL | | fn foo_k(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as L>`: [
error: vtable entries for `<S as L>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -169,7 +169,7 @@ LL | | fn foo_l(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as M>`: [
error: vtable entries for `<S as M>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -186,7 +186,7 @@ LL | | fn foo_m(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as N>`: [
error: vtable entries for `<S as N>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,

View File

@ -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) {}
}

View File

@ -1,4 +1,4 @@
error: Vtable entries for `<S as C>`: [
error: vtable entries for `<S as C>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,
@ -15,7 +15,7 @@ LL | | fn foo_c(&self) {}
LL | | }
| |_^
error: Vtable entries for `<S as B>`: [
error: vtable entries for `<S as B>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,

View File

@ -6,7 +6,7 @@
#[rustc_dump_vtable]
trait A: Iterator {}
//~^ error Vtable
//~^ error vtable
impl<T> A for T where T: Iterator {}

View File

@ -1,4 +1,4 @@
error: Vtable entries for `<std::vec::IntoIter<u8> as A>`: [
error: vtable entries for `<std::vec::IntoIter<u8> as A>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,

View File

@ -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 {}
}

View File

@ -1,4 +1,4 @@
error: Vtable entries for `<S as B>`: [
error: vtable entries for `<S as B>`: [
MetadataDropInPlace,
MetadataSize,
MetadataAlign,

View File

@ -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<T>(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 {

View File

@ -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<X = i32>
| ^^^^^^^^^^
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<X = u8>
| ^^^^^^^^^
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<X = i32> + 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<X = i32> + 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<X = u8> + 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<X = u8> + A

View File

@ -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<dyn A + 'a>: 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 {

View File

@ -1,4 +1,4 @@
warning: Trait bound Vec<str>: Debug does not depend on any type or lifetime parameters
warning: trait bound Vec<str>: 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<str>: Debug, str: Copy {
@ -6,7 +6,7 @@ LL | pub fn foo() where Vec<str>: 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<str>: Debug, str: Copy {

View File

@ -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<dyn A + 'a>: 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<Output=String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 {

View File

@ -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<S = i32> {}
| ^^^^^^^^^^
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<T: Copy>() where i32: X<T> + Copy {}