1
Fork 0

Auto merge of #137348 - compiler-errors:span-trim, r=estebank

More sophisticated span trimming for suggestions

Previously #136958 only cared about prefixes or suffixes. Now it detects more cases where a suggestion is "sandwiched" by unchanged code on the left or the right. Would be cool if we could detect several insertions, like `ACE` going to `ABCDE`, extracting `B` and `D`, but that seems unwieldy.

r? `@estebank`
This commit is contained in:
bors 2025-02-21 23:59:08 +00:00
commit dc37ff82e8
133 changed files with 1036 additions and 1247 deletions

View file

@ -2216,12 +2216,7 @@ impl HumanEmitter {
if let DisplaySuggestion::Diff | DisplaySuggestion::Underline | DisplaySuggestion::Add =
show_code_change
{
for mut part in parts {
// If this is a replacement of, e.g. `"a"` into `"ab"`, adjust the
// suggestion and snippet to look as if we just suggested to add
// `"b"`, which is typically much easier for the user to understand.
part.trim_trivial_replacements(sm);
for part in parts {
let snippet = if let Ok(snippet) = sm.span_to_snippet(part.span) {
snippet
} else {

View file

@ -71,7 +71,7 @@ use rustc_macros::{Decodable, Encodable};
pub use rustc_span::ErrorGuaranteed;
pub use rustc_span::fatal_error::{FatalError, FatalErrorMarker};
use rustc_span::source_map::SourceMap;
use rustc_span::{DUMMY_SP, Loc, Span};
use rustc_span::{BytePos, DUMMY_SP, Loc, Span};
pub use snippet::Style;
// Used by external projects such as `rust-gpu`.
// See https://github.com/rust-lang/rust/pull/115393.
@ -237,10 +237,9 @@ impl SubstitutionPart {
/// it with "abx" is, since the "c" character is lost.
pub fn is_destructive_replacement(&self, sm: &SourceMap) -> bool {
self.is_replacement(sm)
&& !sm.span_to_snippet(self.span).is_ok_and(|snippet| {
self.snippet.trim_start().starts_with(snippet.trim_start())
|| self.snippet.trim_end().ends_with(snippet.trim_end())
})
&& !sm
.span_to_snippet(self.span)
.is_ok_and(|snippet| as_substr(snippet.trim(), self.snippet.trim()).is_some())
}
fn replaces_meaningful_content(&self, sm: &SourceMap) -> bool {
@ -257,16 +256,40 @@ impl SubstitutionPart {
let Ok(snippet) = sm.span_to_snippet(self.span) else {
return;
};
if self.snippet.starts_with(&snippet) {
self.span = self.span.shrink_to_hi();
self.snippet = self.snippet[snippet.len()..].to_string();
} else if self.snippet.ends_with(&snippet) {
self.span = self.span.shrink_to_lo();
self.snippet = self.snippet[..self.snippet.len() - snippet.len()].to_string();
if let Some((prefix, substr, suffix)) = as_substr(&snippet, &self.snippet) {
self.span = Span::new(
self.span.lo() + BytePos(prefix as u32),
self.span.hi() - BytePos(suffix as u32),
self.span.ctxt(),
self.span.parent(),
);
self.snippet = substr.to_string();
}
}
}
/// Given an original string like `AACC`, and a suggestion like `AABBCC`, try to detect
/// the case where a substring of the suggestion is "sandwiched" in the original, like
/// `BB` is. Return the length of the prefix, the "trimmed" suggestion, and the length
/// of the suffix.
fn as_substr<'a>(original: &'a str, suggestion: &'a str) -> Option<(usize, &'a str, usize)> {
let common_prefix = original
.chars()
.zip(suggestion.chars())
.take_while(|(c1, c2)| c1 == c2)
.map(|(c, _)| c.len_utf8())
.sum();
let original = &original[common_prefix..];
let suggestion = &suggestion[common_prefix..];
if suggestion.ends_with(original) {
let common_suffix = original.len();
Some((common_prefix, &suggestion[..suggestion.len() - original.len()], common_suffix))
} else {
None
}
}
impl CodeSuggestion {
/// Returns the assembled code suggestions, whether they should be shown with an underline
/// and whether the substitution only differs in capitalization.
@ -380,7 +403,12 @@ impl CodeSuggestion {
// or deleted code in order to point at the correct column *after* substitution.
let mut acc = 0;
let mut only_capitalization = false;
for part in &substitution.parts {
for part in &mut substitution.parts {
// If this is a replacement of, e.g. `"a"` into `"ab"`, adjust the
// suggestion and snippet to look as if we just suggested to add
// `"b"`, which is typically much easier for the user to understand.
part.trim_trivial_replacements(sm);
only_capitalization |= is_case_difference(sm, &part.snippet, part.span);
let cur_lo = sm.lookup_char_pos(part.span.lo());
if prev_hi.line == cur_lo.line {

View file

@ -14,9 +14,9 @@ LL | | };
= help: to override `-D warnings` add `#[allow(clippy::async_yields_async)]`
help: consider awaiting this value
|
LL ~ async {
LL + 3
LL + }.await
LL | async {
LL | 3
LL ~ }.await
|
error: an async construct yields a type which is itself awaitable
@ -46,9 +46,9 @@ LL | | };
|
help: consider awaiting this value
|
LL ~ async {
LL + 3
LL + }.await
LL | async {
LL | 3
LL ~ }.await
|
error: an async construct yields a type which is itself awaitable

View file

@ -13,9 +13,8 @@ LL + let x: &str = s;
|
help: if you would like to deref, try using `&**`
|
LL - let x: &str = &*s;
LL + let x: &str = &**s;
|
LL | let x: &str = &**s;
| +
error: aborting due to 1 previous error

View file

@ -8,9 +8,8 @@ LL | let _ = foo as i8;
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast_any)]`
help: did you mean to invoke the function?
|
LL - let _ = foo as i8;
LL + let _ = foo() as i8;
|
LL | let _ = foo() as i8;
| ++
error: casting function pointer `foo` to `i16`
--> tests/ui/fn_to_numeric_cast_any.rs:26:13
@ -20,9 +19,8 @@ LL | let _ = foo as i16;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as i16;
LL + let _ = foo() as i16;
|
LL | let _ = foo() as i16;
| ++
error: casting function pointer `foo` to `i32`
--> tests/ui/fn_to_numeric_cast_any.rs:28:13
@ -32,9 +30,8 @@ LL | let _ = foo as i32;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as i32;
LL + let _ = foo() as i32;
|
LL | let _ = foo() as i32;
| ++
error: casting function pointer `foo` to `i64`
--> tests/ui/fn_to_numeric_cast_any.rs:30:13
@ -44,9 +41,8 @@ LL | let _ = foo as i64;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as i64;
LL + let _ = foo() as i64;
|
LL | let _ = foo() as i64;
| ++
error: casting function pointer `foo` to `i128`
--> tests/ui/fn_to_numeric_cast_any.rs:32:13
@ -56,9 +52,8 @@ LL | let _ = foo as i128;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as i128;
LL + let _ = foo() as i128;
|
LL | let _ = foo() as i128;
| ++
error: casting function pointer `foo` to `isize`
--> tests/ui/fn_to_numeric_cast_any.rs:34:13
@ -68,9 +63,8 @@ LL | let _ = foo as isize;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as isize;
LL + let _ = foo() as isize;
|
LL | let _ = foo() as isize;
| ++
error: casting function pointer `foo` to `u8`
--> tests/ui/fn_to_numeric_cast_any.rs:37:13
@ -80,9 +74,8 @@ LL | let _ = foo as u8;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as u8;
LL + let _ = foo() as u8;
|
LL | let _ = foo() as u8;
| ++
error: casting function pointer `foo` to `u16`
--> tests/ui/fn_to_numeric_cast_any.rs:39:13
@ -92,9 +85,8 @@ LL | let _ = foo as u16;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as u16;
LL + let _ = foo() as u16;
|
LL | let _ = foo() as u16;
| ++
error: casting function pointer `foo` to `u32`
--> tests/ui/fn_to_numeric_cast_any.rs:41:13
@ -104,9 +96,8 @@ LL | let _ = foo as u32;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as u32;
LL + let _ = foo() as u32;
|
LL | let _ = foo() as u32;
| ++
error: casting function pointer `foo` to `u64`
--> tests/ui/fn_to_numeric_cast_any.rs:43:13
@ -116,9 +107,8 @@ LL | let _ = foo as u64;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as u64;
LL + let _ = foo() as u64;
|
LL | let _ = foo() as u64;
| ++
error: casting function pointer `foo` to `u128`
--> tests/ui/fn_to_numeric_cast_any.rs:45:13
@ -128,9 +118,8 @@ LL | let _ = foo as u128;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as u128;
LL + let _ = foo() as u128;
|
LL | let _ = foo() as u128;
| ++
error: casting function pointer `foo` to `usize`
--> tests/ui/fn_to_numeric_cast_any.rs:47:13
@ -140,9 +129,8 @@ LL | let _ = foo as usize;
|
help: did you mean to invoke the function?
|
LL - let _ = foo as usize;
LL + let _ = foo() as usize;
|
LL | let _ = foo() as usize;
| ++
error: casting function pointer `Struct::static_method` to `usize`
--> tests/ui/fn_to_numeric_cast_any.rs:52:13
@ -152,9 +140,8 @@ LL | let _ = Struct::static_method as usize;
|
help: did you mean to invoke the function?
|
LL - let _ = Struct::static_method as usize;
LL + let _ = Struct::static_method() as usize;
|
LL | let _ = Struct::static_method() as usize;
| ++
error: casting function pointer `f` to `usize`
--> tests/ui/fn_to_numeric_cast_any.rs:57:5
@ -164,9 +151,8 @@ LL | f as usize
|
help: did you mean to invoke the function?
|
LL - f as usize
LL + f() as usize
|
LL | f() as usize
| ++
error: casting function pointer `T::static_method` to `usize`
--> tests/ui/fn_to_numeric_cast_any.rs:62:5
@ -176,9 +162,8 @@ LL | T::static_method as usize
|
help: did you mean to invoke the function?
|
LL - T::static_method as usize
LL + T::static_method() as usize
|
LL | T::static_method() as usize
| ++
error: casting function pointer `(clos as fn(u32) -> u32)` to `usize`
--> tests/ui/fn_to_numeric_cast_any.rs:69:13
@ -188,9 +173,8 @@ LL | let _ = (clos as fn(u32) -> u32) as usize;
|
help: did you mean to invoke the function?
|
LL - let _ = (clos as fn(u32) -> u32) as usize;
LL + let _ = (clos as fn(u32) -> u32)() as usize;
|
LL | let _ = (clos as fn(u32) -> u32)() as usize;
| ++
error: casting function pointer `foo` to `*const ()`
--> tests/ui/fn_to_numeric_cast_any.rs:74:13
@ -200,9 +184,8 @@ LL | let _ = foo as *const ();
|
help: did you mean to invoke the function?
|
LL - let _ = foo as *const ();
LL + let _ = foo() as *const ();
|
LL | let _ = foo() as *const ();
| ++
error: aborting due to 17 previous errors

View file

@ -78,9 +78,8 @@ LL | pub fn map(map: &mut HashMap<i32, i32>) {}
|
help: add a type parameter for `BuildHasher`
|
LL - pub fn map(map: &mut HashMap<i32, i32>) {}
LL + pub fn map<S: ::std::hash::BuildHasher>(map: &mut HashMap<i32, i32, S>) {}
|
LL | pub fn map<S: ::std::hash::BuildHasher>(map: &mut HashMap<i32, i32, S>) {}
| +++++++++++++++++++++++++++++ +++
error: parameter of type `HashSet` should be generalized over different hashers
--> tests/ui/implicit_hasher.rs:70:22
@ -90,9 +89,8 @@ LL | pub fn set(set: &mut HashSet<i32>) {}
|
help: add a type parameter for `BuildHasher`
|
LL - pub fn set(set: &mut HashSet<i32>) {}
LL + pub fn set<S: ::std::hash::BuildHasher>(set: &mut HashSet<i32, S>) {}
|
LL | pub fn set<S: ::std::hash::BuildHasher>(set: &mut HashSet<i32, S>) {}
| +++++++++++++++++++++++++++++ +++
error: impl for `HashMap` should be generalized over different hashers
--> tests/ui/implicit_hasher.rs:76:43
@ -116,9 +114,8 @@ LL | pub async fn election_vote(_data: HashMap<i32, i32>) {}
|
help: add a type parameter for `BuildHasher`
|
LL - pub async fn election_vote(_data: HashMap<i32, i32>) {}
LL + pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
|
LL | pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
| +++++++++++++++++++++++++++++ +++
error: aborting due to 9 previous errors

View file

@ -9,7 +9,7 @@ LL | true
help: add `return` as shown
|
LL | return true
|
| ++++++
error: missing `return` statement
--> tests/ui/implicit_return.rs:19:15
@ -122,7 +122,7 @@ LL | format!("test {}", "test")
help: add `return` as shown
|
LL | return format!("test {}", "test")
|
| ++++++
error: missing `return` statement
--> tests/ui/implicit_return.rs:90:5
@ -133,7 +133,7 @@ LL | m!(true, false)
help: add `return` as shown
|
LL | return m!(true, false)
|
| ++++++
error: missing `return` statement
--> tests/ui/implicit_return.rs:96:13
@ -169,10 +169,8 @@ LL | | }
|
help: add `return` as shown
|
LL ~ return loop {
LL + m!(true);
LL + }
|
LL | return loop {
| ++++++
error: missing `return` statement
--> tests/ui/implicit_return.rs:130:5
@ -183,7 +181,7 @@ LL | true
help: add `return` as shown
|
LL | return true
|
| ++++++
error: aborting due to 16 previous errors

View file

@ -99,9 +99,8 @@ LL + let fail8 = 123;
|
help: if you mean to use an octal constant, use `0o`
|
LL - let fail8 = 0123;
LL + let fail8 = 0o123;
|
LL | let fail8 = 0o123;
| +
error: integer type suffix should not be separated by an underscore
--> tests/ui/literals.rs:48:16

View file

@ -196,11 +196,9 @@ LL | | }
| |_________^
help: try
|
LL ~ for n in vec![
LL +
LL + Some(1),
LL + Some(2),
LL + Some(3)
LL | for n in vec![
...
LL | Some(3)
LL ~ ].iter().flatten() {
|

View file

@ -14,9 +14,8 @@ LL + let _bad1 = "\x1b[0m";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad1 = "\033[0m";
LL + let _bad1 = "\x0033[0m";
|
LL | let _bad1 = "\x0033[0m";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:6:19
@ -31,9 +30,8 @@ LL + let _bad2 = b"\x1b[0m";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad2 = b"\033[0m";
LL + let _bad2 = b"\x0033[0m";
|
LL | let _bad2 = b"\x0033[0m";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:7:20
@ -48,9 +46,8 @@ LL + let _bad3 = "\\\x1b[0m";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad3 = "\\\033[0m";
LL + let _bad3 = "\\\x0033[0m";
|
LL | let _bad3 = "\\\x0033[0m";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:9:18
@ -65,9 +62,8 @@ LL + let _bad4 = "\x0a34567";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad4 = "\01234567";
LL + let _bad4 = "\x001234567";
|
LL | let _bad4 = "\x001234567";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:10:20
@ -77,14 +73,12 @@ LL | let _bad5 = "\0\03";
|
help: if an octal escape is intended, use a hex escape instead
|
LL - let _bad5 = "\0\03";
LL + let _bad5 = "\0\x03";
|
LL | let _bad5 = "\0\x03";
| +
help: if a null escape is intended, disambiguate using
|
LL - let _bad5 = "\0\03";
LL + let _bad5 = "\0\x0003";
|
LL | let _bad5 = "\0\x0003";
| +++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:11:23
@ -99,9 +93,8 @@ LL + let _bad6 = "Text-\x2d\077-MoreText";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad6 = "Text-\055\077-MoreText";
LL + let _bad6 = "Text-\x0055\077-MoreText";
|
LL | let _bad6 = "Text-\x0055\077-MoreText";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:11:27
@ -116,9 +109,8 @@ LL + let _bad6 = "Text-\055\x3f-MoreText";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad6 = "Text-\055\077-MoreText";
LL + let _bad6 = "Text-\055\x0077-MoreText";
|
LL | let _bad6 = "Text-\055\x0077-MoreText";
| ++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:14:31
@ -128,14 +120,12 @@ LL | let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
|
help: if an octal escape is intended, use a hex escape instead
|
LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
LL + let _bad7 = "EvenMoreText-\x01\02-ShortEscapes";
|
LL | let _bad7 = "EvenMoreText-\x01\02-ShortEscapes";
| +
help: if a null escape is intended, disambiguate using
|
LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
LL + let _bad7 = "EvenMoreText-\x0001\02-ShortEscapes";
|
LL | let _bad7 = "EvenMoreText-\x0001\02-ShortEscapes";
| +++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:14:34
@ -145,14 +135,12 @@ LL | let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
|
help: if an octal escape is intended, use a hex escape instead
|
LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
LL + let _bad7 = "EvenMoreText-\01\x02-ShortEscapes";
|
LL | let _bad7 = "EvenMoreText-\01\x02-ShortEscapes";
| +
help: if a null escape is intended, disambiguate using
|
LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes";
LL + let _bad7 = "EvenMoreText-\01\x0002-ShortEscapes";
|
LL | let _bad7 = "EvenMoreText-\01\x0002-ShortEscapes";
| +++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:17:19
@ -162,14 +150,12 @@ LL | let _bad8 = "锈\01锈";
|
help: if an octal escape is intended, use a hex escape instead
|
LL - let _bad8 = "锈\01锈";
LL + let _bad8 = "锈\x01锈";
|
LL | let _bad8 = "锈\x01锈";
| +
help: if a null escape is intended, disambiguate using
|
LL - let _bad8 = "锈\01锈";
LL + let _bad8 = "锈\x0001锈";
|
LL | let _bad8 = "锈\x0001锈";
| +++
error: octal-looking escape in a literal
--> tests/ui/octal_escapes.rs:18:19
@ -184,9 +170,8 @@ LL + let _bad9 = "锈\x09锈";
|
help: if a null escape is intended, disambiguate using
|
LL - let _bad9 = "锈\011锈";
LL + let _bad9 = "锈\x0011锈";
|
LL | let _bad9 = "锈\x0011锈";
| ++
error: aborting due to 11 previous errors

View file

@ -8,9 +8,8 @@ LL | let _ = cow.to_owned();
= help: to override `-D warnings` add `#[allow(clippy::suspicious_to_owned)]`
help: depending on intent, either make the Cow an Owned variant
|
LL - let _ = cow.to_owned();
LL + let _ = cow.into_owned();
|
LL | let _ = cow.into_owned();
| ++
help: or clone the Cow itself
|
LL - let _ = cow.to_owned();
@ -25,9 +24,8 @@ LL | let _ = cow.to_owned();
|
help: depending on intent, either make the Cow an Owned variant
|
LL - let _ = cow.to_owned();
LL + let _ = cow.into_owned();
|
LL | let _ = cow.into_owned();
| ++
help: or clone the Cow itself
|
LL - let _ = cow.to_owned();
@ -42,9 +40,8 @@ LL | let _ = cow.to_owned();
|
help: depending on intent, either make the Cow an Owned variant
|
LL - let _ = cow.to_owned();
LL + let _ = cow.into_owned();
|
LL | let _ = cow.into_owned();
| ++
help: or clone the Cow itself
|
LL - let _ = cow.to_owned();
@ -59,9 +56,8 @@ LL | let _ = cow.to_owned();
|
help: depending on intent, either make the Cow an Owned variant
|
LL - let _ = cow.to_owned();
LL + let _ = cow.into_owned();
|
LL | let _ = cow.into_owned();
| ++
help: or clone the Cow itself
|
LL - let _ = cow.to_owned();

View file

@ -12,7 +12,7 @@ LL | | /// 200 characters so I needed to write something longeeeeeeer.
= help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`
help: add an empty line
|
LL ~ /// A very short summary.
LL | /// A very short summary.
LL + ///
|

View file

@ -12,8 +12,8 @@ LL | | //! 200 characters so I needed to write something longeeeeeeer.
= help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`
help: add an empty line
|
LL ~ //! A very short summary.
LL + //!
LL | //! A very short summary.
LL ~ //!
LL ~ //! A much longer explanation that goes into a lot more detail about
|

View file

@ -42,9 +42,8 @@ LL | fn missing(_i: u32) {}
| ^^^^^^^ -------
help: provide the argument
|
LL - missing();
LL + missing(/* u32 */);
|
LL | missing(/* u32 */);
| +++++++++
error[E0308]: arguments to this function are incorrect
--> $DIR/basic.rs:23:5
@ -98,9 +97,8 @@ LL | let closure = |x| x;
| ^^^
help: provide the argument
|
LL - closure();
LL + closure(/* x */);
|
LL | closure(/* x */);
| +++++++
error: aborting due to 6 previous errors

View file

@ -11,9 +11,8 @@ LL | fn foo(x: &(dyn Display + Send)) {}
| ^^^ ------------------------
help: provide the argument
|
LL - foo();
LL + foo(/* &dyn std::fmt::Display + Send */);
|
LL | foo(/* &dyn std::fmt::Display + Send */);
| +++++++++++++++++++++++++++++++++++
error: aborting due to 1 previous error

View file

@ -17,9 +17,8 @@ LL | fn dstfn(src: i32, dst: err);
| ^^^^^ ---
help: provide the argument
|
LL - dstfn(1);
LL + dstfn(1, /* dst */);
|
LL | dstfn(1, /* dst */);
| +++++++++++
error: aborting due to 2 previous errors

View file

@ -11,9 +11,8 @@ LL | pub fn g(a1: (), a2: bool, a3: bool, a4: bool, a5: bool, a6: ()) -> () {}
| ^ -------- -------- -------- --------
help: provide the arguments
|
LL - g((), ());
LL + g((), /* bool */, /* bool */, /* bool */, /* bool */, ());
|
LL | g((), /* bool */, /* bool */, /* bool */, /* bool */, ());
| +++++++++++++++++++++++++++++++++++++++++++++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | (|_, ()| ())(if true {} else {return;});
| ^^^^^^^
help: provide the argument
|
LL - (|_, ()| ())(if true {} else {return;});
LL + (|_, ()| ())(if true {} else {return;}, ());
|
LL | (|_, ()| ())(if true {} else {return;}, ());
| ++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | (|_, ()| ())([return, ()]);
| ^^^^^^^
help: provide the argument
|
LL - (|_, ()| ())([return, ()]);
LL + (|_, ()| ())([return, ()], ());
|
LL | (|_, ()| ())([return, ()], ());
| ++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | let f = |_: (), f: fn()| f;
| ^^^^^^^^^^^^^^^^
help: provide the argument
|
LL - let _f = f(main);
LL + let _f = f((), main);
|
LL | let _f = f((), main);
| +++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | fn one_arg(_a: i32) {}
| ^^^^^^^ -------
help: provide the argument
|
LL - one_arg();
LL + one_arg(/* i32 */);
|
LL | one_arg(/* i32 */);
| +++++++++
error[E0061]: this function takes 2 arguments but 0 arguments were supplied
--> $DIR/missing_arguments.rs:14:3

View file

@ -16,12 +16,10 @@ LL | const ID: i32 = 1;
| ^^^^^^^^^^^^^
help: use fully-qualified syntax to disambiguate
|
LL - const X: i32 = <i32>::ID;
LL + const X: i32 = <i32 as Bar>::ID;
|
LL - const X: i32 = <i32>::ID;
LL + const X: i32 = <i32 as Foo>::ID;
|
LL | const X: i32 = <i32 as Bar>::ID;
| ++++++
LL | const X: i32 = <i32 as Foo>::ID;
| ++++++
error: aborting due to 1 previous error

View file

@ -43,9 +43,8 @@ LL | struct Wrapper<T>(T);
| ^^^^^^^
help: provide the argument
|
LL - const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper();
LL + const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper(/* value */);
|
LL | const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper(/* value */);
| +++++++++++
error: aborting due to 4 previous errors

View file

@ -9,9 +9,8 @@ LL | Enum::mispellable();
|
help: there is an associated function `misspellable` with a similar name
|
LL - Enum::mispellable();
LL + Enum::misspellable();
|
LL | Enum::misspellable();
| +
error[E0599]: no variant or associated item named `mispellable_trait` found for enum `Enum` in the current scope
--> $DIR/associated-item-enum.rs:18:11
@ -24,9 +23,8 @@ LL | Enum::mispellable_trait();
|
help: there is an associated function `misspellable_trait` with a similar name
|
LL - Enum::mispellable_trait();
LL + Enum::misspellable_trait();
|
LL | Enum::misspellable_trait();
| +
error[E0599]: no variant or associated item named `MISPELLABLE` found for enum `Enum` in the current scope
--> $DIR/associated-item-enum.rs:19:11
@ -39,9 +37,8 @@ LL | Enum::MISPELLABLE;
|
help: there is an associated constant `MISSPELLABLE` with a similar name
|
LL - Enum::MISPELLABLE;
LL + Enum::MISSPELLABLE;
|
LL | Enum::MISSPELLABLE;
| +
error: aborting due to 3 previous errors

View file

@ -6,9 +6,8 @@ LL | if x<-1 {
|
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
|
LL - if x<-1 {
LL + if x< -1 {
|
LL | if x< -1 {
| +
error: aborting due to 1 previous error

View file

@ -116,9 +116,8 @@ LL | let _s2 = T { ..s0 };
|
help: clone the value from the field instead of using the functional record update syntax
|
LL - let _s2 = T { ..s0 };
LL + let _s2 = T { b: s0.b.clone(), ..s0 };
|
LL | let _s2 = T { b: s0.b.clone(), ..s0 };
| ++++++++++++++++
error[E0509]: cannot move out of type `T`, which implements the `Drop` trait
--> $DIR/borrowck-struct-update-with-dtor.rs:47:32

View file

@ -9,9 +9,8 @@ LL | let sfoo: *mut Foo = &mut SFOO;
= note: `#[warn(static_mut_refs)]` on by default
help: use `&raw mut` instead to create a raw pointer
|
LL - let sfoo: *mut Foo = &mut SFOO;
LL + let sfoo: *mut Foo = &raw mut SFOO;
|
LL | let sfoo: *mut Foo = &raw mut SFOO;
| +++
warning: 1 warning emitted

View file

@ -6,9 +6,8 @@ LL | rofl.push(Vec::new());
|
help: consider changing this binding's type
|
LL - let rofl: &Vec<Vec<i32>> = &mut test;
LL + let rofl: &mut Vec<Vec<i32>> = &mut test;
|
LL | let rofl: &mut Vec<Vec<i32>> = &mut test;
| +++
error[E0594]: cannot assign to `*r`, which is behind a `&` reference
--> $DIR/issue-85765-closure.rs:13:9
@ -29,9 +28,8 @@ LL | *x = 1;
|
help: consider changing this binding's type
|
LL - let x: &usize = &mut{0};
LL + let x: &mut usize = &mut{0};
|
LL | let x: &mut usize = &mut{0};
| +++
error[E0594]: cannot assign to `*y`, which is behind a `&` reference
--> $DIR/issue-85765-closure.rs:27:9
@ -41,9 +39,8 @@ LL | *y = 1;
|
help: consider changing this binding's type
|
LL - let y: &usize = &mut(0);
LL + let y: &mut usize = &mut(0);
|
LL | let y: &mut usize = &mut(0);
| +++
error: aborting due to 4 previous errors

View file

@ -6,9 +6,8 @@ LL | rofl.push(Vec::new());
|
help: consider changing this binding's type
|
LL - let rofl: &Vec<Vec<i32>> = &mut test;
LL + let rofl: &mut Vec<Vec<i32>> = &mut test;
|
LL | let rofl: &mut Vec<Vec<i32>> = &mut test;
| +++
error[E0594]: cannot assign to `*r`, which is behind a `&` reference
--> $DIR/issue-85765.rs:12:5
@ -29,9 +28,8 @@ LL | *x = 1;
|
help: consider changing this binding's type
|
LL - let x: &usize = &mut{0};
LL + let x: &mut usize = &mut{0};
|
LL | let x: &mut usize = &mut{0};
| +++
error[E0594]: cannot assign to `*y`, which is behind a `&` reference
--> $DIR/issue-85765.rs:26:5
@ -41,9 +39,8 @@ LL | *y = 1;
|
help: consider changing this binding's type
|
LL - let y: &usize = &mut(0);
LL + let y: &mut usize = &mut(0);
|
LL | let y: &mut usize = &mut(0);
| +++
error: aborting due to 4 previous errors

View file

@ -17,9 +17,8 @@ LL | fn foo(f: isize, x: u8, ...);
| ^^^ - -
help: provide the arguments
|
LL - foo();
LL + foo(/* isize */, /* u8 */);
|
LL | foo(/* isize */, /* u8 */);
| +++++++++++++++++++++
error[E0060]: this function takes at least 2 arguments but 1 argument was supplied
--> $DIR/variadic-ffi-1.rs:23:9
@ -34,9 +33,8 @@ LL | fn foo(f: isize, x: u8, ...);
| ^^^ -
help: provide the argument
|
LL - foo(1);
LL + foo(1, /* u8 */);
|
LL | foo(1, /* u8 */);
| ++++++++++
error[E0308]: mismatched types
--> $DIR/variadic-ffi-1.rs:25:56

View file

@ -48,9 +48,8 @@ LL | struct MyType<'a>(Cell<Option<&'unpinned mut MyType<'a>>>, Pin);
| ^^^^^^
help: provide the argument
|
LL - let mut unpinned = MyType(Cell::new(None));
LL + let mut unpinned = MyType(Cell::new(None), /* value */);
|
LL | let mut unpinned = MyType(Cell::new(None), /* value */);
| +++++++++++++
error[E0606]: casting `&MyType<'_>` as `*const Cell<Option<&mut MyType<'_>>>` is invalid
--> $DIR/ice-cast-type-with-error-124848.rs:14:20

View file

@ -7,9 +7,8 @@ LL | #[cfg_attr()]
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
help: missing condition and attribute
|
LL - #[cfg_attr()]
LL + #[cfg_attr(condition, attribute, other_attribute, ...)]
|
LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
| ++++++++++++++++++++++++++++++++++++++++++
error: expected `,`, found end of `cfg_attr` input
--> $DIR/cfg-attr-parse.rs:8:17

View file

@ -9,9 +9,8 @@ LL | let ptr = unsafe { &mut BB };
= note: `#[warn(static_mut_refs)]` on by default
help: use `&raw mut` instead to create a raw pointer
|
LL - let ptr = unsafe { &mut BB };
LL + let ptr = unsafe { &raw mut BB };
|
LL | let ptr = unsafe { &raw mut BB };
| +++
warning: 1 warning emitted

View file

@ -8,9 +8,8 @@ note: method defined here
--> $SRC_DIR/core/src/ops/coroutine.rs:LL:COL
help: provide the argument
|
LL - Pin::new(&mut b).resume();
LL + Pin::new(&mut b).resume(());
|
LL | Pin::new(&mut b).resume(());
| ++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | generator
|
help: consider changing `impl Coroutine<&'not_static str> + 'static`'s explicit `'static` bound to the lifetime of argument `s`
|
LL - fn demo<'not_static>(s: &'not_static str) -> Pin<Box<impl Coroutine<&'not_static str> + 'static>> {
LL + fn demo<'not_static>(s: &'not_static str) -> Pin<Box<impl Coroutine<&'not_static str> + 'not_static>> {
|
LL | fn demo<'not_static>(s: &'not_static str) -> Pin<Box<impl Coroutine<&'not_static str> + 'not_static>> {
| ++++
help: alternatively, add an explicit `'static` bound to this reference
|
LL - fn demo<'not_static>(s: &'not_static str) -> Pin<Box<impl Coroutine<&'not_static str> + 'static>> {

View file

@ -6,12 +6,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: aborting due to 1 previous error

View file

@ -6,12 +6,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error[E0658]: the `#[coverage]` attribute is an experimental feature
--> $DIR/bad-attr-ice.rs:11:1

View file

@ -6,12 +6,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/bad-syntax.rs:20:1
@ -36,12 +34,10 @@ LL | #[coverage()]
|
help: the following are the possible correct uses
|
LL - #[coverage()]
LL + #[coverage(off)]
|
LL - #[coverage()]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++
LL | #[coverage(on)]
| ++
error: malformed `coverage` attribute input
--> $DIR/bad-syntax.rs:26:1

View file

@ -6,12 +6,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:17:5
@ -21,12 +19,10 @@ LL | #![coverage]
|
help: the following are the possible correct uses
|
LL - #![coverage]
LL + #![coverage(off)]
|
LL - #![coverage]
LL + #![coverage(on)]
|
LL | #![coverage(off)]
| +++++
LL | #![coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:21:1
@ -36,12 +32,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:29:5
@ -51,12 +45,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:26:1
@ -66,12 +58,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:39:5
@ -81,12 +71,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:44:5
@ -96,12 +84,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:35:1
@ -111,12 +97,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:53:5
@ -126,12 +110,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:58:5
@ -141,12 +123,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:50:1
@ -156,12 +136,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error: malformed `coverage` attribute input
--> $DIR/word-only.rs:64:1
@ -171,12 +149,10 @@ LL | #[coverage]
|
help: the following are the possible correct uses
|
LL - #[coverage]
LL + #[coverage(off)]
|
LL - #[coverage]
LL + #[coverage(on)]
|
LL | #[coverage(off)]
| +++++
LL | #[coverage(on)]
| ++++
error[E0788]: coverage attribute not allowed here
--> $DIR/word-only.rs:21:1

View file

@ -31,9 +31,8 @@ LL + Struct { a, b } = Struct { a: 1, b: 2 };
|
help: if you don't care about this missing field, you can explicitly ignore it
|
LL - Struct { a, _ } = Struct { a: 1, b: 2 };
LL + Struct { a, b: _ } = Struct { a: 1, b: 2 };
|
LL | Struct { a, b: _ } = Struct { a: 1, b: 2 };
| ++
help: or always ignore missing fields here
|
LL - Struct { a, _ } = Struct { a: 1, b: 2 };

View file

@ -11,9 +11,8 @@ LL | #![deny(unknown_or_malformed_diagnostic_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: an attribute with a similar name exists
|
LL - #[diagnostic::onunimplemented]
LL + #[diagnostic::on_unimplemented]
|
LL | #[diagnostic::on_unimplemented]
| +
error: unknown diagnostic attribute
--> $DIR/suggest_typos.rs:9:15
@ -35,9 +34,8 @@ LL | #[diagnostic::on_implemented]
|
help: an attribute with a similar name exists
|
LL - #[diagnostic::on_implemented]
LL + #[diagnostic::on_unimplemented]
|
LL | #[diagnostic::on_unimplemented]
| ++
error: aborting due to 3 previous errors

View file

@ -25,19 +25,16 @@ LL | Dog { name: x, } => {}
|
help: include the missing field in the pattern
|
LL - Dog { name: x, } => {}
LL + Dog { name: x, age } => {}
|
LL | Dog { name: x, age } => {}
| +++
help: if you don't care about this missing field, you can explicitly ignore it
|
LL - Dog { name: x, } => {}
LL + Dog { name: x, age: _ } => {}
|
LL | Dog { name: x, age: _ } => {}
| ++++++
help: or always ignore missing fields here
|
LL - Dog { name: x, } => {}
LL + Dog { name: x, .. } => {}
|
LL | Dog { name: x, .. } => {}
| ++
error[E0027]: pattern does not mention field `age`
--> $DIR/E0027.rs:19:9
@ -47,19 +44,16 @@ LL | Dog { name: x , } => {}
|
help: include the missing field in the pattern
|
LL - Dog { name: x , } => {}
LL + Dog { name: x, age } => {}
|
LL | Dog { name: x, age } => {}
| ~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
|
LL - Dog { name: x , } => {}
LL + Dog { name: x, age: _ } => {}
|
LL | Dog { name: x, age: _ } => {}
| ~~~~~~~~~~
help: or always ignore missing fields here
|
LL - Dog { name: x , } => {}
LL + Dog { name: x, .. } => {}
|
LL | Dog { name: x, .. } => {}
| ~~~~~~
error[E0027]: pattern does not mention fields `name`, `age`
--> $DIR/E0027.rs:22:9
@ -69,19 +63,16 @@ LL | Dog {} => {}
|
help: include the missing fields in the pattern
|
LL - Dog {} => {}
LL + Dog { name, age } => {}
|
LL | Dog { name, age } => {}
| +++++++++
help: if you don't care about these missing fields, you can explicitly ignore them
|
LL - Dog {} => {}
LL + Dog { name: _, age: _ } => {}
|
LL | Dog { name: _, age: _ } => {}
| +++++++++++++++
help: or always ignore missing fields here
|
LL - Dog {} => {}
LL + Dog { .. } => {}
|
LL | Dog { .. } => {}
| ++
error: aborting due to 4 previous errors

View file

@ -11,9 +11,8 @@ LL | let f = |x| x * 3;
| ^^^
help: provide the argument
|
LL - let a = f();
LL + let a = f(/* x */);
|
LL | let a = f(/* x */);
| +++++++
error[E0057]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/E0057.rs:5:13

View file

@ -11,9 +11,8 @@ LL | fn printf(_: *const u8, ...) -> u32;
| ^^^^^^ -
help: provide the argument
|
LL - unsafe { printf(); }
LL + unsafe { printf(/* *const u8 */); }
|
LL | unsafe { printf(/* *const u8 */); }
| +++++++++++++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | fn f(a: u16, b: &str) {}
| ^ -------
help: provide the argument
|
LL - f(0);
LL + f(0, /* &str */);
|
LL | f(0, /* &str */);
| ++++++++++++
error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/E0061.rs:9:5
@ -28,9 +27,8 @@ LL | fn f2(a: u16) {}
| ^^ ------
help: provide the argument
|
LL - f2();
LL + f2(/* u16 */);
|
LL | f2(/* u16 */);
| +++++++++
error: aborting due to 2 previous errors

View file

@ -10,9 +10,8 @@ LL | extern crate test as alloc;
= note: `alloc` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate test as alloc;
LL + extern crate test as other_alloc;
|
LL | extern crate test as other_alloc;
| ++++++
error: aborting due to 1 previous error

View file

@ -10,9 +10,8 @@ LL | mod alloc {
= note: `alloc` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate alloc;
LL + extern crate alloc as other_alloc;
|
LL | extern crate alloc as other_alloc;
| ++++++++++++++
error: aborting due to 1 previous error

View file

@ -12,11 +12,8 @@ LL | | )) {}
= note: `#[warn(anonymous_parameters)]` on by default
help: try naming the parameter or explicitly ignoring it
|
LL ~ fn test(x: u32, _: (
LL +
LL +
LL ~ )) {}
|
LL | fn test(x: u32, _: (
| ++
warning: 1 warning emitted

View file

@ -9,9 +9,8 @@ LL | extern crate m2 as m1;
= note: `m1` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate m2 as m1;
LL + extern crate m2 as other_m1;
|
LL | extern crate m2 as other_m1;
| ++++++
error: aborting due to 1 previous error

View file

@ -165,9 +165,8 @@ LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {}
found signature `extern "rust-call" fn(&Bar, ()) -> ()`
help: change the self-receiver type to match the trait
|
LL - extern "rust-call" fn call_mut(&self, args: ()) -> () {}
LL + extern "rust-call" fn call_mut(&mut self, args: ()) -> () {}
|
LL | extern "rust-call" fn call_mut(&mut self, args: ()) -> () {}
| +++
error[E0046]: not all trait items implemented, missing: `Output`
--> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:1

View file

@ -13,9 +13,8 @@ LL + format_args!("{}", 0x8f_u8); // issue #115423
|
help: to use as a negative number (decimal `-113`), consider using the type `u8` for the literal and cast it to `i8`
|
LL - format_args!("{}", 0x8f_i8); // issue #115423
LL + format_args!("{}", 0x8f_u8 as i8); // issue #115423
|
LL | format_args!("{}", 0x8f_u8 as i8); // issue #115423
| +++++
error: literal out of range for `u8`
--> $DIR/no-inline-literals-out-of-range.rs:6:24

View file

@ -11,8 +11,8 @@ note: method defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: provide the argument
|
LL ~ needlesArr.iter().fold(|x, y| {
LL +
LL | needlesArr.iter().fold(|x, y| {
LL |
LL ~ }, /* f */);
|

View file

@ -11,9 +11,8 @@ LL | fn foo(x: i32, y: u32, z: i32);
| ^^^ -
help: provide the argument
|
LL - foo(1i32, 2i32);
LL + foo(1i32, /* u32 */, 2i32);
|
LL | foo(1i32, /* u32 */, 2i32);
| ++++++++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | fn f<I>(i: I)
| ^ ----
help: provide the argument
|
LL - f(&[f()]);
LL + f(&[f(/* i */)]);
|
LL | f(&[f(/* i */)]);
| +++++++
error: aborting due to 1 previous error

View file

@ -12,9 +12,8 @@ LL | fn bar(&self) -> impl Iterator + '_ {
= note: `#[warn(refining_impl_trait_internal)]` on by default
help: replace the return type so that it matches the trait
|
LL - fn bar(&self) -> impl Iterator + '_ {
LL + fn bar(&self) -> impl Iterator<Item = impl Sized> + '_ {
|
LL | fn bar(&self) -> impl Iterator<Item = impl Sized> + '_ {
| +++++++++++++++++++
warning: 1 warning emitted

View file

@ -9,9 +9,8 @@ LL | fn test() -> impl Sized + use<> {}
= note: `#[warn(refining_impl_trait_internal)]` on by default
help: modify the `use<..>` bound to capture the same lifetimes that the trait does
|
LL - fn test() -> impl Sized + use<> {}
LL + fn test() -> impl Sized + use<'a> {}
|
LL | fn test() -> impl Sized + use<'a> {}
| ++
warning: impl trait in impl method captures fewer lifetimes than in trait
--> $DIR/refine-captures.rs:22:31
@ -23,9 +22,8 @@ LL | fn test() -> impl Sized + use<> {}
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
help: modify the `use<..>` bound to capture the same lifetimes that the trait does
|
LL - fn test() -> impl Sized + use<> {}
LL + fn test() -> impl Sized + use<'a> {}
|
LL | fn test() -> impl Sized + use<'a> {}
| ++
warning: impl trait in impl method captures fewer lifetimes than in trait
--> $DIR/refine-captures.rs:27:31
@ -37,9 +35,8 @@ LL | fn test() -> impl Sized + use<'b> {}
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
help: modify the `use<..>` bound to capture the same lifetimes that the trait does
|
LL - fn test() -> impl Sized + use<'b> {}
LL + fn test() -> impl Sized + use<'a, 'b> {}
|
LL | fn test() -> impl Sized + use<'a, 'b> {}
| ++++
error: `impl Trait` must mention all type parameters in scope in `use<...>`
--> $DIR/refine-captures.rs:32:18

View file

@ -41,9 +41,8 @@ LL + fn elided2(x: &i32) -> impl Copy + '_ { x }
|
help: alternatively, add an explicit `'static` bound to this reference
|
LL - fn elided2(x: &i32) -> impl Copy + 'static { x }
LL + fn elided2(x: &'static i32) -> impl Copy + 'static { x }
|
LL | fn elided2(x: &'static i32) -> impl Copy + 'static { x }
| +++++++
error: lifetime may not live long enough
--> $DIR/must_outlive_least_region_or_bound.rs:12:55
@ -172,9 +171,8 @@ LL + fn elided4(x: &i32) -> Box<dyn Debug + '_> { Box::new(x) }
|
help: alternatively, add an explicit `'static` bound to this reference
|
LL - fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
LL + fn elided4(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x) }
|
LL | fn elided4(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x) }
| +++++++
error: lifetime may not live long enough
--> $DIR/must_outlive_least_region_or_bound.rs:27:60

View file

@ -6,9 +6,8 @@ LL | extern crate self;
|
help: rename the `self` crate to be able to import it
|
LL - extern crate self;
LL + extern crate self as name;
|
LL | extern crate self as name;
| +++++++
error: `#[macro_use]` is not supported on `extern crate self`
--> $DIR/extern-crate-self-fail.rs:3:1

View file

@ -7,9 +7,8 @@ LL | extern crate std;
= note: `std` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate std;
LL + extern crate std as other_std;
|
LL | extern crate std as other_std;
| ++++++++++++
error: aborting due to 1 previous error

View file

@ -62,9 +62,8 @@ LL | use foo::{self as A};
= note: `A` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - use foo::{self as A};
LL + use foo::{self as OtherA};
|
LL | use foo::{self as OtherA};
| +++++
error: aborting due to 5 previous errors

View file

@ -9,9 +9,8 @@ LL | use foo::{A, B as A};
= note: `A` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - use foo::{A, B as A};
LL + use foo::{A, B as OtherA};
|
LL | use foo::{A, B as OtherA};
| +++++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | extern crate issue_45829_b as bar;
= note: `bar` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate issue_45829_b as bar;
LL + extern crate issue_45829_b as other_bar;
|
LL | extern crate issue_45829_b as other_bar;
| ++++++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | extern crate issue_45829_b as issue_45829_a;
= note: `issue_45829_a` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate issue_45829_b as issue_45829_a;
LL + extern crate issue_45829_b as other_issue_45829_a;
|
LL | extern crate issue_45829_b as other_issue_45829_a;
| ++++++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | use std as issue_45829_b;
= note: `issue_45829_b` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - use std as issue_45829_b;
LL + use std as other_issue_45829_b;
|
LL | use std as other_issue_45829_b;
| ++++++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | use std::{collections::HashMap as A, sync::Arc as A};
= note: `A` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - use std::{collections::HashMap as A, sync::Arc as A};
LL + use std::{collections::HashMap as A, sync::Arc as OtherA};
|
LL | use std::{collections::HashMap as A, sync::Arc as OtherA};
| +++++
error: aborting due to 1 previous error

View file

@ -9,9 +9,8 @@ LL | use std as core;
= note: `core` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - use std as core;
LL + use std as other_core;
|
LL | use std as other_core;
| ++++++
error: aborting due to 1 previous error

View file

@ -14,9 +14,8 @@ LL | m!();
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can use `as` to change the binding name of the import
|
LL - extern crate std as core;
LL + extern crate std as other_core;
|
LL | extern crate std as other_core;
| ++++++
error: aborting due to 1 previous error

View file

@ -14,9 +14,8 @@ LL | m!();
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can use `as` to change the binding name of the import
|
LL - extern crate std as empty;
LL + extern crate std as other_empty;
|
LL | extern crate std as other_empty;
| ++++++
error: aborting due to 1 previous error

View file

@ -20,9 +20,8 @@ LL | m!();
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can use `as` to change the binding name of the import
|
LL - extern crate std as non_existent;
LL + extern crate std as other_non_existent;
|
LL | extern crate std as other_non_existent;
| ++++++
error: aborting due to 2 previous errors

View file

@ -7,9 +7,8 @@ LL | extern crate core;
= note: `core` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate core;
LL + extern crate core as other_core;
|
LL | extern crate core as other_core;
| +++++++++++++
error: aborting due to 1 previous error

View file

@ -20,9 +20,8 @@ LL | let _ = include_str!("hello.rs");
= note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
|
LL - let _ = include_str!("hello.rs");
LL + let _ = include_str!("../hello.rs");
|
LL | let _ = include_str!("../hello.rs");
| +++
error: couldn't read `$DIR/../../data.bin`: $FILE_NOT_FOUND_MSG
--> $DIR/parent_dir.rs:8:13

View file

@ -10,9 +10,8 @@ LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
found signature `extern "rust-call" fn(&Foo, (_,))`
help: change the parameter type to match the trait
|
LL - extern "rust-call" fn call(&self, (_,): (T,)) {}
LL + extern "rust-call" fn call(&self, (_,): (&'a T,)) {}
|
LL | extern "rust-call" fn call(&self, (_,): (&'a T,)) {}
| +++
error[E0053]: method `call_mut` has an incompatible type for trait
--> $DIR/issue-20225.rs:11:51
@ -26,9 +25,8 @@ LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
found signature `extern "rust-call" fn(&mut Foo, (_,))`
help: change the parameter type to match the trait
|
LL - extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
LL + extern "rust-call" fn call_mut(&mut self, (_,): (&'a T,)) {}
|
LL | extern "rust-call" fn call_mut(&mut self, (_,): (&'a T,)) {}
| +++
error[E0053]: method `call_once` has an incompatible type for trait
--> $DIR/issue-20225.rs:18:47
@ -43,9 +41,8 @@ LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
found signature `extern "rust-call" fn(Foo, (_,))`
help: change the parameter type to match the trait
|
LL - extern "rust-call" fn call_once(self, (_,): (T,)) {}
LL + extern "rust-call" fn call_once(self, (_,): (&'a T,)) {}
|
LL | extern "rust-call" fn call_once(self, (_,): (&'a T,)) {}
| +++
error: aborting due to 3 previous errors

View file

@ -6,9 +6,8 @@ LL | type FooT = <<Self as Bar>::Foo>::T;
|
help: if there were a trait named `Example` with associated type `T` implemented for `<Self as Bar>::Foo`, you could use the fully-qualified path
|
LL - type FooT = <<Self as Bar>::Foo>::T;
LL + type FooT = <<Self as Bar>::Foo as Example>::T;
|
LL | type FooT = <<Self as Bar>::Foo as Example>::T;
| ++++++++++
error: aborting due to 1 previous error

View file

@ -6,9 +6,8 @@ LL | let foo::Foo {} = foo::Foo::default();
|
help: ignore the inaccessible and unused fields
|
LL - let foo::Foo {} = foo::Foo::default();
LL + let foo::Foo { .. } = foo::Foo::default();
|
LL | let foo::Foo { .. } = foo::Foo::default();
| ++
error: pattern requires `..` due to inaccessible fields
--> $DIR/issue-76077-1.rs:16:9

View file

@ -13,7 +13,7 @@ LL | x.use_mut();
help: consider consuming the `Vec<i32>` when turning it into an `Iterator`
|
LL | let mut x = vec![1].into_iter();
| +++++
| +++++
help: consider using a `let` binding to create a longer lived value
|
LL ~ let binding = vec![1];

View file

@ -56,9 +56,8 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
|
help: provide the argument
|
LL - fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
LL + fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter(/* &u8 */) }
|
LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter(/* &u8 */) }
| +++++++++
error[E0308]: mismatched types
--> $DIR/issue-26638.rs:4:47

View file

@ -22,9 +22,8 @@ LL | let _y = &mut X;
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
help: use `&raw mut` instead to create a raw pointer
|
LL - let _y = &mut X;
LL + let _y = &raw mut X;
|
LL | let _y = &raw mut X;
| +++
warning: creating a shared reference to mutable static is discouraged
--> $DIR/static-mut-refs.rs:50:22

View file

@ -22,9 +22,8 @@ LL | let _y = &mut X;
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
help: use `&raw mut` instead to create a raw pointer
|
LL - let _y = &mut X;
LL + let _y = &raw mut X;
|
LL | let _y = &raw mut X;
| +++
error: creating a shared reference to mutable static is discouraged
--> $DIR/static-mut-refs.rs:50:22

View file

@ -26,9 +26,8 @@ LL + let fail = 0b1000_0001u8;
|
help: to use as a negative number (decimal `-127`), consider using the type `u8` for the literal and cast it to `i8`
|
LL - let fail = 0b1000_0001i8;
LL + let fail = 0b1000_0001u8 as i8;
|
LL | let fail = 0b1000_0001u8 as i8;
| +++++
warning: literal out of range for `i64`
--> $DIR/type-overflow.rs:15:16
@ -44,9 +43,8 @@ LL + let fail = 0x8000_0000_0000_0000u64;
|
help: to use as a negative number (decimal `-9223372036854775808`), consider using the type `u64` for the literal and cast it to `i64`
|
LL - let fail = 0x8000_0000_0000_0000i64;
LL + let fail = 0x8000_0000_0000_0000u64 as i64;
|
LL | let fail = 0x8000_0000_0000_0000u64 as i64;
| ++++++
warning: literal out of range for `u32`
--> $DIR/type-overflow.rs:19:16

View file

@ -7,9 +7,8 @@ LL | #[cfg_attr]
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
help: missing condition and attribute
|
LL - #[cfg_attr]
LL + #[cfg_attr(condition, attribute, other_attribute, ...)]
|
LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
| ++++++++++++++++++++++++++++++++++++++++++++
error: malformed `cfg_attr` attribute input
--> $DIR/malformed-special-attrs.rs:4:1

View file

@ -28,9 +28,8 @@ LL | fn one(self, _: isize) -> Foo { self }
| ^^^ --------
help: provide the argument
|
LL - .one()
LL + .one(/* isize */)
|
LL | .one(/* isize */)
| +++++++++++
error[E0061]: this method takes 2 arguments but 1 argument was supplied
--> $DIR/method-call-err-msg.rs:15:7
@ -45,9 +44,8 @@ LL | fn two(self, _: isize, _: isize) -> Foo { self }
| ^^^ --------
help: provide the argument
|
LL - .two(0);
LL + .two(0, /* isize */);
|
LL | .two(0, /* isize */);
| +++++++++++++
error[E0599]: `Foo` is not an iterator
--> $DIR/method-call-err-msg.rs:19:7
@ -84,9 +82,8 @@ LL | fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
| ^^^^^ ---- ---- ----
help: provide the arguments
|
LL - y.three::<usize>();
LL + y.three::<usize>(/* usize */, /* usize */, /* usize */);
|
LL | y.three::<usize>(/* usize */, /* usize */, /* usize */);
| +++++++++++++++++++++++++++++++++++++
error: aborting due to 5 previous errors

View file

@ -8,9 +8,8 @@ LL | [1, 2, 3].sort_by(|| panic!());
|
help: consider changing the closure to take and ignore the expected arguments
|
LL - [1, 2, 3].sort_by(|| panic!());
LL + [1, 2, 3].sort_by(|_, _| panic!());
|
LL | [1, 2, 3].sort_by(|_, _| panic!());
| ++++
error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
--> $DIR/closure-arg-count.rs:7:15
@ -64,9 +63,8 @@ LL | fn f<F: Fn<(usize,)>>(_: F) {}
| ^^^^^^^^^^^^ required by this bound in `f`
help: consider changing the closure to take and ignore the expected argument
|
LL - f(|| panic!());
LL + f(|_| panic!());
|
LL | f(|_| panic!());
| +
error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> $DIR/closure-arg-count.rs:15:5
@ -84,9 +82,8 @@ LL | fn f<F: Fn<(usize,)>>(_: F) {}
| ^^^^^^^^^^^^ required by this bound in `f`
help: consider changing the closure to take and ignore the expected argument
|
LL - f( move || panic!());
LL + f( move |_| panic!());
|
LL | f( move |_| panic!());
| +
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:18:53

View file

@ -13,9 +13,8 @@ LL | fn bar(&mut self, other: &mut dyn Foo);
found signature `fn(&mut Baz, &dyn Foo)`
help: change the parameter type to match the trait
|
LL - fn bar(&mut self, other: &dyn Foo) {}
LL + fn bar(&mut self, other: &mut dyn Foo) {}
|
LL | fn bar(&mut self, other: &mut dyn Foo) {}
| +++
error: aborting due to 1 previous error

View file

@ -8,9 +8,8 @@ note: method defined here
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
help: provide the argument
|
LL - f.call_once()
LL + f.call_once(/* args */)
|
LL | f.call_once(/* args */)
| ++++++++++
error: aborting due to 1 previous error

View file

@ -11,9 +11,8 @@ LL | fn foo(&mut self) -> _ {
| ^^^ ---------
help: provide the argument
|
LL - Self::foo()
LL + Self::foo(/* value */)
|
LL | Self::foo(/* value */)
| +++++++++++
error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
--> $DIR/mismatch-args-crash-issue-130400.rs:2:26

View file

@ -11,9 +11,8 @@ LL | unsafe extern "C" fn test_va_copy(_: u64, mut ap: ...) {}
| ^^^^^^^^^^^^ ------
help: provide the argument
|
LL - test_va_copy();
LL + test_va_copy(/* u64 */);
|
LL | test_va_copy(/* u64 */);
| +++++++++
error: aborting due to 1 previous error

View file

@ -25,9 +25,8 @@ LL | impl FnMut<(isize,)> for S {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
LL - let ans = s();
LL + let ans = s(/* isize */);
|
LL | let ans = s(/* isize */);
| +++++++++++
error[E0057]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/overloaded-calls-bad.rs:37:15

View file

@ -32,9 +32,8 @@ LL | fn bar(&mut self, bar: &mut Bar);
found signature `fn(&mut Bar, &Bar)`
help: change the parameter type to match the trait
|
LL - fn bar(&mut self, bar: &Bar) { }
LL + fn bar(&mut self, bar: &mut Bar) { }
|
LL | fn bar(&mut self, bar: &mut Bar) { }
| +++
error: aborting due to 2 previous errors

View file

@ -9,9 +9,8 @@ LL | S1 { a: unsafe { &mut X1 } }
= note: `#[warn(static_mut_refs)]` on by default
help: use `&raw mut` instead to create a raw pointer
|
LL - S1 { a: unsafe { &mut X1 } }
LL + S1 { a: unsafe { &raw mut X1 } }
|
LL | S1 { a: unsafe { &raw mut X1 } }
| +++
warning: 1 warning emitted

View file

@ -11,9 +11,8 @@ LL | fn foo(a: isize, b: isize, c: isize, d:isize) {
| ^^^ -------
help: provide the argument
|
LL - foo(1, 2, 3);
LL + foo(1, 2, 3, /* isize */);
|
LL | foo(1, 2, 3, /* isize */);
| +++++++++++++
error[E0061]: this function takes 6 arguments but 3 arguments were supplied
--> $DIR/not-enough-arguments.rs:29:3
@ -35,9 +34,8 @@ LL | f: i32,
| ------
help: provide the arguments
|
LL - bar(1, 2, 3);
LL + bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
|
LL | bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
| +++++++++++++++++++++++++++++++++
error: aborting due to 2 previous errors

View file

@ -6,9 +6,8 @@ LL | x <- y;
|
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
|
LL - x <- y;
LL + x < - y;
|
LL | x < - y;
| +
error: expected expression, found keyword `in`
--> $DIR/bad.rs:10:5

View file

@ -6,12 +6,10 @@ LL | #[rustc_on_unimplemented]
|
help: the following are the possible correct uses
|
LL - #[rustc_on_unimplemented]
LL + #[rustc_on_unimplemented = "message"]
|
LL - #[rustc_on_unimplemented]
LL + #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
|
LL | #[rustc_on_unimplemented = "message"]
| +++++++++++
LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0230]: there is no parameter `C` on trait `BadAnnotation2`
--> $DIR/bad-annotation.rs:22:1

View file

@ -6,12 +6,10 @@ LL | #[rustc_on_unimplemented]
|
help: the following are the possible correct uses
|
LL - #[rustc_on_unimplemented]
LL + #[rustc_on_unimplemented = "message"]
|
LL - #[rustc_on_unimplemented]
LL + #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
|
LL | #[rustc_on_unimplemented = "message"]
| +++++++++++
LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error: aborting due to 1 previous error

View file

@ -7,9 +7,8 @@ LL | extern crate core;
= note: `core` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
LL - extern crate core;
LL + extern crate core as other_core;
|
LL | extern crate core as other_core;
| +++++++++++++
error: `#[panic_handler]` function required, but not found

View file

@ -81,9 +81,8 @@ LL | fn full_of_✨() -> 👀 {
| ^^^^^^^^^^^^^^^^^^^^^
help: there is an associated function `full_of_✨` with a similar name
|
LL - 👀::full_of✨()
LL + 👀::full_of_✨()
|
LL | 👀::full_of_✨()
| +
error[E0425]: cannot find function `i_like_to_😄_a_lot` in this scope
--> $DIR/emoji-identifiers.rs:13:13

View file

@ -6,9 +6,8 @@ LL | extern crte foo;
|
help: there is a keyword `crate` with a similar name
|
LL - extern crte foo;
LL + extern crate foo;
|
LL | extern crate foo;
| +
error: aborting due to 1 previous error

View file

@ -6,9 +6,8 @@ LL | cnst fn code() {}
|
help: there is a keyword `const` with a similar name
|
LL - cnst fn code() {}
LL + const fn code() {}
|
LL | const fn code() {}
| +
error: aborting due to 1 previous error

View file

@ -37,7 +37,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match ref_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -100,7 +100,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match res_u32_never {
LL + Ok(_) => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -374,7 +374,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: `&[]` not covered
@ -415,7 +415,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match *slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -462,7 +462,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match array_0_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern

View file

@ -46,7 +46,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match ref_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -76,7 +76,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match res_u32_never {
LL + Ok(_) => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered
@ -321,7 +321,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: `&[!, ..]` not covered
@ -376,7 +376,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match *slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
@ -390,7 +390,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match array_0_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -502,7 +502,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match *ref_tuple_half_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern

View file

@ -37,7 +37,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match ref_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -67,7 +67,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match res_u32_never {
LL + Ok(_) => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered
@ -312,7 +312,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
@ -367,7 +367,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match *slice_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
@ -381,7 +381,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match array_0_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern
@ -493,7 +493,7 @@ help: ensure that all possible cases are being handled by adding a match arm wit
|
LL ~ match *ref_tuple_half_never {
LL + _ => todo!(),
LL + }
LL ~ }
|
error: unreachable pattern

Some files were not shown because too many files have changed in this diff Show more