Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank

Practice diagnostic message convention

Detected by #89455.

r? ```@estebank```
This commit is contained in:
Jubilee 2021-10-04 13:58:15 -07:00 committed by GitHub
commit 5352e17df3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 167 additions and 168 deletions

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