diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 050f3ae583371..07c864c93a1b5 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -14,7 +14,10 @@ use rustc_span::{MultiSpan, SourceFile, Span}; use crate::snippet::{Annotation, AnnotationType, Line, MultilineAnnotation, Style, StyledString}; use crate::styled_buffer::StyledBuffer; -use crate::{CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle}; +use crate::{ + CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SubstitutionHighlight, + SuggestionStyle, +}; use rustc_lint_defs::pluralize; @@ -1590,8 +1593,11 @@ impl EmitterWriter { ); let mut row_num = 2; + draw_col_separator_no_space(&mut buffer, 1, max_line_num_len + 1); let mut notice_capitalization = false; - for (complete, parts, only_capitalization) in suggestions.iter().take(MAX_SUGGESTIONS) { + for (complete, parts, highlights, only_capitalization) in + suggestions.iter().take(MAX_SUGGESTIONS) + { notice_capitalization |= only_capitalization; // Only show underline if the suggestion spans a single line and doesn't cover the // entirety of the code output. If you have multiple replacements in the same line @@ -1599,16 +1605,26 @@ impl EmitterWriter { let show_underline = !(parts.len() == 1 && parts[0].snippet.trim() == complete.trim()) && complete.lines().count() == 1; - let lines = sm + let has_deletion = parts.iter().any(|p| p.is_deletion()); + let is_multiline = complete.lines().count() > 1; + + let show_diff = has_deletion && !is_multiline; + + if show_diff { + row_num += 1; + } + + let file_lines = sm .span_to_lines(parts[0].span) .expect("span_to_lines failed when emitting suggestion"); - assert!(!lines.lines.is_empty() || parts[0].span.is_dummy()); + assert!(!file_lines.lines.is_empty() || parts[0].span.is_dummy()); let line_start = sm.lookup_char_pos(parts[0].span.lo()).line; draw_col_separator_no_space(&mut buffer, 1, max_line_num_len + 1); let mut lines = complete.lines(); - for (line_pos, line) in lines.by_ref().take(MAX_SUGGESTION_HIGHLIGHT_LINES).enumerate() + for (line_pos, (line, parts)) in + lines.by_ref().zip(highlights).take(MAX_SUGGESTION_HIGHLIGHT_LINES).enumerate() { // Print the span column to avoid confusion buffer.puts( @@ -1617,9 +1633,60 @@ impl EmitterWriter { &self.maybe_anonymized(line_start + line_pos), Style::LineNumber, ); + if show_diff { + // Add the line number for both addition and removal to drive the point home. + // + // N - fn foo(bar: A) { + // N + fn foo(bar: impl T) { + buffer.puts( + row_num - 1, + 0, + &self.maybe_anonymized(line_start + line_pos), + Style::LineNumber, + ); + buffer.puts(row_num - 1, max_line_num_len + 1, "- ", Style::Removal); + buffer.puts( + row_num - 1, + max_line_num_len + 3, + &replace_tabs( + &*file_lines + .file + .get_line(file_lines.lines[line_pos].line_index) + .unwrap(), + ), + Style::NoStyle, + ); + buffer.puts(row_num, max_line_num_len + 1, "+ ", Style::Addition); + } else if is_multiline { + match &parts[..] { + [SubstitutionHighlight { start: 0, end }] if *end == line.len() => { + buffer.puts(row_num, max_line_num_len + 1, "+ ", Style::Addition); + } + [] => { + draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); + } + _ => { + buffer.puts(row_num, max_line_num_len + 1, "~ ", Style::Addition); + } + } + } else { + draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); + } + // print the suggestion - draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); buffer.append(row_num, &replace_tabs(line), Style::NoStyle); + + if is_multiline { + for SubstitutionHighlight { start, end } in parts { + buffer.set_style_range( + row_num, + max_line_num_len + 3 + start, + max_line_num_len + 3 + end, + Style::Addition, + true, + ); + } + } row_num += 1; } @@ -1654,25 +1721,36 @@ impl EmitterWriter { let underline_start = (span_start_pos + start) as isize + offset; let underline_end = (span_start_pos + start + sub_len) as isize + offset; assert!(underline_start >= 0 && underline_end >= 0); + let padding: usize = max_line_num_len + 3; for p in underline_start..underline_end { - buffer.putc( - row_num, - ((max_line_num_len + 3) as isize + p) as usize, - '^', - Style::UnderlinePrimary, + // Colorize addition/replacements with green. + buffer.set_style( + row_num - 1, + (padding as isize + p) as usize, + Style::Addition, + true, ); - } - // underline removals too - if underline_start == underline_end { - for p in underline_start - 1..underline_start + 1 { + if !show_diff { + // If this is a replacement, underline with `^`, if this is an addition + // underline with `+`. buffer.putc( row_num, - ((max_line_num_len + 3) as isize + p) as usize, - '-', - Style::UnderlineSecondary, + (padding as isize + p) as usize, + if part.is_addition(&sm) { '+' } else { '~' }, + Style::Addition, ); } } + if show_diff { + // Colorize removal with red in diff format. + buffer.set_style_range( + row_num - 2, + (padding as isize + span_start_pos as isize) as usize, + (padding as isize + span_end_pos as isize) as usize, + Style::Removal, + true, + ); + } // length of the code after substitution let full_sub_len = part @@ -2129,6 +2207,12 @@ impl<'a> WritableDst<'a> { fn apply_style(&mut self, lvl: Level, style: Style) -> io::Result<()> { let mut spec = ColorSpec::new(); match style { + Style::Addition => { + spec.set_fg(Some(Color::Green)).set_intense(true); + } + Style::Removal => { + spec.set_fg(Some(Color::Red)).set_intense(true); + } Style::LineAndColumn => {} Style::LineNumber => { spec.set_bold(true); diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index fc0924ac5f920..ec29d8016ddf4 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -160,32 +160,77 @@ pub struct SubstitutionPart { pub snippet: String, } +/// Used to translate between `Span`s and byte positions within a single output line in highlighted +/// code of structured suggestions. +#[derive(Debug, Clone, Copy)] +pub struct SubstitutionHighlight { + start: usize, + end: usize, +} + +impl SubstitutionPart { + pub fn is_addition(&self, sm: &SourceMap) -> bool { + !self.snippet.is_empty() + && sm + .span_to_snippet(self.span) + .map_or(self.span.is_empty(), |snippet| snippet.trim().is_empty()) + } + + pub fn is_deletion(&self) -> bool { + self.snippet.trim().is_empty() + } + + pub fn is_replacement(&self, sm: &SourceMap) -> bool { + !self.snippet.is_empty() + && sm + .span_to_snippet(self.span) + .map_or(!self.span.is_empty(), |snippet| !snippet.trim().is_empty()) + } +} + impl CodeSuggestion { /// Returns the assembled code suggestions, whether they should be shown with an underline /// and whether the substitution only differs in capitalization. - pub fn splice_lines(&self, sm: &SourceMap) -> Vec<(String, Vec, bool)> { + pub fn splice_lines( + &self, + sm: &SourceMap, + ) -> Vec<(String, Vec, Vec>, bool)> { + // For the `Vec>` value, the first level of the vector + // corresponds to the output snippet's lines, while the second level corresponds to the + // substrings within that line that should be highlighted. + use rustc_span::{CharPos, Pos}; + /// Append to a buffer the remainder of the line of existing source code, and return the + /// count of lines that have been added for accurate highlighting. fn push_trailing( buf: &mut String, line_opt: Option<&Cow<'_, str>>, lo: &Loc, hi_opt: Option<&Loc>, - ) { + ) -> usize { + let mut line_count = 0; let (lo, hi_opt) = (lo.col.to_usize(), hi_opt.map(|hi| hi.col.to_usize())); if let Some(line) = line_opt { if let Some(lo) = line.char_indices().map(|(i, _)| i).nth(lo) { let hi_opt = hi_opt.and_then(|hi| line.char_indices().map(|(i, _)| i).nth(hi)); match hi_opt { - Some(hi) if hi > lo => buf.push_str(&line[lo..hi]), + Some(hi) if hi > lo => { + line_count = line[lo..hi].matches('\n').count(); + buf.push_str(&line[lo..hi]) + } Some(_) => (), - None => buf.push_str(&line[lo..]), + None => { + line_count = line[lo..].matches('\n').count(); + buf.push_str(&line[lo..]) + } } } if hi_opt.is_none() { buf.push('\n'); } } + line_count } assert!(!self.substitutions.is_empty()); @@ -220,6 +265,7 @@ impl CodeSuggestion { return None; } + let mut highlights = vec![]; // To build up the result, we do this for each span: // - push the line segment trailing the previous span // (at the beginning a "phantom" span pointing at the start of the line) @@ -236,17 +282,29 @@ impl CodeSuggestion { lines.lines.get(0).and_then(|line0| sf.get_line(line0.line_index)); let mut buf = String::new(); + let mut line_highlight = vec![]; for part in &substitution.parts { let cur_lo = sm.lookup_char_pos(part.span.lo()); if prev_hi.line == cur_lo.line { - push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, Some(&cur_lo)); + let mut count = + push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, Some(&cur_lo)); + while count > 0 { + highlights.push(std::mem::take(&mut line_highlight)); + count -= 1; + } } else { - push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, None); + highlights.push(std::mem::take(&mut line_highlight)); + let mut count = push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, None); + while count > 0 { + highlights.push(std::mem::take(&mut line_highlight)); + count -= 1; + } // push lines between the previous and current span (if any) for idx in prev_hi.line..(cur_lo.line - 1) { if let Some(line) = sf.get_line(idx) { buf.push_str(line.as_ref()); buf.push('\n'); + highlights.push(std::mem::take(&mut line_highlight)); } } if let Some(cur_line) = sf.get_line(cur_lo.line - 1) { @@ -257,10 +315,21 @@ impl CodeSuggestion { buf.push_str(&cur_line[..end]); } } + // Add a whole line highlight per line in the snippet. + line_highlight.push(SubstitutionHighlight { + start: cur_lo.col.0, + end: cur_lo.col.0 + + part.snippet.split('\n').next().unwrap_or(&part.snippet).len(), + }); + for line in part.snippet.split('\n').skip(1) { + highlights.push(std::mem::take(&mut line_highlight)); + line_highlight.push(SubstitutionHighlight { start: 0, end: line.len() }); + } buf.push_str(&part.snippet); prev_hi = sm.lookup_char_pos(part.span.hi()); prev_line = sf.get_line(prev_hi.line - 1); } + highlights.push(std::mem::take(&mut line_highlight)); let only_capitalization = is_case_difference(sm, &buf, bounding_span); // if the replacement already ends with a newline, don't print the next line if !buf.ends_with('\n') { @@ -270,7 +339,7 @@ impl CodeSuggestion { while buf.ends_with('\n') { buf.pop(); } - Some((buf, substitution.parts, only_capitalization)) + Some((buf, substitution.parts, highlights, only_capitalization)) }) .collect() } diff --git a/compiler/rustc_errors/src/snippet.rs b/compiler/rustc_errors/src/snippet.rs index 3fe02bd0ceecf..64353461e90e0 100644 --- a/compiler/rustc_errors/src/snippet.rs +++ b/compiler/rustc_errors/src/snippet.rs @@ -177,4 +177,6 @@ pub enum Style { NoStyle, Level(Level), Highlight, + Addition, + Removal, } diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr index 991dc6eec1d20..aa39d26feed1e 100644 --- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr +++ b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr @@ -10,7 +10,7 @@ LL | This(E), help: insert some indirection (e.g., a `DEF_ID` representable | LL | This(Box), - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr index ec1bb786fe5ad..009bedec5ed6a 100644 --- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr +++ b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr @@ -10,7 +10,7 @@ LL | V(E), help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `f::E` representable | LL | V(Box), - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/rustdoc-ui/infinite-recursive-type.stderr b/src/test/rustdoc-ui/infinite-recursive-type.stderr index 897445f200cb7..b33aba446223c 100644 --- a/src/test/rustdoc-ui/infinite-recursive-type.stderr +++ b/src/test/rustdoc-ui/infinite-recursive-type.stderr @@ -10,7 +10,7 @@ LL | V(E), help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E` representable | LL | V(Box), - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/rustdoc-ui/intra-doc/ambiguity.stderr b/src/test/rustdoc-ui/intra-doc/ambiguity.stderr index e87c26e9cc5b0..7974796e47b17 100644 --- a/src/test/rustdoc-ui/intra-doc/ambiguity.stderr +++ b/src/test/rustdoc-ui/intra-doc/ambiguity.stderr @@ -12,11 +12,11 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] help: to link to the module, prefix with `mod@` | LL | /// [mod@true] - | ^^^^ + | ++++ help: to link to the builtin type, prefix with `prim@` | LL | /// [prim@true] - | ^^^^^ + | +++++ error: `ambiguous` is both a struct and a function --> $DIR/ambiguity.rs:27:7 @@ -27,11 +27,11 @@ LL | /// [`ambiguous`] is ambiguous. help: to link to the struct, prefix with `struct@` | LL | /// [`struct@ambiguous`] is ambiguous. - | ^^^^^^^ + | +++++++ help: to link to the function, add parentheses | LL | /// [`ambiguous()`] is ambiguous. - | ^^ + | ++ error: `ambiguous` is both a struct and a function --> $DIR/ambiguity.rs:29:6 @@ -42,11 +42,11 @@ LL | /// [ambiguous] is ambiguous. help: to link to the struct, prefix with `struct@` | LL | /// [struct@ambiguous] is ambiguous. - | ^^^^^^^ + | +++++++ help: to link to the function, add parentheses | LL | /// [ambiguous()] is ambiguous. - | ^^ + | ++ error: `multi_conflict` is a struct, a function, and a macro --> $DIR/ambiguity.rs:31:7 @@ -57,15 +57,15 @@ LL | /// [`multi_conflict`] is a three-way conflict. help: to link to the struct, prefix with `struct@` | LL | /// [`struct@multi_conflict`] is a three-way conflict. - | ^^^^^^^ + | +++++++ help: to link to the function, add parentheses | LL | /// [`multi_conflict()`] is a three-way conflict. - | ^^ + | ++ help: to link to the macro, add an exclamation mark | LL | /// [`multi_conflict!`] is a three-way conflict. - | ^ + | + error: `type_and_value` is both a module and a constant --> $DIR/ambiguity.rs:33:16 @@ -76,11 +76,11 @@ LL | /// Ambiguous [type_and_value]. help: to link to the module, prefix with `mod@` | LL | /// Ambiguous [mod@type_and_value]. - | ^^^^ + | ++++ help: to link to the constant, prefix with `const@` | LL | /// Ambiguous [const@type_and_value]. - | ^^^^^^ + | ++++++ error: `foo::bar` is both an enum and a function --> $DIR/ambiguity.rs:35:43 @@ -91,11 +91,11 @@ LL | /// Ambiguous non-implied shortcut link [`foo::bar`]. help: to link to the enum, prefix with `enum@` | LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`]. - | ^^^^^ + | +++++ help: to link to the function, add parentheses | LL | /// Ambiguous non-implied shortcut link [`foo::bar()`]. - | ^^ + | ++ error: aborting due to 6 previous errors diff --git a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr index 8d1519516ee76..12122f5fa8674 100644 --- a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr +++ b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr @@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] help: to link to the enum, prefix with `enum@` | LL | /// Link to [enum@S] - | ^^^^^ + | ~~~~~ error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:21:14 @@ -23,7 +23,7 @@ LL | /// Link to [mod@S] help: to link to the enum, prefix with `enum@` | LL | /// Link to [enum@S] - | ^^^^^ + | ~~~~~ error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:26:14 @@ -34,7 +34,7 @@ LL | /// Link to [union@S] help: to link to the enum, prefix with `enum@` | LL | /// Link to [enum@S] - | ^^^^^ + | ~~~~~ error: incompatible link kind for `S` --> $DIR/disambiguator-mismatch.rs:31:14 @@ -45,7 +45,7 @@ LL | /// Link to [trait@S] help: to link to the enum, prefix with `enum@` | LL | /// Link to [enum@S] - | ^^^^^ + | ~~~~~ error: incompatible link kind for `T` --> $DIR/disambiguator-mismatch.rs:36:14 @@ -56,7 +56,7 @@ LL | /// Link to [struct@T] help: to link to the trait, prefix with `trait@` | LL | /// Link to [trait@T] - | ^^^^^^ + | ~~~~~~ error: incompatible link kind for `m` --> $DIR/disambiguator-mismatch.rs:41:14 @@ -66,8 +66,9 @@ LL | /// Link to [derive@m] | help: to link to the macro, add an exclamation mark | -LL | /// Link to [m!] - | --^ +LL - /// Link to [derive@m] +LL + /// Link to [m!] + | error: unresolved link to `m` --> $DIR/disambiguator-mismatch.rs:46:14 @@ -78,7 +79,7 @@ LL | /// Link to [m()] help: to link to the macro, add an exclamation mark | LL | /// Link to [m!()] - | ^ + | + error: incompatible link kind for `s` --> $DIR/disambiguator-mismatch.rs:52:14 @@ -89,7 +90,7 @@ LL | /// Link to [const@s] help: to link to the static, prefix with `static@` | LL | /// Link to [static@s] - | ^^^^^^^ + | ~~~~~~~ error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:57:14 @@ -100,7 +101,7 @@ LL | /// Link to [static@c] help: to link to the constant, prefix with `const@` | LL | /// Link to [const@c] - | ^^^^^^ + | ~~~~~~ error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:62:14 @@ -111,7 +112,7 @@ LL | /// Link to [fn@c] help: to link to the constant, prefix with `const@` | LL | /// Link to [const@c] - | ^^^^^^ + | ~~~~~~ error: incompatible link kind for `c` --> $DIR/disambiguator-mismatch.rs:67:14 @@ -121,8 +122,9 @@ LL | /// Link to [c()] | help: to link to the constant, prefix with `const@` | -LL | /// Link to [const@c] - | ^^^^^^-- +LL - /// Link to [c()] +LL + /// Link to [const@c] + | error: incompatible link kind for `f` --> $DIR/disambiguator-mismatch.rs:72:14 @@ -132,8 +134,9 @@ LL | /// Link to [const@f] | help: to link to the function, add parentheses | -LL | /// Link to [f()] - | --^^ +LL - /// Link to [const@f] +LL + /// Link to [f()] + | error: aborting due to 12 previous errors diff --git a/src/test/rustdoc-ui/intra-doc/errors.stderr b/src/test/rustdoc-ui/intra-doc/errors.stderr index 87d107b9c573b..e1ff3740bf685 100644 --- a/src/test/rustdoc-ui/intra-doc/errors.stderr +++ b/src/test/rustdoc-ui/intra-doc/errors.stderr @@ -96,8 +96,9 @@ LL | /// [type@Vec::into_iter] | help: to link to the associated function, add parentheses | -LL | /// [Vec::into_iter()] - | -- ^^ +LL - /// [type@Vec::into_iter] +LL + /// [Vec::into_iter()] + | error: unresolved link to `S` --> $DIR/errors.rs:68:6 @@ -107,8 +108,9 @@ LL | /// [S!] | help: to link to the struct, prefix with `struct@` | -LL | /// [struct@S] - | ^^^^^^^-- +LL - /// [S!] +LL + /// [struct@S] + | error: unresolved link to `S::h` --> $DIR/errors.rs:78:6 @@ -118,8 +120,9 @@ LL | /// [type@S::h] | help: to link to the associated function, add parentheses | -LL | /// [S::h()] - | -- ^^ +LL - /// [type@S::h] +LL + /// [S::h()] + | error: unresolved link to `T::g` --> $DIR/errors.rs:86:6 @@ -129,8 +132,9 @@ LL | /// [type@T::g] | help: to link to the associated function, add parentheses | -LL | /// [T::g()] - | -- ^^ +LL - /// [type@T::g] +LL + /// [T::g()] + | error: unresolved link to `T::h` --> $DIR/errors.rs:91:6 @@ -147,7 +151,7 @@ LL | /// [m()] help: to link to the macro, add an exclamation mark | LL | /// [m!()] - | ^ + | + error: aborting due to 20 previous errors diff --git a/src/test/rustdoc-ui/intra-doc/field-ice.stderr b/src/test/rustdoc-ui/intra-doc/field-ice.stderr index 3ab35d2df07b0..f45a3ca615bbe 100644 --- a/src/test/rustdoc-ui/intra-doc/field-ice.stderr +++ b/src/test/rustdoc-ui/intra-doc/field-ice.stderr @@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] help: to link to the field, remove the disambiguator | LL | /// [`Foo::bar`] - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr index c2de5607ed64a..c43cda3eb7e94 100644 --- a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr +++ b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr @@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] help: to link to the associated constant, prefix with `const@` | LL | //! [const@u8::MIN] - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr b/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr index 4dc1ce209007e..6ef3b7eab3baf 100644 --- a/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr +++ b/src/test/rustdoc-ui/intra-doc/prim-conflict.stderr @@ -12,11 +12,11 @@ LL | #![deny(rustdoc::broken_intra_doc_links)] help: to link to the module, prefix with `mod@` | LL | /// [mod@char] - | ^^^^ + | ++++ help: to link to the builtin type, prefix with `prim@` | LL | /// [prim@char] - | ^^^^^ + | +++++ error: `char` is both a module and a builtin type --> $DIR/prim-conflict.rs:10:6 @@ -27,11 +27,11 @@ LL | /// [type@char] help: to link to the module, prefix with `mod@` | LL | /// [mod@char] - | ^^^^ + | ~~~~ help: to link to the builtin type, prefix with `prim@` | LL | /// [prim@char] - | ^^^^^ + | ~~~~~ error: incompatible link kind for `char` --> $DIR/prim-conflict.rs:19:6 @@ -42,7 +42,7 @@ LL | /// [struct@char] help: to link to the module, prefix with `mod@` | LL | /// [mod@char] - | ^^^^ + | ~~~~ error: incompatible link kind for `char` --> $DIR/prim-conflict.rs:26:10 @@ -53,7 +53,7 @@ LL | //! [struct@char] help: to link to the builtin type, prefix with `prim@` | LL | //! [prim@char] - | ^^^^^ + | ~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/rustdoc-ui/invalid-syntax.stderr b/src/test/rustdoc-ui/invalid-syntax.stderr index 82eac9bd68b21..5b1846a49d19f 100644 --- a/src/test/rustdoc-ui/invalid-syntax.stderr +++ b/src/test/rustdoc-ui/invalid-syntax.stderr @@ -14,7 +14,7 @@ LL | | /// ``` help: mark blocks that do not contain Rust code as text | LL | /// ```text - | ^^^^^^^ + | ~~~~~~~ warning: could not parse code block as Rust code --> $DIR/invalid-syntax.rs:9:5 @@ -32,7 +32,7 @@ LL | | /// ``` help: mark blocks that do not contain Rust code as text | LL | /// ```text - | ^^^^^^^ + | ~~~~~~~ warning: could not parse code block as Rust code --> $DIR/invalid-syntax.rs:21:5 @@ -47,7 +47,7 @@ LL | | /// ``` help: mark blocks that do not contain Rust code as text | LL | /// ```text - | ^^^^^^^ + | ~~~~~~~ warning: could not parse code block as Rust code --> $DIR/invalid-syntax.rs:35:5 @@ -123,7 +123,7 @@ LL | | /// ``` help: mark blocks that do not contain Rust code as text | LL | /// ```text - | ^^^^^^^ + | ~~~~~~~ warning: could not parse code block as Rust code --> $DIR/invalid-syntax.rs:92:9 @@ -148,7 +148,7 @@ LL | | /// ``` help: mark blocks that do not contain Rust code as text | LL | /// ```text - | ^^^^^^^ + | ~~~~~~~ warning: 12 warnings emitted diff --git a/src/test/rustdoc-ui/nocapture-fail.stderr b/src/test/rustdoc-ui/nocapture-fail.stderr index 16a5ac47cd257..b65b622c1ed4b 100644 --- a/src/test/rustdoc-ui/nocapture-fail.stderr +++ b/src/test/rustdoc-ui/nocapture-fail.stderr @@ -9,9 +9,9 @@ LL | | } | help: you might have forgotten to add the struct literal inside the block | -LL | fn foo() { SomeStruct { +LL ~ fn foo() { SomeStruct { LL | Input: 123 -LL | } } +LL ~ } } | error: aborting due to previous error diff --git a/src/test/ui/anon-params/anon-params-denied-2018.stderr b/src/test/ui/anon-params/anon-params-denied-2018.stderr index b53640cd65ba9..55905e5ca6a5a 100644 --- a/src/test/ui/anon-params/anon-params-denied-2018.stderr +++ b/src/test/ui/anon-params/anon-params-denied-2018.stderr @@ -8,15 +8,15 @@ LL | fn foo(i32); help: if this is a `self` type, give it a parameter name | LL | fn foo(self: i32); - | ^^^^^^^^^ + | ~~~~~~~~~ help: if this is a parameter name, give it a type | LL | fn foo(i32: TypeName); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn foo(_: i32); - | ^^^^^^ + | ~~~~~~ error: expected one of `:`, `@`, or `|`, found `)` --> $DIR/anon-params-denied-2018.rs:9:29 @@ -28,15 +28,15 @@ LL | fn foo_with_ref(&mut i32); help: if this is a `self` type, give it a parameter name | LL | fn foo_with_ref(self: &mut i32); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ help: if this is a parameter name, give it a type | LL | fn foo_with_ref(i32: &mut TypeName); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn foo_with_ref(_: &mut i32); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` --> $DIR/anon-params-denied-2018.rs:12:47 @@ -48,7 +48,7 @@ LL | fn foo_with_qualified_path(::Baz); help: explicitly ignore the parameter name | LL | fn foo_with_qualified_path(_: ::Baz); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` --> $DIR/anon-params-denied-2018.rs:15:56 @@ -60,7 +60,7 @@ LL | fn foo_with_qualified_path_and_ref(&::Baz); help: explicitly ignore the parameter name | LL | fn foo_with_qualified_path_and_ref(_: &::Baz); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,` --> $DIR/anon-params-denied-2018.rs:18:57 @@ -72,7 +72,7 @@ LL | fn foo_with_multiple_qualified_paths(::Baz, ::Baz); help: explicitly ignore the parameter name | LL | fn foo_with_multiple_qualified_paths(_: ::Baz, ::Baz); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)` --> $DIR/anon-params-denied-2018.rs:18:74 @@ -84,7 +84,7 @@ LL | fn foo_with_multiple_qualified_paths(::Baz, ::Baz); help: explicitly ignore the parameter name | LL | fn foo_with_multiple_qualified_paths(::Baz, _: ::Baz); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: expected one of `:`, `@`, or `|`, found `,` --> $DIR/anon-params-denied-2018.rs:22:36 @@ -96,15 +96,15 @@ LL | fn bar_with_default_impl(String, String) {} help: if this is a `self` type, give it a parameter name | LL | fn bar_with_default_impl(self: String, String) {} - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: if this is a parameter name, give it a type | LL | fn bar_with_default_impl(String: TypeName, String) {} - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn bar_with_default_impl(_: String, String) {} - | ^^^^^^^^^ + | ~~~~~~~~~ error: expected one of `:`, `@`, or `|`, found `)` --> $DIR/anon-params-denied-2018.rs:22:44 @@ -116,11 +116,11 @@ LL | fn bar_with_default_impl(String, String) {} help: if this is a parameter name, give it a type | LL | fn bar_with_default_impl(String, String: TypeName) {} - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn bar_with_default_impl(String, _: String) {} - | ^^^^^^^^^ + | ~~~~~~~~~ error: expected one of `:`, `@`, or `|`, found `,` --> $DIR/anon-params-denied-2018.rs:27:22 @@ -132,11 +132,11 @@ LL | fn baz(a:usize, b, c: usize) -> usize { help: if this is a parameter name, give it a type | LL | fn baz(a:usize, b: TypeName, c: usize) -> usize { - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn baz(a:usize, _: b, c: usize) -> usize { - | ^^^^ + | ~~~~ error: aborting due to 9 previous errors diff --git a/src/test/ui/associated-consts/associated-const-ambiguity-report.stderr b/src/test/ui/associated-consts/associated-const-ambiguity-report.stderr index fc94ef2ff8872..d4c12b8e061cc 100644 --- a/src/test/ui/associated-consts/associated-const-ambiguity-report.stderr +++ b/src/test/ui/associated-consts/associated-const-ambiguity-report.stderr @@ -17,11 +17,11 @@ LL | const ID: i32 = 3; help: disambiguate the associated constant for candidate #1 | LL | const X: i32 = Foo::ID; - | ^^^^^ + | ~~~~~ help: disambiguate the associated constant for candidate #2 | LL | const X: i32 = Bar::ID; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index bf18eee4e07ed..703d790e92ce9 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -13,7 +13,7 @@ LL | pub unsafe auto trait Send { help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Send { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0277]: `<::C as Iterator>::Item` is not an iterator --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:43 @@ -30,7 +30,7 @@ LL | pub trait Iterator { help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Iterator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0277]: `<::C as Iterator>::Item` cannot be shared between threads safely --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93 @@ -47,7 +47,7 @@ LL | pub unsafe auto trait Sync { help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Sync { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++++++++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr index 46d472cdf80db..f3bd48f8c3724 100644 --- a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr @@ -13,7 +13,7 @@ LL | pub trait Debug { help: consider further restricting the associated type | LL | trait Case1 where <::A as Iterator>::Item: Debug { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0277]: the trait bound `<::Out as Baz>::Assoc: Default` is not satisfied --> $DIR/bounds-on-assoc-in-trait.rs:35:38 @@ -29,7 +29,7 @@ LL | pub trait Default: Sized { help: consider further restricting the associated type | LL | pub trait Foo where <::Out as Baz>::Assoc: Default { type Out: Baz; } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-type-bounds/inside-adt.stderr b/src/test/ui/associated-type-bounds/inside-adt.stderr index 74e858ca8616f..0cacd78724732 100644 --- a/src/test/ui/associated-type-bounds/inside-adt.stderr +++ b/src/test/ui/associated-type-bounds/inside-adt.stderr @@ -64,11 +64,11 @@ LL | enum E1 { V(dyn Iterator) } help: borrowed types always have a statically known size | LL | enum E1 { V(&dyn Iterator) } - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | enum E1 { V(Box>) } - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn Iterator + 'static)` cannot be known at compilation time --> $DIR/inside-adt.rs:16:13 @@ -82,11 +82,11 @@ LL | enum E3 { V(dyn Iterator) } help: borrowed types always have a statically known size | LL | enum E3 { V(&dyn Iterator) } - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | enum E3 { V(Box>) } - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn Iterator + 'static)` cannot be known at compilation time --> $DIR/inside-adt.rs:20:15 @@ -100,11 +100,11 @@ LL | union U1 { f: dyn Iterator } help: borrowed types always have a statically known size | LL | union U1 { f: &dyn Iterator } - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | union U1 { f: Box> } - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn Iterator + 'static)` cannot be known at compilation time --> $DIR/inside-adt.rs:25:15 @@ -118,11 +118,11 @@ LL | union U3 { f: dyn Iterator } help: borrowed types always have a statically known size | LL | union U3 { f: &dyn Iterator } - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | union U3 { f: Box> } - | ^^^^ ^ + | ++++ + error: aborting due to 13 previous errors diff --git a/src/test/ui/associated-type-bounds/type-alias.stderr b/src/test/ui/associated-type-bounds/type-alias.stderr index 42be09de03f22..6bde9d1a50df4 100644 --- a/src/test/ui/associated-type-bounds/type-alias.stderr +++ b/src/test/ui/associated-type-bounds/type-alias.stderr @@ -7,8 +7,9 @@ LL | type _TaWhere1 where T: Iterator = T; = note: `#[warn(type_alias_bounds)]` on by default help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere1 = T; - | -- +LL - type _TaWhere1 where T: Iterator = T; +LL + type _TaWhere1 = T; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias.rs:6:25 @@ -18,8 +19,9 @@ LL | type _TaWhere2 where T: Iterator = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere2 = T; - | -- +LL - type _TaWhere2 where T: Iterator = T; +LL + type _TaWhere2 = T; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias.rs:7:25 @@ -29,8 +31,9 @@ LL | type _TaWhere3 where T: Iterator = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere3 = T; - | -- +LL - type _TaWhere3 where T: Iterator = T; +LL + type _TaWhere3 = T; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias.rs:8:25 @@ -40,8 +43,9 @@ LL | type _TaWhere4 where T: Iterator = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere4 = T; - | -- +LL - type _TaWhere4 where T: Iterator = T; +LL + type _TaWhere4 = T; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias.rs:9:25 @@ -51,8 +55,9 @@ LL | type _TaWhere5 where T: Iterator Into<&'a u8>> = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere5 = T; - | -- +LL - type _TaWhere5 where T: Iterator Into<&'a u8>> = T; +LL + type _TaWhere5 = T; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias.rs:10:25 @@ -62,8 +67,9 @@ LL | type _TaWhere6 where T: Iterator> = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type _TaWhere6 = T; - | -- +LL - type _TaWhere6 where T: Iterator> = T; +LL + type _TaWhere6 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:12:20 @@ -73,8 +79,9 @@ LL | type _TaInline1> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline1 = T; - | -- +LL - type _TaInline1> = T; +LL + type _TaInline1 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:13:20 @@ -84,8 +91,9 @@ LL | type _TaInline2> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline2 = T; - | -- +LL - type _TaInline2> = T; +LL + type _TaInline2 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:14:20 @@ -95,8 +103,9 @@ LL | type _TaInline3> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline3 = T; - | -- +LL - type _TaInline3> = T; +LL + type _TaInline3 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:15:20 @@ -106,8 +115,9 @@ LL | type _TaInline4> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline4 = T; - | -- +LL - type _TaInline4> = T; +LL + type _TaInline4 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:16:20 @@ -117,8 +127,9 @@ LL | type _TaInline5 Into<&'a u8>>> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline5 = T; - | -- +LL - type _TaInline5 Into<&'a u8>>> = T; +LL + type _TaInline5 = T; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias.rs:17:20 @@ -128,8 +139,9 @@ LL | type _TaInline6>> = T; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type _TaInline6 = T; - | -- +LL - type _TaInline6>> = T; +LL + type _TaInline6 = T; + | warning: 12 warnings emitted diff --git a/src/test/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr b/src/test/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr index 6de8459954c68..474b3c5c717c4 100644 --- a/src/test/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr +++ b/src/test/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr @@ -13,11 +13,11 @@ LL | fn a(_: C::Color) { help: use fully qualified syntax to disambiguate | LL | fn a(_: ::Color) { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn a(_: ::Color) { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:20:12 @@ -34,11 +34,11 @@ LL | fn b(_: C::Color) where C : Vehicle+Box { help: use fully qualified syntax to disambiguate | LL | fn b(_: ::Color) where C : Vehicle+Box { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn b(_: ::Color) where C : Vehicle+Box { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:24:12 @@ -55,11 +55,11 @@ LL | fn c(_: C::Color) where C : Vehicle, C : Box { help: use fully qualified syntax to disambiguate | LL | fn c(_: ::Color) where C : Vehicle, C : Box { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn c(_: ::Color) where C : Vehicle, C : Box { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Color` in bounds of `X` --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:35:20 @@ -76,11 +76,11 @@ LL | fn e(&self, _: X::Color) where X : Box; help: use fully qualified syntax to disambiguate | LL | fn e(&self, _: ::Color) where X : Box; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn e(&self, _: ::Color) where X : Box; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Color` in bounds of `X` --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:38:20 @@ -97,11 +97,11 @@ LL | fn f(&self, _: X::Color) where X : Box { } help: use fully qualified syntax to disambiguate | LL | fn f(&self, _: ::Color) where X : Box { } - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn f(&self, _: ::Color) where X : Box { } - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Color` in bounds of `X` --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:30:20 @@ -118,11 +118,11 @@ LL | fn d(&self, _: X::Color) where X : Box { } help: use fully qualified syntax to disambiguate | LL | fn d(&self, _: ::Color) where X : Box { } - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn d(&self, _: ::Color) where X : Box { } - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr index cd7c0dc4a44d0..e6e95336bb53d 100644 --- a/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr +++ b/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr @@ -21,11 +21,11 @@ LL | fn dent(c: C, color: C::Color) { help: use fully qualified syntax to disambiguate | LL | fn dent(c: C, color: ::Color) { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn dent(c: C, color: ::Color) { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37 @@ -74,11 +74,11 @@ LL | fn paint(c: C, d: C::Color) { help: use fully qualified syntax to disambiguate | LL | fn paint(c: C, d: ::Color) { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | fn paint(c: C, d: ::Color) { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32 diff --git a/src/test/ui/associated-types/associated-types-bound-failure.stderr b/src/test/ui/associated-types/associated-types-bound-failure.stderr index 41e2d8ec314b7..edcd2bf85adb6 100644 --- a/src/test/ui/associated-types/associated-types-bound-failure.stderr +++ b/src/test/ui/associated-types/associated-types-bound-failure.stderr @@ -12,7 +12,7 @@ LL | fn to_int(&self) -> isize; help: consider further restricting the associated type | LL | where G : GetToInt, ::R: ToInt - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-eq-1.stderr b/src/test/ui/associated-types/associated-types-eq-1.stderr index 53a45cf4e4f4d..e9ace7d2574b9 100644 --- a/src/test/ui/associated-types/associated-types-eq-1.stderr +++ b/src/test/ui/associated-types/associated-types-eq-1.stderr @@ -9,11 +9,11 @@ LL | let _: A = x.boo(); help: a type parameter with a similar name exists | LL | let _: I = x.boo(); - | ^ + | ~ help: you might be missing a type parameter | LL | fn foo2(x: I) { - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-eq-3.stderr b/src/test/ui/associated-types/associated-types-eq-3.stderr index dffa4780a09ff..5992b0d6bf143 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.stderr +++ b/src/test/ui/associated-types/associated-types-eq-3.stderr @@ -11,7 +11,7 @@ LL | let _: Bar = x.boo(); help: consider constraining the associated type `::A` to `Bar` | LL | fn foo2>(x: I) { - | ^^^^^^^^^ + | +++++++++ error[E0271]: type mismatch resolving `::A == Bar` --> $DIR/associated-types-eq-3.rs:38:5 diff --git a/src/test/ui/associated-types/associated-types-for-unimpl-trait.stderr b/src/test/ui/associated-types/associated-types-for-unimpl-trait.stderr index 25e80159b0b18..f2195ca694bd7 100644 --- a/src/test/ui/associated-types/associated-types-for-unimpl-trait.stderr +++ b/src/test/ui/associated-types/associated-types-for-unimpl-trait.stderr @@ -10,7 +10,7 @@ LL | fn uhoh(&self, foo: U, bar: ::Value) {} help: consider further restricting `Self` | LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} - | ^^^^^^^^^^^^^^^ + | +++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr b/src/test/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr index 1df127873538d..8fecfdf7b932b 100644 --- a/src/test/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr +++ b/src/test/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr @@ -7,7 +7,7 @@ LL | let u: >::Bar = t.get_bar(); help: consider further restricting this bound | LL | fn f + Foo>(t: &T) { - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr index b8f20d00ff8e4..cfc75652a61b4 100644 --- a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr +++ b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr @@ -12,7 +12,7 @@ LL | fn want_y>(t: &T) { } help: consider constraining the associated type `::Y` to `i32` | LL | fn have_x_want_y>(t: &T) - | ^^^^^^^^^ + | +++++++++ error[E0271]: type mismatch resolving `::X == u32` --> $DIR/associated-types-multiple-types-one-trait.rs:18:5 @@ -28,7 +28,7 @@ LL | fn want_x>(t: &T) { } help: consider constraining the associated type `::X` to `u32` | LL | fn have_y_want_x>(t: &T) - | ^^^^^^^^^ + | +++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-no-suitable-bound.stderr b/src/test/ui/associated-types/associated-types-no-suitable-bound.stderr index 19500f58aa688..75f0354b81a63 100644 --- a/src/test/ui/associated-types/associated-types-no-suitable-bound.stderr +++ b/src/test/ui/associated-types/associated-types-no-suitable-bound.stderr @@ -10,7 +10,7 @@ LL | fn uhoh(foo: ::Value) {} help: consider restricting type parameter `T` | LL | fn uhoh(foo: ::Value) {} - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr b/src/test/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr index 0e978f20a6634..a432805ced8ae 100644 --- a/src/test/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr +++ b/src/test/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr @@ -10,7 +10,7 @@ LL | fn uhoh(&self, foo: U, bar: ::Value) {} help: consider further restricting `Self` | LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} - | ^^^^^^^^^^^^^^^ + | +++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-no-suitable-supertrait.stderr b/src/test/ui/associated-types/associated-types-no-suitable-supertrait.stderr index 1ec3c05983aef..10b2ab5e9741c 100644 --- a/src/test/ui/associated-types/associated-types-no-suitable-supertrait.stderr +++ b/src/test/ui/associated-types/associated-types-no-suitable-supertrait.stderr @@ -10,7 +10,7 @@ LL | fn uhoh(&self, foo: U, bar: ::Value) {} help: consider further restricting `Self` | LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} - | ^^^^^^^^^^^^^^^ + | +++++++++++++++ error[E0277]: the trait bound `(T, U): Get` is not satisfied --> $DIR/associated-types-no-suitable-supertrait.rs:22:40 diff --git a/src/test/ui/associated-types/associated-types-path-1.stderr b/src/test/ui/associated-types/associated-types-path-1.stderr index 60db7749082e5..8f94b24e7b6b6 100644 --- a/src/test/ui/associated-types/associated-types-path-1.stderr +++ b/src/test/ui/associated-types/associated-types-path-1.stderr @@ -19,11 +19,11 @@ LL | pub fn f2(a: T, x: T::A) {} help: use fully qualified syntax to disambiguate | LL | pub fn f2(a: T, x: ::A) {} - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | pub fn f2(a: T, x: ::A) {} - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr index 0881258aca1ac..77b638b703b4c 100644 --- a/src/test/ui/associated-types/associated-types-path-2.stderr +++ b/src/test/ui/associated-types/associated-types-path-2.stderr @@ -7,7 +7,7 @@ LL | f1(2i32, 4i32); help: change the type of the numeric literal from `i32` to `u32` | LL | f1(2i32, 4u32); - | ^^^^ + | ~~~~ error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:29:5 @@ -50,7 +50,7 @@ LL | let _: i32 = f2(2i32); help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit | LL | let _: i32 = f2(2i32).try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr index cadc3e9eab1c9..62a619723511e 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr @@ -6,8 +6,8 @@ LL | field: I::A | help: use a fully qualified path with explicit lifetimes | -LL | struct SomeStruct<'a, I: for<'x> Foo<&'x isize>> { -LL | field: >::A +LL ~ struct SomeStruct<'a, I: for<'x> Foo<&'x isize>> { +LL ~ field: >::A | error[E0212]: cannot use the associated type of a trait with uninferred generic parameters @@ -18,8 +18,8 @@ LL | TupleVariant(I::A), | help: use a fully qualified path with explicit lifetimes | -LL | enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> { -LL | TupleVariant(>::A), +LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> { +LL ~ TupleVariant(>::A), | error[E0212]: cannot use the associated type of a trait with uninferred generic parameters @@ -30,10 +30,10 @@ LL | StructVariant { field: I::A }, | help: use a fully qualified path with explicit lifetimes | -LL | enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> { +LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> { LL | TupleVariant(I::A), LL | -LL | StructVariant { field: >::A }, +LL ~ StructVariant { field: >::A }, | error[E0212]: cannot use the associated type of a trait with uninferred generic parameters @@ -44,9 +44,9 @@ LL | field: I::A, | help: use a fully qualified path with explicit lifetimes | -LL | struct Why<'bb, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, +LL ~ struct Why<'bb, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, LL | 'y, 'z, 'aa, I: for<'l, 'm> Foo<&'l &'m isize>> { -LL | field: >::A, +LL ~ field: >::A, | error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr b/src/test/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr index b6ee1ed733c3e..7bbf060fdb686 100644 --- a/src/test/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr +++ b/src/test/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr @@ -10,7 +10,7 @@ LL | fn okay(&self, foo: U, bar: ::Value); help: consider further restricting `Self` | LL | fn okay(&self, foo: U, bar: ::Value) where Self: Get; - | ^^^^^^^^^^^^^^^ + | +++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-unsized.stderr b/src/test/ui/associated-types/associated-types-unsized.stderr index c2af5483003e2..bec9b1500c9d7 100644 --- a/src/test/ui/associated-types/associated-types-unsized.stderr +++ b/src/test/ui/associated-types/associated-types-unsized.stderr @@ -10,7 +10,7 @@ LL | let x = t.get(); help: consider further restricting the associated type | LL | fn foo(t: T) where ::Value: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr b/src/test/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr index 6c68cc7bc61aa..e8e07997c721d 100644 --- a/src/test/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr +++ b/src/test/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr @@ -9,11 +9,11 @@ LL | fn elision &i32>() { help: consider making the bound lifetime-generic with a new `'a` lifetime | LL | fn elision Fn() -> &'a i32>() { - | ^^^^^^^ ^^^ + | +++++++ ~~~ help: consider using the `'static` lifetime | LL | fn elision &'static i32>() { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/associated-types/bound-lifetime-in-return-only.elision.stderr b/src/test/ui/associated-types/bound-lifetime-in-return-only.elision.stderr index 93d2f8e7911f0..c75e732b7ca4c 100644 --- a/src/test/ui/associated-types/bound-lifetime-in-return-only.elision.stderr +++ b/src/test/ui/associated-types/bound-lifetime-in-return-only.elision.stderr @@ -9,11 +9,11 @@ LL | fn elision(_: fn() -> &i32) { help: consider making the type lifetime-generic with a new `'a` lifetime | LL | fn elision(_: for<'a> fn() -> &'a i32) { - | ^^^^^^^ ^^^ + | +++++++ ~~~ help: consider using the `'static` lifetime | LL | fn elision(_: fn() -> &'static i32) { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/associated-types/defaults-suitability.stderr b/src/test/ui/associated-types/defaults-suitability.stderr index af4e6f0a5c161..7023516e37f37 100644 --- a/src/test/ui/associated-types/defaults-suitability.stderr +++ b/src/test/ui/associated-types/defaults-suitability.stderr @@ -32,7 +32,7 @@ LL | type Bar: Clone = Vec; help: consider restricting type parameter `T` | LL | trait Foo { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `(): Foo` is not satisfied --> $DIR/defaults-suitability.rs:34:5 @@ -68,7 +68,7 @@ LL | type Bar: Clone = Vec; help: consider further restricting the associated type | LL | trait Foo2 where >::Baz: Clone { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++ error[E0277]: the trait bound `>::Baz: Clone` is not satisfied --> $DIR/defaults-suitability.rs:74:5 @@ -83,7 +83,7 @@ LL | type Bar: Clone = Vec; help: consider further restricting the associated type | LL | trait Foo25 where >::Baz: Clone { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++ error[E0277]: the trait bound `T: Clone` is not satisfied --> $DIR/defaults-suitability.rs:87:5 @@ -100,7 +100,7 @@ LL | type Baz = T; help: consider further restricting type parameter `T` | LL | Self::Baz: Clone, T: std::clone::Clone - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr index bcdb50aa312cb..3449272238cae 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr @@ -11,7 +11,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + std::fmt::Display { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-1.rs:20:5 @@ -25,7 +25,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++ error[E0277]: the trait bound `Self: Deref` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:20:5 @@ -39,7 +39,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + Deref { - | ^^^^^^^ + | +++++++ error[E0277]: the trait bound `Self: Copy` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:20:5 @@ -53,7 +53,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + Copy { - | ^^^^^^ + | ++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr index fa5cf9196edbd..3b86c534d58e0 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr @@ -11,7 +11,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + std::fmt::Display { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-2.rs:20:5 @@ -25,7 +25,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++ error[E0277]: the trait bound `Self: Deref` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:20:5 @@ -39,7 +39,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + Deref { - | ^^^^^^^ + | +++++++ error[E0277]: the trait bound `Self: Copy` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:20:5 @@ -53,7 +53,7 @@ LL | type Output: Copy + Deref + AddAssign<&'static str> + Fro help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + Copy { - | ^^^^^^ + | ++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr index 6e02b42e514c5..22bc0281d343a 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr @@ -28,7 +28,7 @@ LL | impl X<'_, T> for (S,) { help: consider restricting type parameter `T` | LL | impl X<'b, T>> X<'_, T> for (S,) { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr index 49fad4e1b1cb8..149279e417c1b 100644 --- a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr +++ b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr @@ -23,7 +23,7 @@ LL | impl UnsafeCopy<'_, T> for T { help: consider further restricting the associated type | LL | impl UnsafeCopy<'_, T> for T where for<'b> >::Item: Deref { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/impl-trait-return-missing-constraint.stderr b/src/test/ui/associated-types/impl-trait-return-missing-constraint.stderr index 89e05b61fc9d8..283ecea735d41 100644 --- a/src/test/ui/associated-types/impl-trait-return-missing-constraint.stderr +++ b/src/test/ui/associated-types/impl-trait-return-missing-constraint.stderr @@ -12,7 +12,7 @@ LL | fn baz() -> impl Bar { help: consider constraining the associated type `::Item` to `i32` | LL | fn bar() -> impl Bar { - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-20005.stderr b/src/test/ui/associated-types/issue-20005.stderr index bc414044f7846..1f14b5bb787a4 100644 --- a/src/test/ui/associated-types/issue-20005.stderr +++ b/src/test/ui/associated-types/issue-20005.stderr @@ -10,11 +10,11 @@ LL | ) -> >::Result where Dst: From { help: consider further restricting `Self` | LL | ) -> >::Result where Dst: From, Self: Sized { - | ^^^^^^^^^^^^^ + | +++++++++++++ help: consider relaxing the implicit `Sized` restriction | LL | trait From { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-22560.stderr b/src/test/ui/associated-types/issue-22560.stderr index 9dda99109fa2b..d2193cc4a4895 100644 --- a/src/test/ui/associated-types/issue-22560.stderr +++ b/src/test/ui/associated-types/issue-22560.stderr @@ -52,7 +52,7 @@ LL | type Test = dyn Add + Sub; help: specify the associated types | LL | type Test = dyn Add + Sub; - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/issue-27675-unchecked-bounds.stderr b/src/test/ui/associated-types/issue-27675-unchecked-bounds.stderr index b6122bd54d162..2bb8398c93ea4 100644 --- a/src/test/ui/associated-types/issue-27675-unchecked-bounds.stderr +++ b/src/test/ui/associated-types/issue-27675-unchecked-bounds.stderr @@ -10,7 +10,7 @@ LL | copy::>(t) help: consider restricting type parameter `T` | LL | pub fn copy_any(t: &T) -> T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-43784-associated-type.stderr b/src/test/ui/associated-types/issue-43784-associated-type.stderr index 0e653a7d3b22f..c5e0cbc8a4a8a 100644 --- a/src/test/ui/associated-types/issue-43784-associated-type.stderr +++ b/src/test/ui/associated-types/issue-43784-associated-type.stderr @@ -10,7 +10,7 @@ LL | type Assoc = T; help: consider restricting type parameter `T` | LL | impl Complete for T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-54108.stderr b/src/test/ui/associated-types/issue-54108.stderr index 927a2de996561..84012e651df59 100644 --- a/src/test/ui/associated-types/issue-54108.stderr +++ b/src/test/ui/associated-types/issue-54108.stderr @@ -11,7 +11,7 @@ LL | type Size = ::ActualSize; help: consider further restricting the associated type | LL | T: SubEncoder, ::ActualSize: Add - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-63593.stderr b/src/test/ui/associated-types/issue-63593.stderr index 16ae07687e2c7..59637367604de 100644 --- a/src/test/ui/associated-types/issue-63593.stderr +++ b/src/test/ui/associated-types/issue-63593.stderr @@ -10,7 +10,7 @@ LL | type This = Self; help: consider further restricting `Self` | LL | trait MyTrait: Sized { - | ^^^^^^^ + | +++++++ error: aborting due to previous error diff --git a/src/test/ui/associated-types/issue-87261.stderr b/src/test/ui/associated-types/issue-87261.stderr index 0725acfe537db..780ef118d1cb2 100644 --- a/src/test/ui/associated-types/issue-87261.stderr +++ b/src/test/ui/associated-types/issue-87261.stderr @@ -12,7 +12,7 @@ LL | accepts_trait(a); help: consider constraining the associated type `::Associated` to `()` | LL | A: Trait + 'static, - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `::Associated == ()` --> $DIR/issue-87261.rs:59:5 @@ -42,7 +42,7 @@ LL | accepts_trait(c); help: consider constraining the associated type `::Associated` to `()` | LL | C: Trait + Foo, - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `::Associated == ()` --> $DIR/issue-87261.rs:65:5 @@ -72,7 +72,7 @@ LL | accepts_generic_trait(e); help: consider constraining the associated type `>::Associated` to `()` | LL | E: GenericTrait<(), Associated = ()> + 'static, - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `>::Associated == ()` --> $DIR/issue-87261.rs:71:5 @@ -88,7 +88,7 @@ LL | accepts_generic_trait(f); help: consider constraining the associated type `>::Associated` to `()` | LL | F: GenericTrait<(), Associated = ()> + Foo, - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `>::Associated == ()` --> $DIR/issue-87261.rs:74:5 @@ -121,7 +121,7 @@ LL | accepts_trait(returns_opaque()); help: consider constraining the associated type `::Associated` to `()` | LL | fn returns_opaque() -> impl Trait + 'static { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `::Associated == ()` --> $DIR/issue-87261.rs:82:5 @@ -140,7 +140,7 @@ LL | accepts_trait(returns_opaque_derived()); help: consider constraining the associated type `::Associated` to `()` | LL | fn returns_opaque_derived() -> impl DerivedTrait + 'static { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `::Associated == ()` --> $DIR/issue-87261.rs:85:5 @@ -159,7 +159,7 @@ LL | accepts_trait(returns_opaque_foo()); help: consider constraining the associated type `::Associated` to `()` | LL | fn returns_opaque_foo() -> impl Trait + Foo { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `::Associated == ()` --> $DIR/issue-87261.rs:88:5 @@ -195,7 +195,7 @@ LL | accepts_generic_trait(returns_opaque_generic()); help: consider constraining the associated type ` as GenericTrait<()>>::Associated` to `()` | LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `+Foo as GenericTrait<()>>::Associated == ()` --> $DIR/issue-87261.rs:94:5 @@ -214,7 +214,7 @@ LL | accepts_generic_trait(returns_opaque_generic_foo()); help: consider constraining the associated type `+Foo as GenericTrait<()>>::Associated` to `()` | LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0271]: type mismatch resolving `+GenericTrait as GenericTrait<()>>::Associated == ()` --> $DIR/issue-87261.rs:97:5 diff --git a/src/test/ui/associated-types/missing-associated-types.stderr b/src/test/ui/associated-types/missing-associated-types.stderr index 63164480a033b..340d4e2418e0f 100644 --- a/src/test/ui/associated-types/missing-associated-types.stderr +++ b/src/test/ui/associated-types/missing-associated-types.stderr @@ -25,7 +25,7 @@ LL | type Foo = dyn Add + Sub + X + Y; help: specify the associated types | LL | type Foo = dyn Add + Sub + X + Y; - | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/missing-associated-types.rs:15:32 @@ -61,7 +61,7 @@ LL | type Bar = dyn Add + Sub + X + Z; help: specify the associated types | LL | type Bar = dyn Add + Sub + X + Z; - | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/missing-associated-types.rs:18:32 @@ -89,7 +89,7 @@ LL | type Baz = dyn Add + Sub + Y; help: specify the associated types | LL | type Baz = dyn Add + Sub + Y; - | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/missing-associated-types.rs:21:32 @@ -113,7 +113,7 @@ LL | type Bat = dyn Add + Sub + Fine; help: specify the associated types | LL | type Bat = dyn Add + Sub + Fine; - | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified --> $DIR/missing-associated-types.rs:24:21 diff --git a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr index 0afc380293370..529b0f76c50d2 100644 --- a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr +++ b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr @@ -12,7 +12,7 @@ LL | pub trait Add { help: consider further restricting `Self` | LL | trait ArithmeticOps: Add + Sub + Mul + Div + Sized {} - | ^^^^^^^ + | +++++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr b/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr index d0c91c4ab4466..44d60c1d80d88 100644 --- a/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr +++ b/src/test/ui/async-await/async-borrowck-escaping-block-error.stderr @@ -15,7 +15,7 @@ LL | fn test_boxed() -> Box> { help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | Box::new(async move { x } ) - | ^^^^ + | ++++ error[E0373]: async block may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/async-borrowck-escaping-block-error.rs:11:11 @@ -34,7 +34,7 @@ LL | async { *x } help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | async move { *x } - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/async-await/async-borrowck-escaping-closure-error.stderr b/src/test/ui/async-await/async-borrowck-escaping-closure-error.stderr index 1bcaaf0d6b33b..10691aad04e81 100644 --- a/src/test/ui/async-await/async-borrowck-escaping-closure-error.stderr +++ b/src/test/ui/async-await/async-borrowck-escaping-closure-error.stderr @@ -14,7 +14,7 @@ LL | Box::new((async || x)()) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | Box::new((async move || x)()) - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr index 05d543a7e486d..56020d1b2f599 100644 --- a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr +++ b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr @@ -7,7 +7,7 @@ LL | pub mod await { help: you can escape reserved keywords to use them as identifiers | LL | pub mod r#await { - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:7:20 @@ -18,7 +18,7 @@ LL | pub struct await; help: you can escape reserved keywords to use them as identifiers | LL | pub struct r#await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:10:22 @@ -29,7 +29,7 @@ LL | use self::outer_mod::await::await; help: you can escape reserved keywords to use them as identifiers | LL | use self::outer_mod::r#await::await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:10:29 @@ -40,7 +40,7 @@ LL | use self::outer_mod::await::await; help: you can escape reserved keywords to use them as identifiers | LL | use self::outer_mod::await::r#await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:13:14 @@ -51,7 +51,7 @@ LL | struct Foo { await: () } help: you can escape reserved keywords to use them as identifiers | LL | struct Foo { r#await: () } - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:16:15 @@ -62,7 +62,7 @@ LL | impl Foo { fn await() {} } help: you can escape reserved keywords to use them as identifiers | LL | impl Foo { fn r#await() {} } - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error-in-non-macro-position.rs:19:14 @@ -73,7 +73,7 @@ LL | macro_rules! await { help: you can escape reserved keywords to use them as identifiers | LL | macro_rules! r#await { - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 7 previous errors diff --git a/src/test/ui/async-await/await-keyword/2018-edition-error.stderr b/src/test/ui/async-await/await-keyword/2018-edition-error.stderr index d44d51b8fd15d..e90cd644457a1 100644 --- a/src/test/ui/async-await/await-keyword/2018-edition-error.stderr +++ b/src/test/ui/async-await/await-keyword/2018-edition-error.stderr @@ -7,7 +7,7 @@ LL | pub mod await { help: you can escape reserved keywords to use them as identifiers | LL | pub mod r#await { - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error.rs:6:20 @@ -18,7 +18,7 @@ LL | pub struct await; help: you can escape reserved keywords to use them as identifiers | LL | pub struct r#await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error.rs:9:22 @@ -29,7 +29,7 @@ LL | use self::outer_mod::await::await; help: you can escape reserved keywords to use them as identifiers | LL | use self::outer_mod::r#await::await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error.rs:9:29 @@ -40,7 +40,7 @@ LL | use self::outer_mod::await::await; help: you can escape reserved keywords to use them as identifiers | LL | use self::outer_mod::await::r#await; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/2018-edition-error.rs:12:14 @@ -51,7 +51,7 @@ LL | macro_rules! await { () => {}; } help: you can escape reserved keywords to use them as identifiers | LL | macro_rules! r#await { () => {}; } - | ^^^^^^^ + | ~~~~~~~ error: expected expression, found `)` --> $DIR/2018-edition-error.rs:15:12 diff --git a/src/test/ui/async-await/dont-suggest-missing-await.stderr b/src/test/ui/async-await/dont-suggest-missing-await.stderr index 4dc5cafb98614..76bbad26c8026 100644 --- a/src/test/ui/async-await/dont-suggest-missing-await.stderr +++ b/src/test/ui/async-await/dont-suggest-missing-await.stderr @@ -14,7 +14,7 @@ LL | async fn make_u32() -> u32 { help: consider `await`ing on the `Future` | LL | take_u32(x.await) - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/issue-61076.stderr b/src/test/ui/async-await/issue-61076.stderr index 9fb2d5bc6cb42..60b5bfa53d77f 100644 --- a/src/test/ui/async-await/issue-61076.stderr +++ b/src/test/ui/async-await/issue-61076.stderr @@ -13,7 +13,7 @@ LL | fn branch(self) -> ControlFlow; help: consider `await`ing on the `Future` | LL | foo().await?; - | ^^^^^^ + | ++++++ error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/issue-61076.rs:67:5 @@ -30,7 +30,7 @@ LL | fn branch(self) -> ControlFlow; help: consider `await`ing on the `Future` | LL | t.await?; - | ^^^^^^ + | ++++++ error[E0609]: no field `0` on type `impl Future` --> $DIR/issue-61076.rs:78:26 @@ -41,7 +41,7 @@ LL | let _: i32 = tuple().0; help: consider `await`ing on the `Future` and access the field of its `Output` | LL | let _: i32 = tuple().await.0; - | ^^^^^^ + | ++++++ error[E0609]: no field `a` on type `impl Future` --> $DIR/issue-61076.rs:82:28 @@ -52,7 +52,7 @@ LL | let _: i32 = struct_().a; help: consider `await`ing on the `Future` and access the field of its `Output` | LL | let _: i32 = struct_().await.a; - | ^^^^^^ + | ++++++ error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope --> $DIR/issue-61076.rs:86:15 @@ -63,7 +63,7 @@ LL | struct_().method(); help: consider `await`ing on the `Future` and calling the method on its `Output` | LL | struct_().await.method(); - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/issue-61076.rs:94:9 @@ -81,7 +81,7 @@ LL | async fn tuple() -> Tuple { help: consider `await`ing on the `Future` | LL | match tuple().await { - | ^^^^^^ + | ++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/async-await/issue-70818.stderr b/src/test/ui/async-await/issue-70818.stderr index 5f39cf6dde125..20109d4d1166a 100644 --- a/src/test/ui/async-await/issue-70818.stderr +++ b/src/test/ui/async-await/issue-70818.stderr @@ -12,7 +12,7 @@ LL | async { (ty, ty1) } help: consider restricting type parameter `U` | LL | fn foo(ty: T, ty1: U) -> impl Future + Send { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/issue-72590-type-error-sized.stderr b/src/test/ui/async-await/issue-72590-type-error-sized.stderr index 50dfeffde7cf0..778423578e169 100644 --- a/src/test/ui/async-await/issue-72590-type-error-sized.stderr +++ b/src/test/ui/async-await/issue-72590-type-error-sized.stderr @@ -26,7 +26,7 @@ LL | struct Foo { help: function arguments must have a statically known size, borrowed types always have a known size | LL | async fn frob(&self) {} - | ^ + | + error: aborting due to 3 previous errors diff --git a/src/test/ui/async-await/issue-86507.stderr b/src/test/ui/async-await/issue-86507.stderr index 51e8f61085b22..ad0a359224147 100644 --- a/src/test/ui/async-await/issue-86507.stderr +++ b/src/test/ui/async-await/issue-86507.stderr @@ -17,7 +17,7 @@ LL | let x = x; help: consider further restricting type parameter `T` | LL | where 'me:'async_trait, T: std::marker::Sync { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/issues/issue-62097.nll.stderr b/src/test/ui/async-await/issues/issue-62097.nll.stderr index 1139175f8a07a..e71bcf5822808 100644 --- a/src/test/ui/async-await/issues/issue-62097.nll.stderr +++ b/src/test/ui/async-await/issues/issue-62097.nll.stderr @@ -14,7 +14,7 @@ LL | foo(|| self.bar()).await; help: to force the closure to take ownership of `self` (and any other referenced variables), use the `move` keyword | LL | foo(move || self.bar()).await; - | ^^^^ + | ++++ error[E0521]: borrowed data escapes outside of associated function --> $DIR/issue-62097.rs:13:9 diff --git a/src/test/ui/async-await/issues/issue-63388-2.stderr b/src/test/ui/async-await/issues/issue-63388-2.stderr index ca42263dfed7b..24fd3845b4e04 100644 --- a/src/test/ui/async-await/issues/issue-63388-2.stderr +++ b/src/test/ui/async-await/issues/issue-63388-2.stderr @@ -10,7 +10,7 @@ LL | ) -> &dyn Foo help: consider using the `'a` lifetime | LL | ) -> &'a dyn Foo - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/async-await/issues/issue-65159.stderr b/src/test/ui/async-await/issues/issue-65159.stderr index 51fc34c48186c..ff46bcb8983b3 100644 --- a/src/test/ui/async-await/issues/issue-65159.stderr +++ b/src/test/ui/async-await/issues/issue-65159.stderr @@ -14,7 +14,7 @@ LL | pub enum Result { help: add missing generic argument | LL | async fn copy() -> Result<(), E> - | ^^^ + | +++ error[E0282]: type annotations needed --> $DIR/issue-65159.rs:8:5 diff --git a/src/test/ui/async-await/issues/issue-78938-async-block.stderr b/src/test/ui/async-await/issues/issue-78938-async-block.stderr index 22ebd86d85ca1..29aa8372f87d0 100644 --- a/src/test/ui/async-await/issues/issue-78938-async-block.stderr +++ b/src/test/ui/async-await/issues/issue-78938-async-block.stderr @@ -12,7 +12,7 @@ LL | | }); help: to force the async block to take ownership of `room_ref` (and any other referenced variables), use the `move` keyword | LL | let gameloop_handle = spawn(async move { - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/pin-needed-to-poll.stderr b/src/test/ui/async-await/pin-needed-to-poll.stderr index 0714e666d387f..c47ec5dddb6e2 100644 --- a/src/test/ui/async-await/pin-needed-to-poll.stderr +++ b/src/test/ui/async-await/pin-needed-to-poll.stderr @@ -15,7 +15,7 @@ LL | fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll u32 { help: consider `await`ing on the `Future` | LL | take_u32(x.await) - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr index 890f66c58d0f8..08868a04657c4 100644 --- a/src/test/ui/async-await/suggest-missing-await.stderr +++ b/src/test/ui/async-await/suggest-missing-await.stderr @@ -14,7 +14,7 @@ LL | async fn make_u32() -> u32 { help: consider `await`ing on the `Future` | LL | take_u32(x.await) - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/suggest-missing-await.rs:22:5 @@ -32,11 +32,11 @@ LL | async fn dummy() {} help: consider `await`ing on the `Future` | LL | dummy().await - | ^^^^^^ + | ++++++ help: consider using a semicolon here | LL | dummy(); - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/attributes/key-value-non-ascii.stderr b/src/test/ui/attributes/key-value-non-ascii.stderr index 01a07ad3b0ee4..422107867f7f9 100644 --- a/src/test/ui/attributes/key-value-non-ascii.stderr +++ b/src/test/ui/attributes/key-value-non-ascii.stderr @@ -7,7 +7,7 @@ LL | #[rustc_dummy = b"ffi.rs"] help: if you meant to use the UTF-8 encoding of 'ffi', use \xHH escapes | LL | #[rustc_dummy = b"/xEF/xAC/x83.rs"] - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/binop/binary-op-on-double-ref.stderr b/src/test/ui/binop/binary-op-on-double-ref.stderr index 02b0488488c55..1651f70d5cde7 100644 --- a/src/test/ui/binop/binary-op-on-double-ref.stderr +++ b/src/test/ui/binop/binary-op-on-double-ref.stderr @@ -9,7 +9,7 @@ LL | x % 2 == 0 help: `%` can be used on `{integer}`, you can dereference `x` | LL | *x % 2 == 0 - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/binop/binop-consume-args.stderr b/src/test/ui/binop/binop-consume-args.stderr index ac0a51d6ae92e..c734f8c1e17e3 100644 --- a/src/test/ui/binop/binop-consume-args.stderr +++ b/src/test/ui/binop/binop-consume-args.stderr @@ -16,7 +16,7 @@ LL | fn add(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn add + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:8:10 @@ -32,7 +32,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn add, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:13:10 @@ -52,7 +52,7 @@ LL | fn sub(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn sub + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:14:10 @@ -68,7 +68,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn sub, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:19:10 @@ -88,7 +88,7 @@ LL | fn mul(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn mul + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:20:10 @@ -104,7 +104,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn mul, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:25:10 @@ -124,7 +124,7 @@ LL | fn div(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn div + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:26:10 @@ -140,7 +140,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn div, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:31:10 @@ -160,7 +160,7 @@ LL | fn rem(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn rem + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:32:10 @@ -176,7 +176,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn rem, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:37:10 @@ -196,7 +196,7 @@ LL | fn bitand(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn bitand + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:38:10 @@ -212,7 +212,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn bitand, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:43:10 @@ -232,7 +232,7 @@ LL | fn bitor(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn bitor + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:44:10 @@ -248,7 +248,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn bitor, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:49:10 @@ -268,7 +268,7 @@ LL | fn bitxor(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn bitxor + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:50:10 @@ -284,7 +284,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn bitxor, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:55:10 @@ -304,7 +304,7 @@ LL | fn shl(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn shl + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:56:10 @@ -320,7 +320,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn shl, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:61:10 @@ -340,7 +340,7 @@ LL | fn shr(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn shr + Copy, B>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:62:10 @@ -356,7 +356,7 @@ LL | drop(rhs); help: consider restricting type parameter `B` | LL | fn shr, B: Copy>(lhs: A, rhs: B) { - | ^^^^^^ + | ++++++ error: aborting due to 20 previous errors diff --git a/src/test/ui/binop/binop-move-semantics.stderr b/src/test/ui/binop/binop-move-semantics.stderr index fa47de9a2cfeb..7721f8827db87 100644 --- a/src/test/ui/binop/binop-move-semantics.stderr +++ b/src/test/ui/binop/binop-move-semantics.stderr @@ -19,7 +19,7 @@ LL | fn add(self, rhs: Rhs) -> Self::Output; help: consider further restricting this bound | LL | fn double_move + Copy>(x: T) { - | ^^^^^^ + | ++++++ error[E0382]: borrow of moved value: `x` --> $DIR/binop-move-semantics.rs:14:5 @@ -35,7 +35,7 @@ LL | x.clone(); help: consider further restricting this bound | LL | fn move_then_borrow + Clone + Copy>(x: T) { - | ^^^^^^ + | ++++++ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/binop-move-semantics.rs:21:5 diff --git a/src/test/ui/blind/blind-item-block-item-shadow.stderr b/src/test/ui/blind/blind-item-block-item-shadow.stderr index d897bf56e108b..68b3f4c1ae2fc 100644 --- a/src/test/ui/blind/blind-item-block-item-shadow.stderr +++ b/src/test/ui/blind/blind-item-block-item-shadow.stderr @@ -10,7 +10,7 @@ LL | use foo::Bar; help: you can use `as` to change the binding name of the import | LL | use foo::Bar as OtherBar; - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/blind/blind-item-item-shadow.stderr b/src/test/ui/blind/blind-item-item-shadow.stderr index f17d7843cd715..12b583ea3e9c0 100644 --- a/src/test/ui/blind/blind-item-item-shadow.stderr +++ b/src/test/ui/blind/blind-item-item-shadow.stderr @@ -11,7 +11,7 @@ LL | use foo::foo; help: you can use `as` to change the binding name of the import | LL | use foo::foo as other_foo; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr index ef3e2da81b28c..7081b5106ff96 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -10,8 +10,9 @@ LL | &panic!() found reference `&_` help: consider removing the borrow | -LL | panic!() - | -- +LL - &panic!() +LL + panic!() + | error: aborting due to previous error diff --git a/src/test/ui/block-result/unexpected-return-on-unit.stderr b/src/test/ui/block-result/unexpected-return-on-unit.stderr index 4fcd0ee2c48e2..4acb955a8e7a4 100644 --- a/src/test/ui/block-result/unexpected-return-on-unit.stderr +++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr @@ -7,11 +7,11 @@ LL | foo() help: consider using a semicolon here | LL | foo(); - | ^ + | + help: try adding a return type | LL | fn bar() -> usize { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr index 161e4610d614f..acf6b37b77396 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr @@ -14,7 +14,7 @@ LL | spawn(|| books.push(4)); help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | LL | spawn(move || books.push(4)); - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr index b07db6e12ad15..814042539a22f 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr @@ -14,7 +14,7 @@ LL | Box::new(|| books.push(4)) help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | LL | Box::new(move || books.push(4)) - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr index a345c1238f02c..a865812cb4a7c 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr @@ -12,8 +12,8 @@ LL | Foo { string: b }] => { = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&` | -LL | [Foo { string: a }, -LL | Foo { string: b }] => { +LL ~ [Foo { string: a }, +LL ~ Foo { string: b }] => { | error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr index bc1721944fbbb..d46ef126da481 100644 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr +++ b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr @@ -34,7 +34,7 @@ LL | f(1, 2); help: consider further restricting this bound | LL | fn c isize + Copy>(f: F) { - | ^^^^^^ + | ++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index b4b3bc1ba2b75..36f8f5c9ad739 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -36,12 +36,12 @@ LL | &mut [_a, | help: consider removing the `&mut` | -LL | [_a, -LL | -LL | -LL | -LL | .. -LL | ] => { +LL ~ [_a, +LL + +LL + +LL + +LL + .. +LL ~ ] => { | error[E0508]: cannot move out of type `[Box]`, a non-copy slice @@ -68,9 +68,9 @@ LL | _b] => {} | help: consider removing the `&mut` | -LL | [ -LL | -LL | _b] => {} +LL ~ [ +LL + +LL ~ _b] => {} | error[E0508]: cannot move out of type `[Box]`, a non-copy slice diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index dd3090b30f012..b20cc6d8cf59f 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -8,7 +8,7 @@ LL | if let Some(thing) = maybe { help: borrow this field in the pattern to avoid moving `maybe.0` | LL | if let Some(ref thing) = maybe { - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr index 0d506a0956d21..4bd0667304397 100644 --- a/src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr +++ b/src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr @@ -26,7 +26,7 @@ LL | struct LockedMarket(T); help: add missing generic argument | LL | async fn buy_lock(generator: &Mutex) -> LockedMarket<'_, T> { - | ^^^ + | +++ error[E0515]: cannot return value referencing temporary value --> $DIR/issue-82126-mismatched-subst-and-hir.rs:19:5 diff --git a/src/test/ui/borrowck/move-in-pattern-mut-in-loop.stderr b/src/test/ui/borrowck/move-in-pattern-mut-in-loop.stderr index 9373e4d95fccd..c6931ba72579b 100644 --- a/src/test/ui/borrowck/move-in-pattern-mut-in-loop.stderr +++ b/src/test/ui/borrowck/move-in-pattern-mut-in-loop.stderr @@ -8,7 +8,7 @@ LL | if let Some(mut _x) = opt {} help: borrow this field in the pattern to avoid moving `opt.0` | LL | if let Some(ref mut _x) = opt {} - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/borrowck/move-in-pattern-mut.stderr b/src/test/ui/borrowck/move-in-pattern-mut.stderr index 17bc5492756e6..2bf34b32176c0 100644 --- a/src/test/ui/borrowck/move-in-pattern-mut.stderr +++ b/src/test/ui/borrowck/move-in-pattern-mut.stderr @@ -11,7 +11,7 @@ LL | foo(s); help: borrow this field in the pattern to avoid moving `s.0` | LL | if let Some(ref mut x) = s { - | ^^^ + | +++ error[E0382]: use of partially moved value: `e` --> $DIR/move-in-pattern-mut.rs:22:9 @@ -26,7 +26,7 @@ LL | bar(e); help: borrow this field in the pattern to avoid moving `e.s` | LL | let E::V { s: ref mut x } = e; - | ^^^ + | +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/move-in-pattern.stderr b/src/test/ui/borrowck/move-in-pattern.stderr index 21ba92f1fc41c..6b84c0032cdde 100644 --- a/src/test/ui/borrowck/move-in-pattern.stderr +++ b/src/test/ui/borrowck/move-in-pattern.stderr @@ -11,7 +11,7 @@ LL | foo(s); help: borrow this field in the pattern to avoid moving `s.0` | LL | if let Some(ref x) = s { - | ^^^ + | +++ error[E0382]: use of partially moved value: `e` --> $DIR/move-in-pattern.rs:23:9 @@ -26,7 +26,7 @@ LL | bar(e); help: borrow this field in the pattern to avoid moving `e.s` | LL | let E::V { s: ref x } = e; - | ^^^ + | +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr b/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr index fa1b741394acb..8b05b23882273 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr @@ -10,7 +10,7 @@ LL | Other::handle(value); help: consider creating a fresh reborrow of `value` here | LL | Other::handle(&mut *value); - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/bound-suggestions.stderr b/src/test/ui/bound-suggestions.stderr index 14e28174a295d..ebad4b023563e 100644 --- a/src/test/ui/bound-suggestions.stderr +++ b/src/test/ui/bound-suggestions.stderr @@ -8,7 +8,7 @@ LL | println!("{:?}", t); help: consider further restricting this bound | LL | fn test_impl(t: impl Sized + std::fmt::Debug) { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `T` doesn't implement `Debug` --> $DIR/bound-suggestions.rs:15:22 @@ -20,7 +20,7 @@ LL | println!("{:?}", t); help: consider restricting type parameter `T` | LL | fn test_no_bounds(t: T) { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `T` doesn't implement `Debug` --> $DIR/bound-suggestions.rs:21:22 @@ -32,7 +32,7 @@ LL | println!("{:?}", t); help: consider further restricting this bound | LL | fn test_one_bound(t: T) { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `Y` doesn't implement `Debug` --> $DIR/bound-suggestions.rs:27:30 @@ -44,7 +44,7 @@ LL | println!("{:?} {:?}", x, y); help: consider further restricting type parameter `Y` | LL | fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error[E0277]: `X` doesn't implement `Debug` --> $DIR/bound-suggestions.rs:33:22 @@ -56,7 +56,7 @@ LL | println!("{:?}", x); help: consider further restricting this bound | LL | fn test_one_bound_where(x: X) where X: Sized + std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `X` doesn't implement `Debug` --> $DIR/bound-suggestions.rs:39:22 @@ -68,7 +68,7 @@ LL | println!("{:?}", x); help: consider further restricting type parameter `X` | LL | fn test_many_bounds_where(x: X) where X: Sized, X: Sized, X: std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/bound-suggestions.rs:44:46 @@ -84,7 +84,7 @@ LL | pub const fn size_of() -> usize { help: consider further restricting `Self` | LL | trait Foo: Sized { - | ^^^^^^^ + | +++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/bound-suggestions.rs:49:46 @@ -100,7 +100,7 @@ LL | pub const fn size_of() -> usize { help: consider further restricting `Self` | LL | trait Bar: std::fmt::Display + Sized { - | ^^^^^^^ + | +++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/bound-suggestions.rs:54:46 @@ -116,7 +116,7 @@ LL | pub const fn size_of() -> usize { help: consider further restricting `Self` | LL | trait Baz: Sized where Self: std::fmt::Display { - | ^^^^^^^ + | +++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/bound-suggestions.rs:59:46 @@ -132,7 +132,7 @@ LL | pub const fn size_of() -> usize { help: consider further restricting `Self` | LL | trait Qux: Sized where Self: std::fmt::Display { - | ^^^^^^^ + | +++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/bound-suggestions.rs:64:46 @@ -148,7 +148,7 @@ LL | pub const fn size_of() -> usize { help: consider further restricting `Self` | LL | trait Bat: std::fmt::Display + Sized { - | ^^^^^^^ + | +++++++ error: aborting due to 11 previous errors diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index 7ff986ec38109..d0df241f747ac 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -11,7 +11,7 @@ LL | impl Foo for (T,) { } help: consider further restricting this bound | LL | impl Foo for (T,) { } - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `T` cannot be shared between threads safely --> $DIR/builtin-superkinds-double-superkind.rs:9:16 @@ -26,7 +26,7 @@ LL | impl Foo for (T,T) { } help: consider further restricting this bound | LL | impl Foo for (T,T) { } - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 64946c316cd1e..8233e781d6972 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -17,7 +17,7 @@ LL | struct X(T); help: consider further restricting this bound | LL | impl RequiresRequiresShareAndSend for X { } - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index ad80b3fa8d11f..78121ad18ed74 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -10,7 +10,7 @@ LL | impl Foo for T { } help: consider further restricting this bound | LL | impl Foo for T { } - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/c-variadic/issue-86053-1.stderr b/src/test/ui/c-variadic/issue-86053-1.stderr index b399f729f6506..793068138a9ac 100644 --- a/src/test/ui/c-variadic/issue-86053-1.stderr +++ b/src/test/ui/c-variadic/issue-86053-1.stderr @@ -72,11 +72,11 @@ LL | pub trait Fn: FnMut { help: a trait with a similar name exists | LL | self , ... , self , self , ... ) where Fn : FnOnce ( & 'a & 'b usize ) { - | ^^ + | ~~ help: you might be missing a type parameter | LL | fn ordering4 < 'a , 'b, F > ( a : , self , self , self , - | ^^^ + | +++ error[E0491]: in type `&'a &'b usize`, reference has a longer lifetime than the data it references --> $DIR/issue-86053-1.rs:11:52 diff --git a/src/test/ui/c-variadic/variadic-ffi-6.stderr b/src/test/ui/c-variadic/variadic-ffi-6.stderr index 4626a4bc2dcff..bb15cc000a46b 100644 --- a/src/test/ui/c-variadic/variadic-ffi-6.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-6.stderr @@ -8,7 +8,7 @@ LL | ) -> &usize { help: consider using the `'static` lifetime | LL | ) -> &'static usize { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/cast/issue-84213.stderr b/src/test/ui/cast/issue-84213.stderr index 90cfa263c5224..025970e54c84a 100644 --- a/src/test/ui/cast/issue-84213.stderr +++ b/src/test/ui/cast/issue-84213.stderr @@ -7,7 +7,7 @@ LL | let _pointer_to_something = something as *const Something; help: consider borrowing the value | LL | let _pointer_to_something = &something as *const Something; - | ^ + | + error[E0605]: non-primitive cast: `Something` as `*mut Something` --> $DIR/issue-84213.rs:14:37 @@ -18,7 +18,7 @@ LL | let _mut_pointer_to_something = something as *mut Something; help: consider borrowing the value | LL | let _mut_pointer_to_something = &mut something as *mut Something; - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr b/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr index 311a1b84e0c80..bb00465758a45 100644 --- a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr +++ b/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr @@ -15,7 +15,7 @@ LL | fn foo () -> impl FnMut()->() { help: to force the closure to take ownership of `p` (and any other referenced variables), use the `move` keyword | LL | let mut c = move || { - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr index 9c954b1465d83..e60d01f0c2caa 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr @@ -15,12 +15,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `fptr` to be fully captured | -LL | thread::spawn(move || { let _ = &fptr; unsafe { -LL | -LL | -LL | -LL | -LL | *fptr.0 = 20; +LL ~ thread::spawn(move || { let _ = &fptr; unsafe { +LL + +LL + +LL + +LL + +LL + *fptr.0 = 20; ... error: changes to closure capture in Rust 2021 will affect `Sync`, `Send` trait implementation for closure @@ -35,12 +35,12 @@ LL | *fptr.0.0 = 20; = note: for more information, see help: add a dummy let to cause `fptr` to be fully captured | -LL | thread::spawn(move || { let _ = &fptr; unsafe { -LL | -LL | -LL | -LL | -LL | *fptr.0.0 = 20; +LL ~ thread::spawn(move || { let _ = &fptr; unsafe { +LL + +LL + +LL + +LL + +LL + *fptr.0.0 = 20; ... error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order @@ -58,12 +58,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `f` to be fully captured | -LL | let c = || { let _ = &f; -LL | -LL | -LL | -LL | -LL | let f_1 = f.1; +LL ~ let c = || { let _ = &f; +LL + +LL + +LL + +LL + +LL + let f_1 = f.1; ... error: aborting due to 3 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr index e9e4794cff5f7..f467729761157 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr @@ -28,12 +28,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured | -LL | let c = || { let _ = (&t, &t1, &t2); -LL | -LL | -LL | -LL | -LL | let _t = t.0; +LL ~ let c = || { let _ = (&t, &t1, &t2); +LL + +LL + +LL + +LL + +LL + let _t = t.0; ... error: changes to closure capture in Rust 2021 will affect drop order @@ -57,12 +57,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t`, `t1` to be fully captured | -LL | let c = || { let _ = (&t, &t1); -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = (&t, &t1); +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -80,12 +80,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -103,12 +103,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -126,12 +126,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -154,12 +154,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t1`, `t` to be fully captured | -LL | let c = move || { let _ = (&t1, &t); -LL | -LL | -LL | -LL | println!("{} {}", t1.1, t.1); -LL | +LL ~ let c = move || { let _ = (&t1, &t); +LL + +LL + +LL + +LL + println!("{} {}", t1.1, t.1); +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -177,12 +177,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: aborting due to 7 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.stderr index 1e97ca34d162e..2de6ffb067323 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.stderr @@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -41,12 +41,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = move || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.1; -LL | +LL ~ let c = move || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.1; +LL + ... error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr index f8f72d1580ca9..e8e1eb03e93a4 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr @@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -41,7 +41,7 @@ LL | } help: add a dummy let to cause `t` to be fully captured | LL | let c = || { let _ = &t; t.0 }; - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr index 6ee0d0d252aba..acd9fb654e5e0 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr @@ -15,12 +15,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `f` to be fully captured | -LL | let result = panic::catch_unwind(move || { let _ = &f; -LL | -LL | -LL | -LL | -LL | f.0() +LL ~ let result = panic::catch_unwind(move || { let _ = &f; +LL + +LL + +LL + +LL + +LL + f.0() ... error: aborting due to previous error diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr index 8a42683c1df9f..b347516c95ce4 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr @@ -21,12 +21,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `f1`, `f2` to be fully captured | -LL | let c = || { let _ = (&f1, &f2); -LL | -LL | -LL | -LL | -LL | let _f_1 = f1.0; +LL ~ let c = || { let _ = (&f1, &f2); +LL + +LL + +LL + +LL + +LL + let _f_1 = f1.0; ... error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure @@ -41,12 +41,12 @@ LL | let _f_1 = f1.0; = note: for more information, see help: add a dummy let to cause `f1` to be fully captured | -LL | let c = || { let _ = &f1; -LL | -LL | -LL | -LL | -LL | let _f_1 = f1.0; +LL ~ let c = || { let _ = &f1; +LL + +LL + +LL + +LL + +LL + let _f_1 = f1.0; ... error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure @@ -67,12 +67,12 @@ LL | let _f_2 = f1.2; = note: for more information, see help: add a dummy let to cause `f1` to be fully captured | -LL | let c = || { let _ = &f1; -LL | -LL | -LL | -LL | -LL | +LL ~ let c = || { let _ = &f1; +LL + +LL + +LL + +LL + +LL + ... error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order @@ -96,12 +96,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `f1` to be fully captured | -LL | let c = || { let _ = &f1; -LL | -LL | -LL | -LL | -LL | let _f_0 = f1.0; +LL ~ let c = || { let _ = &f1; +LL + +LL + +LL + +LL + +LL + let _f_0 = f1.0; ... error: changes to closure capture in Rust 2021 will affect `Sync`, `Send` trait implementation for closure @@ -122,12 +122,12 @@ LL | *fptr2.0 = 20; = note: for more information, see help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured | -LL | thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe { -LL | -LL | -LL | -LL | -LL | +LL ~ thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe { +LL + +LL + +LL + +LL + +LL + ... error: aborting due to 5 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr index 5bf73ccc55400..494d7e8e84236 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr @@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -51,12 +51,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `u` to be fully captured | -LL | let c = || { let _ = &u; -LL | -LL | -LL | -LL | let _x = u.0.0; -LL | +LL ~ let c = || { let _ = &u; +LL + +LL + +LL + +LL + let _x = u.0.0; +LL + ... error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr index b2b9ae8fd12f5..32afc07af7968 100644 --- a/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr +++ b/src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr @@ -28,12 +28,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)] = note: for more information, see help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured | -LL | let c = || { let _ = (&t, &t1, &t2); -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = (&t, &t1, &t2); +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -57,12 +57,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t`, `t1` to be fully captured | -LL | let c = || { let _ = (&t, &t1); -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = (&t, &t1); +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -80,12 +80,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -103,12 +103,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -126,12 +126,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.0; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -149,12 +149,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t` to be fully captured | -LL | let c = || { let _ = &t; -LL | -LL | -LL | -LL | let _t = t.1; -LL | +LL ~ let c = || { let _ = &t; +LL + +LL + +LL + +LL + let _t = t.1; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -177,12 +177,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `t1`, `t` to be fully captured | -LL | let c = move || { let _ = (&t1, &t); -LL | -LL | -LL | -LL | println!("{:?} {:?}", t1.1, t.1); -LL | +LL ~ let c = move || { let _ = (&t1, &t); +LL + +LL + +LL + +LL + println!("{:?} {:?}", t1.1, t.1); +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -200,12 +200,12 @@ LL | } = note: for more information, see help: add a dummy let to cause `tuple` to be fully captured | -LL | let c = || { let _ = &tuple; -LL | -LL | -LL | -LL | tuple.0; -LL | +LL ~ let c = || { let _ = &tuple; +LL + +LL + +LL + +LL + tuple.0; +LL + ... error: changes to closure capture in Rust 2021 will affect drop order @@ -223,12 +223,12 @@ LL | }; = note: for more information, see help: add a dummy let to cause `tuple` to be fully captured | -LL | let c = || { let _ = &tuple; -LL | -LL | -LL | -LL | tuple.0; -LL | +LL ~ let c = || { let _ = &tuple; +LL + +LL + +LL + +LL + tuple.0; +LL + ... error: aborting due to 9 previous errors diff --git a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index 273eae995538a..b7f0571316f05 100644 --- a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -10,7 +10,7 @@ LL | fn foo(blk: F) -> X where F: FnOnce() + 'static { help: consider further restricting this bound | LL | fn foo(blk: F) -> X where F: FnOnce() + 'static + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr index 7823e3570096e..e7d9664ec505e 100644 --- a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr +++ b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr @@ -27,7 +27,7 @@ LL | | }) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | bar(move || { - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/closure-bounds-subtype.stderr b/src/test/ui/closures/closure-bounds-subtype.stderr index 7df29d5a098a0..16b168db6810d 100644 --- a/src/test/ui/closures/closure-bounds-subtype.stderr +++ b/src/test/ui/closures/closure-bounds-subtype.stderr @@ -10,7 +10,7 @@ LL | take_const_owned(f); help: consider further restricting this bound | LL | fn give_owned(f: F) where F: FnOnce() + Send + std::marker::Sync { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/closures/issue-41366.stderr b/src/test/ui/closures/issue-41366.stderr index ffe0bce6f0fd8..06477efac264e 100644 --- a/src/test/ui/closures/issue-41366.stderr +++ b/src/test/ui/closures/issue-41366.stderr @@ -20,11 +20,11 @@ LL | (&|_| ()) as &dyn for<'x> Fn(>::V); help: consider further restricting the associated type | LL | fn main() where >::V: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | (&|&_| ()) as &dyn for<'x> Fn(>::V); - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/issue-67123.stderr b/src/test/ui/closures/issue-67123.stderr index 5a6dfb2fdf946..7877c7334d79b 100644 --- a/src/test/ui/closures/issue-67123.stderr +++ b/src/test/ui/closures/issue-67123.stderr @@ -10,7 +10,7 @@ LL | || { t; t; }; help: consider restricting type parameter `T` | LL | fn foo(t: T) { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/closures/print/closure-print-generic-2.stderr b/src/test/ui/closures/print/closure-print-generic-2.stderr index f7cfbd251b7c2..9c75d5a9023ed 100644 --- a/src/test/ui/closures/print/closure-print-generic-2.stderr +++ b/src/test/ui/closures/print/closure-print-generic-2.stderr @@ -13,7 +13,7 @@ LL | let c1: () = c; help: use parentheses to call this closure | LL | let c1: () = c(); - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr b/src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr index 7fd929221d026..d9479002b6cde 100644 --- a/src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr +++ b/src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr @@ -13,7 +13,7 @@ LL | let c1 : () = c; help: use parentheses to call this closure | LL | let c1 : () = c(); - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/closures/print/closure-print-generic-verbose-2.stderr b/src/test/ui/closures/print/closure-print-generic-verbose-2.stderr index 680f6ff679219..880e38df2d70a 100644 --- a/src/test/ui/closures/print/closure-print-generic-verbose-2.stderr +++ b/src/test/ui/closures/print/closure-print-generic-verbose-2.stderr @@ -13,7 +13,7 @@ LL | let c1 : () = c; help: use parentheses to call this closure | LL | let c1 : () = c(); - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/compare-method/bad-self-type.stderr b/src/test/ui/compare-method/bad-self-type.stderr index 76f91fbf241d0..737a5ae2656e6 100644 --- a/src/test/ui/compare-method/bad-self-type.stderr +++ b/src/test/ui/compare-method/bad-self-type.stderr @@ -39,7 +39,7 @@ LL | fn bar(self) {} help: change the output type to match the trait | LL | fn bar(self) -> Option<()> {} - | ^^^^^^^^^^^^^ + | +++++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/conditional-compilation/cfg-attr-parse.stderr b/src/test/ui/conditional-compilation/cfg-attr-parse.stderr index 3a590d3282d46..8084a62204560 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-parse.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-parse.stderr @@ -51,7 +51,7 @@ LL | #[cfg_attr[all(),,]] help: the delimiters should be `(` and `)` | LL | #[cfg_attr(all(),,)] - | ^ ^ + | ~ ~ error: expected identifier, found `,` --> $DIR/cfg-attr-parse.rs:44:18 @@ -71,7 +71,7 @@ LL | #[cfg_attr{all(),,}] help: the delimiters should be `(` and `)` | LL | #[cfg_attr(all(),,)] - | ^ ^ + | ~ ~ error: expected identifier, found `,` --> $DIR/cfg-attr-parse.rs:50:18 diff --git a/src/test/ui/confuse-field-and-method/issue-18343.stderr b/src/test/ui/confuse-field-and-method/issue-18343.stderr index fe6b12968c110..2f67c11ad1f5d 100644 --- a/src/test/ui/confuse-field-and-method/issue-18343.stderr +++ b/src/test/ui/confuse-field-and-method/issue-18343.stderr @@ -10,7 +10,7 @@ LL | o.closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (o.closure)(); - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/confuse-field-and-method/issue-2392.stderr b/src/test/ui/confuse-field-and-method/issue-2392.stderr index 0480958e99c05..a37e132d36429 100644 --- a/src/test/ui/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/confuse-field-and-method/issue-2392.stderr @@ -10,7 +10,7 @@ LL | o_closure.closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (o_closure.closure)(); - | ^ ^ + | + + error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope --> $DIR/issue-2392.rs:38:15 @@ -35,7 +35,7 @@ LL | o_func.closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (o_func.closure)(); - | ^ ^ + | + + error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope --> $DIR/issue-2392.rs:45:14 @@ -49,7 +49,7 @@ LL | boxed_fn.boxed_closure(); help: to call the function stored in `boxed_closure`, surround the field access with parentheses | LL | (boxed_fn.boxed_closure)(); - | ^ ^ + | + + error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope --> $DIR/issue-2392.rs:48:19 @@ -63,7 +63,7 @@ LL | boxed_closure.boxed_closure(); help: to call the function stored in `boxed_closure`, surround the field access with parentheses | LL | (boxed_closure.boxed_closure)(); - | ^ ^ + | + + error[E0599]: no method named `closure` found for struct `Obj` in the current scope --> $DIR/issue-2392.rs:53:12 @@ -77,7 +77,7 @@ LL | w.wrap.closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (w.wrap.closure)(); - | ^ ^ + | + + error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope --> $DIR/issue-2392.rs:55:12 @@ -102,7 +102,7 @@ LL | check_expression().closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (check_expression().closure)(); - | ^ ^ + | + + error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:64:31 @@ -116,7 +116,7 @@ LL | (*self.container).f1(1); help: to call the function stored in `f1`, surround the field access with parentheses | LL | ((*self.container).f1)(1); - | ^ ^ + | + + error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:65:31 @@ -130,7 +130,7 @@ LL | (*self.container).f2(1); help: to call the function stored in `f2`, surround the field access with parentheses | LL | ((*self.container).f2)(1); - | ^ ^ + | + + error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:66:31 @@ -144,7 +144,7 @@ LL | (*self.container).f3(1); help: to call the function stored in `f3`, surround the field access with parentheses | LL | ((*self.container).f3)(1); - | ^ ^ + | + + error: aborting due to 11 previous errors diff --git a/src/test/ui/confuse-field-and-method/issue-32128.stderr b/src/test/ui/confuse-field-and-method/issue-32128.stderr index a8d97bdfe2fb5..50c6fe1e83308 100644 --- a/src/test/ui/confuse-field-and-method/issue-32128.stderr +++ b/src/test/ui/confuse-field-and-method/issue-32128.stderr @@ -10,7 +10,7 @@ LL | demo.example(1); help: to call the function stored in `example`, surround the field access with parentheses | LL | (demo.example)(1); - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/confuse-field-and-method/issue-33784.stderr b/src/test/ui/confuse-field-and-method/issue-33784.stderr index c109896e825be..7c2e6b015330f 100644 --- a/src/test/ui/confuse-field-and-method/issue-33784.stderr +++ b/src/test/ui/confuse-field-and-method/issue-33784.stderr @@ -7,7 +7,7 @@ LL | p.closure(); help: to call the function stored in `closure`, surround the field access with parentheses | LL | (p.closure)(); - | ^ ^ + | + + error[E0599]: no method named `fn_ptr` found for reference `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope --> $DIR/issue-33784.rs:29:7 @@ -18,7 +18,7 @@ LL | q.fn_ptr(); help: to call the function stored in `fn_ptr`, surround the field access with parentheses | LL | (q.fn_ptr)(); - | ^ ^ + | + + error[E0599]: no method named `c_fn_ptr` found for reference `&D` in the current scope --> $DIR/issue-33784.rs:32:7 @@ -29,7 +29,7 @@ LL | s.c_fn_ptr(); help: to call the function stored in `c_fn_ptr`, surround the field access with parentheses | LL | (s.c_fn_ptr)(); - | ^ ^ + | + + error: aborting due to 3 previous errors diff --git a/src/test/ui/const-generics/closing-args-token.full.stderr b/src/test/ui/const-generics/closing-args-token.full.stderr index 7737705440eb8..f4bb1e4220769 100644 --- a/src/test/ui/const-generics/closing-args-token.full.stderr +++ b/src/test/ui/const-generics/closing-args-token.full.stderr @@ -7,7 +7,7 @@ LL | S::<5 + 2 >> 7>; help: enclose the `const` expression in braces | LL | S::<{ 5 + 2 } >> 7>; - | ^ ^ + | + + error: comparison operators cannot be chained --> $DIR/closing-args-token.rs:10:16 @@ -18,7 +18,7 @@ LL | S::<5 + 2 >> 7>; help: split the comparison into two | LL | S::<5 + 2 >> 7 && 7>; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/closing-args-token.rs:16:20 @@ -29,7 +29,7 @@ LL | S::<{ 5 + 2 } >> 7>; help: split the comparison into two | LL | S::<{ 5 + 2 } >> 7 && 7>; - | ^^^^ + | ++++ error: expected expression, found `;` --> $DIR/closing-args-token.rs:21:16 @@ -46,7 +46,7 @@ LL | T::>= 2 > 0>; help: split the comparison into two | LL | T::>= 2 && 2 > 0>; - | ^^^^ + | ++++ error: aborting due to 5 previous errors diff --git a/src/test/ui/const-generics/closing-args-token.min.stderr b/src/test/ui/const-generics/closing-args-token.min.stderr index 7737705440eb8..f4bb1e4220769 100644 --- a/src/test/ui/const-generics/closing-args-token.min.stderr +++ b/src/test/ui/const-generics/closing-args-token.min.stderr @@ -7,7 +7,7 @@ LL | S::<5 + 2 >> 7>; help: enclose the `const` expression in braces | LL | S::<{ 5 + 2 } >> 7>; - | ^ ^ + | + + error: comparison operators cannot be chained --> $DIR/closing-args-token.rs:10:16 @@ -18,7 +18,7 @@ LL | S::<5 + 2 >> 7>; help: split the comparison into two | LL | S::<5 + 2 >> 7 && 7>; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/closing-args-token.rs:16:20 @@ -29,7 +29,7 @@ LL | S::<{ 5 + 2 } >> 7>; help: split the comparison into two | LL | S::<{ 5 + 2 } >> 7 && 7>; - | ^^^^ + | ++++ error: expected expression, found `;` --> $DIR/closing-args-token.rs:21:16 @@ -46,7 +46,7 @@ LL | T::>= 2 > 0>; help: split the comparison into two | LL | T::>= 2 && 2 > 0>; - | ^^^^ + | ++++ error: aborting due to 5 previous errors diff --git a/src/test/ui/const-generics/const-argument-if-length.full.stderr b/src/test/ui/const-generics/const-argument-if-length.full.stderr index cc2c9c8681bcc..4eec2b21be606 100644 --- a/src/test/ui/const-generics/const-argument-if-length.full.stderr +++ b/src/test/ui/const-generics/const-argument-if-length.full.stderr @@ -13,8 +13,9 @@ LL | pub const fn size_of() -> usize { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | pub const fn is_zst() -> usize { - | -- +LL - pub const fn is_zst() -> usize { +LL + pub const fn is_zst() -> usize { + | error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/const-argument-if-length.rs:16:12 @@ -28,16 +29,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | pub struct AtLeastByte { - | -- +LL - pub struct AtLeastByte { +LL + pub struct AtLeastByte { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/const-argument-if-length.min.stderr b/src/test/ui/const-generics/const-argument-if-length.min.stderr index 173a14716635d..cdbbbf2a99b3b 100644 --- a/src/test/ui/const-generics/const-argument-if-length.min.stderr +++ b/src/test/ui/const-generics/const-argument-if-length.min.stderr @@ -19,16 +19,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | pub struct AtLeastByte { - | -- +LL - pub struct AtLeastByte { +LL + pub struct AtLeastByte { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/const-expression-parameter.full.stderr b/src/test/ui/const-generics/const-expression-parameter.full.stderr index 93c5173554f3c..4ce0ecdf3aab9 100644 --- a/src/test/ui/const-generics/const-expression-parameter.full.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.full.stderr @@ -7,7 +7,7 @@ LL | i32_identity::<1 + 2>(); help: enclose the `const` expression in braces | LL | i32_identity::<{ 1 + 2 }>(); - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-expression-parameter.min.stderr b/src/test/ui/const-generics/const-expression-parameter.min.stderr index 93c5173554f3c..4ce0ecdf3aab9 100644 --- a/src/test/ui/const-generics/const-expression-parameter.min.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.min.stderr @@ -7,7 +7,7 @@ LL | i32_identity::<1 + 2>(); help: enclose the `const` expression in braces | LL | i32_identity::<{ 1 + 2 }>(); - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-param-shadowing.stderr b/src/test/ui/const-generics/const-param-shadowing.stderr index 17ccd2f3527b0..625338bd9b4a6 100644 --- a/src/test/ui/const-generics/const-param-shadowing.stderr +++ b/src/test/ui/const-generics/const-param-shadowing.stderr @@ -7,7 +7,7 @@ LL | fn test() -> Foo { help: if this generic argument was intended as a const parameter, surround it with braces | LL | fn test() -> Foo<{ N }> { - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/const-generics/diagnostics.stderr b/src/test/ui/const-generics/diagnostics.stderr index 2e3132c2eb7b6..dd37d4e7a85af 100644 --- a/src/test/ui/const-generics/diagnostics.stderr +++ b/src/test/ui/const-generics/diagnostics.stderr @@ -10,11 +10,11 @@ LL | impl Foo for A {} help: a struct with a similar name exists | LL | impl Foo for A {} - | ^ + | ~ help: you might be missing a type parameter | LL | impl Foo for A {} - | ^^^ + | +++ error[E0412]: cannot find type `T` in this scope --> $DIR/diagnostics.rs:16:32 @@ -28,11 +28,11 @@ LL | impl Foo for C {} help: a struct with a similar name exists | LL | impl Foo for C {} - | ^ + | ~ help: you might be missing a type parameter | LL | impl Foo for C {} - | ^^^ + | +++ error[E0747]: unresolved item provided when a constant was expected --> $DIR/diagnostics.rs:7:16 @@ -43,7 +43,7 @@ LL | impl Foo for A {} help: if this generic argument was intended as a const parameter, surround it with braces | LL | impl Foo for A<{ N }> {} - | ^ ^ + | + + error[E0747]: type provided when a constant was expected --> $DIR/diagnostics.rs:12:19 @@ -54,7 +54,7 @@ LL | impl Foo for B {} help: consider changing this type parameter to be a `const` generic | LL | impl Foo for B {} - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0747]: unresolved item provided when a constant was expected --> $DIR/diagnostics.rs:16:32 @@ -65,7 +65,7 @@ LL | impl Foo for C {} help: if this generic argument was intended as a const parameter, surround it with braces | LL | impl Foo for C {} - | ^ ^ + | + + error: aborting due to 5 previous errors diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr index 9deda56cd0df2..7a12f3bdec278 100644 --- a/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr @@ -14,7 +14,7 @@ LL | fn foo() -> usize { help: add missing generic argument | LL | foo::<0, Y>(); - | ^^^ + | +++ error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/incorrect-number-of-const-args.rs:14:5 diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr index 9deda56cd0df2..7a12f3bdec278 100644 --- a/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr @@ -14,7 +14,7 @@ LL | fn foo() -> usize { help: add missing generic argument | LL | foo::<0, Y>(); - | ^^^ + | +++ error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/incorrect-number-of-const-args.rs:14:5 diff --git a/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr b/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr index e85bf8829aee7..01fb137dd6aff 100644 --- a/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr +++ b/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr @@ -7,7 +7,7 @@ LL | foo(); help: consider specifying the const argument | LL | foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr b/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr index e85bf8829aee7..01fb137dd6aff 100644 --- a/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr +++ b/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr @@ -7,7 +7,7 @@ LL | foo(); help: consider specifying the const argument | LL | foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/issue-77092.stderr b/src/test/ui/const-generics/infer/issue-77092.stderr index 5857a4211985a..a625ed2bdc3b2 100644 --- a/src/test/ui/const-generics/infer/issue-77092.stderr +++ b/src/test/ui/const-generics/infer/issue-77092.stderr @@ -7,7 +7,7 @@ LL | println!("{:?}", take_array_from_mut(&mut arr, i)); help: consider specifying the const argument | LL | println!("{:?}", take_array_from_mut::(&mut arr, i)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/method-chain.full.stderr b/src/test/ui/const-generics/infer/method-chain.full.stderr index f6d9c4a26453c..979d50b85f146 100644 --- a/src/test/ui/const-generics/infer/method-chain.full.stderr +++ b/src/test/ui/const-generics/infer/method-chain.full.stderr @@ -7,7 +7,7 @@ LL | Foo.bar().bar().bar().bar().baz(); help: consider specifying the const argument | LL | Foo.bar().bar().bar().bar().baz::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/method-chain.min.stderr b/src/test/ui/const-generics/infer/method-chain.min.stderr index f6d9c4a26453c..979d50b85f146 100644 --- a/src/test/ui/const-generics/infer/method-chain.min.stderr +++ b/src/test/ui/const-generics/infer/method-chain.min.stderr @@ -7,7 +7,7 @@ LL | Foo.bar().bar().bar().bar().baz(); help: consider specifying the const argument | LL | Foo.bar().bar().bar().bar().baz::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/one-param-uninferred.full.stderr b/src/test/ui/const-generics/infer/one-param-uninferred.full.stderr index cc6c9a475104c..31b7fc7ccf5a0 100644 --- a/src/test/ui/const-generics/infer/one-param-uninferred.full.stderr +++ b/src/test/ui/const-generics/infer/one-param-uninferred.full.stderr @@ -7,7 +7,7 @@ LL | let _: [u8; 17] = foo(); help: consider specifying the const argument | LL | let _: [u8; 17] = foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/one-param-uninferred.min.stderr b/src/test/ui/const-generics/infer/one-param-uninferred.min.stderr index cc6c9a475104c..31b7fc7ccf5a0 100644 --- a/src/test/ui/const-generics/infer/one-param-uninferred.min.stderr +++ b/src/test/ui/const-generics/infer/one-param-uninferred.min.stderr @@ -7,7 +7,7 @@ LL | let _: [u8; 17] = foo(); help: consider specifying the const argument | LL | let _: [u8; 17] = foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/uninferred-consts.full.stderr b/src/test/ui/const-generics/infer/uninferred-consts.full.stderr index 254a28f70e213..bee4b693825f3 100644 --- a/src/test/ui/const-generics/infer/uninferred-consts.full.stderr +++ b/src/test/ui/const-generics/infer/uninferred-consts.full.stderr @@ -7,7 +7,7 @@ LL | Foo.foo(); help: consider specifying the const argument | LL | Foo.foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/infer/uninferred-consts.min.stderr b/src/test/ui/const-generics/infer/uninferred-consts.min.stderr index 254a28f70e213..bee4b693825f3 100644 --- a/src/test/ui/const-generics/infer/uninferred-consts.min.stderr +++ b/src/test/ui/const-generics/infer/uninferred-consts.min.stderr @@ -7,7 +7,7 @@ LL | Foo.foo(); help: consider specifying the const argument | LL | Foo.foo::(); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/invalid-enum.stderr b/src/test/ui/const-generics/invalid-enum.stderr index cfbc61f02543b..0d3643f6f899a 100644 --- a/src/test/ui/const-generics/invalid-enum.stderr +++ b/src/test/ui/const-generics/invalid-enum.stderr @@ -34,7 +34,7 @@ LL | let _: Example = Example { x: 0 }; help: if this generic argument was intended as a const parameter, surround it with braces | LL | let _: Example<{ CompileFlag::A }, _> = Example { x: 0 }; - | ^ ^ + | + + error[E0747]: type provided when a constant was expected --> $DIR/invalid-enum.rs:33:18 @@ -45,7 +45,7 @@ LL | let _: Example = Example { x: 0 }; help: if this generic argument was intended as a const parameter, surround it with braces | LL | let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 }; - | ^ ^ + | + + error[E0747]: unresolved item provided when a constant was expected --> $DIR/invalid-enum.rs:21:12 @@ -56,7 +56,7 @@ LL | test_1::(); help: if this generic argument was intended as a const parameter, surround it with braces | LL | test_1::<{ CompileFlag::A }>(); - | ^ ^ + | + + error[E0747]: unresolved item provided when a constant was expected --> $DIR/invalid-enum.rs:25:15 @@ -67,7 +67,7 @@ LL | test_2::<_, CompileFlag::A>(0); help: if this generic argument was intended as a const parameter, surround it with braces | LL | test_2::<_, { CompileFlag::A }>(0); - | ^ ^ + | + + error: aborting due to 7 previous errors diff --git a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr index ef0cafcb9bb7c..8f07d208091a0 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr @@ -17,7 +17,7 @@ LL | [x; { N }] help: consider restricting type parameter `T` | LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr index e5fe50513aaf7..9b62ffc93494b 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr @@ -8,7 +8,7 @@ LL | [x; { N }] help: consider restricting type parameter `T` | LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/const-generics/issues/issue-61336.full.stderr b/src/test/ui/const-generics/issues/issue-61336.full.stderr index fcfd39387c293..4883463c2e673 100644 --- a/src/test/ui/const-generics/issues/issue-61336.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.full.stderr @@ -17,7 +17,7 @@ LL | [x; N] help: consider restricting type parameter `T` | LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61336.min.stderr b/src/test/ui/const-generics/issues/issue-61336.min.stderr index 91580313e1e83..dc891842e1382 100644 --- a/src/test/ui/const-generics/issues/issue-61336.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.min.stderr @@ -8,7 +8,7 @@ LL | [x; N] help: consider restricting type parameter `T` | LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/const-generics/issues/issue-61336.stderr b/src/test/ui/const-generics/issues/issue-61336.stderr deleted file mode 100644 index 1be907b98acad..0000000000000 --- a/src/test/ui/const-generics/issues/issue-61336.stderr +++ /dev/null @@ -1,24 +0,0 @@ -warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-61336.rs:1:12 - | -LL | #![feature(const_generics)] - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #44580 for more information - -error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-61336.rs:9:5 - | -LL | [x; N] - | ^^^^^^ the trait `Copy` is not implemented for `T` - | - = note: the `Copy` trait is required because the repeated element will be copied -help: consider restricting type parameter `T` - | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^ - -error: aborting due to previous error; 1 warning emitted - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/const-generics/issues/issue-76595.stderr b/src/test/ui/const-generics/issues/issue-76595.stderr index 01a0f6bcba9d8..3b69a4066a9ed 100644 --- a/src/test/ui/const-generics/issues/issue-76595.stderr +++ b/src/test/ui/const-generics/issues/issue-76595.stderr @@ -14,7 +14,7 @@ LL | fn test() where Bool<{core::mem::size_of::() > 4}>: T help: add missing generic argument | LL | test::<2, P>(); - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/const-generics/macro_rules-braces.full.stderr b/src/test/ui/const-generics/macro_rules-braces.full.stderr index ef6e857838a28..b29e853510b1a 100644 --- a/src/test/ui/const-generics/macro_rules-braces.full.stderr +++ b/src/test/ui/const-generics/macro_rules-braces.full.stderr @@ -7,7 +7,7 @@ LL | let _: baz!(m::P); help: enclose the `const` expression in braces | LL | let _: baz!({ m::P }); - | ^ ^ + | + + error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/macro_rules-braces.rs:68:17 @@ -18,7 +18,7 @@ LL | let _: baz!(10 + 7); help: enclose the `const` expression in braces | LL | let _: baz!({ 10 + 7 }); - | ^ ^ + | + + error: constant expression depends on a generic parameter --> $DIR/macro_rules-braces.rs:15:13 diff --git a/src/test/ui/const-generics/macro_rules-braces.min.stderr b/src/test/ui/const-generics/macro_rules-braces.min.stderr index 60583d43c0162..c2e8c2c9c05ae 100644 --- a/src/test/ui/const-generics/macro_rules-braces.min.stderr +++ b/src/test/ui/const-generics/macro_rules-braces.min.stderr @@ -7,7 +7,7 @@ LL | let _: baz!(m::P); help: enclose the `const` expression in braces | LL | let _: baz!({ m::P }); - | ^ ^ + | + + error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/macro_rules-braces.rs:68:17 @@ -18,7 +18,7 @@ LL | let _: baz!(10 + 7); help: enclose the `const` expression in braces | LL | let _: baz!({ 10 + 7 }); - | ^ ^ + | + + error: generic parameters may not be used in const operations --> $DIR/macro_rules-braces.rs:36:20 diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr index beea0acac600a..11c3481f15afa 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr @@ -7,7 +7,7 @@ LL | foo(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:9:8 @@ -18,7 +18,7 @@ LL | foo(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:12:8 @@ -29,7 +29,7 @@ LL | foo<3 + 3>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::<3 + 3>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:15:8 @@ -40,7 +40,7 @@ LL | foo(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:18:8 @@ -51,7 +51,7 @@ LL | foo(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:21:8 @@ -62,7 +62,7 @@ LL | foo<100 - BAR>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::<100 - BAR>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:8 @@ -73,7 +73,7 @@ LL | foo()>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::()>(); - | ^^ + | ++ error: expected one of `;` or `}`, found `>` --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:19 @@ -90,7 +90,7 @@ LL | foo()>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::()>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:31:8 @@ -101,7 +101,7 @@ LL | foo() + BAR>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::() + BAR>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:34:8 @@ -112,7 +112,7 @@ LL | foo() - BAR>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::() - BAR>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:37:8 @@ -123,7 +123,7 @@ LL | foo()>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::()>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:40:8 @@ -134,7 +134,7 @@ LL | foo()>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | foo::()>(); - | ^^ + | ++ error: aborting due to 13 previous errors diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr index b93bd6c6fa064..1707640f6edec 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr @@ -7,7 +7,7 @@ LL | foo::(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR + 3 }>(); - | ^ ^ + | + + error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/const-expression-suggest-missing-braces.rs:19:11 @@ -18,7 +18,7 @@ LL | foo::<3 + 3>(); help: enclose the `const` expression in braces | LL | foo::<{ 3 + 3 }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:22:15 @@ -29,7 +29,7 @@ LL | foo::(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - 3 }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:25:15 @@ -40,7 +40,7 @@ LL | foo::(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - BAR }>(); - | ^ ^ + | + + error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/const-expression-suggest-missing-braces.rs:28:11 @@ -51,7 +51,7 @@ LL | foo::<100 - BAR>(); help: enclose the `const` expression in braces | LL | foo::<{ 100 - BAR }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:31:19 @@ -62,7 +62,7 @@ LL | foo::()>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar() }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:34:21 @@ -73,7 +73,7 @@ LL | foo::()>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:37:21 @@ -84,7 +84,7 @@ LL | foo::() + BAR>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() + BAR }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `(` --> $DIR/const-expression-suggest-missing-braces.rs:40:21 @@ -95,7 +95,7 @@ LL | foo::() - BAR>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ bar::() - BAR }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:43:15 @@ -106,7 +106,7 @@ LL | foo::()>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - bar::() }>(); - | ^ ^ + | + + error: expected one of `,` or `>`, found `-` --> $DIR/const-expression-suggest-missing-braces.rs:46:15 @@ -117,7 +117,7 @@ LL | foo::()>(); help: expressions must be enclosed in braces to be used as const generic arguments | LL | foo::<{ BAR - bar::() }>(); - | ^ ^ + | + + error[E0404]: expected trait, found constant `BAR` --> $DIR/const-expression-suggest-missing-braces.rs:11:11 diff --git a/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr b/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr index b942c397a8d2b..a0a14558490da 100644 --- a/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr +++ b/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr @@ -7,7 +7,7 @@ LL | assert_eq!(R.method::<1u16>(), 1); help: change the type of the numeric literal from `u16` to `u8` | LL | assert_eq!(R.method::<1u8>(), 1); - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr b/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr index b942c397a8d2b..a0a14558490da 100644 --- a/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr +++ b/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr @@ -7,7 +7,7 @@ LL | assert_eq!(R.method::<1u16>(), 1); help: change the type of the numeric literal from `u16` to `u8` | LL | assert_eq!(R.method::<1u8>(), 1); - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/constructor-lifetime-args.stderr b/src/test/ui/constructor-lifetime-args.stderr index f33aa4953e4f5..b97b6faa3be71 100644 --- a/src/test/ui/constructor-lifetime-args.stderr +++ b/src/test/ui/constructor-lifetime-args.stderr @@ -14,7 +14,7 @@ LL | struct S<'a, 'b>(&'a u8, &'b u8); help: add missing lifetime argument | LL | S::<'static, 'b>(&0, &0); - | ^^^^ + | ++++ error[E0107]: this struct takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/constructor-lifetime-args.rs:19:5 @@ -46,7 +46,7 @@ LL | enum E<'a, 'b> { help: add missing lifetime argument | LL | E::V::<'static, 'b>(&0); - | ^^^^ + | ++++ error[E0107]: this enum takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/constructor-lifetime-args.rs:24:8 diff --git a/src/test/ui/consts/const-match-check.eval1.stderr b/src/test/ui/consts/const-match-check.eval1.stderr index eb6b0774e152c..4141cc4ab1a48 100644 --- a/src/test/ui/consts/const-match-check.eval1.stderr +++ b/src/test/ui/consts/const-match-check.eval1.stderr @@ -10,7 +10,7 @@ LL | A = { let 0 = 0; 0 }, help: you might want to use `if let` to ignore the variant that isn't matched | LL | A = { if let 0 = 0 { /* */ } 0 }, - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/consts/const-match-check.eval2.stderr b/src/test/ui/consts/const-match-check.eval2.stderr index 756426d84a479..af86ba0cc82f8 100644 --- a/src/test/ui/consts/const-match-check.eval2.stderr +++ b/src/test/ui/consts/const-match-check.eval2.stderr @@ -10,7 +10,7 @@ LL | let x: [i32; { let 0 = 0; 0 }] = []; help: you might want to use `if let` to ignore the variant that isn't matched | LL | let x: [i32; { if let 0 = 0 { /* */ } 0 }] = []; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/consts/const-match-check.matchck.stderr b/src/test/ui/consts/const-match-check.matchck.stderr index 84600bb1b8aad..f71490eba6135 100644 --- a/src/test/ui/consts/const-match-check.matchck.stderr +++ b/src/test/ui/consts/const-match-check.matchck.stderr @@ -10,7 +10,7 @@ LL | const X: i32 = { let 0 = 0; 0 }; help: you might want to use `if let` to ignore the variant that isn't matched | LL | const X: i32 = { if let 0 = 0 { /* */ } 0 }; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered --> $DIR/const-match-check.rs:8:23 @@ -24,7 +24,7 @@ LL | static Y: i32 = { let 0 = 0; 0 }; help: you might want to use `if let` to ignore the variant that isn't matched | LL | static Y: i32 = { if let 0 = 0 { /* */ } 0 }; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered --> $DIR/const-match-check.rs:13:26 @@ -38,7 +38,7 @@ LL | const X: i32 = { let 0 = 0; 0 }; help: you might want to use `if let` to ignore the variant that isn't matched | LL | const X: i32 = { if let 0 = 0 { /* */ } 0 }; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered --> $DIR/const-match-check.rs:19:26 @@ -52,7 +52,7 @@ LL | const X: i32 = { let 0 = 0; 0 }; help: you might want to use `if let` to ignore the variant that isn't matched | LL | const X: i32 = { if let 0 = 0 { /* */ } 0 }; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/deprecation/invalid-literal.stderr b/src/test/ui/deprecation/invalid-literal.stderr index a5088a3ee3316..f15be95db1024 100644 --- a/src/test/ui/deprecation/invalid-literal.stderr +++ b/src/test/ui/deprecation/invalid-literal.stderr @@ -7,11 +7,11 @@ LL | #[deprecated = b"test"] help: the following are the possible correct uses | LL | #[deprecated] - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ LL | #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LL | #[deprecated = "reason"] - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 8c004148a5d75..c5c8b8842979b 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -15,7 +15,7 @@ LL | foo3(u); help: consider dereferencing the borrow | LL | foo3(*u); - | ^ + | + error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:30:9 @@ -25,8 +25,9 @@ LL | foo(&"aaa".to_owned()); | help: consider removing the borrow | -LL | foo("aaa".to_owned()); - | -- +LL - foo(&"aaa".to_owned()); +LL + foo("aaa".to_owned()); + | error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:32:9 @@ -36,8 +37,9 @@ LL | foo(&mut "aaa".to_owned()); | help: consider removing the borrow | -LL | foo("aaa".to_owned()); - | -- +LL - foo(&mut "aaa".to_owned()); +LL + foo("aaa".to_owned()); + | error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:2:20 @@ -85,7 +87,7 @@ LL | let r = R { i }; help: consider dereferencing the borrow | LL | let r = R { i: *i }; - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:46:20 @@ -96,7 +98,7 @@ LL | let r = R { i: i }; help: consider dereferencing the borrow | LL | let r = R { i: *i }; - | ^ + | + error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:55:9 @@ -107,7 +109,7 @@ LL | b help: consider dereferencing the borrow | LL | *b - | ^ + | + error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:63:9 @@ -118,7 +120,7 @@ LL | b help: consider dereferencing the borrow | LL | *b - | ^ + | + error[E0308]: `if` and `else` have incompatible types --> $DIR/deref-suggestion.rs:68:12 diff --git a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr index 8a83e145ea2d0..635bd5e7edf49 100644 --- a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr @@ -33,11 +33,11 @@ LL | Struct { a, _ } = Struct { a: 1, b: 2 }; help: include the missing field in the pattern | 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 }; - | ^^^^^^ + | ~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr index c270593cac741..0e92cc5c9f282 100644 --- a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr @@ -35,11 +35,11 @@ LL | TupleStruct(_) = TupleStruct(1, 2); help: use `_` to explicitly ignore each field | LL | TupleStruct(_, _) = TupleStruct(1, 2); - | ^^^ + | +++ help: use `..` to ignore all fields | LL | TupleStruct(..) = TupleStruct(1, 2); - | ^^ + | ~~ error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/tuple_struct_destructure_fail.rs:34:5 @@ -62,11 +62,11 @@ LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2); help: use `_` to explicitly ignore each field | LL | Enum::SingleVariant(_, _) = Enum::SingleVariant(1, 2); - | ^^^ + | +++ help: use `..` to ignore all fields | LL | Enum::SingleVariant(..) = Enum::SingleVariant(1, 2); - | ^^ + | ~~ error[E0070]: invalid left-hand side of assignment --> $DIR/tuple_struct_destructure_fail.rs:40:12 diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr index 8db9652b1eade..0e2fdf9f6c2bf 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -133,7 +133,7 @@ LL | fn foo>(x: X) {} help: use type parameters instead | LL | fn foo, T>(x: X) {} - | ^ ^ ^^^ + | ~ ~ +++ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:52:34 @@ -144,7 +144,7 @@ LL | fn bar(_: F) where F: Fn() -> _ {} help: use type parameters instead | LL | fn bar(_: F) where F: Fn() -> T {} - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:55:19 @@ -155,7 +155,7 @@ LL | fn baz _>(_: F) {} help: use type parameters instead | LL | fn baz T, T>(_: F) {} - | ^^^^ + | ~+++ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs --> $DIR/bad-assoc-ty.rs:58:33 @@ -166,7 +166,7 @@ LL | struct L(F) where F: Fn() -> _; help: use type parameters instead | LL | struct L(F) where F: Fn() -> T; - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs --> $DIR/bad-assoc-ty.rs:60:30 @@ -177,7 +177,7 @@ LL | struct M where F: Fn() -> _ { help: use type parameters instead | LL | struct M where F: Fn() -> T { - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for enums --> $DIR/bad-assoc-ty.rs:64:28 @@ -188,7 +188,7 @@ LL | enum N where F: Fn() -> _ { help: use type parameters instead | LL | enum N where F: Fn() -> T { - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for unions --> $DIR/bad-assoc-ty.rs:69:29 @@ -199,7 +199,7 @@ LL | union O where F: Fn() -> _ { help: use type parameters instead | LL | union O where F: Fn() -> T { - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for traits --> $DIR/bad-assoc-ty.rs:74:29 @@ -210,7 +210,7 @@ LL | trait P where F: Fn() -> _ { help: use type parameters instead | LL | trait P where F: Fn() -> T { - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:79:38 @@ -221,7 +221,7 @@ LL | fn foo(_: F) where F: Fn() -> _ {} help: use type parameters instead | LL | fn foo(_: F) where F: Fn() -> T {} - | ^^^ ^ + | +++ ~ error: aborting due to 28 previous errors diff --git a/src/test/ui/did_you_mean/issue-40006.stderr b/src/test/ui/did_you_mean/issue-40006.stderr index 76e87a3749c33..d5e16e1ff273d 100644 --- a/src/test/ui/did_you_mean/issue-40006.stderr +++ b/src/test/ui/did_you_mean/issue-40006.stderr @@ -82,7 +82,7 @@ LL | } help: add `fn` here to parse `hello_method` as a public method | LL | pub fn hello_method(&self) { - | ^^ + | ++ error[E0599]: no method named `hello_method` found for struct `S` in the current scope --> $DIR/issue-40006.rs:38:7 diff --git a/src/test/ui/did_you_mean/issue-40396.stderr b/src/test/ui/did_you_mean/issue-40396.stderr index 2c2978d2bff2d..f4bc5aef82dc3 100644 --- a/src/test/ui/did_you_mean/issue-40396.stderr +++ b/src/test/ui/did_you_mean/issue-40396.stderr @@ -7,7 +7,7 @@ LL | (0..13).collect>(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | (0..13).collect::>(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/issue-40396.rs:5:8 @@ -18,7 +18,7 @@ LL | Vec::new(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | Vec::::new(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/issue-40396.rs:8:20 @@ -29,7 +29,7 @@ LL | (0..13).collect(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | (0..13).collect::(); - | ^^ + | ++ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,` --> $DIR/issue-40396.rs:11:43 @@ -40,7 +40,7 @@ LL | let x = std::collections::HashMap::new(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | let x = std::collections::HashMap::::new(); - | ^^ + | ++ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,` --> $DIR/issue-40396.rs:15:39 @@ -51,7 +51,7 @@ LL | std::collections::HashMap::new() help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | std::collections::HashMap::::new() - | ^^ + | ++ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,` --> $DIR/issue-40396.rs:20:39 @@ -62,7 +62,7 @@ LL | std::collections::HashMap::new(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | std::collections::HashMap::::new(); - | ^^ + | ++ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,` --> $DIR/issue-40396.rs:25:39 @@ -73,7 +73,7 @@ LL | std::collections::HashMap::new(1, 2); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | std::collections::HashMap::::new(1, 2); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/issue-40396.rs:13:17 diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index 16b80a6f41236..b339ce5ce8c92 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -9,9 +9,9 @@ LL | this_function_expects_a_double_option(n); help: try using a variant of the expected enum | LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-42764.rs:27:33 diff --git a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr index d05d6d120b084..c2e3ead7ec7c6 100644 --- a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr +++ b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr @@ -7,11 +7,11 @@ LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a s help: try adding parentheses to match on a tuple... | LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") { - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") { - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: unexpected `,` in pattern --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:49:14 @@ -22,11 +22,11 @@ LL | if let b1, b2, b3 = reading_frame.next().unwrap() { help: try adding parentheses to match on a tuple... | LL | if let (b1, b2, b3) = reading_frame.next().unwrap() { - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() { - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: unexpected `,` in pattern --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:59:28 @@ -37,11 +37,11 @@ LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true help: try adding parentheses to match on a tuple... | LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: unexpected `,` in pattern --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:67:10 @@ -52,11 +52,11 @@ LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) help: try adding parentheses to match on a tuple... | LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) { - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) { - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: unexpected `,` in pattern --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:75:10 @@ -67,11 +67,11 @@ LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone() help: try adding parentheses to match on a tuple... | LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) { - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: unexpected `,` in pattern --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:84:14 @@ -82,11 +82,11 @@ LL | let women, men: (Vec, Vec) = genomes.iter().cloned() help: try adding parentheses to match on a tuple... | LL | let (women, men): (Vec, Vec) = genomes.iter().cloned() - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: ...or a vertical bar to match on multiple alternatives | LL | let women | men: (Vec, Vec) = genomes.iter().cloned() - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr b/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr index 0ccccb53aac25..83fc37e7e537f 100644 --- a/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr +++ b/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr @@ -13,7 +13,7 @@ LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e−11; // m³⋅kg⁻¹ help: Unicode character '−' (Minus Sign) looks like '-' (Minus/Hyphen), but it is not | LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e-11; // m³⋅kg⁻¹⋅s⁻² - | ^ + | ~ error[E0277]: cannot subtract `{integer}` from `{float}` --> $DIR/issue-49746-unicode-confusable-in-float-literal-expt.rs:1:53 diff --git a/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr b/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr index 9429a0b576532..abc040c0546b4 100644 --- a/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr +++ b/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr @@ -7,13 +7,13 @@ LL | fn setup() -> Set { Set } help: there is an enum variant `AffixHeart::Set` and 7 others; try using the variant's enum | LL | fn setup() -> AffixHeart { Set } - | ^^^^^^^^^^ + | ~~~~~~~~~~ LL | fn setup() -> CauseToBe { Set } - | ^^^^^^^^^ + | ~~~~~~~~~ LL | fn setup() -> Determine { Set } - | ^^^^^^^^^ + | ~~~~~~~~~ LL | fn setup() -> PutDown { Set } - | ^^^^^^^ + | ~~~~~~~ and 3 other candidates error[E0425]: cannot find value `Set` in this scope diff --git a/src/test/ui/discrim/discrim-ill-typed.stderr b/src/test/ui/discrim/discrim-ill-typed.stderr index 9a695a8987a37..3d8049cba9c8f 100644 --- a/src/test/ui/discrim/discrim-ill-typed.stderr +++ b/src/test/ui/discrim/discrim-ill-typed.stderr @@ -7,7 +7,7 @@ LL | OhNo = 0_u8, help: change the type of the numeric literal from `u8` to `i8` | LL | OhNo = 0_i8, - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:28:16 @@ -18,7 +18,7 @@ LL | OhNo = 0_i8, help: change the type of the numeric literal from `i8` to `u8` | LL | OhNo = 0_u8, - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:41:16 @@ -29,7 +29,7 @@ LL | OhNo = 0_u16, help: change the type of the numeric literal from `u16` to `i16` | LL | OhNo = 0_i16, - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:54:16 @@ -40,7 +40,7 @@ LL | OhNo = 0_i16, help: change the type of the numeric literal from `i16` to `u16` | LL | OhNo = 0_u16, - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:67:16 @@ -51,7 +51,7 @@ LL | OhNo = 0_u32, help: change the type of the numeric literal from `u32` to `i32` | LL | OhNo = 0_i32, - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:80:16 @@ -62,7 +62,7 @@ LL | OhNo = 0_i32, help: change the type of the numeric literal from `i32` to `u32` | LL | OhNo = 0_u32, - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:93:16 @@ -73,7 +73,7 @@ LL | OhNo = 0_u64, help: change the type of the numeric literal from `u64` to `i64` | LL | OhNo = 0_i64, - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:106:16 @@ -84,7 +84,7 @@ LL | OhNo = 0_i64, help: change the type of the numeric literal from `i64` to `u64` | LL | OhNo = 0_u64, - | ^^^^^ + | ~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr index 017b73a0d8611..32967b376ca9c 100644 --- a/src/test/ui/diverging-tuple-parts-39485.stderr +++ b/src/test/ui/diverging-tuple-parts-39485.stderr @@ -9,11 +9,12 @@ LL | &panic!() help: try adding a return type | LL | fn g() -> &_ { - | ^^^^^ + | +++++ help: consider removing the borrow | -LL | panic!() - | -- +LL - &panic!() +LL + panic!() + | error[E0308]: mismatched types --> $DIR/diverging-tuple-parts-39485.rs:12:5 diff --git a/src/test/ui/dst/dst-object-from-unsized-type.stderr b/src/test/ui/dst/dst-object-from-unsized-type.stderr index 6c57dd9316fbd..b7824c027ec11 100644 --- a/src/test/ui/dst/dst-object-from-unsized-type.stderr +++ b/src/test/ui/dst/dst-object-from-unsized-type.stderr @@ -9,8 +9,9 @@ LL | let u: &dyn Foo = t; = note: required for the cast to the object type `dyn Foo` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn test1(t: &T) { - | -- +LL - fn test1(t: &T) { +LL + fn test1(t: &T) { + | error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/dst-object-from-unsized-type.rs:13:23 @@ -23,8 +24,9 @@ LL | let v: &dyn Foo = t as &dyn Foo; = note: required for the cast to the object type `dyn Foo` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn test2(t: &T) { - | -- +LL - fn test2(t: &T) { +LL + fn test2(t: &T) { + | error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/dst-object-from-unsized-type.rs:18:28 diff --git a/src/test/ui/dst/dst-sized-trait-param.stderr b/src/test/ui/dst/dst-sized-trait-param.stderr index 481c01a75e5a9..8b781a7b1f92d 100644 --- a/src/test/ui/dst/dst-sized-trait-param.stderr +++ b/src/test/ui/dst/dst-sized-trait-param.stderr @@ -11,7 +11,7 @@ LL | impl Foo<[isize]> for usize { } help: consider relaxing the implicit `Sized` restriction | LL | trait Foo : Sized { fn take(self, x: &T) { } } // Note: T is sized - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `[usize]` cannot be known at compilation time --> $DIR/dst-sized-trait-param.rs:10:6 diff --git a/src/test/ui/duplicate/duplicate-check-macro-exports.stderr b/src/test/ui/duplicate/duplicate-check-macro-exports.stderr index 02f0206c443a2..ba723b38bfada 100644 --- a/src/test/ui/duplicate/duplicate-check-macro-exports.stderr +++ b/src/test/ui/duplicate/duplicate-check-macro-exports.stderr @@ -11,7 +11,7 @@ LL | macro_rules! panic { () => {} } help: you can use `as` to change the binding name of the import | LL | pub use std::panic as other_panic; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr b/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr index 798f48060e7b7..730bc691bf886 100644 --- a/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr +++ b/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr @@ -7,7 +7,7 @@ LL | let _x: &SomeTrait = todo!(); help: add `dyn` keyword before this trait | LL | let _x: &dyn SomeTrait = todo!(); - | ^^^ + | +++ error[E0782]: trait objects must include the `dyn` keyword --> $DIR/dyn-2021-edition-error.rs:3:17 @@ -18,7 +18,7 @@ LL | fn function(x: &SomeTrait, y: Box) { help: add `dyn` keyword before this trait | LL | fn function(x: &dyn SomeTrait, y: Box) { - | ^^^ + | +++ error[E0782]: trait objects must include the `dyn` keyword --> $DIR/dyn-2021-edition-error.rs:3:35 @@ -29,7 +29,7 @@ LL | fn function(x: &SomeTrait, y: Box) { help: add `dyn` keyword before this trait | LL | fn function(x: &SomeTrait, y: Box) { - | ^^^ + | +++ error: aborting due to 3 previous errors diff --git a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr index 22f28a67798f5..65d9199fa3326 100644 --- a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr @@ -8,7 +8,7 @@ LL | produces_async! {} help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async() {}) - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr index 04d45758578a3..837d35bfccb0e 100644 --- a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr @@ -7,7 +7,7 @@ LL | let mut async = 1; help: you can escape reserved keywords to use them as identifiers | LL | let mut r#async = 1; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `async` --> $DIR/edition-keywords-2018-2015-parsing.rs:26:13 @@ -18,7 +18,7 @@ LL | module::async(); help: you can escape reserved keywords to use them as identifiers | LL | module::r#async(); - | ^^^^^^^ + | ~~~~~~~ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2018-2015-parsing.rs:20:31 diff --git a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr index 2a1e7bb4afafd..77b95ec87a033 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr @@ -8,7 +8,7 @@ LL | produces_async! {} help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async() {}) - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr index af11a505ccf36..7c183699ac255 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr @@ -7,7 +7,7 @@ LL | let mut async = 1; help: you can escape reserved keywords to use them as identifiers | LL | let mut r#async = 1; - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `async` --> $DIR/edition-keywords-2018-2018-parsing.rs:26:13 @@ -18,7 +18,7 @@ LL | module::async(); help: you can escape reserved keywords to use them as identifiers | LL | module::r#async(); - | ^^^^^^^ + | ~~~~~~~ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2018-2018-parsing.rs:20:31 diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 5ee8cbd912b0e..48e5ea8ec866c 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -15,11 +15,11 @@ LL | pub struct XEmpty2; help: use struct literal syntax instead | LL | let e1 = Empty1 {}; - | ^^^^^^^^^ + | ~~~~~~~~~ help: a unit struct with a similar name exists | LL | let e1 = XEmpty2; - | ^^^^^^^ + | ~~~~~~~ error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1` --> $DIR/empty-struct-braces-expr.rs:16:14 @@ -38,11 +38,11 @@ LL | pub struct XEmpty2; help: use struct literal syntax instead | LL | let e1 = Empty1 {}; - | ^^^^^^^^^ + | ~~~~~~~~~ help: a unit struct with a similar name exists | LL | let e1 = XEmpty2(); - | ^^^^^^^ + | ~~~~~~~ error[E0423]: expected value, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:18:14 @@ -78,11 +78,11 @@ LL | pub struct XEmpty2; help: use struct literal syntax instead | LL | let xe1 = XEmpty1 {}; - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: a unit struct with a similar name exists | LL | let xe1 = XEmpty2; - | ^^^^^^^ + | ~~~~~~~ error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-expr.rs:23:15 @@ -100,11 +100,11 @@ LL | pub struct XEmpty2; help: use struct literal syntax instead | LL | let xe1 = XEmpty1 {}; - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: a unit struct with a similar name exists | LL | let xe1 = XEmpty2(); - | ^^^^^^^ + | ~~~~~~~ error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:25:19 diff --git a/src/test/ui/empty/empty-struct-braces-pat-1.stderr b/src/test/ui/empty/empty-struct-braces-pat-1.stderr index 5c02b62969fe7..0215a9e593532 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-1.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-1.stderr @@ -23,11 +23,11 @@ LL | XEmpty4, help: use struct pattern syntax instead | LL | XE::XEmpty3 { /* fields */ } => () - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: a unit variant with a similar name exists | LL | XE::XEmpty4 => () - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/empty/empty-struct-braces-pat-2.stderr b/src/test/ui/empty/empty-struct-braces-pat-2.stderr index 4bac2dfe76f28..28191615afda4 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-2.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-2.stderr @@ -15,11 +15,11 @@ LL | pub struct XEmpty6(); help: use struct pattern syntax instead | LL | Empty1 {} => () - | ^^^^^^^^^ + | ~~~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6() => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-pat-2.rs:18:9 @@ -38,11 +38,11 @@ LL | pub struct XEmpty6(); help: use struct pattern syntax instead | LL | XEmpty1 {} => () - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6() => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found struct `Empty1` --> $DIR/empty-struct-braces-pat-2.rs:21:9 @@ -61,11 +61,11 @@ LL | pub struct XEmpty6(); help: use struct pattern syntax instead | LL | Empty1 {} => () - | ^^^^^^^^^ + | ~~~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6(..) => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-pat-2.rs:24:9 @@ -84,11 +84,11 @@ LL | pub struct XEmpty6(); help: use struct pattern syntax instead | LL | XEmpty1 {} => () - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6(..) => () - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/empty/empty-struct-braces-pat-3.stderr b/src/test/ui/empty/empty-struct-braces-pat-3.stderr index cc2feb86d8e5b..60266bb35807d 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-3.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-3.stderr @@ -24,11 +24,11 @@ LL | XEmpty5(), help: use struct pattern syntax instead | LL | XE::XEmpty3 { /* fields */ } => () - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | XE::XEmpty5() => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-pat-3.rs:25:9 @@ -56,11 +56,11 @@ LL | XEmpty5(), help: use struct pattern syntax instead | LL | XE::XEmpty3 { /* fields */ } => () - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | XE::XEmpty5(..) => () - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr index 9b5c8422de55d..e696b85c6cc81 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.stderr +++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr @@ -41,11 +41,11 @@ LL | XEmpty5(), help: use the tuple variant pattern syntax instead | LL | XE::XEmpty5(/* fields */) => (), - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ help: a unit variant with a similar name exists | LL | XE::XEmpty4 => (), - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/empty/empty-struct-unit-expr.stderr b/src/test/ui/empty/empty-struct-unit-expr.stderr index 50b0e19133e3c..1023950639a66 100644 --- a/src/test/ui/empty/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty/empty-struct-unit-expr.stderr @@ -23,7 +23,7 @@ LL | let e4 = E::Empty4(); help: `E::Empty4` is a unit variant, you need to write it without the parenthesis | LL | let e4 = E::Empty4; - | ^^^^^^^^^ + | ~~~~~~~~~ error[E0618]: expected function, found `empty_struct::XEmpty2` --> $DIR/empty-struct-unit-expr.rs:18:15 @@ -44,7 +44,7 @@ LL | let xe4 = XE::XEmpty4(); help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis | LL | let xe4 = XE::XEmpty4; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/empty/empty-struct-unit-pat.stderr b/src/test/ui/empty/empty-struct-unit-pat.stderr index 839d3a84103fa..b1b253385fd34 100644 --- a/src/test/ui/empty/empty-struct-unit-pat.stderr +++ b/src/test/ui/empty/empty-struct-unit-pat.stderr @@ -15,11 +15,11 @@ LL | pub struct XEmpty6(); help: use this syntax instead | LL | Empty2 => () - | ^^^^^^ + | ~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6() => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2` --> $DIR/empty-struct-unit-pat.rs:24:9 @@ -37,11 +37,11 @@ LL | pub struct XEmpty6(); help: use this syntax instead | LL | XEmpty2 => () - | ^^^^^^^ + | ~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6() => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found unit struct `Empty2` --> $DIR/empty-struct-unit-pat.rs:28:9 @@ -60,11 +60,11 @@ LL | pub struct XEmpty6(); help: use this syntax instead | LL | Empty2 => () - | ^^^^^^ + | ~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6(..) => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2` --> $DIR/empty-struct-unit-pat.rs:32:9 @@ -82,11 +82,11 @@ LL | pub struct XEmpty6(); help: use this syntax instead | LL | XEmpty2 => () - | ^^^^^^^ + | ~~~~~~~ help: a tuple struct with a similar name exists | LL | XEmpty6(..) => () - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found unit variant `E::Empty4` --> $DIR/empty-struct-unit-pat.rs:37:9 @@ -113,11 +113,11 @@ LL | XEmpty5(), help: use this syntax instead | LL | XE::XEmpty4 => (), - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | XE::XEmpty5() => (), - | ^^^^^^^ + | ~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found unit variant `E::Empty4` --> $DIR/empty-struct-unit-pat.rs:46:9 @@ -144,11 +144,11 @@ LL | XEmpty5(), help: use this syntax instead | LL | XE::XEmpty4 => (), - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | XE::XEmpty5(..) => (), - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index a945a4be70854..b95dcbd8935b3 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -15,7 +15,7 @@ LL | None, help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Some(y) = x { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index 832eba6972213..ec3aae2971410 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -10,7 +10,7 @@ LL | Fruit::Apple(a) => {}, help: use `_` to explicitly ignore each field | LL | Fruit::Apple(a, _) => {}, - | ^^^ + | +++ error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:12:9 @@ -42,7 +42,7 @@ LL | Fruit::Orange(a, b) => {}, help: missing parentheses | LL | Fruit::Orange((a, b)) => {}, - | ^ ^ + | + + error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field --> $DIR/E0023.rs:15:9 @@ -56,7 +56,7 @@ LL | Fruit::Banana() => {}, help: missing parentheses | LL | Fruit::Banana(()) => {}, - | ^ ^ + | + + error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr index a3dd6910be4a5..9ae97e4a994da 100644 --- a/src/test/ui/error-codes/E0027.stderr +++ b/src/test/ui/error-codes/E0027.stderr @@ -7,11 +7,11 @@ LL | Dog { age: x } => {} help: include the missing field in the pattern | LL | Dog { age: x, name } => {} - | ^^^^^^^^ + | ~~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { age: x, .. } => {} - | ^^^^^^ + | ~~~~~~ error[E0027]: pattern does not mention field `age` --> $DIR/E0027.rs:15:9 @@ -22,11 +22,11 @@ LL | Dog { name: x, } => {} help: include the missing field in the pattern | LL | Dog { name: x, age } => {} - | ^^^^^^^ + | ~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { name: x, .. } => {} - | ^^^^^^ + | ~~~~~~ error[E0027]: pattern does not mention field `age` --> $DIR/E0027.rs:19:9 @@ -37,11 +37,11 @@ LL | Dog { name: x , } => {} help: include the missing field in the pattern | LL | Dog { name: x, age } => {} - | ^^^^^^^ + | ~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { name: x, .. } => {} - | ^^^^^^ + | ~~~~~~ error[E0027]: pattern does not mention fields `name`, `age` --> $DIR/E0027.rs:22:9 @@ -52,11 +52,11 @@ LL | Dog {} => {} help: include the missing fields in the pattern | LL | Dog { name, age } => {} - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: if you don't care about these missing fields, you can explicitly ignore them | LL | Dog { .. } => {} - | ^^^^^^ + | ~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr index 513fda3097c14..3b68abbb4a0ba 100644 --- a/src/test/ui/error-codes/E0033-teach.stderr +++ b/src/test/ui/error-codes/E0033-teach.stderr @@ -20,11 +20,11 @@ LL | fn foo(); help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self); - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0033]: type `&dyn SomeTrait` cannot be dereferenced --> $DIR/E0033-teach.rs:12:9 diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr index fc1248440d043..f0645107831e0 100644 --- a/src/test/ui/error-codes/E0033.stderr +++ b/src/test/ui/error-codes/E0033.stderr @@ -20,11 +20,11 @@ LL | fn foo(); help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self); - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0033]: type `&dyn SomeTrait` cannot be dereferenced --> $DIR/E0033.rs:10:9 diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr index 55119857d8f83..83718a1e27371 100644 --- a/src/test/ui/error-codes/E0034.stderr +++ b/src/test/ui/error-codes/E0034.stderr @@ -17,11 +17,11 @@ LL | fn foo() {} help: disambiguate the associated function for candidate #1 | LL | Trait1::foo() - | ^^^^^^^^ + | ~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | Trait2::foo() - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0106.stderr b/src/test/ui/error-codes/E0106.stderr index b961fc8aeeb53..ee9a4733fd95f 100644 --- a/src/test/ui/error-codes/E0106.stderr +++ b/src/test/ui/error-codes/E0106.stderr @@ -6,8 +6,8 @@ LL | x: &bool, | help: consider introducing a named lifetime parameter | -LL | struct Foo<'a> { -LL | x: &'a bool, +LL ~ struct Foo<'a> { +LL ~ x: &'a bool, | error[E0106]: missing lifetime specifier @@ -18,9 +18,9 @@ LL | B(&bool), | help: consider introducing a named lifetime parameter | -LL | enum Bar<'a> { +LL ~ enum Bar<'a> { LL | A(u8), -LL | B(&'a bool), +LL ~ B(&'a bool), | error[E0106]: missing lifetime specifier @@ -31,8 +31,8 @@ LL | baz: Baz, | help: consider introducing a named lifetime parameter | -LL | struct Quux<'a> { -LL | baz: Baz<'a>, +LL ~ struct Quux<'a> { +LL ~ baz: Baz<'a>, | error[E0106]: missing lifetime specifiers @@ -43,11 +43,11 @@ LL | buzz: Buzz, | help: consider introducing a named lifetime parameter | -LL | struct Quux<'a> { +LL ~ struct Quux<'a> { LL | baz: Baz, LL | LL | -LL | buzz: Buzz<'a, 'a>, +LL ~ buzz: Buzz<'a, 'a>, | error[E0106]: missing lifetime specifier @@ -59,7 +59,7 @@ LL | type MyStr = &str; help: consider introducing a named lifetime parameter | LL | type MyStr<'a> = &'a str; - | ^^^^ ^^^ + | ++++ ~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr index 3c7aa6de54136..c90f85df96741 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -14,7 +14,7 @@ LL | struct Buzz<'a, 'b>(&'a str, &'b str); help: add missing lifetime argument | LL | buzz: Buzz<'a, 'a>, - | ^^^^ + | ++++ error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/E0107.rs:17:10 diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr index 085f80f44f30f..86966d520e7e2 100644 --- a/src/test/ui/error-codes/E0221.stderr +++ b/src/test/ui/error-codes/E0221.stderr @@ -13,11 +13,11 @@ LL | let _: Self::A; help: use fully qualified syntax to disambiguate | LL | let _: ::A; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ help: use fully qualified syntax to disambiguate | LL | let _: ::A; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0221]: ambiguous associated type `Err` in bounds of `Self` --> $DIR/E0221.rs:21:16 diff --git a/src/test/ui/error-codes/E0252.stderr b/src/test/ui/error-codes/E0252.stderr index 8486806c6729c..2722dfe5e0543 100644 --- a/src/test/ui/error-codes/E0252.stderr +++ b/src/test/ui/error-codes/E0252.stderr @@ -10,7 +10,7 @@ LL | use bar::baz; help: you can use `as` to change the binding name of the import | LL | use bar::baz as other_baz; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0254.stderr b/src/test/ui/error-codes/E0254.stderr index 10456fd5a5dc1..b098f8e1a7f49 100644 --- a/src/test/ui/error-codes/E0254.stderr +++ b/src/test/ui/error-codes/E0254.stderr @@ -11,7 +11,7 @@ LL | use foo::alloc; help: you can use `as` to change the binding name of the import | LL | use foo::alloc as other_alloc; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0255.stderr b/src/test/ui/error-codes/E0255.stderr index 36e4eeeaeea76..b5c09499276b1 100644 --- a/src/test/ui/error-codes/E0255.stderr +++ b/src/test/ui/error-codes/E0255.stderr @@ -11,7 +11,7 @@ LL | fn foo() {} help: you can use `as` to change the binding name of the import | LL | use bar::foo as other_foo; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr index dea0bb259f506..2c2dcbdd0dc4a 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -10,7 +10,7 @@ LL | fn f(p: Path) { } help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn f(p: &Path) { } - | ^ + | + error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/E0277.rs:15:15 diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index a9aecb520b228..5f251527e7716 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -7,7 +7,7 @@ LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } help: surround the struct literal with parentheses | LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); } - | ^ ^ + | + + error: expected expression, found `==` --> $DIR/E0423.rs:14:13 @@ -24,7 +24,7 @@ LL | for _ in std::ops::Range { start: 0, end: 10 } {} help: surround the struct literal with parentheses | LL | for _ in (std::ops::Range { start: 0, end: 10 }) {} - | ^ ^ + | + + error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo` --> $DIR/E0423.rs:4:13 @@ -41,11 +41,11 @@ LL | fn foo() { help: use struct literal syntax instead | LL | let f = Foo { a: val }; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ help: a function with a similar name exists | LL | let f = foo(); - | ^^^ + | ~~~ error[E0423]: expected value, found struct `T` --> $DIR/E0423.rs:14:8 @@ -56,7 +56,7 @@ LL | if T {} == T {} { println!("Ok"); } help: surround the struct literal with parentheses | LL | if (T {}) == T {} { println!("Ok"); } - | ^ ^ + | + + error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr index 20b7a4cb6ece6..d02da3e4ecb8a 100644 --- a/src/test/ui/error-codes/E0424.stderr +++ b/src/test/ui/error-codes/E0424.stderr @@ -9,7 +9,7 @@ LL | self.bar(); help: add a `self` receiver parameter to make the associated `fn` a method | LL | fn foo(&self) { - | ^^^^^ + | +++++ error[E0424]: expected value, found module `self` --> $DIR/E0424.rs:11:9 @@ -22,7 +22,7 @@ LL | self.bar(); help: add a `self` receiver parameter to make the associated `fn` a method | LL | fn baz(&self, _: i32) { - | ^^^^^^ + | ++++++ error[E0424]: expected value, found module `self` --> $DIR/E0424.rs:15:20 @@ -35,7 +35,7 @@ LL | let _ = || self.bar(); help: add a `self` receiver parameter to make the associated `fn` a method | LL | fn qux(&self) { - | ^^^^^ + | +++++ error[E0424]: expected unit struct, unit variant or constant, found module `self` --> $DIR/E0424.rs:20:9 diff --git a/src/test/ui/error-codes/E0429.stderr b/src/test/ui/error-codes/E0429.stderr index c598803fa6cb8..0b786ab1e2fe0 100644 --- a/src/test/ui/error-codes/E0429.stderr +++ b/src/test/ui/error-codes/E0429.stderr @@ -6,12 +6,13 @@ LL | use std::fmt::self; | help: consider importing the module directly | -LL | use std::fmt; - | -- +LL - use std::fmt::self; +LL + use std::fmt; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use std::fmt::{self}; - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr index 6314e7a3a8a78..e5647ee6d0968 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -13,7 +13,7 @@ LL | v as &u8; help: consider borrowing the value | LL | &*v as &u8; - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index 1bc047dd356e0..c12e1a3a64361 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -7,7 +7,7 @@ LL | f.method; help: use parentheses to call the method | LL | f.method(); - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0617.stderr b/src/test/ui/error-codes/E0617.stderr index c029060c3fbe1..ea91ad0829230 100644 --- a/src/test/ui/error-codes/E0617.stderr +++ b/src/test/ui/error-codes/E0617.stderr @@ -37,7 +37,7 @@ LL | printf(::std::ptr::null(), printf); help: cast the value to `unsafe extern "C" fn(*const i8, ...)` | LL | printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr index 714c8d1e4d75c..19a1a8e20ccfa 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -12,7 +12,7 @@ LL | X::Entry(); help: `X::Entry` is a unit variant, you need to write it without the parenthesis | LL | X::Entry; - | ^^^^^^^^ + | ~~~~~~~~ error[E0618]: expected function, found `i32` --> $DIR/E0618.rs:9:5 diff --git a/src/test/ui/error-codes/E0642.stderr b/src/test/ui/error-codes/E0642.stderr index 83fcac042b1b4..dd9e28ad49277 100644 --- a/src/test/ui/error-codes/E0642.stderr +++ b/src/test/ui/error-codes/E0642.stderr @@ -7,7 +7,7 @@ LL | fn foo((x, y): (i32, i32)); help: give this argument a name or use an underscore to ignore it | LL | fn foo(_: (i32, i32)); - | ^ + | ~ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/E0642.rs:11:12 @@ -18,7 +18,7 @@ LL | fn bar((x, y): (i32, i32)) {} help: give this argument a name or use an underscore to ignore it | LL | fn bar(_: (i32, i32)) {} - | ^ + | ~ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/E0642.rs:13:15 @@ -29,7 +29,7 @@ LL | fn method(S { .. }: S) {} help: give this argument a name or use an underscore to ignore it | LL | fn method(_: S) {} - | ^ + | ~ error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0746.stderr b/src/test/ui/error-codes/E0746.stderr index 3757ed6d0926e..2153b59ad18dd 100644 --- a/src/test/ui/error-codes/E0746.stderr +++ b/src/test/ui/error-codes/E0746.stderr @@ -8,7 +8,7 @@ LL | fn foo() -> dyn Trait { Struct } help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait` | LL | fn foo() -> impl Trait { Struct } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0746]: return type cannot have an unboxed trait object --> $DIR/E0746.rs:11:13 @@ -20,7 +20,7 @@ LL | fn bar() -> dyn Trait { help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait` | LL | fn bar() -> impl Trait { - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/expr/if/if-no-match-bindings.stderr b/src/test/ui/expr/if/if-no-match-bindings.stderr index 554cc3a2bcf34..319371720710c 100644 --- a/src/test/ui/expr/if/if-no-match-bindings.stderr +++ b/src/test/ui/expr/if/if-no-match-bindings.stderr @@ -7,7 +7,7 @@ LL | if b_ref() {} help: consider dereferencing the borrow | LL | if *b_ref() {} - | ^ + | + error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:19:8 @@ -18,7 +18,7 @@ LL | if b_mut_ref() {} help: consider dereferencing the borrow | LL | if *b_mut_ref() {} - | ^ + | + error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:20:8 @@ -28,8 +28,9 @@ LL | if &true {} | help: consider removing the borrow | -LL | if true {} - | -- +LL - if &true {} +LL + if true {} + | error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:21:8 @@ -39,8 +40,9 @@ LL | if &mut true {} | help: consider removing the borrow | -LL | if true {} - | -- +LL - if &mut true {} +LL + if true {} + | error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:24:11 @@ -51,7 +53,7 @@ LL | while b_ref() {} help: consider dereferencing the borrow | LL | while *b_ref() {} - | ^ + | + error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:25:11 @@ -62,7 +64,7 @@ LL | while b_mut_ref() {} help: consider dereferencing the borrow | LL | while *b_mut_ref() {} - | ^ + | + error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:26:11 @@ -72,8 +74,9 @@ LL | while &true {} | help: consider removing the borrow | -LL | while true {} - | -- +LL - while &true {} +LL + while true {} + | error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:27:11 @@ -83,8 +86,9 @@ LL | while &mut true {} | help: consider removing the borrow | -LL | while true {} - | -- +LL - while &mut true {} +LL + while true {} + | error: aborting due to 8 previous errors diff --git a/src/test/ui/extern/extern-crate-rename.stderr b/src/test/ui/extern/extern-crate-rename.stderr index 787c11f2a81ab..5f14779552110 100644 --- a/src/test/ui/extern/extern-crate-rename.stderr +++ b/src/test/ui/extern/extern-crate-rename.stderr @@ -10,7 +10,7 @@ LL | extern crate m2 as m1; help: you can use `as` to change the binding name of the import | LL | extern crate m2 as other_m1; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/extern/extern-types-unsized.stderr b/src/test/ui/extern/extern-types-unsized.stderr index 72e4be51822e2..44c0ae49ea6d6 100644 --- a/src/test/ui/extern/extern-types-unsized.stderr +++ b/src/test/ui/extern/extern-types-unsized.stderr @@ -11,7 +11,7 @@ LL | assert_sized::(); help: consider relaxing the implicit `Sized` restriction | LL | fn assert_sized() {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/extern-types-unsized.rs:25:5 @@ -31,7 +31,7 @@ LL | struct Foo { help: consider relaxing the implicit `Sized` restriction | LL | fn assert_sized() {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/extern-types-unsized.rs:28:5 @@ -51,7 +51,7 @@ LL | struct Bar { help: consider relaxing the implicit `Sized` restriction | LL | fn assert_sized() {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/extern-types-unsized.rs:31:5 @@ -76,7 +76,7 @@ LL | struct Bar { help: consider relaxing the implicit `Sized` restriction | LL | fn assert_sized() {} - | ^^^^^^^^ + | ++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr index 912252fd34a2e..8f5ba07bdaa9c 100644 --- a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr +++ b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr @@ -147,7 +147,7 @@ LL | pub trait Copy: Clone { help: consider further restricting the associated type | LL | trait _Tr3 where <::A as Iterator>::Item: Copy { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++++++++++++ error: aborting due to 17 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr index 74629d3e7e64a..c5ffa55ebec6f 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr @@ -15,7 +15,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Ok(_x) = foo() { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr index 4afbde5021f91..318fb63d3827a 100644 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr @@ -70,7 +70,7 @@ LL | type Pointer2 = Box; help: consider restricting type parameter `U32` | LL | type Pointer2 = Box; - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 8 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr index 497b8a429e0ed..20e61303e36aa 100644 --- a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr +++ b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr @@ -28,11 +28,11 @@ LL | fn my_lifetime(&self) -> &'a u8 { self.0 } help: consider introducing lifetime `'a` here | LL | impl<'a> MyTrait<'a> for Y<&'a u8> { - | ^^^^ + | ++++ help: consider introducing lifetime `'a` here | LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 @@ -44,11 +44,11 @@ LL | fn any_lifetime() -> &'b u8 { &0 } help: consider introducing lifetime `'b` here | LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | fn any_lifetime<'b>() -> &'b u8 { &0 } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:57:27 @@ -60,11 +60,11 @@ LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } help: consider introducing lifetime `'b` here | LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:57:40 @@ -76,11 +76,11 @@ LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } help: consider introducing lifetime `'b` here | LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:3:12 @@ -120,11 +120,11 @@ LL | fn inner_2(&self) -> &'b u8 { help: consider introducing lifetime `'b` here | LL | impl<'b, 'a> X<'b> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn inner_2<'b>(&self) -> &'b u8 { - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:23:8 @@ -146,11 +146,11 @@ LL | fn inner_3(&self) -> &'b u8 { help: consider introducing lifetime `'b` here | LL | impl<'b> X<'b> { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | fn inner_3<'b>(&self) -> &'b u8 { - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:33:9 @@ -172,11 +172,11 @@ LL | fn inner(&self) -> &'a u8 { help: consider introducing lifetime `'a` here | LL | impl<'a> Y<&'a u8> { - | ^^^^ + | ++++ help: consider introducing lifetime `'a` here | LL | fn inner<'a>(&self) -> &'a u8 { - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:43:27 @@ -188,11 +188,11 @@ LL | fn any_lifetime() -> &'b u8; help: consider introducing lifetime `'b` here | LL | trait MyTrait<'b, 'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn any_lifetime<'b>() -> &'b u8; - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:45:27 @@ -204,11 +204,11 @@ LL | fn borrowed_lifetime(&'b self) -> &'b u8; help: consider introducing lifetime `'b` here | LL | trait MyTrait<'b, 'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8; - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:45:40 @@ -220,11 +220,11 @@ LL | fn borrowed_lifetime(&'b self) -> &'b u8; help: consider introducing lifetime `'b` here | LL | trait MyTrait<'b, 'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8; - | ^^^^ + | ++++ error: aborting due to 17 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr b/src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr index c13c05f146a7e..a3bd65e518e4c 100644 --- a/src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr +++ b/src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr @@ -28,11 +28,11 @@ LL | fn static_fn() {} help: consider turning `static_fn` into a method by giving it a `&self` argument | LL | fn static_fn(&self) {} - | ^^^^^ + | +++++ help: alternatively, consider constraining `static_fn` so it does not apply to trait objects | LL | fn static_fn() where Self: Sized {} - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0038]: the trait `NonObjectSafe3` cannot be made into an object --> $DIR/feature-gate-object_safe_for_dispatch.rs:27:39 diff --git a/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr b/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr index 3631a03938a65..fbb18c8c49097 100644 --- a/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr +++ b/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr @@ -9,7 +9,7 @@ LL | fn foo(x: dyn Foo) { help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(x: &dyn Foo) { - | ^ + | + error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time --> $DIR/feature-gate-unsized_fn_params.rs:24:5 diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr index 0919c2f3a1e0e..c4507843e366e 100644 --- a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr +++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr @@ -9,7 +9,7 @@ LL | fn f(f: dyn FnOnce()) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn f(f: &dyn FnOnce()) {} - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/feature-gates/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gates/issue-43106-gating-of-macro_use.stderr index 7f6d608038f91..c0d2df3753d2c 100644 --- a/src/test/ui/feature-gates/issue-43106-gating-of-macro_use.stderr +++ b/src/test/ui/feature-gates/issue-43106-gating-of-macro_use.stderr @@ -25,9 +25,9 @@ LL | #[macro_use = "2700"] struct S; help: the following are the possible correct uses | LL | #[macro_use] struct S; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ LL | #[macro_use(name1, name2, ...)] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/float-literal-inference-restrictions.stderr b/src/test/ui/float-literal-inference-restrictions.stderr index 62ca8dc77294b..263b5e594e10c 100644 --- a/src/test/ui/float-literal-inference-restrictions.stderr +++ b/src/test/ui/float-literal-inference-restrictions.stderr @@ -19,7 +19,7 @@ LL | let y: f32 = 1f64; help: change the type of the numeric literal from `f64` to `f32` | LL | let y: f32 = 1f32; - | ^^^^ + | ~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/fmt/ifmt-bad-format-args.stderr b/src/test/ui/fmt/ifmt-bad-format-args.stderr index d117f3254407b..854abb90638c8 100644 --- a/src/test/ui/fmt/ifmt-bad-format-args.stderr +++ b/src/test/ui/fmt/ifmt-bad-format-args.stderr @@ -15,7 +15,7 @@ LL | format_args!(|| {}); help: you might be missing a string literal to format with | LL | format_args!("{}", || {}); - | ^^^^^ + | +++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/fn/fn-compare-mismatch.stderr b/src/test/ui/fn/fn-compare-mismatch.stderr index 326418ecbf953..585f556abc8b5 100644 --- a/src/test/ui/fn/fn-compare-mismatch.stderr +++ b/src/test/ui/fn/fn-compare-mismatch.stderr @@ -9,11 +9,11 @@ LL | let x = f == g; help: you might have forgotten to call this function | LL | let x = f() == g; - | ^^^ + | ~~~ help: you might have forgotten to call this function | LL | let x = f == g(); - | ^^^ + | ~~~ error[E0308]: mismatched types --> $DIR/fn-compare-mismatch.rs:4:18 diff --git a/src/test/ui/foreign-fn-return-lifetime.stderr b/src/test/ui/foreign-fn-return-lifetime.stderr index feecb6d80e771..b174766cd3d0c 100644 --- a/src/test/ui/foreign-fn-return-lifetime.stderr +++ b/src/test/ui/foreign-fn-return-lifetime.stderr @@ -8,7 +8,7 @@ LL | pub fn f() -> &u8; help: consider using the `'static` lifetime | LL | pub fn f() -> &'static u8; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr index ad02202dfc90c..957ae5d293240 100644 --- a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr +++ b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr @@ -11,7 +11,7 @@ LL | let b: Vec = a; help: consider constraining the associated type `::Y` to `Vec` | LL | fn f = Vec>>(a: T::Y) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr index 310f722e120fd..1594747e54ce9 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr @@ -15,7 +15,7 @@ LL | type F = &[u8]; help: consider introducing a named lifetime parameter | LL | type F<'a, T1> = &'a [u8]; - | ^^^ ^^^ + | +++ ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr index 9b63e8f30726b..aeb9238de81f4 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr @@ -12,7 +12,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn foo<'a, T1: X = T1>>(t : T1) -> T1::Y<'a> { - | ^^^^^ + | ~~~~~ error[E0107]: missing generics for associated type `X::Y` --> $DIR/gat-trait-path-missing-lifetime.rs:10:20 @@ -28,7 +28,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn foo<'a, T1: X = T1>>(t : T1) -> T1::Y<'a> { - | ^^^^^ + | ~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr index d6fba8b8e4c8a..d557802bbd941 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr @@ -34,7 +34,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn foo<'a>(arg: Box>) {} - | ^^^ + | +++ error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/gat-trait-path-parenthesised-args.rs:7:27 diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr index d652654382209..99a601003c13f 100644 --- a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr +++ b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr @@ -8,7 +8,7 @@ LL | type Assoc2 = Vec; help: consider restricting type parameter `T` | LL | type Assoc2 = Vec; - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0276]: impl has stricter requirements than trait --> $DIR/generic-associated-types-where.rs:22:5 diff --git a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr index e87176e0fb27b..adbd47ac16f45 100644 --- a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr +++ b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr @@ -8,11 +8,11 @@ LL | + Deref>; help: consider introducing lifetime `'b` here | LL | trait Iterable<'b> { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | type Iter<'b, 'a>: Iterator> - | ^^^ + | +++ error[E0261]: use of undeclared lifetime name `'undeclared` --> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:41 @@ -24,11 +24,11 @@ LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; help: consider introducing lifetime `'undeclared` here | LL | trait Iterable<'undeclared> { - | ^^^^^^^^^^^^^ + | +++++++++++++ help: consider introducing lifetime `'undeclared` here | LL | fn iter<'undeclared, 'a>(&'a self) -> Self::Iter<'undeclared>; - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/impl_bounds.stderr b/src/test/ui/generic-associated-types/impl_bounds.stderr index 585ba16a491b7..8cf923ca3ac0c 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.stderr +++ b/src/test/ui/generic-associated-types/impl_bounds.stderr @@ -64,7 +64,7 @@ LL | type C where Self: Clone; help: consider restricting type parameter `T` | LL | impl Foo for Fooy { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/impl_bounds.rs:22:5 @@ -89,7 +89,7 @@ LL | fn d() where Self: Clone; help: consider restricting type parameter `T` | LL | impl Foo for Fooy { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 5 previous errors diff --git a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr index 7ac1ccf0f37f3..c341338390c3d 100644 --- a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr +++ b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr @@ -10,7 +10,7 @@ LL | type Item<'a> = T; help: consider restricting type parameter `T` | LL | impl UnsafeCopy for T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr index 4e609ca5484df..2861aee3aafac 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr @@ -11,7 +11,7 @@ LL | type F<'a> = Self; help: consider restricting type parameter `T` | LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr index 44600bfcf96f7..2eaeffba0893f 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr @@ -11,7 +11,7 @@ LL | type F<'a> = Self; help: consider restricting type parameter `T` | LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr index 2c21795e16199..7c56ded01bf98 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr @@ -11,7 +11,7 @@ LL | type F<'a> = Self; help: consider restricting type parameter `T` | LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr index b2a2636d3eb9b..6662a2b35da75 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr @@ -11,7 +11,7 @@ LL | type F<'a> = Self; help: consider restricting type parameter `T` | LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr index 9d90d6f608f7a..422805a0d0b8c 100644 --- a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr @@ -14,7 +14,7 @@ LL | type Item<'a> = T; help: consider further restricting this bound | LL | impl> UnsafeCopy for T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-70304.stderr b/src/test/ui/generic-associated-types/issue-70304.stderr index fd9e1acc557fa..c53dbf63a3c5b 100644 --- a/src/test/ui/generic-associated-types/issue-70304.stderr +++ b/src/test/ui/generic-associated-types/issue-70304.stderr @@ -8,7 +8,7 @@ LL | fn create_doc() -> impl Document = DocCursorImpl<'_>> { help: consider using the `'static` lifetime | LL | fn create_doc() -> impl Document = DocCursorImpl<'_>> { - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-71176.stderr b/src/test/ui/generic-associated-types/issue-71176.stderr index f0babdaa60bea..08c8d41624e27 100644 --- a/src/test/ui/generic-associated-types/issue-71176.stderr +++ b/src/test/ui/generic-associated-types/issue-71176.stderr @@ -12,7 +12,7 @@ LL | type A<'a>; help: add missing lifetime argument | LL | inner: Box = B>>, - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-74816.stderr b/src/test/ui/generic-associated-types/issue-74816.stderr index 431182e79c4f0..c910261ca52a0 100644 --- a/src/test/ui/generic-associated-types/issue-74816.stderr +++ b/src/test/ui/generic-associated-types/issue-74816.stderr @@ -10,7 +10,7 @@ LL | type Associated: Trait1 = Self; help: consider further restricting `Self` | LL | trait Trait2: Trait1 { - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/issue-74816.rs:9:5 @@ -24,7 +24,7 @@ LL | type Associated: Trait1 = Self; help: consider further restricting `Self` | LL | trait Trait2: Sized { - | ^^^^^^^ + | +++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/issue-74824.stderr b/src/test/ui/generic-associated-types/issue-74824.stderr index 54cb3fba2b587..aef44a164a98c 100644 --- a/src/test/ui/generic-associated-types/issue-74824.stderr +++ b/src/test/ui/generic-associated-types/issue-74824.stderr @@ -20,7 +20,7 @@ LL | type Copy: Copy = Box; help: consider restricting type parameter `T` | LL | type Copy: Copy = Box; - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/issue-76535.stderr b/src/test/ui/generic-associated-types/issue-76535.stderr index 45af30e39651e..246454f0612db 100644 --- a/src/test/ui/generic-associated-types/issue-76535.stderr +++ b/src/test/ui/generic-associated-types/issue-76535.stderr @@ -12,7 +12,7 @@ LL | type SubType<'a>: SubTrait; help: add missing lifetime argument | LL | let sub: Box = SubStruct>> = Box::new(SuperStruct::new(0)); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0038]: the trait `SuperTrait` cannot be made into an object --> $DIR/issue-76535.rs:36:14 diff --git a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr index fedc6a341cad3..8ff6cb569b060 100644 --- a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr +++ b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr @@ -23,7 +23,7 @@ LL | impl A for Box {} help: consider relaxing the implicit `'static` requirement | LL | impl A for Box {} - | ^^^^ + | ++++ error: incompatible lifetime on type --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:5 @@ -77,11 +77,11 @@ LL | impl E for (Box, Box) {} help: consider relaxing the implicit `'static` requirement | LL | impl E for (Box, Box) {} - | ^^^^ + | ++++ help: consider relaxing the implicit `'static` requirement | LL | impl E for (Box, Box) {} - | ^^^^ + | ++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/generic-associated-types/issue-78671.stderr b/src/test/ui/generic-associated-types/issue-78671.stderr index 802621bd18c0b..b92730839568d 100644 --- a/src/test/ui/generic-associated-types/issue-78671.stderr +++ b/src/test/ui/generic-associated-types/issue-78671.stderr @@ -12,7 +12,7 @@ LL | type Member; help: add missing generic argument | LL | Box::new(Family) as &dyn CollectionFamily=usize> - | ^^^^^^^^^ + | ~~~~~~~~~ error[E0038]: the trait `CollectionFamily` cannot be made into an object --> $DIR/issue-78671.rs:7:25 diff --git a/src/test/ui/generic-associated-types/issue-79422.stderr b/src/test/ui/generic-associated-types/issue-79422.stderr index cf0a80bb2c58d..8d8ef6bf83685 100644 --- a/src/test/ui/generic-associated-types/issue-79422.stderr +++ b/src/test/ui/generic-associated-types/issue-79422.stderr @@ -12,7 +12,7 @@ LL | type VRefCont<'a>: RefCont<'a, V>; help: add missing lifetime argument | LL | as Box = dyn RefCont<'_, u8>>>; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0038]: the trait `MapLike` cannot be made into an object --> $DIR/issue-79422.rs:42:12 diff --git a/src/test/ui/generic-associated-types/issue-79636-1.stderr b/src/test/ui/generic-associated-types/issue-79636-1.stderr index e6f9a0c754681..1ecb862827fd7 100644 --- a/src/test/ui/generic-associated-types/issue-79636-1.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-1.stderr @@ -12,7 +12,7 @@ LL | type Wrapped; help: add missing generic argument | LL | MInner: Monad = MOuter::Wrapped>, - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-79636-2.stderr b/src/test/ui/generic-associated-types/issue-79636-2.stderr index 9a240c6545824..ae61b7b104e87 100644 --- a/src/test/ui/generic-associated-types/issue-79636-2.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-2.stderr @@ -12,7 +12,7 @@ LL | type Wrapped: SomeTrait; help: add missing generic argument | LL | W: SomeTrait = W>, - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-80433.stderr b/src/test/ui/generic-associated-types/issue-80433.stderr index 26c879193b66b..d8c210dcf7e98 100644 --- a/src/test/ui/generic-associated-types/issue-80433.stderr +++ b/src/test/ui/generic-associated-types/issue-80433.stderr @@ -12,7 +12,7 @@ LL | type Output<'a>; help: add missing lifetime argument | LL | fn test_simpler<'a>(dst: &'a mut impl TestMut = &'a mut f32>) - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr index 850b434e9bfdc..86c99c32fc1ab 100644 --- a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr +++ b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr @@ -12,7 +12,7 @@ LL | type DType: D; help: add missing generic argument | LL | type CType: C = Self>; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-81862.stderr b/src/test/ui/generic-associated-types/issue-81862.stderr index 1ba21ccd79679..024f8ad89f757 100644 --- a/src/test/ui/generic-associated-types/issue-81862.stderr +++ b/src/test/ui/generic-associated-types/issue-81862.stderr @@ -12,7 +12,7 @@ LL | type Item<'a>; help: add missing lifetime argument | LL | fn next(&mut self) -> Option>; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/missing-bounds.stderr b/src/test/ui/generic-associated-types/missing-bounds.stderr index 4d4f7e55873b9..4d33fe84829e0 100644 --- a/src/test/ui/generic-associated-types/missing-bounds.stderr +++ b/src/test/ui/generic-associated-types/missing-bounds.stderr @@ -12,7 +12,7 @@ LL | A(self.0 + rhs.0) help: consider further restricting this bound | LL | impl Add for A where B: Add + Add { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0308]: mismatched types --> $DIR/missing-bounds.rs:21:14 @@ -28,7 +28,7 @@ LL | Self(self.0 + rhs.0) help: consider further restricting this bound | LL | impl> Add for C { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0369]: cannot add `B` to `B` --> $DIR/missing-bounds.rs:31:21 @@ -41,7 +41,7 @@ LL | Self(self.0 + rhs.0) help: consider restricting type parameter `B` | LL | impl> Add for D { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr index 95b048d36c2de..7cf3f4b737e0e 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr +++ b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr @@ -12,7 +12,7 @@ LL | type Y<'a, 'b>; help: add missing lifetime arguments | LL | fn foo<'c, 'd>(_arg: Box = (&'c u32, &'d u32)>>) {} - | ^^^^^^^^^ + | ~~~~~~~~~ error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied --> $DIR/missing_lifetime_args.rs:16:26 @@ -30,7 +30,7 @@ LL | struct Foo<'a, 'b, 'c> { help: add missing lifetime argument | LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {} - | ^^^^ + | ++++ error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing_lifetime_args.rs:19:16 @@ -48,7 +48,7 @@ LL | struct Foo<'a, 'b, 'c> { help: add missing lifetime arguments | LL | fn f<'a>(_arg: Foo<'a, 'b, 'c>) {} - | ^^^^^^^^ + | ++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/generic-associated-types/missing_lifetime_const.stderr b/src/test/ui/generic-associated-types/missing_lifetime_const.stderr index 02d3cd2e8d5f9..5d50637bd0131 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_const.stderr +++ b/src/test/ui/generic-associated-types/missing_lifetime_const.stderr @@ -12,7 +12,7 @@ LL | type Assoc<'a, const N: usize>; help: add missing lifetime argument | LL | let _: ::Assoc<'a, 3>; - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr b/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr index db469597f9a63..53d76fd220122 100644 --- a/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr +++ b/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr @@ -26,7 +26,7 @@ LL | type E<'a, T>; help: add missing generic argument | LL | type FErr1 = Self::E<'static, 'static, T>; - | ^^^ + | +++ error[E0107]: this associated type takes 1 generic argument but 2 generic arguments were supplied --> $DIR/parameter_number_and_kind.rs:15:27 diff --git a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr index c2908150429e3..3ace774a041c7 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr @@ -7,7 +7,7 @@ LL | fn f1<'a>(arg : Box>) {} help: expressions must be enclosed in braces to be used as const generic arguments | LL | fn f1<'a>(arg : Box<{ dyn X< : 32 } >>) {} - | ^ ^ + | + + error: expected parameter name, found `>` --> $DIR/trait-path-missing-gen_arg.rs:8:36 diff --git a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr index 59b53c70388ac..46ddcb6351877 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr @@ -12,7 +12,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn f2<'a>(arg : Box = &'a ()>>) {} - | ^^^ + | +++ error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/trait-path-type-error-once-implemented.rs:8:29 diff --git a/src/test/ui/generics/generic-extern-lifetime.stderr b/src/test/ui/generics/generic-extern-lifetime.stderr index 3c9ed7a9dec08..909848604ec8a 100644 --- a/src/test/ui/generics/generic-extern-lifetime.stderr +++ b/src/test/ui/generics/generic-extern-lifetime.stderr @@ -14,7 +14,7 @@ LL | pub fn life4<'b>(x: for<'c> fn(&'a i32)); help: consider making the type lifetime-generic with a new `'a` lifetime | LL | pub fn life4<'b>(x: for<'c, 'a> fn(&'a i32)); - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/generic-extern-lifetime.rs:11:39 @@ -26,7 +26,7 @@ LL | pub fn life7<'b>() -> for<'c> fn(&'a i32); help: consider making the type lifetime-generic with a new `'a` lifetime | LL | pub fn life7<'b>() -> for<'c, 'a> fn(&'a i32); - | ^^^^ + | ++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr b/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr index 2c7ffde7ddb97..cdbb57902e4a7 100644 --- a/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr @@ -14,7 +14,7 @@ LL | struct Foo( help: add missing generic argument | LL | Foo::::new(); - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr index 7c0836375e38e..e45a0d9ca7737 100644 --- a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr @@ -12,7 +12,7 @@ LL | struct Vec( help: add missing generic argument | LL | let _: Vec; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr b/src/test/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr index ce853d4d36ddd..270d6b8e18e22 100644 --- a/src/test/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr +++ b/src/test/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr @@ -13,7 +13,7 @@ LL | fn bar<'b, L: X<&'b Nested>>(){} help: consider using the `'b` lifetime | LL | fn bar<'b, L: X<'b, &'b Nested>>(){} - | ^^^ + | +++ error[E0106]: missing lifetime specifier --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:9:21 @@ -31,7 +31,7 @@ LL | fn foo<'b, L: X<&'b Nested>>(); help: consider using one of the available lifetimes here | LL | fn foo<'b, L: X<'lifetime, &'b Nested>>(); - | ^^^^^^^^^^ + | ++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/generics/wrong-number-of-args.stderr b/src/test/ui/generics/wrong-number-of-args.stderr index 4e921db8c25a4..98e5cd6bab893 100644 --- a/src/test/ui/generics/wrong-number-of-args.stderr +++ b/src/test/ui/generics/wrong-number-of-args.stderr @@ -82,7 +82,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type A = Ty; - | ^^^^^^^^ + | ~~~~~~~~ error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:30:14 @@ -100,7 +100,7 @@ LL | struct Ty; help: add missing generic argument | LL | type B = Ty; - | ^^^ + | +++ error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:36:14 @@ -130,7 +130,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type E = Ty; - | ^^^^ + | ++++ error[E0107]: missing generics for struct `lifetime_and_type::Ty` --> $DIR/wrong-number-of-args.rs:48:14 @@ -146,7 +146,7 @@ LL | struct Ty<'a, T>; help: add missing generic argument | LL | type A = Ty; - | ^^^^^ + | ~~~~~ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:48:14 @@ -157,7 +157,7 @@ LL | type A = Ty; help: consider introducing a named lifetime parameter | LL | type A<'a> = Ty<'a>; - | ^^^^ ^^^^^^ + | ++++ ~~~~~~ error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:54:14 @@ -173,7 +173,7 @@ LL | struct Ty<'a, T>; help: add missing generic argument | LL | type B = Ty<'static, T>; - | ^^^ + | +++ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:58:17 @@ -184,7 +184,7 @@ LL | type C = Ty; help: consider introducing a named lifetime parameter | LL | type C<'a> = Ty<'a, usize>; - | ^^^^ ^^^ + | ++++ +++ error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:64:14 @@ -200,7 +200,7 @@ LL | struct Ty<'a, T>; help: add missing generic argument | LL | type E = Ty; - | ^ + | + error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:64:16 @@ -211,7 +211,7 @@ LL | type E = Ty<>; help: consider introducing a named lifetime parameter | LL | type E<'a> = Ty<'a>; - | ^^^^ ^^ + | ++++ ++ error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:70:14 @@ -255,7 +255,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type A = Ty; - | ^^^^^^^^ + | ~~~~~~~~ error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:84:14 @@ -273,7 +273,7 @@ LL | struct Ty; help: add missing generic argument | LL | type B = Ty; - | ^^^ + | +++ error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:92:14 @@ -303,7 +303,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type F = Ty; - | ^^^^ + | ++++ error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:116:22 @@ -328,7 +328,7 @@ LL | type B = Box; help: consider introducing a named lifetime parameter | LL | type B<'a> = Box>; - | ^^^^ ^^^^^^^^^^^^^^^^^^^ + | ++++ ~~~~~~~~~~~~~~~~~~~ error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:124:22 @@ -358,7 +358,7 @@ LL | trait GenericType { help: add missing generic argument | LL | type D = Box>; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:132:22 @@ -383,7 +383,7 @@ LL | type F = Box>; help: consider introducing a named lifetime parameter | LL | type F<'a> = Box>; - | ^^^^ ^^ + | ++++ ++ error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:140:22 @@ -399,7 +399,7 @@ LL | trait GenericType { help: add missing generic argument | LL | type G = Box>; - | ^ + | + error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:151:26 @@ -424,7 +424,7 @@ LL | type A = Box>; help: consider introducing a named lifetime parameter | LL | type A<'a> = Box>; - | ^^^^ ^^^ + | ++++ +++ error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:165:26 @@ -449,7 +449,7 @@ LL | type C = Box>; help: consider introducing a named lifetime parameter | LL | type C<'a> = Box>; - | ^^^^ ^^^ + | ++++ +++ error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:169:26 @@ -479,7 +479,7 @@ LL | trait GenericTypeAT { help: add missing generic argument | LL | type A = Box>; - | ^^ + | ++ error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:185:26 @@ -523,7 +523,7 @@ LL | trait GenericTypeAT { help: add missing generic argument | LL | type C = Box>; - | ^^^ + | +++ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:201:48 @@ -534,7 +534,7 @@ LL | type A = Box>; help: consider introducing a named lifetime parameter | LL | type A<'a> = Box>; - | ^^^^ ^^^ + | ++++ +++ error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:201:26 @@ -550,7 +550,7 @@ LL | trait GenericLifetimeTypeAT<'a, A> { help: add missing generic argument | LL | type A = Box>; - | ^^ + | ++ error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:207:26 @@ -566,7 +566,7 @@ LL | trait GenericLifetimeTypeAT<'a, A> { help: add missing generic argument | LL | type B = Box>; - | ^^^ + | +++ error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:211:26 @@ -596,7 +596,7 @@ LL | trait GenericLifetimeTypeAT<'a, A> { help: add missing generic argument | LL | type C = Box>; - | ^^^ + | +++ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:217:48 @@ -607,7 +607,7 @@ LL | type D = Box>; help: consider introducing a named lifetime parameter | LL | type D<'a> = Box>; - | ^^^^ ^^^ + | ++++ +++ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:221:48 @@ -618,7 +618,7 @@ LL | type E = Box>; help: consider introducing a named lifetime parameter | LL | type E<'a> = Box>; - | ^^^^ ^^^ + | ++++ +++ error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:221:26 @@ -704,7 +704,7 @@ LL | trait GenericTypeTypeAT { help: add missing generic arguments | LL | type A = Box>; - | ^^^^^ + | +++++ error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:251:26 @@ -722,7 +722,7 @@ LL | trait GenericTypeTypeAT { help: add missing generic argument | LL | type B = Box>; - | ^^^ + | +++ error[E0107]: this trait takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:255:26 @@ -747,7 +747,7 @@ LL | type A = Box>; help: consider introducing a named lifetime parameter | LL | type A<'a> = Box>; - | ^^^^ ^^^^^^^ + | ++++ +++++++ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:269:26 @@ -765,7 +765,7 @@ LL | trait GenericLifetimeLifetimeAT<'a, 'b> { help: add missing lifetime argument | LL | type B = Box>; - | ^^^^ + | ++++ error[E0106]: missing lifetime specifiers --> $DIR/wrong-number-of-args.rs:279:56 @@ -776,7 +776,7 @@ LL | type A = Box>; help: consider introducing a named lifetime parameter | LL | type A<'a> = Box>; - | ^^^^ ^^^^^^^ + | ++++ +++++++ error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:279:26 @@ -792,7 +792,7 @@ LL | trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> { help: add missing generic argument | LL | type A = Box>; - | ^^ + | ++ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:285:26 @@ -810,7 +810,7 @@ LL | trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> { help: add missing lifetime argument | LL | type B = Box>; - | ^^^^ + | ++++ error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:285:26 @@ -826,7 +826,7 @@ LL | trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> { help: add missing generic argument | LL | type B = Box>; - | ^^^ + | +++ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:291:26 @@ -844,7 +844,7 @@ LL | trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> { help: add missing lifetime argument | LL | type C = Box>; - | ^^^^ + | ++++ error[E0107]: missing generics for struct `HashMap` --> $DIR/wrong-number-of-args.rs:301:18 @@ -860,7 +860,7 @@ LL | pub struct HashMap { help: add missing generic arguments | LL | type A = HashMap; - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:305:18 @@ -878,7 +878,7 @@ LL | pub struct HashMap { help: add missing generic argument | LL | type B = HashMap; - | ^^^ + | +++ error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:309:18 @@ -908,7 +908,7 @@ LL | pub struct HashMap { help: add missing generic arguments | LL | type C = HashMap<'static, K, V>; - | ^^^^^^ + | ++++++ error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:315:18 @@ -938,7 +938,7 @@ LL | pub struct HashMap { help: add missing generic arguments | LL | type E = HashMap; - | ^^^^ + | ++++ error[E0107]: missing generics for enum `Result` --> $DIR/wrong-number-of-args.rs:325:18 @@ -954,7 +954,7 @@ LL | pub enum Result { help: add missing generic arguments | LL | type A = Result; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:329:18 @@ -972,7 +972,7 @@ LL | pub enum Result { help: add missing generic argument | LL | type B = Result; - | ^^^ + | +++ error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:333:18 @@ -1002,7 +1002,7 @@ LL | pub enum Result { help: add missing generic arguments | LL | type C = Result<'static, T, E>; - | ^^^^^^ + | ++++++ error[E0107]: this enum takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:339:18 @@ -1032,7 +1032,7 @@ LL | pub enum Result { help: add missing generic arguments | LL | type E = Result; - | ^^^^ + | ++++ error: aborting due to 71 previous errors diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr index 87a13889298df..55eca0345139e 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr @@ -12,7 +12,7 @@ LL | want_bar_for_any_ccx(b); help: consider further restricting this bound | LL | where B : Qux + for<'ccx> Bar<'ccx> - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr index 0123faa36dbcd..d7758ad960985 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr @@ -12,7 +12,7 @@ LL | where F : for<'tcx> Foo<'tcx> help: consider further restricting this bound | LL | where F : Foo<'x> + for<'tcx> Foo<'tcx> - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26 @@ -28,7 +28,7 @@ LL | where B : for<'ccx> Bar<'ccx> help: consider further restricting this bound | LL | where B : Bar<'x> + for<'ccx> Bar<'ccx> - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/hygiene/expansion-info-reset.stderr b/src/test/ui/hygiene/expansion-info-reset.stderr index 216f7a24a1e3a..64d27e0648700 100644 --- a/src/test/ui/hygiene/expansion-info-reset.stderr +++ b/src/test/ui/hygiene/expansion-info-reset.stderr @@ -7,7 +7,7 @@ LL | format_args!({ #[derive(Clone)] struct S; }); help: you might be missing a string literal to format with | LL | format_args!("{}", { #[derive(Clone)] struct S; }); - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/hygiene/rustc-macro-transparency.stderr b/src/test/ui/hygiene/rustc-macro-transparency.stderr index 94256b2eb79ab..ef650b75b5634 100644 --- a/src/test/ui/hygiene/rustc-macro-transparency.stderr +++ b/src/test/ui/hygiene/rustc-macro-transparency.stderr @@ -13,7 +13,7 @@ LL | semitransparent; help: use `!` to invoke the macro | LL | semitransparent!; - | ^ + | + error[E0423]: expected value, found macro `opaque` --> $DIR/rustc-macro-transparency.rs:30:5 @@ -24,7 +24,7 @@ LL | opaque; help: use `!` to invoke the macro | LL | opaque!; - | ^ + | + error: aborting due to 3 previous errors diff --git a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr index 211a3286cc355..b752cde228d52 100644 --- a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr +++ b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr @@ -7,7 +7,7 @@ LL | type Output = &i32; help: consider introducing a named lifetime parameter | LL | type Output<'a> = &'a i32; - | ^^^^ ^^^ + | ++++ ~~~ error[E0106]: missing lifetime specifier --> $DIR/assoc-type.rs:16:20 @@ -18,7 +18,7 @@ LL | type Output = &'_ i32; help: consider introducing a named lifetime parameter | LL | type Output<'a> = &'a i32; - | ^^^^ ^^ + | ++++ ~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr index 611543a19260b..bf04a8c987393 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.stderr +++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr @@ -9,7 +9,7 @@ LL | fn foo_fail() -> impl FooLike { help: consider constraining the associated type `::Assoc` to `()` | LL | fn foo_fail>() -> impl FooLike { - | ^^^^^^^^^^^^ + | ++++++++++++ error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope --> $DIR/bound-normalization-fail.rs:41:41 @@ -28,7 +28,7 @@ LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike { help: consider constraining the associated type `>::Assoc` to `()` | LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike { - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/impl-trait/does-not-live-long-enough.stderr b/src/test/ui/impl-trait/does-not-live-long-enough.stderr index 73fd5e8ded3b6..f4bd0fde3b6cb 100644 --- a/src/test/ui/impl-trait/does-not-live-long-enough.stderr +++ b/src/test/ui/impl-trait/does-not-live-long-enough.stderr @@ -14,7 +14,7 @@ LL | fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator Trait { Struct } help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait` | LL | fn bap() -> impl Trait { Struct } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0746]: return type cannot have an unboxed trait object --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13 @@ -62,7 +62,7 @@ LL | fn ban() -> dyn Trait { Struct } help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait` | LL | fn ban() -> impl Trait { Struct } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0746]: return type cannot have an unboxed trait object --> $DIR/dyn-trait-return-should-be-impl-trait.rs:17:13 @@ -73,15 +73,15 @@ LL | fn bak() -> dyn Trait { unimplemented!() } help: use some type `T` that is `T: Sized` as the return type if all return paths have the same type | LL | fn bak() -> T { unimplemented!() } - | ^ + | ~ help: use `impl Trait` as the return type if all return paths have the same type but you want to expose only the trait in the signature | LL | fn bak() -> impl Trait { unimplemented!() } - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: use a boxed trait object if all return paths implement trait `Trait` | LL | fn bak() -> Box { unimplemented!() } - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0746]: return type cannot have an unboxed trait object --> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13 @@ -95,11 +95,11 @@ LL | fn bal() -> dyn Trait { = note: you can create a new `enum` with a variant for each returned type help: return a boxed trait object instead | -LL | fn bal() -> Box { +LL ~ fn bal() -> Box { LL | if true { -LL | return Box::new(Struct); +LL ~ return Box::new(Struct); LL | } -LL | Box::new(42) +LL ~ Box::new(42) | error[E0308]: `if` and `else` have incompatible types @@ -126,11 +126,11 @@ LL | fn bax() -> dyn Trait { = note: you can create a new `enum` with a variant for each returned type help: return a boxed trait object instead | -LL | fn bax() -> Box { +LL ~ fn bax() -> Box { LL | if true { -LL | Box::new(Struct) +LL ~ Box::new(Struct) LL | } else { -LL | Box::new(42) +LL ~ Box::new(42) | error[E0308]: mismatched types @@ -148,7 +148,7 @@ LL | return Struct; help: store this in the heap by calling `Box::new` | LL | return Box::new(Struct); - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:36:5 @@ -165,7 +165,7 @@ LL | 42 help: store this in the heap by calling `Box::new` | LL | Box::new(42) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:40:16 @@ -182,7 +182,7 @@ LL | return 0; help: store this in the heap by calling `Box::new` | LL | return Box::new(0); - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:42:5 @@ -199,7 +199,7 @@ LL | 42 help: store this in the heap by calling `Box::new` | LL | Box::new(42) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:46:9 @@ -216,7 +216,7 @@ LL | Struct help: store this in the heap by calling `Box::new` | LL | Box::new(Struct) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:48:9 @@ -233,7 +233,7 @@ LL | 42 help: store this in the heap by calling `Box::new` | LL | Box::new(42) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:53:9 @@ -250,7 +250,7 @@ LL | 0 help: store this in the heap by calling `Box::new` | LL | Box::new(0) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9 @@ -267,7 +267,7 @@ LL | 42 help: store this in the heap by calling `Box::new` | LL | Box::new(42) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0746]: return type cannot have an unboxed trait object --> $DIR/dyn-trait-return-should-be-impl-trait.rs:60:13 @@ -279,7 +279,7 @@ LL | fn bat() -> dyn Trait { help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait` | LL | fn bat() -> impl Trait { - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0746]: return type cannot have an unboxed trait object --> $DIR/dyn-trait-return-should-be-impl-trait.rs:66:13 @@ -291,7 +291,7 @@ LL | fn bay() -> dyn Trait { help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait` | LL | fn bay() -> impl Trait { - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to 20 previous errors diff --git a/src/test/ui/impl-trait/equality2.stderr b/src/test/ui/impl-trait/equality2.stderr index 3318866c52cf9..46053c6e7c119 100644 --- a/src/test/ui/impl-trait/equality2.stderr +++ b/src/test/ui/impl-trait/equality2.stderr @@ -38,7 +38,7 @@ LL | let _: i32 = Leak::leak(hide(0_i32)); help: consider constraining the associated type `::T` to `i32` | LL | fn hide(x: T) -> impl Foo { - | ^^^^^^^^^ + | +++++++++ error[E0308]: mismatched types --> $DIR/equality2.rs:38:10 diff --git a/src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr b/src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr index 233b47445db02..b6701b68fd6c1 100644 --- a/src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr +++ b/src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr @@ -14,7 +14,7 @@ LL | fn f(_: impl AsRef, _: impl AsRef) {} help: add missing generic argument | LL | f::<[u8], U>("a", b"a"); - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.stderr b/src/test/ui/impl-trait/impl-generic-mismatch.stderr index 6af91480e3a6e..d1a04af070637 100644 --- a/src/test/ui/impl-trait/impl-generic-mismatch.stderr +++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr @@ -9,8 +9,9 @@ LL | fn foo(&self, _: &U) { } | help: try removing the generic parameter and using `impl Trait` instead | -LL | fn foo(&self, _: &impl Debug) { } - | -- ^^^^^^^^^^ +LL - fn foo(&self, _: &U) { } +LL + fn foo(&self, _: &impl Debug) { } + | error[E0643]: method `bar` has incompatible signature for trait --> $DIR/impl-generic-mismatch.rs:17:23 @@ -24,7 +25,7 @@ LL | fn bar(&self, _: &impl Debug) { } help: try changing the `impl Trait` argument to a generic parameter | LL | fn bar(&self, _: &U) { } - | ^^^^^^^^^^ ^ + | ++++++++++ ~ error[E0643]: method `hash` has incompatible signature for trait --> $DIR/impl-generic-mismatch.rs:28:33 diff --git a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr new file mode 100644 index 0000000000000..50eab7dcc9789 --- /dev/null +++ b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr @@ -0,0 +1,57 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/issue-55872-1.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0276]: impl has stricter requirements than trait + --> $DIR/issue-55872-1.rs:17:5 + | +LL | fn foo() -> Self::E; + | ----------------------- definition of `foo` from trait +... +LL | fn foo() -> Self::E { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` + +error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` + --> $DIR/issue-55872-1.rs:13:14 + | +LL | type E = impl Copy; + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` + | + = note: required because it appears within the type `(S, T)` +help: consider further restricting this bound + | +LL | impl Bar for S { + | +++++++++++++++++++ + +error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` + --> $DIR/issue-55872-1.rs:13:14 + | +LL | type E = impl Copy; + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` + | + = note: required because it appears within the type `(S, T)` +help: consider further restricting this bound + | +LL | fn foo() -> Self::E { + | +++++++++++++++++++ + +error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-55872-1.rs:17:37 + | +LL | fn foo() -> Self::E { + | _____________________________________^ +LL | | +LL | | +LL | | (S::default(), T::default()) +LL | | } + | |_____^ + +error: aborting due to 4 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0276, E0277. +For more information about an error, try `rustc --explain E0276`. diff --git a/src/test/ui/impl-trait/issue-55872-1.stderr b/src/test/ui/impl-trait/issue-55872-1.stderr index 56f5bff939fb7..e772445a56c9a 100644 --- a/src/test/ui/impl-trait/issue-55872-1.stderr +++ b/src/test/ui/impl-trait/issue-55872-1.stderr @@ -17,7 +17,7 @@ LL | fn foo() -> Self::E { help: consider further restricting this bound | LL | impl Bar for S { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` --> $DIR/issue-55872-1.rs:12:29 @@ -29,7 +29,7 @@ LL | fn foo() -> Self::E { help: consider further restricting this bound | LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias --> $DIR/issue-55872-1.rs:12:37 diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr index e9d6208773454..3b75939ff02c5 100644 --- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr +++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr @@ -9,7 +9,7 @@ LL | fn elided(x: &i32) -> impl Copy { x } help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound | LL | fn elided(x: &i32) -> impl Copy + '_ { x } - | ^^^^ + | ++++ error: lifetime may not live long enough --> $DIR/must_outlive_least_region_or_bound.rs:5:32 @@ -23,7 +23,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound | LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x } - | ^^^^ + | ++++ error: lifetime may not live long enough --> $DIR/must_outlive_least_region_or_bound.rs:7:46 diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr index b040889217e47..81ba89b0e05f7 100644 --- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr +++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr @@ -14,7 +14,7 @@ LL | fn elided(x: &i32) -> impl Copy { x } help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided(x: &i32) -> impl Copy + '_ { x } - | ^^^^ + | ++++ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:5:44 @@ -32,7 +32,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'a` lifetime bound | LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x } - | ^^^^ + | ++++ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:7:46 @@ -50,11 +50,11 @@ LL | fn elided2(x: &i32) -> impl Copy + 'static { x } help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x` | LL | fn elided2(x: &i32) -> impl Copy + '_ { x } - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn elided2(x: &'static i32) -> impl Copy + 'static { x } - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:9:55 @@ -72,11 +72,11 @@ LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x } help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x` | LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'a { x } - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn explicit2<'a>(x: &'static i32) -> impl Copy + 'static { x } - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/must_outlive_least_region_or_bound.rs:11:24 @@ -95,11 +95,11 @@ LL | fn elided5(x: &i32) -> (Box, impl Debug) { (Box::new(x), x) } help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided5(x: &i32) -> (Box, impl Debug) { (Box::new(x), x) } - | ^^^^ + | ++++ help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided5(x: &i32) -> (Box, impl Debug + '_) { (Box::new(x), x) } - | ^^^^ + | ++++ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:22:69 @@ -115,11 +115,11 @@ LL | fn elided5(x: &i32) -> (Box, impl Debug) { (Box::new(x), x) } help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided5(x: &i32) -> (Box, impl Debug) { (Box::new(x), x) } - | ^^^^ + | ++++ help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided5(x: &i32) -> (Box, impl Debug + '_) { (Box::new(x), x) } - | ^^^^ + | ++++ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:28:69 @@ -135,11 +135,11 @@ LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x } help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x` | LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'a { x } - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn with_bound<'a>(x: &'static i32) -> impl LifetimeTrait<'a> + 'static { x } - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0623]: lifetime mismatch --> $DIR/must_outlive_least_region_or_bound.rs:32:61 @@ -169,7 +169,7 @@ LL | fn elided3(x: &i32) -> Box { Box::new(x) } help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound | LL | fn elided3(x: &i32) -> Box { Box::new(x) } - | ^^^^ + | ++++ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:16:59 @@ -182,7 +182,7 @@ LL | fn explicit3<'a>(x: &'a i32) -> Box { Box::new(x) } help: to declare that the trait object captures data from argument `x`, you can add an explicit `'a` lifetime bound | LL | fn explicit3<'a>(x: &'a i32) -> Box { Box::new(x) } - | ^^^^ + | ++++ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:18:60 @@ -195,11 +195,11 @@ LL | fn elided4(x: &i32) -> Box { Box::new(x) } help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x` | LL | fn elided4(x: &i32) -> Box { Box::new(x) } - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn elided4(x: &'static i32) -> Box { Box::new(x) } - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/must_outlive_least_region_or_bound.rs:20:69 @@ -210,11 +210,11 @@ LL | fn explicit4<'a>(x: &'a i32) -> Box { Box::new(x) } help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x` | LL | fn explicit4<'a>(x: &'a i32) -> Box { Box::new(x) } - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn explicit4<'a>(x: &'static i32) -> Box { Box::new(x) } - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to 14 previous errors diff --git a/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr b/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr index 2f3726bdb33a8..365ecd9fcfa1d 100644 --- a/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr +++ b/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr @@ -14,11 +14,11 @@ LL | fn foo() -> Self; help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self) -> Self; - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() -> Self where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0038]: the trait `NotObjectSafe` cannot be made into an object --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:28:13 @@ -36,11 +36,11 @@ LL | fn foo() -> Self; help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self) -> Self; - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() -> Self where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr b/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr index 66043267f91cd..357166d112377 100644 --- a/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr +++ b/src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr @@ -35,12 +35,12 @@ LL | B help: you could change the return type to be a boxed trait object | LL | fn cat() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | return Box::new(A); +LL ~ return Box::new(A); LL | } -LL | Box::new(B) +LL ~ Box::new(B) | error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr b/src/test/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr index eb4dc45c8a932..970abad5c72e9 100644 --- a/src/test/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr +++ b/src/test/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr @@ -17,12 +17,12 @@ LL | 1u32 help: you could change the return type to be a boxed trait object | LL | fn foo() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | return Box::new(0i32); +LL ~ return Box::new(0i32); LL | } -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error[E0308]: mismatched types @@ -44,12 +44,12 @@ LL | return 1u32; help: you could change the return type to be a boxed trait object | LL | fn bar() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | return Box::new(0i32); +LL ~ return Box::new(0i32); LL | } else { -LL | return Box::new(1u32); +LL ~ return Box::new(1u32); | error[E0308]: mismatched types @@ -71,12 +71,12 @@ LL | 1u32 help: you could change the return type to be a boxed trait object | LL | fn baz() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | return Box::new(0i32); +LL ~ return Box::new(0i32); LL | } else { -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error[E0308]: `if` and `else` have incompatible types @@ -94,12 +94,12 @@ LL | | } help: you could change the return type to be a boxed trait object | LL | fn qux() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | Box::new(0i32) +LL ~ Box::new(0i32) LL | } else { -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error[E0308]: mismatched types @@ -120,11 +120,11 @@ LL | _ => 1u32, help: you could change the return type to be a boxed trait object | LL | fn bat() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | 0 => return Box::new(0i32), -LL | _ => Box::new(1u32), +LL ~ 0 => return Box::new(0i32), +LL ~ _ => Box::new(1u32), | error[E0308]: mismatched types @@ -147,14 +147,14 @@ LL | | } help: you could change the return type to be a boxed trait object | LL | fn can() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | Box::new(match 13 { -LL | 0 => return Box::new(0i32), +LL ~ Box::new(match 13 { +LL ~ 0 => return Box::new(0i32), LL | 1 => 1u32, LL | _ => 2u32, -LL | }) +LL ~ }) | error[E0308]: mismatched types @@ -176,13 +176,13 @@ LL | 1u32 help: you could change the return type to be a boxed trait object | LL | fn cat() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | return Box::new(0i32); +LL ~ return Box::new(0i32); LL | } LL | _ => { -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error[E0308]: `match` arms have incompatible types @@ -200,11 +200,11 @@ LL | | } help: you could change the return type to be a boxed trait object | LL | fn dog() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | 0 => Box::new(0i32), -LL | 1 => Box::new(1u32), +LL ~ 0 => Box::new(0i32), +LL ~ 1 => Box::new(1u32), | error[E0308]: `if` and `else` have incompatible types @@ -222,12 +222,12 @@ LL | | } help: you could change the return type to be a boxed trait object | LL | fn apt() -> Box { - | ^^^^^^^ ^ + | ~~~~~~~ + help: if you change the return type to expect trait objects, box the returned expressions | -LL | Box::new(0i32) +LL ~ Box::new(0i32) LL | } else { -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error[E0746]: return type cannot have an unboxed trait object @@ -242,10 +242,10 @@ LL | fn hat() -> dyn std::fmt::Display { = note: you can create a new `enum` with a variant for each returned type help: return a boxed trait object instead | -LL | fn hat() -> Box { +LL ~ fn hat() -> Box { LL | match 13 { LL | 0 => { -LL | return Box::new(0i32); +LL ~ return Box::new(0i32); LL | } LL | _ => { ... @@ -274,11 +274,11 @@ LL | fn pug() -> dyn std::fmt::Display { = note: you can create a new `enum` with a variant for each returned type help: return a boxed trait object instead | -LL | fn pug() -> Box { +LL ~ fn pug() -> Box { LL | match 13 { -LL | 0 => Box::new(0i32), -LL | 1 => Box::new(1u32), -LL | _ => Box::new(2u32), +LL ~ 0 => Box::new(0i32), +LL ~ 1 => Box::new(1u32), +LL ~ _ => Box::new(2u32), | error[E0308]: `if` and `else` have incompatible types @@ -305,11 +305,11 @@ LL | fn man() -> dyn std::fmt::Display { = note: you can create a new `enum` with a variant for each returned type help: return a boxed trait object instead | -LL | fn man() -> Box { +LL ~ fn man() -> Box { LL | if false { -LL | Box::new(0i32) +LL ~ Box::new(0i32) LL | } else { -LL | Box::new(1u32) +LL ~ Box::new(1u32) | error: aborting due to 14 previous errors diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr index 6c5264671a912..05a9ed1d4e15d 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr @@ -9,7 +9,7 @@ LL | fn iter_values_anon(&self) -> impl Iterator { help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound | LL | fn iter_values_anon(&self) -> impl Iterator + '_ { - | ^^^^ + | ++++ error: lifetime may not live long enough --> $DIR/static-return-lifetime-infered.rs:9:37 @@ -23,7 +23,7 @@ LL | fn iter_values<'a>(&'a self) -> impl Iterator { help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound | LL | fn iter_values<'a>(&'a self) -> impl Iterator + 'a { - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr index 7c289b388223a..ebd0b6a128180 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr @@ -16,7 +16,7 @@ LL | fn iter_values_anon(&self) -> impl Iterator { help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | fn iter_values_anon(&self) -> impl Iterator + '_ { - | ^^^^ + | ++++ error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/static-return-lifetime-infered.rs:10:16 @@ -36,7 +36,7 @@ LL | fn iter_values<'a>(&'a self) -> impl Iterator { help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'a` lifetime bound | LL | fn iter_values<'a>(&'a self) -> impl Iterator + 'a { - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/implicit-method-bind.stderr b/src/test/ui/implicit-method-bind.stderr index c6af47805ea5b..e0a968527205f 100644 --- a/src/test/ui/implicit-method-bind.stderr +++ b/src/test/ui/implicit-method-bind.stderr @@ -7,7 +7,7 @@ LL | let _f = 10i32.abs; help: use parentheses to call the method | LL | let _f = 10i32.abs(); - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/imports/double-import.stderr b/src/test/ui/imports/double-import.stderr index 7a4e8e5d3b926..82f5eb83e6f2d 100644 --- a/src/test/ui/imports/double-import.stderr +++ b/src/test/ui/imports/double-import.stderr @@ -10,7 +10,7 @@ LL | use sub2::foo; help: you can use `as` to change the binding name of the import | LL | use sub2::foo as other_foo; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/glob-resolve1.stderr b/src/test/ui/imports/glob-resolve1.stderr index 7629cede7a45f..2c7a8ad5c1adb 100644 --- a/src/test/ui/imports/glob-resolve1.stderr +++ b/src/test/ui/imports/glob-resolve1.stderr @@ -36,7 +36,7 @@ LL | | } help: you might have meant to use the following enum variant | LL | B::B1; - | ^^^^^ + | ~~~~~ error[E0425]: cannot find value `C` in this scope --> $DIR/glob-resolve1.rs:29:5 @@ -72,7 +72,7 @@ LL | foo::(); help: an enum with a similar name exists | LL | foo::(); - | ^ + | ~ help: consider importing this enum | LL | use bar::A; @@ -90,7 +90,7 @@ LL | foo::(); help: an enum with a similar name exists | LL | foo::(); - | ^ + | ~ help: consider importing this struct | LL | use bar::C; @@ -108,7 +108,7 @@ LL | foo::(); help: an enum with a similar name exists | LL | foo::(); - | ^ + | ~ help: consider importing this type alias | LL | use bar::D; diff --git a/src/test/ui/imports/issue-19498.stderr b/src/test/ui/imports/issue-19498.stderr index cc1d649d61093..9d26022098fdd 100644 --- a/src/test/ui/imports/issue-19498.stderr +++ b/src/test/ui/imports/issue-19498.stderr @@ -11,7 +11,7 @@ LL | mod A {} help: you can use `as` to change the binding name of the import | LL | use self::A as OtherA; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0255]: the name `B` is defined multiple times --> $DIR/issue-19498.rs:5:1 @@ -26,7 +26,7 @@ LL | pub mod B {} help: you can use `as` to change the binding name of the import | LL | use self::B as OtherB; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0255]: the name `D` is defined multiple times --> $DIR/issue-19498.rs:9:5 @@ -40,7 +40,7 @@ LL | mod D {} help: you can use `as` to change the binding name of the import | LL | use C::D as OtherD; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/imports/issue-24081.stderr b/src/test/ui/imports/issue-24081.stderr index 647048c7c2012..e5ed6b10a5479 100644 --- a/src/test/ui/imports/issue-24081.stderr +++ b/src/test/ui/imports/issue-24081.stderr @@ -11,7 +11,7 @@ LL | type Add = bool; help: you can use `as` to change the binding name of the import | LL | use std::ops::Add as OtherAdd; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Sub` is defined multiple times --> $DIR/issue-24081.rs:9:1 @@ -26,7 +26,7 @@ LL | struct Sub { x: f32 } help: you can use `as` to change the binding name of the import | LL | use std::ops::Sub as OtherSub; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Mul` is defined multiple times --> $DIR/issue-24081.rs:11:1 @@ -41,7 +41,7 @@ LL | enum Mul { A, B } help: you can use `as` to change the binding name of the import | LL | use std::ops::Mul as OtherMul; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Div` is defined multiple times --> $DIR/issue-24081.rs:13:1 @@ -56,7 +56,7 @@ LL | mod Div { } help: you can use `as` to change the binding name of the import | LL | use std::ops::Div as OtherDiv; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Rem` is defined multiple times --> $DIR/issue-24081.rs:15:1 @@ -71,7 +71,7 @@ LL | trait Rem { } help: you can use `as` to change the binding name of the import | LL | use std::ops::Rem as OtherRem; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/imports/issue-25396.stderr b/src/test/ui/imports/issue-25396.stderr index 38dc9ef103519..518d2be784111 100644 --- a/src/test/ui/imports/issue-25396.stderr +++ b/src/test/ui/imports/issue-25396.stderr @@ -10,7 +10,7 @@ LL | use bar::baz; help: you can use `as` to change the binding name of the import | LL | use bar::baz as other_baz; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0252]: the name `Quux` is defined multiple times --> $DIR/issue-25396.rs:7:5 @@ -24,7 +24,7 @@ LL | use bar::Quux; help: you can use `as` to change the binding name of the import | LL | use bar::Quux as OtherQuux; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0252]: the name `blah` is defined multiple times --> $DIR/issue-25396.rs:10:5 @@ -38,7 +38,7 @@ LL | use bar::blah; help: you can use `as` to change the binding name of the import | LL | use bar::blah as other_blah; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0252]: the name `WOMP` is defined multiple times --> $DIR/issue-25396.rs:13:5 @@ -52,7 +52,7 @@ LL | use bar::WOMP; help: you can use `as` to change the binding name of the import | LL | use bar::WOMP as OtherWOMP; - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/imports/issue-32354-suggest-import-rename.stderr b/src/test/ui/imports/issue-32354-suggest-import-rename.stderr index 96684309a008d..4c5875ba77664 100644 --- a/src/test/ui/imports/issue-32354-suggest-import-rename.stderr +++ b/src/test/ui/imports/issue-32354-suggest-import-rename.stderr @@ -10,7 +10,7 @@ LL | use extension2::ConstructorExtension; help: you can use `as` to change the binding name of the import | LL | use extension2::ConstructorExtension as OtherConstructorExtension; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-45829/import-self.stderr b/src/test/ui/imports/issue-45829/import-self.stderr index 158e81cdd9643..3301b7d4ef80e 100644 --- a/src/test/ui/imports/issue-45829/import-self.stderr +++ b/src/test/ui/imports/issue-45829/import-self.stderr @@ -12,12 +12,13 @@ LL | use foo::self; | help: consider importing the module directly | -LL | use foo; - | -- +LL - use foo::self; +LL + use foo; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use foo::{self}; - | ^ ^ + | + + error[E0255]: the name `foo` is defined multiple times --> $DIR/import-self.rs:6:11 @@ -32,7 +33,7 @@ LL | use foo::{self}; help: you can use `as` to change the binding name of the import | LL | use foo::{self as other_foo}; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0255]: the name `foo` is defined multiple times --> $DIR/import-self.rs:12:5 @@ -47,7 +48,7 @@ LL | use foo::self; help: you can use `as` to change the binding name of the import | LL | use foo as other_foo; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0252]: the name `A` is defined multiple times --> $DIR/import-self.rs:16:11 @@ -61,7 +62,7 @@ LL | use foo::{self as A}; help: you can use `as` to change the binding name of the import | LL | use foo::{self as OtherA}; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/imports/issue-45829/issue-45829.stderr b/src/test/ui/imports/issue-45829/issue-45829.stderr index a7ebc7171bc90..e9a9d47ce7cd6 100644 --- a/src/test/ui/imports/issue-45829/issue-45829.stderr +++ b/src/test/ui/imports/issue-45829/issue-45829.stderr @@ -10,7 +10,7 @@ LL | use foo::{A, B as A}; help: you can use `as` to change the binding name of the import | LL | use foo::{A, B as OtherA}; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-45829/rename-use-vs-extern.stderr b/src/test/ui/imports/issue-45829/rename-use-vs-extern.stderr index 6b917d5574762..dfb5810c494c6 100644 --- a/src/test/ui/imports/issue-45829/rename-use-vs-extern.stderr +++ b/src/test/ui/imports/issue-45829/rename-use-vs-extern.stderr @@ -10,7 +10,7 @@ LL | use std as issue_45829_b; help: you can use `as` to change the binding name of the import | LL | use std as other_issue_45829_b; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-45829/rename-use-with-tabs.stderr b/src/test/ui/imports/issue-45829/rename-use-with-tabs.stderr index 3baad6cd72f3e..5a63af5885541 100644 --- a/src/test/ui/imports/issue-45829/rename-use-with-tabs.stderr +++ b/src/test/ui/imports/issue-45829/rename-use-with-tabs.stderr @@ -10,7 +10,7 @@ LL | use foo::{A, bar::B as A}; help: you can use `as` to change the binding name of the import | LL | use foo::{A, bar::B as OtherA}; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-45829/rename-with-path.stderr b/src/test/ui/imports/issue-45829/rename-with-path.stderr index ba83eeaa81338..2d26b08384e10 100644 --- a/src/test/ui/imports/issue-45829/rename-with-path.stderr +++ b/src/test/ui/imports/issue-45829/rename-with-path.stderr @@ -10,7 +10,7 @@ LL | use std::{collections::HashMap as A, sync::Arc as A}; help: you can use `as` to change the binding name of the import | LL | use std::{collections::HashMap as A, sync::Arc as OtherA}; - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-45829/rename.stderr b/src/test/ui/imports/issue-45829/rename.stderr index 8f12d92d6fbe9..ed185ae2a4463 100644 --- a/src/test/ui/imports/issue-45829/rename.stderr +++ b/src/test/ui/imports/issue-45829/rename.stderr @@ -10,7 +10,7 @@ LL | use std as core; help: you can use `as` to change the binding name of the import | LL | use std as other_core; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-52891.stderr b/src/test/ui/imports/issue-52891.stderr index 6e6e42ddc2d09..7bb1301edf264 100644 --- a/src/test/ui/imports/issue-52891.stderr +++ b/src/test/ui/imports/issue-52891.stderr @@ -98,7 +98,7 @@ LL | use issue_52891::b::inner; help: you can use `as` to change the binding name of the import | LL | use issue_52891::b::inner as other_inner; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0254]: the name `issue_52891` is defined multiple times --> $DIR/issue-52891.rs:31:19 diff --git a/src/test/ui/imports/issue-59764.stderr b/src/test/ui/imports/issue-59764.stderr index f266e908ecc3f..c2cfc0939d6b3 100644 --- a/src/test/ui/imports/issue-59764.stderr +++ b/src/test/ui/imports/issue-59764.stderr @@ -7,8 +7,9 @@ LL | use issue_59764::foo::{baz, makro}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{baz}}; - | ^^^^^^^^^ --^^ +LL - use issue_59764::foo::{baz, makro}; +LL + use issue_59764::{makro, foo::{baz}}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:21:9 @@ -19,10 +20,10 @@ LL | makro, = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{ +LL ~ use issue_59764::{makro, foo::{ LL | baz, -LL | -LL | }}; +LL ~ +LL ~ }}; | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -34,10 +35,10 @@ LL | makro = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{ +LL ~ use issue_59764::{makro, foo::{ LL | baz, -LL | -LL | }}; +LL ~ +LL ~ }}; | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -49,8 +50,9 @@ LL | use issue_59764::foo::{baz, makro, foobar}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{baz, foobar}}; - | ^^^^^^^^^ -- ^^ +LL - use issue_59764::foo::{baz, makro, foobar}; +LL + use issue_59764::{makro, foo::{baz, foobar}}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:40:9 @@ -61,11 +63,11 @@ LL | makro, = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{ +LL ~ use issue_59764::{makro, foo::{ LL | baz, -LL | +LL ~ LL | foobar, -LL | }}; +LL ~ }}; | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -77,11 +79,11 @@ LL | makro, = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foo::{ +LL ~ use issue_59764::{makro, foo::{ LL | baz, -LL | +LL ~ LL | foobar -LL | }}; +LL ~ }}; | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -93,8 +95,9 @@ LL | use issue_59764::{foobaz, foo::makro}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foobaz}; - | ^^^^^^^ -- +LL - use issue_59764::{foobaz, foo::makro}; +LL + use issue_59764::{makro, foobaz}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:59:42 @@ -105,8 +108,9 @@ LL | use issue_59764::{foobaz, foo::{baz, makro}}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foobaz, foo::{baz}}; - | ^^^^^^^ -- +LL - use issue_59764::{foobaz, foo::{baz, makro}}; +LL + use issue_59764::{makro, foobaz, foo::{baz}}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:68:13 @@ -117,11 +121,11 @@ LL | makro, = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, +LL ~ use issue_59764::{makro, LL | foobaz, LL | foo::{ LL | baz, -LL | +LL ~ | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -133,11 +137,11 @@ LL | makro = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, +LL ~ use issue_59764::{makro, LL | foobaz, LL | foo::{ LL | baz, -LL | +LL ~ | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -149,8 +153,9 @@ LL | use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}}; - | ^^^^^^^ -- +LL - use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}}; +LL + use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:93:13 @@ -161,11 +166,11 @@ LL | makro, = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro, +LL ~ use issue_59764::{makro, LL | foobaz, LL | foo::{ LL | baz, -LL | +LL ~ | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -178,7 +183,7 @@ LL | use issue_59764::foo::makro as baz; help: a macro with this name exists at the root of the crate | LL | use issue_59764::makro as baz; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:107:33 @@ -189,8 +194,9 @@ LL | use issue_59764::foo::{baz, makro as foobar}; = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | use issue_59764::{makro as foobar, foo::{baz}}; - | ^^^^^^^^^^^^^^^^^^^ --^^ +LL - use issue_59764::foo::{baz, makro as foobar}; +LL + use issue_59764::{makro as foobar, foo::{baz}}; + | error[E0432]: unresolved import `issue_59764::foo::makro` --> $DIR/issue-59764.rs:120:17 @@ -201,12 +207,12 @@ LL | makro as foobar} = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined help: a macro with this name exists at the root of the crate | -LL | issue_59764::{makro as foobar, +LL ~ issue_59764::{makro as foobar, LL | LL | foobaz, LL | LL | -LL | foo::{baz} +LL ~ foo::{baz} | error[E0432]: unresolved import `issue_59764::foo::makro` @@ -219,7 +225,7 @@ LL | use issue_59764::foo::makro; help: a macro with this name exists at the root of the crate | LL | use issue_59764::makro; - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: cannot determine resolution for the macro `makro` --> $DIR/issue-59764.rs:130:1 diff --git a/src/test/ui/imports/issue-8640.stderr b/src/test/ui/imports/issue-8640.stderr index 4ce639454640a..ab44f067fe744 100644 --- a/src/test/ui/imports/issue-8640.stderr +++ b/src/test/ui/imports/issue-8640.stderr @@ -10,7 +10,7 @@ LL | mod bar {} help: you can use `as` to change the binding name of the import | LL | use baz::bar as other_bar; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr b/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr index f2a4150632d2f..20369a543b3ae 100644 --- a/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr +++ b/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr @@ -7,7 +7,7 @@ LL | struct Heartbreak(Betrayal); help: consider introducing a named lifetime parameter | LL | struct Heartbreak<'a>(Betrayal<'a>); - | ^^^^ ^^^^^^^^^^^^ + | ++++ ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr index a43b49041ec2a..5f0de61e69d29 100644 --- a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr +++ b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr @@ -16,11 +16,11 @@ LL | let y: fn(&'test u32) = foo2; help: consider introducing lifetime `'test` here | LL | fn bar<'test>() { - | ^^^^^^^ + | +++++++ help: consider making the type lifetime-generic with a new `'test` lifetime | LL | let y: for<'test> fn(&'test u32) = foo2; - | ^^^^^^^^^^ + | ++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr index 3152dec30a0e6..1bcb89de2bad4 100644 --- a/src/test/ui/indexing-requires-a-uint.stderr +++ b/src/test/ui/indexing-requires-a-uint.stderr @@ -16,7 +16,7 @@ LL | bar::(i); // i should not be re-coerced back to an isize help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | bar::(i.try_into().unwrap()); // i should not be re-coerced back to an isize - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/inference/cannot-infer-closure.stderr b/src/test/ui/inference/cannot-infer-closure.stderr index e055d1a94ffe9..f8026fafeb2c4 100644 --- a/src/test/ui/inference/cannot-infer-closure.stderr +++ b/src/test/ui/inference/cannot-infer-closure.stderr @@ -7,7 +7,7 @@ LL | Ok(b) help: give this closure an explicit return type without `_` placeholders | LL | let x = |a: (), b: ()| -> Result<(), _> { - | ^^^^^^^^^^^^^^^^ + | ++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/inference/cannot-infer-partial-try-return.stderr b/src/test/ui/inference/cannot-infer-partial-try-return.stderr index c394f6efbda9b..3542eb6848caf 100644 --- a/src/test/ui/inference/cannot-infer-partial-try-return.stderr +++ b/src/test/ui/inference/cannot-infer-partial-try-return.stderr @@ -7,7 +7,7 @@ LL | infallible()?; help: give this closure an explicit return type without `_` placeholders | LL | let x = || -> Result<(), QualifiedError<_>> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/inference/inference_unstable_featured.stderr b/src/test/ui/inference/inference_unstable_featured.stderr index 0dd4baf80db60..4ddede29c8555 100644 --- a/src/test/ui/inference/inference_unstable_featured.stderr +++ b/src/test/ui/inference/inference_unstable_featured.stderr @@ -9,11 +9,11 @@ LL | assert_eq!('x'.ipu_flatten(), 0); help: disambiguate the associated function for candidate #1 | LL | assert_eq!(IpuIterator::ipu_flatten(&'x'), 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | assert_eq!(IpuItertools::ipu_flatten(&'x'), 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/infinite/infinite-autoderef.stderr b/src/test/ui/infinite/infinite-autoderef.stderr index 957ab2a754882..cbefbf83be0a2 100644 --- a/src/test/ui/infinite/infinite-autoderef.stderr +++ b/src/test/ui/infinite/infinite-autoderef.stderr @@ -7,7 +7,7 @@ LL | x = box x; help: try using a conversion method | LL | x = (box x).to_string(); - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error[E0055]: reached the recursion limit while auto-dereferencing `Foo` --> $DIR/infinite-autoderef.rs:25:5 diff --git a/src/test/ui/infinite/infinite-struct.stderr b/src/test/ui/infinite/infinite-struct.stderr index d180670e38fda..7ffb51061b7dd 100644 --- a/src/test/ui/infinite/infinite-struct.stderr +++ b/src/test/ui/infinite/infinite-struct.stderr @@ -10,7 +10,7 @@ LL | struct Take(Take); help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Take` representable | LL | struct Take(Box); - | ^^^^ ^ + | ++++ + error[E0391]: cycle detected when computing drop-check constraints for `Take` --> $DIR/infinite-struct.rs:1:1 diff --git a/src/test/ui/infinite/infinite-tag-type-recursion.stderr b/src/test/ui/infinite/infinite-tag-type-recursion.stderr index 45322ea96721d..1f147e070b4d1 100644 --- a/src/test/ui/infinite/infinite-tag-type-recursion.stderr +++ b/src/test/ui/infinite/infinite-tag-type-recursion.stderr @@ -9,7 +9,7 @@ LL | enum MList { Cons(isize, MList), Nil } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `MList` representable | LL | enum MList { Cons(isize, Box), Nil } - | ^^^^ ^ + | ++++ + error[E0391]: cycle detected when computing drop-check constraints for `MList` --> $DIR/infinite-tag-type-recursion.rs:1:1 diff --git a/src/test/ui/integer-literal-suffix-inference.stderr b/src/test/ui/integer-literal-suffix-inference.stderr index bfb47515823a3..c9cfbc506be46 100644 --- a/src/test/ui/integer-literal-suffix-inference.stderr +++ b/src/test/ui/integer-literal-suffix-inference.stderr @@ -7,7 +7,7 @@ LL | id_i8(a16); help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(a16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:41:11 @@ -18,7 +18,7 @@ LL | id_i8(a32); help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(a32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:44:11 @@ -29,7 +29,7 @@ LL | id_i8(a64); help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(a64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:47:11 @@ -40,7 +40,7 @@ LL | id_i8(asize); help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(asize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:51:12 @@ -60,7 +60,7 @@ LL | id_i16(a32); help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit | LL | id_i16(a32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:58:12 @@ -71,7 +71,7 @@ LL | id_i16(a64); help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit | LL | id_i16(a64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:61:12 @@ -82,7 +82,7 @@ LL | id_i16(asize); help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit | LL | id_i16(asize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:65:12 @@ -111,7 +111,7 @@ LL | id_i32(a64); help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit | LL | id_i32(a64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:75:12 @@ -122,7 +122,7 @@ LL | id_i32(asize); help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit | LL | id_i32(asize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:79:12 @@ -160,7 +160,7 @@ LL | id_i64(asize); help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit | LL | id_i64(asize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:93:14 @@ -189,7 +189,7 @@ LL | id_isize(a32); help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | LL | id_isize(a32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:102:14 @@ -200,7 +200,7 @@ LL | id_isize(a64); help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit | LL | id_isize(a64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:108:11 @@ -211,7 +211,7 @@ LL | id_i8(c16); help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(c16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:111:11 @@ -222,7 +222,7 @@ LL | id_i8(c32); help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(c32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:114:11 @@ -233,7 +233,7 @@ LL | id_i8(c64); help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit | LL | id_i8(c64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:118:12 @@ -253,7 +253,7 @@ LL | id_i16(c32); help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit | LL | id_i16(c32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:125:12 @@ -264,7 +264,7 @@ LL | id_i16(c64); help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit | LL | id_i16(c64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:129:12 @@ -293,7 +293,7 @@ LL | id_i32(c64); help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit | LL | id_i32(c64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:140:12 @@ -331,7 +331,7 @@ LL | id_u8(b16); help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit | LL | id_u8(b16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:155:11 @@ -342,7 +342,7 @@ LL | id_u8(b32); help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit | LL | id_u8(b32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:158:11 @@ -353,7 +353,7 @@ LL | id_u8(b64); help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit | LL | id_u8(b64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:161:11 @@ -364,7 +364,7 @@ LL | id_u8(bsize); help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit | LL | id_u8(bsize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:165:12 @@ -384,7 +384,7 @@ LL | id_u16(b32); help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | LL | id_u16(b32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:172:12 @@ -395,7 +395,7 @@ LL | id_u16(b64); help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit | LL | id_u16(b64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:175:12 @@ -406,7 +406,7 @@ LL | id_u16(bsize); help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit | LL | id_u16(bsize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:179:12 @@ -435,7 +435,7 @@ LL | id_u32(b64); help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit | LL | id_u32(b64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:189:12 @@ -446,7 +446,7 @@ LL | id_u32(bsize); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | id_u32(bsize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:193:12 @@ -484,7 +484,7 @@ LL | id_u64(bsize); help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | id_u64(bsize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:207:14 @@ -513,7 +513,7 @@ LL | id_usize(b32); help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit | LL | id_usize(b32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:216:14 @@ -524,7 +524,7 @@ LL | id_usize(b64); help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit | LL | id_usize(b64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 52 previous errors diff --git a/src/test/ui/issues/issue-10412.stderr b/src/test/ui/issues/issue-10412.stderr index 9d181eab7fbcd..ee5b81391e97c 100644 --- a/src/test/ui/issues/issue-10412.stderr +++ b/src/test/ui/issues/issue-10412.stderr @@ -61,7 +61,7 @@ LL | impl<'self> Serializable for &'self str { help: consider relaxing the implicit `Sized` restriction | LL | trait Serializable<'self, T: ?Sized> { - | ^^^^^^^^ + | ++++++++ error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-13359.stderr b/src/test/ui/issues/issue-13359.stderr index 115b471e96b46..0796ede52a9ee 100644 --- a/src/test/ui/issues/issue-13359.stderr +++ b/src/test/ui/issues/issue-13359.stderr @@ -7,7 +7,7 @@ LL | foo(1*(1 as isize)); help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit | LL | foo((1*(1 as isize)).try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-13359.rs:10:9 @@ -18,7 +18,7 @@ LL | bar(1*(1 as usize)); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | bar((1*(1 as usize)).try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13497.stderr b/src/test/ui/issues/issue-13497.stderr index a231f73d06729..6521a67428eb2 100644 --- a/src/test/ui/issues/issue-13497.stderr +++ b/src/test/ui/issues/issue-13497.stderr @@ -8,7 +8,7 @@ LL | &str help: consider using the `'static` lifetime | LL | &'static str - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1362.stderr b/src/test/ui/issues/issue-1362.stderr index 6fc2b99a11a4d..a925fc29c8cf0 100644 --- a/src/test/ui/issues/issue-1362.stderr +++ b/src/test/ui/issues/issue-1362.stderr @@ -9,7 +9,7 @@ LL | let x: u32 = 20i32; help: change the type of the numeric literal from `i32` to `u32` | LL | let x: u32 = 20u32; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13853-2.stderr b/src/test/ui/issues/issue-13853-2.stderr index 667ddbca97c1a..92068df6c0570 100644 --- a/src/test/ui/issues/issue-13853-2.stderr +++ b/src/test/ui/issues/issue-13853-2.stderr @@ -7,7 +7,7 @@ LL | fn foo(res : Box) { res.get } help: use parentheses to call the method | LL | fn foo(res : Box) { res.get() } - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14092.stderr b/src/test/ui/issues/issue-14092.stderr index 1aa278b450f9f..7928b3fba2785 100644 --- a/src/test/ui/issues/issue-14092.stderr +++ b/src/test/ui/issues/issue-14092.stderr @@ -14,7 +14,7 @@ LL | T: ?Sized, help: add missing generic argument | LL | fn fn1(0: Box) {} - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1448-2.stderr b/src/test/ui/issues/issue-1448-2.stderr index 9cf2f09e17747..6bf76c4904dcb 100644 --- a/src/test/ui/issues/issue-1448-2.stderr +++ b/src/test/ui/issues/issue-1448-2.stderr @@ -7,7 +7,7 @@ LL | println!("{}", foo(10i32)); help: change the type of the numeric literal from `i32` to `u32` | LL | println!("{}", foo(10u32)); - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16922.stderr b/src/test/ui/issues/issue-16922.stderr index 6decc751321f9..8b09b7d59079f 100644 --- a/src/test/ui/issues/issue-16922.stderr +++ b/src/test/ui/issues/issue-16922.stderr @@ -9,7 +9,7 @@ LL | Box::new(value) as Box help: to declare that the trait object captures data from argument `value`, you can add an explicit `'_` lifetime bound | LL | fn foo(value: &T) -> Box { - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-1.stderr b/src/test/ui/issues/issue-17431-1.stderr index 58d087ca1998b..4d739a3823b10 100644 --- a/src/test/ui/issues/issue-17431-1.stderr +++ b/src/test/ui/issues/issue-17431-1.stderr @@ -9,7 +9,7 @@ LL | struct Foo { foo: Option> } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | struct Foo { foo: Box>> } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-2.stderr b/src/test/ui/issues/issue-17431-2.stderr index eba4bf6d1d5ea..e53134c5238c6 100644 --- a/src/test/ui/issues/issue-17431-2.stderr +++ b/src/test/ui/issues/issue-17431-2.stderr @@ -9,7 +9,7 @@ LL | struct Baz { q: Option } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Baz` representable | LL | struct Baz { q: Box> } - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-2.rs:4:1 @@ -22,7 +22,7 @@ LL | struct Foo { q: Option } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | struct Foo { q: Box> } - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17431-3.stderr b/src/test/ui/issues/issue-17431-3.stderr index f6b15d0528ae8..0dde6f382c34a 100644 --- a/src/test/ui/issues/issue-17431-3.stderr +++ b/src/test/ui/issues/issue-17431-3.stderr @@ -9,7 +9,7 @@ LL | struct Foo { foo: Mutex> } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | struct Foo { foo: Box>> } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-4.stderr b/src/test/ui/issues/issue-17431-4.stderr index aa709e1ad5183..f5aeeec733711 100644 --- a/src/test/ui/issues/issue-17431-4.stderr +++ b/src/test/ui/issues/issue-17431-4.stderr @@ -9,7 +9,7 @@ LL | struct Foo { foo: Option>>, marker: marker::PhantomData help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | struct Foo { foo: Box>>>, marker: marker::PhantomData } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-5.stderr b/src/test/ui/issues/issue-17431-5.stderr index 1558cffb036b3..a379598c2657c 100644 --- a/src/test/ui/issues/issue-17431-5.stderr +++ b/src/test/ui/issues/issue-17431-5.stderr @@ -9,7 +9,7 @@ LL | struct Bar { x: Bar , marker: marker::PhantomData } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable | LL | struct Bar { x: Box> , marker: marker::PhantomData } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-6.stderr b/src/test/ui/issues/issue-17431-6.stderr index f2aa2a79c8200..fcac420b23845 100644 --- a/src/test/ui/issues/issue-17431-6.stderr +++ b/src/test/ui/issues/issue-17431-6.stderr @@ -9,7 +9,7 @@ LL | enum Foo { X(Mutex>) } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | enum Foo { X(Box>>) } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-7.stderr b/src/test/ui/issues/issue-17431-7.stderr index 684c3089e85ec..aeaadaa69175e 100644 --- a/src/test/ui/issues/issue-17431-7.stderr +++ b/src/test/ui/issues/issue-17431-7.stderr @@ -9,7 +9,7 @@ LL | enum Foo { Voo(Option>) } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | enum Foo { Voo(Box>>) } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17546.stderr b/src/test/ui/issues/issue-17546.stderr index 42953bd8d2c2e..16678c8c8a902 100644 --- a/src/test/ui/issues/issue-17546.stderr +++ b/src/test/ui/issues/issue-17546.stderr @@ -12,11 +12,11 @@ LL | pub enum Result { help: try using the variant's enum | LL | fn new() -> foo::MyEnum { - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: an enum with a similar name exists | LL | fn new() -> Result { - | ^^^^^^ + | ~~~~~~ error[E0573]: expected type, found variant `Result` --> $DIR/issue-17546.rs:24:17 @@ -66,11 +66,11 @@ LL | pub enum Result { help: try using the variant's enum | LL | fn newer() -> foo::MyEnum { - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: an enum with a similar name exists | LL | fn newer() -> Result { - | ^^^^^^ + | ~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-17800.stderr b/src/test/ui/issues/issue-17800.stderr index 7df86d7326bc6..baab675834fca 100644 --- a/src/test/ui/issues/issue-17800.stderr +++ b/src/test/ui/issues/issue-17800.stderr @@ -7,7 +7,7 @@ LL | MyOption::MySome { x: 42 } => (), help: use the tuple variant pattern syntax instead | LL | MyOption::MySome(42) => (), - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18446.stderr b/src/test/ui/issues/issue-18446.stderr index 33cf76d777bb6..939cf0292534c 100644 --- a/src/test/ui/issues/issue-18446.stderr +++ b/src/test/ui/issues/issue-18446.stderr @@ -17,7 +17,7 @@ LL | fn foo(&self); help: disambiguate the associated function for candidate #2 | LL | T::foo(&x); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-19380.stderr b/src/test/ui/issues/issue-19380.stderr index 4400b6179c6f8..b2aeb5edf29e2 100644 --- a/src/test/ui/issues/issue-19380.stderr +++ b/src/test/ui/issues/issue-19380.stderr @@ -14,11 +14,11 @@ LL | fn qiz(); help: consider turning `qiz` into a method by giving it a `&self` argument | LL | fn qiz(&self); - | ^^^^^ + | +++++ help: alternatively, consider constraining `qiz` so it does not apply to trait objects | LL | fn qiz() where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-19707.stderr b/src/test/ui/issues/issue-19707.stderr index 337f2f971ede0..c3e5fcdd63b55 100644 --- a/src/test/ui/issues/issue-19707.stderr +++ b/src/test/ui/issues/issue-19707.stderr @@ -9,11 +9,11 @@ LL | type Foo = fn(&u8, &u8) -> &u8; help: consider making the type lifetime-generic with a new `'a` lifetime | LL | type Foo = for<'a> fn(&'a u8, &'a u8) -> &'a u8; - | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^ + | +++++++ ~~~~~~ ~~~~~~ ~~~ help: consider introducing a named lifetime parameter | LL | type Foo<'a> = fn(&'a u8, &'a u8) -> &'a u8; - | ^^^^ ^^^^^^ ^^^^^^ ^^^ + | ++++ ~~~~~~ ~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:5:27 @@ -26,11 +26,11 @@ LL | fn bar &u8>(f: &F) {} help: consider making the bound lifetime-generic with a new `'a` lifetime | LL | fn bar Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {} - | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^ + | +++++++ ~~~~~~ ~~~~~~ ~~~ help: consider introducing a named lifetime parameter | LL | fn bar<'a, F: Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {} - | ^^^ ^^^^^^ ^^^^^^ ^^^ + | +++ ~~~~~~ ~~~~~~ ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-21837.stderr b/src/test/ui/issues/issue-21837.stderr index 27e5c606a64a4..4b5768d1291ac 100644 --- a/src/test/ui/issues/issue-21837.stderr +++ b/src/test/ui/issues/issue-21837.stderr @@ -10,7 +10,7 @@ LL | impl Trait2 for Foo {} help: consider restricting type parameter `T` | LL | impl Trait2 for Foo {} - | ^^^^^^^ + | +++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22289.stderr b/src/test/ui/issues/issue-22289.stderr index f90e89efb4a8c..b594e8b7a1eed 100644 --- a/src/test/ui/issues/issue-22289.stderr +++ b/src/test/ui/issues/issue-22289.stderr @@ -7,7 +7,7 @@ LL | 0 as &dyn std::any::Any; help: consider borrowing the value | LL | &0 as &dyn std::any::Any; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22312.stderr b/src/test/ui/issues/issue-22312.stderr index 47ee544c02af7..da15c092fc311 100644 --- a/src/test/ui/issues/issue-22312.stderr +++ b/src/test/ui/issues/issue-22312.stderr @@ -7,7 +7,7 @@ LL | let indexer = &(*self as &dyn Index>::Output>); - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22644.stderr b/src/test/ui/issues/issue-22644.stderr index 99ff9ac0a0d58..6bec98121b759 100644 --- a/src/test/ui/issues/issue-22644.stderr +++ b/src/test/ui/issues/issue-22644.stderr @@ -9,7 +9,7 @@ LL | println!("{}", a as usize < long_name); help: try comparing the cast value | LL | println!("{}", (a as usize) < long_name); - | ^ ^ + | + + error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:9:33 @@ -22,7 +22,7 @@ LL | println!("{}{}", a as usize < long_name, long_name); help: try comparing the cast value | LL | println!("{}{}", (a as usize) < long_name, long_name); - | ^ ^ + | + + error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:11:31 @@ -35,7 +35,7 @@ LL | println!("{}", a as usize < 4); help: try comparing the cast value | LL | println!("{}", (a as usize) < 4); - | ^ ^ + | + + error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:13:31 @@ -48,7 +48,7 @@ LL | println!("{}{}", a: usize < long_name, long_name); help: try comparing the cast value | LL | println!("{}{}", (a: usize) < long_name, long_name); - | ^ ^ + | + + error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:15:29 @@ -61,7 +61,7 @@ LL | println!("{}", a: usize < 4); help: try comparing the cast value | LL | println!("{}", (a: usize) < 4); - | ^ ^ + | + + error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:20:20 @@ -73,9 +73,9 @@ LL | 4); | help: try comparing the cast value | -LL | println!("{}", (a +LL ~ println!("{}", (a LL | as -LL | usize) +LL ~ usize) | error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison @@ -88,7 +88,7 @@ LL | 5); | help: try comparing the cast value | -LL | println!("{}", (a +LL ~ println!("{}", (a LL | LL | LL | as @@ -107,7 +107,7 @@ LL | println!("{}", a as usize << long_name); help: try shifting the cast value | LL | println!("{}", (a as usize) << long_name); - | ^ ^ + | + + error: expected type, found `4` --> $DIR/issue-22644.rs:34:28 diff --git a/src/test/ui/issues/issue-22872.stderr b/src/test/ui/issues/issue-22872.stderr index fd3db9546991c..cd96646d751f2 100644 --- a/src/test/ui/issues/issue-22872.stderr +++ b/src/test/ui/issues/issue-22872.stderr @@ -14,7 +14,7 @@ LL | impl<'b, P> Wrap<'b> for Wrapper

help: consider further restricting the associated type | LL | fn push_process

(process: P) where P: Process<'static>,

>::Item: Iterator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr index 5d7ffeb0deb0e..7a4d90b4412f9 100644 --- a/src/test/ui/issues/issue-23024.stderr +++ b/src/test/ui/issues/issue-23024.stderr @@ -21,7 +21,7 @@ LL | pub trait Fn: FnMut { help: add missing generic argument | LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); - | ^^^^^^^^ + | ~~~~~~~~ error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified --> $DIR/issue-23024.rs:9:39 diff --git a/src/test/ui/issues/issue-26472.stderr b/src/test/ui/issues/issue-26472.stderr index 8e95b2ff68887..d7134bff17618 100644 --- a/src/test/ui/issues/issue-26472.stderr +++ b/src/test/ui/issues/issue-26472.stderr @@ -7,7 +7,7 @@ LL | let v = s.len; help: a method `len` also exists, call it with parentheses | LL | let v = s.len(); - | ^^ + | ++ error[E0616]: field `len` of struct `S` is private --> $DIR/issue-26472.rs:12:7 diff --git a/src/test/ui/issues/issue-26638.stderr b/src/test/ui/issues/issue-26638.stderr index 3df58d66d1f8e..5784ca9d77f0e 100644 --- a/src/test/ui/issues/issue-26638.stderr +++ b/src/test/ui/issues/issue-26638.stderr @@ -8,7 +8,7 @@ LL | fn parse_type(iter: Box+'static>) -> &str { iter.ne help: consider introducing a named lifetime parameter | LL | fn parse_type<'a>(iter: Box+'static>) -> &'a str { iter.next() } - | ^^^^ ^^^ + | ++++ ~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:4:40 @@ -20,7 +20,7 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } help: consider using the `'static` lifetime | LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &'static str { iter() } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:7:22 @@ -32,7 +32,7 @@ LL | fn parse_type_3() -> &str { unimplemented!() } help: consider using the `'static` lifetime | LL | fn parse_type_3() -> &'static str { unimplemented!() } - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-27078.stderr b/src/test/ui/issues/issue-27078.stderr index 021a08696de2c..98cec1bfe9d99 100644 --- a/src/test/ui/issues/issue-27078.stderr +++ b/src/test/ui/issues/issue-27078.stderr @@ -8,11 +8,11 @@ LL | fn foo(self) -> &'static i32 { help: consider further restricting `Self` | LL | fn foo(self) -> &'static i32 where Self: Sized { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(&self) -> &'static i32 { - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2718-a.stderr b/src/test/ui/issues/issue-2718-a.stderr index 5c6c99a1ff252..4aec27f9684f9 100644 --- a/src/test/ui/issues/issue-2718-a.stderr +++ b/src/test/ui/issues/issue-2718-a.stderr @@ -10,7 +10,7 @@ LL | pub struct Pong(SendPacket); help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Pong` representable | LL | pub struct Pong(Box>); - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-29181.stderr b/src/test/ui/issues/issue-29181.stderr index b66dcb88d0062..53addf2fe4d09 100644 --- a/src/test/ui/issues/issue-29181.stderr +++ b/src/test/ui/issues/issue-29181.stderr @@ -13,7 +13,7 @@ LL | let _ = |x: f64| x * 2.0.exp(); help: you must specify a concrete type for this numeric value, like `f32` | LL | let _ = |x: f64| x * 2.0_f32.exp(); - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-2995.stderr b/src/test/ui/issues/issue-2995.stderr index b08fe8c7352a9..455d32e233ab9 100644 --- a/src/test/ui/issues/issue-2995.stderr +++ b/src/test/ui/issues/issue-2995.stderr @@ -7,7 +7,7 @@ LL | let _q: &isize = p as &isize; help: consider borrowing the value | LL | let _q: &isize = &*p as &isize; - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3008-1.stderr b/src/test/ui/issues/issue-3008-1.stderr index 87ee36df21696..e49d8e6aa0d8e 100644 --- a/src/test/ui/issues/issue-3008-1.stderr +++ b/src/test/ui/issues/issue-3008-1.stderr @@ -10,7 +10,7 @@ LL | BarSome(Bar) help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable | LL | BarSome(Box) - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3008-2.stderr b/src/test/ui/issues/issue-3008-2.stderr index 369a19d37e6f6..b3ce6e42096bb 100644 --- a/src/test/ui/issues/issue-3008-2.stderr +++ b/src/test/ui/issues/issue-3008-2.stderr @@ -9,7 +9,7 @@ LL | struct Bar { x: Bar } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable | LL | struct Bar { x: Box } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3008-3.stderr b/src/test/ui/issues/issue-3008-3.stderr index 0b162eff94a7c..c1c043e217b4e 100644 --- a/src/test/ui/issues/issue-3008-3.stderr +++ b/src/test/ui/issues/issue-3008-3.stderr @@ -9,7 +9,7 @@ LL | enum E2 { V2(E2, marker::PhantomData), } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E2` representable | LL | enum E2 { V2(Box>, marker::PhantomData), } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-30255.stderr b/src/test/ui/issues/issue-30255.stderr index ab43d4a3c6002..390aa31487a87 100644 --- a/src/test/ui/issues/issue-30255.stderr +++ b/src/test/ui/issues/issue-30255.stderr @@ -8,7 +8,7 @@ LL | fn f(a: &S, b: i32) -> &i32 { help: consider introducing a named lifetime parameter | LL | fn f<'a>(a: &'a S, b: i32) -> &'a i32 { - | ^^^^ ^^^^^ ^^^ + | ++++ ~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:14:34 @@ -20,7 +20,7 @@ LL | fn g(a: &S, b: bool, c: &i32) -> &i32 { help: consider introducing a named lifetime parameter | LL | fn g<'a>(a: &'a S, b: bool, c: &'a i32) -> &'a i32 { - | ^^^^ ^^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~ ~~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:19:44 @@ -32,7 +32,7 @@ LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { help: consider introducing a named lifetime parameter | LL | fn h<'a>(a: &'a bool, b: bool, c: &'a S, d: &'a i32) -> &'a i32 { - | ^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~~~~ ~~~~~ ~~~~~~~ ~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-32004.stderr b/src/test/ui/issues/issue-32004.stderr index bf125a8942edf..2d2ed5a63015b 100644 --- a/src/test/ui/issues/issue-32004.stderr +++ b/src/test/ui/issues/issue-32004.stderr @@ -12,11 +12,11 @@ LL | Foo::Bar => {} help: use the tuple variant pattern syntax instead | LL | Foo::Bar(_) => {} - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: a unit variant with a similar name exists | LL | Foo::Baz => {} - | ^^^ + | ~~~ error[E0532]: expected tuple struct or tuple variant, found unit struct `S` --> $DIR/issue-32004.rs:16:9 diff --git a/src/test/ui/issues/issue-32122-1.stderr b/src/test/ui/issues/issue-32122-1.stderr index b3362ae44b637..10b0c0967c1e8 100644 --- a/src/test/ui/issues/issue-32122-1.stderr +++ b/src/test/ui/issues/issue-32122-1.stderr @@ -11,7 +11,7 @@ LL | let _: *const u8 = &a; help: consider dereferencing | LL | let _: *const u8 = &*a; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32122-2.stderr b/src/test/ui/issues/issue-32122-2.stderr index bcf71638127e0..5c3dade8e20c5 100644 --- a/src/test/ui/issues/issue-32122-2.stderr +++ b/src/test/ui/issues/issue-32122-2.stderr @@ -11,7 +11,7 @@ LL | let _: *const u8 = &a; help: consider dereferencing | LL | let _: *const u8 = &***a; - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32323.stderr b/src/test/ui/issues/issue-32323.stderr index 369f56b9869a3..8212c607e1126 100644 --- a/src/test/ui/issues/issue-32323.stderr +++ b/src/test/ui/issues/issue-32323.stderr @@ -11,7 +11,7 @@ LL | pub fn f<'a, T: Tr<'a>>() -> >::Out {} help: consider constraining the associated type `>::Out` to `()` | LL | pub fn f<'a, T: Tr<'a, Out = ()>>() -> >::Out {} - | ^^^^^^^^^^ + | ++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32326.stderr b/src/test/ui/issues/issue-32326.stderr index 0f3d3690b732e..cea765850564f 100644 --- a/src/test/ui/issues/issue-32326.stderr +++ b/src/test/ui/issues/issue-32326.stderr @@ -11,7 +11,7 @@ LL | Plus(Expr, Expr), help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Expr` representable | LL | Plus(Box, Box), - | ^^^^ ^ ^^^^ ^ + | ++++ + ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-34721.stderr b/src/test/ui/issues/issue-34721.stderr index b14faff8f7b8d..045819061c1b0 100644 --- a/src/test/ui/issues/issue-34721.stderr +++ b/src/test/ui/issues/issue-34721.stderr @@ -21,7 +21,7 @@ LL | fn zero(self) -> Self; help: consider further restricting this bound | LL | pub fn baz(x: T) -> T { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35075.stderr b/src/test/ui/issues/issue-35075.stderr index 85acbfb8de4be..08bdaa728583d 100644 --- a/src/test/ui/issues/issue-35075.stderr +++ b/src/test/ui/issues/issue-35075.stderr @@ -7,7 +7,7 @@ LL | inner: Foo help: there is an enum variant `Baz::Foo`; try using the variant's enum | LL | inner: Baz - | ^^^ + | ~~~ error[E0412]: cannot find type `Foo` in this scope --> $DIR/issue-35075.rs:6:9 @@ -18,7 +18,7 @@ LL | Foo(Foo) help: there is an enum variant `Baz::Foo`; try using the variant's enum | LL | Foo(Baz) - | ^^^ + | ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-35241.stderr b/src/test/ui/issues/issue-35241.stderr index b6045c993a958..4e89f59afbe42 100644 --- a/src/test/ui/issues/issue-35241.stderr +++ b/src/test/ui/issues/issue-35241.stderr @@ -14,7 +14,7 @@ LL | fn test() -> Foo { Foo } help: use parentheses to instantiate this tuple struct | LL | fn test() -> Foo { Foo(_) } - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35668.stderr b/src/test/ui/issues/issue-35668.stderr index 81a2bb88c89a3..04faea9008a11 100644 --- a/src/test/ui/issues/issue-35668.stderr +++ b/src/test/ui/issues/issue-35668.stderr @@ -9,7 +9,7 @@ LL | a.iter().map(|a| a*a) help: consider restricting type parameter `T` | LL | fn func<'a, T: std::ops::Mul>(a: &'a [T]) -> impl Iterator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35675.stderr b/src/test/ui/issues/issue-35675.stderr index 8637e574c5ecb..4a06196d548e3 100644 --- a/src/test/ui/issues/issue-35675.stderr +++ b/src/test/ui/issues/issue-35675.stderr @@ -7,7 +7,7 @@ LL | fn should_return_fruit() -> Apple { help: there is an enum variant `Fruit::Apple`; try using the variant's enum | LL | fn should_return_fruit() -> Fruit { - | ^^^^^ + | ~~~~~ error[E0425]: cannot find function, tuple struct or tuple variant `Apple` in this scope --> $DIR/issue-35675.rs:9:5 @@ -58,7 +58,7 @@ LL | fn bar() -> Variant3 { help: there is an enum variant `x::Enum::Variant3`; try using the variant's enum | LL | fn bar() -> x::Enum { - | ^^^^^^^ + | ~~~~~~~ error[E0573]: expected type, found variant `Some` --> $DIR/issue-35675.rs:28:13 diff --git a/src/test/ui/issues/issue-35988.stderr b/src/test/ui/issues/issue-35988.stderr index 2e03acc112d6c..55988844c178c 100644 --- a/src/test/ui/issues/issue-35988.stderr +++ b/src/test/ui/issues/issue-35988.stderr @@ -10,11 +10,11 @@ LL | V([Box]), help: borrowed types always have a statically known size | LL | V(&[Box]), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | V(Box<[Box]>), - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3702-2.stderr b/src/test/ui/issues/issue-3702-2.stderr index 6d8d17292f2d1..1fd64ca90aa78 100644 --- a/src/test/ui/issues/issue-3702-2.stderr +++ b/src/test/ui/issues/issue-3702-2.stderr @@ -17,11 +17,11 @@ LL | fn to_int(&self) -> isize { *self } help: disambiguate the associated function for candidate #1 | LL | ToPrimitive::to_int(&self) + other.to_int() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | Add::to_int(&self) + other.to_int() - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3779.stderr b/src/test/ui/issues/issue-3779.stderr index 7b17e91421660..6a21472848a74 100644 --- a/src/test/ui/issues/issue-3779.stderr +++ b/src/test/ui/issues/issue-3779.stderr @@ -10,7 +10,7 @@ LL | element: Option help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `S` representable | LL | element: Box> - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-38954.stderr b/src/test/ui/issues/issue-38954.stderr index f76063fc55872..ab15bb1afa827 100644 --- a/src/test/ui/issues/issue-38954.stderr +++ b/src/test/ui/issues/issue-38954.stderr @@ -9,7 +9,7 @@ LL | fn _test(ref _p: str) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn _test(ref _p: &str) {} - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41229-ref-str.stderr b/src/test/ui/issues/issue-41229-ref-str.stderr index 8b37e5e9774e5..31fdf3b72e7a4 100644 --- a/src/test/ui/issues/issue-41229-ref-str.stderr +++ b/src/test/ui/issues/issue-41229-ref-str.stderr @@ -9,7 +9,7 @@ LL | pub fn example(ref s: str) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | pub fn example(ref s: &str) {} - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41652/issue-41652.stderr b/src/test/ui/issues/issue-41652/issue-41652.stderr index f7107d61ac3e2..1618f0f5a11aa 100644 --- a/src/test/ui/issues/issue-41652/issue-41652.stderr +++ b/src/test/ui/issues/issue-41652/issue-41652.stderr @@ -7,7 +7,7 @@ LL | 3.f() help: you must specify a concrete type for this numeric value, like `i32` | LL | 3_i32.f() - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42312.stderr b/src/test/ui/issues/issue-42312.stderr index f69c2a9925de7..6fe151622433a 100644 --- a/src/test/ui/issues/issue-42312.stderr +++ b/src/test/ui/issues/issue-42312.stderr @@ -9,11 +9,11 @@ LL | fn baz(_: Self::Target) where Self: Deref {} help: consider further restricting the associated type | LL | fn baz(_: Self::Target) where Self: Deref, ::Target: Sized {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn baz(_: &Self::Target) where Self: Deref {} - | ^ + | + error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be known at compilation time --> $DIR/issue-42312.rs:8:10 @@ -26,7 +26,7 @@ LL | pub fn f(_: dyn ToString) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | pub fn f(_: &dyn ToString) {} - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-42954.stderr b/src/test/ui/issues/issue-42954.stderr index 4f41c95323a25..d00fd4aad73a6 100644 --- a/src/test/ui/issues/issue-42954.stderr +++ b/src/test/ui/issues/issue-42954.stderr @@ -13,7 +13,7 @@ LL | is_plainly_printable!(c); help: try comparing the cast value | LL | ($i as u32) < 0 - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43784-supertrait.stderr b/src/test/ui/issues/issue-43784-supertrait.stderr index 45a2350ddfd0e..7fd1fd90ccca5 100644 --- a/src/test/ui/issues/issue-43784-supertrait.stderr +++ b/src/test/ui/issues/issue-43784-supertrait.stderr @@ -10,7 +10,7 @@ LL | impl Complete for T {} help: consider restricting type parameter `T` | LL | impl Complete for T {} - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47377.stderr b/src/test/ui/issues/issue-47377.stderr index 5f785679c5587..a7b8b1ca86167 100644 --- a/src/test/ui/issues/issue-47377.stderr +++ b/src/test/ui/issues/issue-47377.stderr @@ -10,7 +10,7 @@ LL | let _a = b + ", World!"; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _a = b.to_owned() + ", World!"; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47380.stderr b/src/test/ui/issues/issue-47380.stderr index 216e32ddae411..f6222c77e2e25 100644 --- a/src/test/ui/issues/issue-47380.stderr +++ b/src/test/ui/issues/issue-47380.stderr @@ -10,7 +10,7 @@ LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-49257.stderr b/src/test/ui/issues/issue-49257.stderr index b9d96dc79075a..a14a66659b3b3 100644 --- a/src/test/ui/issues/issue-49257.stderr +++ b/src/test/ui/issues/issue-49257.stderr @@ -9,8 +9,9 @@ LL | let Point { .., y, } = p; | help: move the `..` to the end of the field list | -LL | let Point { y, .. } = p; - | -- ^^^^ +LL - let Point { .., y, } = p; +LL + let Point { y, .. } = p; + | error: expected `}`, found `,` --> $DIR/issue-49257.rs:11:19 @@ -23,8 +24,9 @@ LL | let Point { .., y } = p; | help: move the `..` to the end of the field list | -LL | let Point { y , .. } = p; - | -- ^^^^^^ +LL - let Point { .., y } = p; +LL + let Point { y , .. } = p; + | error: expected `}`, found `,` --> $DIR/issue-49257.rs:12:19 diff --git a/src/test/ui/issues/issue-50571.stderr b/src/test/ui/issues/issue-50571.stderr index ed01362758573..f69963bb7af6c 100644 --- a/src/test/ui/issues/issue-50571.stderr +++ b/src/test/ui/issues/issue-50571.stderr @@ -7,7 +7,7 @@ LL | fn foo([a, b]: [i32; 2]) {} help: give this argument a name or use an underscore to ignore it | LL | fn foo(_: [i32; 2]) {} - | ^ + | ~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50687-ice-on-borrow.stderr b/src/test/ui/issues/issue-50687-ice-on-borrow.stderr index a9404c1c46afd..e6a0edac4b111 100644 --- a/src/test/ui/issues/issue-50687-ice-on-borrow.stderr +++ b/src/test/ui/issues/issue-50687-ice-on-borrow.stderr @@ -11,7 +11,7 @@ LL | let _: () = Borrow::borrow(&owned); help: consider dereferencing the borrow | LL | let _: () = *Borrow::borrow(&owned); - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5099.stderr b/src/test/ui/issues/issue-5099.stderr index b39c4a9f272d0..e9b2a9c4d4844 100644 --- a/src/test/ui/issues/issue-5099.stderr +++ b/src/test/ui/issues/issue-5099.stderr @@ -7,11 +7,11 @@ LL | this.a help: you might have meant to use `self` here instead | LL | self.a - | ^^^^ + | ~~~~ help: if you meant to use `self`, you are also missing a `self` receiver argument | LL | fn a(&self) -> A { - | ^^^^^ + | +++++ error[E0425]: cannot find value `this` in this scope --> $DIR/issue-5099.rs:6:9 @@ -22,11 +22,11 @@ LL | this.b(x); help: you might have meant to use `self` here instead | LL | self.b(x); - | ^^^^ + | ~~~~ help: if you meant to use `self`, you are also missing a `self` receiver argument | LL | fn b(&self, x: i32) { - | ^^^^^^ + | ++++++ error[E0425]: cannot find value `this` in this scope --> $DIR/issue-5099.rs:9:20 @@ -37,11 +37,11 @@ LL | let _ = || this.a; help: you might have meant to use `self` here instead | LL | let _ = || self.a; - | ^^^^ + | ~~~~ help: if you meant to use `self`, you are also missing a `self` receiver argument | LL | fn c(&self) { - | ^^^^^ + | +++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr index 554ac7e7c75fc..2c821aa23088d 100644 --- a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr @@ -8,8 +8,9 @@ LL | missing_discourses()? found type `isize` help: try removing this `?` | -LL | missing_discourses() - | -- +LL - missing_discourses()? +LL + missing_discourses() + | help: try using a variant of the expected enum | LL | Ok(missing_discourses()?) diff --git a/src/test/ui/issues/issue-51874.stderr b/src/test/ui/issues/issue-51874.stderr index c7c4843a0fa80..b39159a65390d 100644 --- a/src/test/ui/issues/issue-51874.stderr +++ b/src/test/ui/issues/issue-51874.stderr @@ -7,7 +7,7 @@ LL | let a = (1.0).pow(1.0); help: you must specify a concrete type for this numeric value, like `f32` | LL | let a = (1.0_f32).pow(1.0); - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5239-1.stderr b/src/test/ui/issues/issue-5239-1.stderr index 078a7ef2173bd..b743f0df4b11a 100644 --- a/src/test/ui/issues/issue-5239-1.stderr +++ b/src/test/ui/issues/issue-5239-1.stderr @@ -9,7 +9,7 @@ LL | let x = |ref x: isize| { x += 1; }; help: `+=` can be used on `isize`, you can dereference `x` | LL | let x = |ref x: isize| { *x += 1; }; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-56685.stderr b/src/test/ui/issues/issue-56685.stderr index eccb71095acc7..ccf357d4aa00e 100644 --- a/src/test/ui/issues/issue-56685.stderr +++ b/src/test/ui/issues/issue-56685.stderr @@ -12,7 +12,7 @@ LL | #![deny(unused_variables)] help: if this is intentional, prefix it with an underscore | LL | E::A(_x) | E::B(_x) => {} - | ^^ ^^ + | ~~ ~~ error: unused variable: `x` --> $DIR/issue-56685.rs:25:14 @@ -23,7 +23,7 @@ LL | F::A(x, y) | F::B(x, y) => { y }, help: if this is intentional, prefix it with an underscore | LL | F::A(_x, y) | F::B(_x, y) => { y }, - | ^^ ^^ + | ~~ ~~ error: unused variable: `a` --> $DIR/issue-56685.rs:27:14 @@ -46,7 +46,7 @@ LL | let _ = if let F::A(x, y) | F::B(x, y) = F::A(1, 2) { help: if this is intentional, prefix it with an underscore | LL | let _ = if let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) { - | ^^ ^^ + | ~~ ~~ error: unused variable: `x` --> $DIR/issue-56685.rs:39:20 @@ -57,7 +57,7 @@ LL | while let F::A(x, y) | F::B(x, y) = F::A(1, 2) { help: if this is intentional, prefix it with an underscore | LL | while let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) { - | ^^ ^^ + | ~~ ~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/issues/issue-57271.stderr b/src/test/ui/issues/issue-57271.stderr index b7c799e163cee..8250096656ab2 100644 --- a/src/test/ui/issues/issue-57271.stderr +++ b/src/test/ui/issues/issue-57271.stderr @@ -10,7 +10,7 @@ LL | Array(TypeSignature), help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ObjectType` representable | LL | Array(Box), - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `TypeSignature` has infinite size --> $DIR/issue-57271.rs:19:1 @@ -24,7 +24,7 @@ LL | Object(ObjectType), help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `TypeSignature` representable | LL | Object(Box), - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-5883.stderr b/src/test/ui/issues/issue-5883.stderr index de598a70ee06a..8a20a60853a63 100644 --- a/src/test/ui/issues/issue-5883.stderr +++ b/src/test/ui/issues/issue-5883.stderr @@ -9,7 +9,7 @@ LL | r: dyn A + 'static help: function arguments must have a statically known size, borrowed types always have a known size | LL | r: &dyn A + 'static - | ^ + | + error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time --> $DIR/issue-5883.rs:9:6 diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 46d1f99241187..7789ee342ab44 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -45,11 +45,11 @@ LL | foo > foo; help: you might have forgotten to call this function | LL | foo() > foo; - | ^^^^^ + | ~~~~~ help: you might have forgotten to call this function | LL | foo > foo(); - | ^^^^^ + | ~~~~~ error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` --> $DIR/issue-59488.rs:25:9 diff --git a/src/test/ui/issues/issue-60283.stderr b/src/test/ui/issues/issue-60283.stderr index 9bddc2c41a310..7241128d17aa9 100644 --- a/src/test/ui/issues/issue-60283.stderr +++ b/src/test/ui/issues/issue-60283.stderr @@ -28,7 +28,7 @@ LL | pub fn drop(_x: T) {} help: consider further restricting the associated type | LL | fn main() where <() as Trait<'_>>::Item: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr index de0e78ac20c69..68ccf5cab5b6b 100644 --- a/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr +++ b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr @@ -17,11 +17,11 @@ LL | fn r#struct(&self) { help: disambiguate the associated function for candidate #1 | LL | async::r#struct(&r#fn {}); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | await::r#struct(&r#fn {}); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6738.stderr b/src/test/ui/issues/issue-6738.stderr index a428ff7e91fad..f97d899c2d3f3 100644 --- a/src/test/ui/issues/issue-6738.stderr +++ b/src/test/ui/issues/issue-6738.stderr @@ -9,7 +9,7 @@ LL | self.x += v.x; help: consider restricting type parameter `T` | LL | impl Foo { - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-69130.stderr b/src/test/ui/issues/issue-69130.stderr index a4700a5ed1da0..e67cc295d43e1 100644 --- a/src/test/ui/issues/issue-69130.stderr +++ b/src/test/ui/issues/issue-69130.stderr @@ -12,8 +12,8 @@ LL | M (§& u8)} | help: consider introducing a named lifetime parameter | -LL | enum F<'a> { -LL | M (§&'a u8)} +LL ~ enum F<'a> { +LL ~ M (§&'a u8)} | error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-71676-1.stderr b/src/test/ui/issues/issue-71676-1.stderr index 14913c93bf745..2104634eb9355 100644 --- a/src/test/ui/issues/issue-71676-1.stderr +++ b/src/test/ui/issues/issue-71676-1.stderr @@ -11,7 +11,7 @@ LL | let _: *const u8 = &a; help: consider dereferencing | LL | let _: *const u8 = &***a; - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/issue-71676-1.rs:46:22 @@ -26,7 +26,7 @@ LL | let _: *mut u8 = &a; help: consider dereferencing | LL | let _: *mut u8 = &mut ***a; - | ^^^^^^^ + | +++++++ error[E0308]: mismatched types --> $DIR/issue-71676-1.rs:49:24 @@ -41,7 +41,7 @@ LL | let _: *const u8 = &mut a; help: consider dereferencing | LL | let _: *const u8 = &***a; - | ^^^ + | ~~~ error[E0308]: mismatched types --> $DIR/issue-71676-1.rs:52:22 @@ -56,7 +56,7 @@ LL | let _: *mut u8 = &mut a; help: consider dereferencing | LL | let _: *mut u8 = &mut ***a; - | ^^^ + | +++ error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-71676-2.stderr b/src/test/ui/issues/issue-71676-2.stderr index 0544deda4ae5a..80fb4aed1cd68 100644 --- a/src/test/ui/issues/issue-71676-2.stderr +++ b/src/test/ui/issues/issue-71676-2.stderr @@ -11,7 +11,7 @@ LL | let _: *mut u8 = &a; help: consider dereferencing | LL | let _: *mut u8 = &mut ***a; - | ^^^^^^^ + | +++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-72554.stderr b/src/test/ui/issues/issue-72554.stderr index 9de94c393a711..a6e44be636a43 100644 --- a/src/test/ui/issues/issue-72554.stderr +++ b/src/test/ui/issues/issue-72554.stderr @@ -9,7 +9,7 @@ LL | A(ElemDerived) help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ElemDerived` representable | LL | A(Box) - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-72574-1.stderr b/src/test/ui/issues/issue-72574-1.stderr index 92ebb45e88d4b..653869a237d88 100644 --- a/src/test/ui/issues/issue-72574-1.stderr +++ b/src/test/ui/issues/issue-72574-1.stderr @@ -8,7 +8,7 @@ LL | (_a, _x @ ..) => {} help: if you don't need to use the contents of _x, discard the tuple's remaining fields | LL | (_a, ..) => {} - | ^^ + | ~~ error: `..` patterns are not allowed here --> $DIR/issue-72574-1.rs:4:19 diff --git a/src/test/ui/issues/issue-72574-2.stderr b/src/test/ui/issues/issue-72574-2.stderr index a1e8ec1677db5..928fa58b17556 100644 --- a/src/test/ui/issues/issue-72574-2.stderr +++ b/src/test/ui/issues/issue-72574-2.stderr @@ -8,7 +8,7 @@ LL | Binder(_a, _x @ ..) => {} help: if you don't need to use the contents of _x, discard the tuple's remaining fields | LL | Binder(_a, ..) => {} - | ^^ + | ~~ error: `..` patterns are not allowed here --> $DIR/issue-72574-2.rs:6:25 @@ -30,7 +30,7 @@ LL | Binder(_a, _x @ ..) => {} help: use `_` to explicitly ignore each field | LL | Binder(_a, _x @ .., _) => {} - | ^^^ + | +++ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-73427.stderr b/src/test/ui/issues/issue-73427.stderr index 4b5f65b346174..54df7fccaa5c0 100644 --- a/src/test/ui/issues/issue-73427.stderr +++ b/src/test/ui/issues/issue-73427.stderr @@ -18,17 +18,17 @@ LL | | } help: you might have meant to use one of the following enum variants | LL | (A::Struct {}).foo(); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ LL | (A::Tuple()).foo(); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ LL | A::Unit.foo(); - | ^^^^^^^ + | ~~~~~~~ help: the following enum variants are available | LL | (A::StructWithFields { /* fields */ }).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LL | (A::TupleWithFields(/* fields */)).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected value, found enum `B` --> $DIR/issue-73427.rs:31:5 @@ -47,9 +47,9 @@ LL | | } help: the following enum variants are available | LL | (B::StructWithFields { /* fields */ }).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LL | (B::TupleWithFields(/* fields */)).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected value, found enum `C` --> $DIR/issue-73427.rs:33:5 @@ -69,13 +69,13 @@ LL | | } help: you might have meant to use the following enum variant | LL | C::Unit.foo(); - | ^^^^^^^ + | ~~~~~~~ help: the following enum variants are available | LL | (C::StructWithFields { /* fields */ }).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LL | (C::TupleWithFields(/* fields */)).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected value, found enum `D` --> $DIR/issue-73427.rs:35:5 @@ -94,11 +94,11 @@ LL | | } help: you might have meant to use the following enum variant | LL | D::Unit.foo(); - | ^^^^^^^ + | ~~~~~~~ help: the following enum variant is available | LL | (D::TupleWithFields(/* fields */)).foo(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected function, tuple struct or tuple variant, found enum `A` --> $DIR/issue-73427.rs:40:13 @@ -121,9 +121,9 @@ LL | | } help: try to construct one of the enum's variants | LL | let x = A::TupleWithFields(3); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ LL | let x = A::Tuple(3); - | ^^^^^^^^ + | ~~~~~~~~ error[E0532]: expected tuple struct or tuple variant, found enum `A` --> $DIR/issue-73427.rs:42:12 @@ -146,9 +146,9 @@ LL | | } help: try to match against one of the enum's variants | LL | if let A::TupleWithFields(3) = x { } - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ LL | if let A::Tuple(3) = x { } - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/issues/issue-76077-1.stderr b/src/test/ui/issues/issue-76077-1.stderr index 4557595529fa2..8e77662b4ba3f 100644 --- a/src/test/ui/issues/issue-76077-1.stderr +++ b/src/test/ui/issues/issue-76077-1.stderr @@ -7,7 +7,7 @@ LL | let foo::Foo {} = foo::Foo::default(); help: ignore the inaccessible and unused fields | LL | let foo::Foo { .. } = foo::Foo::default(); - | ^^^^^^ + | ~~~~~~ error: pattern requires `..` due to inaccessible fields --> $DIR/issue-76077-1.rs:16:9 @@ -18,7 +18,7 @@ LL | let foo::Bar { visible } = foo::Bar::default(); help: ignore the inaccessible and unused fields | LL | let foo::Bar { visible, .. } = foo::Bar::default(); - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-76191.stderr b/src/test/ui/issues/issue-76191.stderr index bdcd2fe1adc5a..fb8ed43674f28 100644 --- a/src/test/ui/issues/issue-76191.stderr +++ b/src/test/ui/issues/issue-76191.stderr @@ -17,7 +17,7 @@ LL | RANGE => {} help: you may want to move the range into the match block | LL | 0..=255 => {} - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-76191.rs:15:9 diff --git a/src/test/ui/issues/issue-77218.stderr b/src/test/ui/issues/issue-77218.stderr index f945f7f38f9ee..ce70c0111bee2 100644 --- a/src/test/ui/issues/issue-77218.stderr +++ b/src/test/ui/issues/issue-77218.stderr @@ -26,7 +26,7 @@ LL | while Some(0) = value.get(0) { help: consider dereferencing the borrow | LL | while Some(*0) = value.get(0) { - | ^ + | + error[E0308]: mismatched types --> $DIR/issue-77218.rs:3:11 diff --git a/src/test/ui/issues/issue-78720.stderr b/src/test/ui/issues/issue-78720.stderr index 95b2f447102ad..3dd1387729833 100644 --- a/src/test/ui/issues/issue-78720.stderr +++ b/src/test/ui/issues/issue-78720.stderr @@ -18,11 +18,11 @@ LL | pub trait Fn: FnMut { help: a trait with a similar name exists | LL | _func: Fn, - | ^^ + | ~~ help: you might be missing a type parameter | LL | struct Map2 { - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/issue-78720.rs:7:39 @@ -43,11 +43,11 @@ LL | fn map2(self, f: F) -> Map2 {} help: consider further restricting `Self` | LL | fn map2(self, f: F) -> Map2 where Self: Sized {} - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn map2(&self, f: F) -> Map2 {} - | ^ + | + error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-83924.stderr b/src/test/ui/issues/issue-83924.stderr index 682bc323cb051..767571cddbeea 100644 --- a/src/test/ui/issues/issue-83924.stderr +++ b/src/test/ui/issues/issue-83924.stderr @@ -18,7 +18,7 @@ LL | fn into_iter(self) -> Self::IntoIter; help: consider creating a fresh reborrow of `v` here | LL | for n in &mut *v { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-86756.stderr b/src/test/ui/issues/issue-86756.stderr index 1ef2198672660..9ff4e3167a11e 100644 --- a/src/test/ui/issues/issue-86756.stderr +++ b/src/test/ui/issues/issue-86756.stderr @@ -38,7 +38,7 @@ LL | trait Foo {} help: add missing generic argument | LL | eq::> - | ^^^^^^ + | ~~~~~~ error: aborting due to 3 previous errors; 1 warning emitted diff --git a/src/test/ui/issues/issue-87199.stderr b/src/test/ui/issues/issue-87199.stderr index e3a8e82a09fd6..87b284abf201c 100644 --- a/src/test/ui/issues/issue-87199.stderr +++ b/src/test/ui/issues/issue-87199.stderr @@ -29,7 +29,7 @@ LL | ref_arg::<[i32]>(&[5]); help: consider relaxing the implicit `Sized` restriction | LL | fn ref_arg(_: &T) {} - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error; 3 warnings emitted diff --git a/src/test/ui/issues/issue-8761.stderr b/src/test/ui/issues/issue-8761.stderr index 836520a28ef34..4c67dbf6796b3 100644 --- a/src/test/ui/issues/issue-8761.stderr +++ b/src/test/ui/issues/issue-8761.stderr @@ -7,7 +7,7 @@ LL | A = 1i64, help: change the type of the numeric literal from `i64` to `isize` | LL | A = 1isize, - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/issue-8761.rs:5:9 @@ -18,7 +18,7 @@ LL | B = 2u8 help: change the type of the numeric literal from `u8` to `isize` | LL | B = 2isize - | ^^^^^^ + | ~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr index 3bd3ca6e875a1..72a1c3cdd35a5 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr @@ -10,11 +10,11 @@ LL | let _: Iter<'_, i32> = array.into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | let _: Iter<'_, i32> = array.iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 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. --> $DIR/into-iter-on-arrays-2018.rs:18:44 @@ -27,11 +27,11 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | let _: Iter<'_, i32> = Box::new(array).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | let _: Iter<'_, i32> = IntoIterator::into_iter(Box::new(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. --> $DIR/into-iter-on-arrays-2018.rs:29:24 @@ -44,11 +44,12 @@ LL | for _ in [1, 2, 3].into_iter() {} help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | for _ in [1, 2, 3].iter() {} - | ^^^^ + | ~~~~ help: or remove `.into_iter()` to iterate by value | -LL | for _ in [1, 2, 3] {} - | -- +LL - for _ in [1, 2, 3].into_iter() {} +LL + for _ in [1, 2, 3] {} + | warning: 3 warnings emitted diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr index 01789e0e25748..0959d351ece92 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr @@ -10,11 +10,11 @@ LL | small.into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | small.iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 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. --> $DIR/into-iter-on-arrays-lint.rs:13:12 @@ -27,11 +27,11 @@ LL | [1, 2].into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | [1, 2].iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 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. --> $DIR/into-iter-on-arrays-lint.rs:16:9 @@ -44,11 +44,11 @@ LL | big.into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | big.iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 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. --> $DIR/into-iter-on-arrays-lint.rs:19:15 @@ -61,11 +61,11 @@ LL | [0u8; 33].into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | [0u8; 33].iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 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. --> $DIR/into-iter-on-arrays-lint.rs:23:21 @@ -78,11 +78,11 @@ LL | Box::new(small).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(small).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(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. --> $DIR/into-iter-on-arrays-lint.rs:26:22 @@ -95,11 +95,11 @@ LL | Box::new([1, 2]).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new([1, 2]).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new([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. --> $DIR/into-iter-on-arrays-lint.rs:29:19 @@ -112,11 +112,11 @@ LL | Box::new(big).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(big).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(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. --> $DIR/into-iter-on-arrays-lint.rs:32:25 @@ -129,11 +129,11 @@ LL | Box::new([0u8; 33]).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new([0u8; 33]).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new([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. --> $DIR/into-iter-on-arrays-lint.rs:36:31 @@ -146,11 +146,11 @@ LL | Box::new(Box::new(small)).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(Box::new(small)).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(Box::new(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. --> $DIR/into-iter-on-arrays-lint.rs:39:32 @@ -163,11 +163,11 @@ LL | Box::new(Box::new([1, 2])).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(Box::new([1, 2])).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(Box::new([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. --> $DIR/into-iter-on-arrays-lint.rs:42:29 @@ -180,11 +180,11 @@ LL | Box::new(Box::new(big)).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(Box::new(big)).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(Box::new(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. --> $DIR/into-iter-on-arrays-lint.rs:45:35 @@ -197,11 +197,11 @@ LL | Box::new(Box::new([0u8; 33])).into_iter(); help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL | Box::new(Box::new([0u8; 33])).iter(); - | ^^^^ + | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | LL | IntoIterator::into_iter(Box::new(Box::new([0u8; 33]))); - | ^^^^^^^^^^^^^^^^^^^^^^^^ ^ + | ++++++++++++++++++++++++ ~ warning: 12 warnings emitted diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr index 5f5297be42ac9..b3535232f0296 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr @@ -7,7 +7,7 @@ LL | let extern = 0; help: you can escape reserved keywords to use them as identifiers | LL | let r#extern = 0; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr index edbb36452b6ce..a5787d657589d 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr @@ -7,7 +7,7 @@ LL | use extern::foo; help: you can escape reserved keywords to use them as identifiers | LL | use r#extern::foo; - | ^^^^^^^^ + | ~~~~~~~~ error[E0432]: unresolved import `r#extern` --> $DIR/keyword-extern-as-identifier-use.rs:1:5 diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr index 035501009bda4..7129bad8a978a 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -13,7 +13,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:18:13 @@ -30,7 +30,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:25:31 @@ -47,7 +47,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:25:31 @@ -64,7 +64,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:38:13 diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr index 241fe367fd339..3558f0c9e6294 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.stderr @@ -13,7 +13,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:18:13 @@ -30,7 +30,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:25:31 @@ -47,7 +47,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:25:31 @@ -64,7 +64,7 @@ LL | impl Gettable for S {} help: consider restricting type parameter `T` | LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0477]: the type `&'a isize` does not fulfill the required lifetime --> $DIR/kindck-impl-type-params.rs:32:13 diff --git a/src/test/ui/label/label_misspelled.stderr b/src/test/ui/label/label_misspelled.stderr index b09695787a443..4b5b9e92ca09a 100644 --- a/src/test/ui/label/label_misspelled.stderr +++ b/src/test/ui/label/label_misspelled.stderr @@ -158,11 +158,11 @@ LL | break foo; help: use `break` on its own without a value inside this `while` loop | LL | break; - | ^^^^^ + | ~~~~~ help: alternatively, you might have meant to use the available loop label | LL | break 'while_loop; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0571]: `break` with value from a `while` loop --> $DIR/label_misspelled.rs:54:9 @@ -176,11 +176,11 @@ LL | break foo; help: use `break` on its own without a value inside this `while` loop | LL | break; - | ^^^^^ + | ~~~~~ help: alternatively, you might have meant to use the available loop label | LL | break 'while_let; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0571]: `break` with value from a `for` loop --> $DIR/label_misspelled.rs:59:9 @@ -194,11 +194,11 @@ LL | break foo; help: use `break` on its own without a value inside this `for` loop | LL | break; - | ^^^^^ + | ~~~~~ help: alternatively, you might have meant to use the available loop label | LL | break 'for_loop; - | ^^^^^^^^^ + | ~~~~~~~~~ error: aborting due to 11 previous errors; 10 warnings emitted diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr index 5809b5bd661e0..d0dc3601202f0 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr +++ b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr @@ -8,7 +8,7 @@ LL | fn f() -> &isize { help: consider using the `'static` lifetime | LL | fn f() -> &'static isize { - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:7:33 @@ -20,7 +20,7 @@ LL | fn g(_x: &isize, _y: &isize) -> &isize { help: consider introducing a named lifetime parameter | LL | fn g<'a>(_x: &'a isize, _y: &'a isize) -> &'a isize { - | ^^^^ ^^^^^^^^^ ^^^^^^^^^ ^^^ + | ++++ ~~~~~~~~~ ~~~~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:19 @@ -32,7 +32,7 @@ LL | fn h(_x: &Foo) -> &isize { help: consider introducing a named lifetime parameter | LL | fn h<'a>(_x: &'a Foo) -> &'a isize { - | ^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:21:20 @@ -44,7 +44,7 @@ LL | fn i(_x: isize) -> &isize { help: consider using the `'static` lifetime | LL | fn i(_x: isize) -> &'static isize { - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:34:24 @@ -56,7 +56,7 @@ LL | fn j(_x: StaticStr) -> &isize { help: consider using the `'static` lifetime | LL | fn j(_x: StaticStr) -> &'static isize { - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:40:49 @@ -68,7 +68,7 @@ LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { help: consider using the `'a` lifetime | LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &'a isize { - | ^^^ + | ~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr index c1fcab2409f64..cf365af99040a 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr @@ -8,7 +8,7 @@ LL | fn foo(x: &i32, y: &i32) -> &i32 { help: consider introducing a named lifetime parameter | LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 { - | ^^^^ ^^^^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~~~ ~~~~~~~ ~~~ error: aborting due to previous error diff --git a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr b/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr index 16333a7ca380c..8c87f6da8dc3a 100644 --- a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr +++ b/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr @@ -18,11 +18,11 @@ LL | fn foo(&'b self) {} help: consider introducing lifetime `'b` here | LL | impl<'b> T for Test { - | ^^^^ + | ++++ help: consider introducing lifetime `'b` here | LL | fn foo<'b>(&'b self) {} - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9 diff --git a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr b/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr index 1fef8fc69e23a..4399045098d0f 100644 --- a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr +++ b/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr @@ -14,7 +14,7 @@ LL | [0].iter().flat_map(|a| [0].iter().map(|_| &a)); help: to force the closure to take ownership of `a` (and any other referenced variables), use the `move` keyword | LL | [0].iter().flat_map(|a| [0].iter().map(move |_| &a)); - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/lint/fn_must_use.stderr b/src/test/ui/lint/fn_must_use.stderr index 6a5fdac4d914b..61b7993d2ae4d 100644 --- a/src/test/ui/lint/fn_must_use.stderr +++ b/src/test/ui/lint/fn_must_use.stderr @@ -52,7 +52,7 @@ LL | 2 == 3; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 2 == 3; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/fn_must_use.rs:75:5 @@ -63,7 +63,7 @@ LL | m == n; help: use `let _ = ...` to ignore the resulting value | LL | let _ = m == n; - | ^^^^^^^ + | +++++++ warning: 8 warnings emitted diff --git a/src/test/ui/lint/lint-non-snake-case-identifiers-suggestion-reserved.stderr b/src/test/ui/lint/lint-non-snake-case-identifiers-suggestion-reserved.stderr index c179f4a25bdd2..2841815ecf2b9 100644 --- a/src/test/ui/lint/lint-non-snake-case-identifiers-suggestion-reserved.stderr +++ b/src/test/ui/lint/lint-non-snake-case-identifiers-suggestion-reserved.stderr @@ -31,7 +31,7 @@ LL | #![deny(non_snake_case)] help: rename the identifier or convert it to a snake case raw identifier | LL | mod r#impl {} - | ^^^^^^ + | ~~~~~~ error: function `While` should have a snake case name --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:8:4 @@ -42,7 +42,7 @@ LL | fn While() {} help: rename the identifier or convert it to a snake case raw identifier | LL | fn r#while() {} - | ^^^^^^^ + | ~~~~~~~ error: variable `Mod` should have a snake case name --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:12:9 @@ -53,7 +53,7 @@ LL | let Mod: usize = 0; help: rename the identifier or convert it to a snake case raw identifier | LL | let r#mod: usize = 0; - | ^^^^^ + | ~~~~~ error: variable `Super` should have a snake case name --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:16:9 diff --git a/src/test/ui/lint/recommend-literal.stderr b/src/test/ui/lint/recommend-literal.stderr index b01073b42b864..0ebcfb40dc3b8 100644 --- a/src/test/ui/lint/recommend-literal.stderr +++ b/src/test/ui/lint/recommend-literal.stderr @@ -52,11 +52,11 @@ LL | depth: Option, help: perhaps you intended to use this type | LL | depth: Option, - | ^^^ + | ~~~ help: you might be missing a type parameter | LL | struct Data { - | ^^^^^ + | +++++ error[E0412]: cannot find type `short` in this scope --> $DIR/recommend-literal.rs:33:16 diff --git a/src/test/ui/lint/renamed-lints-still-apply.stderr b/src/test/ui/lint/renamed-lints-still-apply.stderr index 33e5a03266e50..00ed5c89d4b8b 100644 --- a/src/test/ui/lint/renamed-lints-still-apply.stderr +++ b/src/test/ui/lint/renamed-lints-still-apply.stderr @@ -21,8 +21,9 @@ LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn _foo(_x: &u32) {} - | -- -- +LL - fn _foo<'a>(_x: &'a u32) {} +LL + fn _foo(_x: &u32) {} + | error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/lint/unused-borrows.stderr b/src/test/ui/lint/unused-borrows.stderr index e91e02df4764d..d8dd2b5fddf94 100644 --- a/src/test/ui/lint/unused-borrows.stderr +++ b/src/test/ui/lint/unused-borrows.stderr @@ -12,7 +12,7 @@ LL | #![deny(unused_must_use)] help: use `let _ = ...` to ignore the resulting value | LL | let _ = &42; - | ^^^^^^^ + | +++++++ error: unused borrow that must be used --> $DIR/unused-borrows.rs:9:5 @@ -23,7 +23,7 @@ LL | &mut foo(42); help: use `let _ = ...` to ignore the resulting value | LL | let _ = &mut foo(42); - | ^^^^^^^ + | +++++++ error: unused borrow that must be used --> $DIR/unused-borrows.rs:12:5 @@ -34,7 +34,7 @@ LL | &&42; help: use `let _ = ...` to ignore the resulting value | LL | let _ = &&42; - | ^^^^^^^ + | +++++++ error: unused borrow that must be used --> $DIR/unused-borrows.rs:15:5 @@ -45,7 +45,7 @@ LL | &&mut 42; help: use `let _ = ...` to ignore the resulting value | LL | let _ = &&mut 42; - | ^^^^^^^ + | +++++++ error: unused borrow that must be used --> $DIR/unused-borrows.rs:18:5 @@ -56,7 +56,7 @@ LL | &mut &42; help: use `let _ = ...` to ignore the resulting value | LL | let _ = &mut &42; - | ^^^^^^^ + | +++++++ error: unused borrow that must be used --> $DIR/unused-borrows.rs:23:5 @@ -67,7 +67,7 @@ LL | && foo(42); help: use `let _ = ...` to ignore the resulting value | LL | let _ = && foo(42); - | ^^^^^^^ + | +++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr b/src/test/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr index 8aefe243a944b..8fc2d1bc88fdd 100644 --- a/src/test/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr +++ b/src/test/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr @@ -13,7 +13,7 @@ LL | #![deny(unused)] help: try ignoring the field | LL | A { i, j: _ } | B { i, j: _ } => { - | ^^^^ ^^^^ + | ~~~~ ~~~~ error: unused variable: `j` --> $DIR/issue-67691-unused-field-in-or-pattern.rs:30:16 @@ -24,7 +24,7 @@ LL | A { i, ref j } | B { i, ref j } => { help: try ignoring the field | LL | A { i, j: _ } | B { i, j: _ } => { - | ^^^^ ^^^^ + | ~~~~ ~~~~ error: unused variable: `j` --> $DIR/issue-67691-unused-field-in-or-pattern.rs:40:21 @@ -35,7 +35,7 @@ LL | Some(A { i, j } | B { i, j }) => { help: try ignoring the field | LL | Some(A { i, j: _ } | B { i, j: _ }) => { - | ^^^^ ^^^^ + | ~~~~ ~~~~ error: unused variable: `j` --> $DIR/issue-67691-unused-field-in-or-pattern.rs:52:21 @@ -46,7 +46,7 @@ LL | Some(A { i, ref j } | B { i, ref j }) => { help: try ignoring the field | LL | Some(A { i, j: _ } | B { i, j: _ }) => { - | ^^^^ ^^^^ + | ~~~~ ~~~~ error: unused variable: `i` --> $DIR/issue-67691-unused-field-in-or-pattern.rs:62:24 @@ -57,7 +57,7 @@ LL | MixedEnum::A { i } | MixedEnum::B(i) => { help: try ignoring the field | LL | MixedEnum::A { i: _ } | MixedEnum::B(_) => { - | ^^^^ ^ + | ~~~~ ~ error: unused variable: `i` --> $DIR/issue-67691-unused-field-in-or-pattern.rs:70:24 @@ -68,7 +68,7 @@ LL | MixedEnum::A { ref i } | MixedEnum::B(ref i) => { help: try ignoring the field | LL | MixedEnum::A { i: _ } | MixedEnum::B(_) => { - | ^^^^ ^ + | ~~~~ ~ error: aborting due to 6 previous errors diff --git a/src/test/ui/lint/unused/issue-85913.stderr b/src/test/ui/lint/unused/issue-85913.stderr index 4835cfae46fdc..8234ed3b1678c 100644 --- a/src/test/ui/lint/unused/issue-85913.stderr +++ b/src/test/ui/lint/unused/issue-85913.stderr @@ -12,7 +12,7 @@ LL | #![deny(unused_must_use)] help: use `let _ = ...` to ignore the resulting value | LL | let _ = function() && return 1; - | ^^^^^^^ + | +++++++ error: aborting due to previous error diff --git a/src/test/ui/lint/unused/must-use-ops.stderr b/src/test/ui/lint/unused/must-use-ops.stderr index 4dd739088b99f..b248dd0fe1547 100644 --- a/src/test/ui/lint/unused/must-use-ops.stderr +++ b/src/test/ui/lint/unused/must-use-ops.stderr @@ -12,7 +12,7 @@ LL | #![warn(unused_must_use)] help: use `let _ = ...` to ignore the resulting value | LL | let _ = val == 1; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/must-use-ops.rs:13:5 @@ -23,7 +23,7 @@ LL | val < 1; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val < 1; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/must-use-ops.rs:14:5 @@ -34,7 +34,7 @@ LL | val <= 1; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val <= 1; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/must-use-ops.rs:15:5 @@ -45,7 +45,7 @@ LL | val != 1; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val != 1; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/must-use-ops.rs:16:5 @@ -56,7 +56,7 @@ LL | val >= 1; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val >= 1; - | ^^^^^^^ + | +++++++ warning: unused comparison that must be used --> $DIR/must-use-ops.rs:17:5 @@ -67,7 +67,7 @@ LL | val > 1; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val > 1; - | ^^^^^^^ + | +++++++ warning: unused arithmetic operation that must be used --> $DIR/must-use-ops.rs:20:5 @@ -78,7 +78,7 @@ LL | val + 2; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val + 2; - | ^^^^^^^ + | +++++++ warning: unused arithmetic operation that must be used --> $DIR/must-use-ops.rs:21:5 @@ -89,7 +89,7 @@ LL | val - 2; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val - 2; - | ^^^^^^^ + | +++++++ warning: unused arithmetic operation that must be used --> $DIR/must-use-ops.rs:22:5 @@ -100,7 +100,7 @@ LL | val / 2; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val / 2; - | ^^^^^^^ + | +++++++ warning: unused arithmetic operation that must be used --> $DIR/must-use-ops.rs:23:5 @@ -111,7 +111,7 @@ LL | val * 2; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val * 2; - | ^^^^^^^ + | +++++++ warning: unused arithmetic operation that must be used --> $DIR/must-use-ops.rs:24:5 @@ -122,7 +122,7 @@ LL | val % 2; help: use `let _ = ...` to ignore the resulting value | LL | let _ = val % 2; - | ^^^^^^^ + | +++++++ warning: unused logical operation that must be used --> $DIR/must-use-ops.rs:27:5 @@ -133,7 +133,7 @@ LL | true && true; help: use `let _ = ...` to ignore the resulting value | LL | let _ = true && true; - | ^^^^^^^ + | +++++++ warning: unused logical operation that must be used --> $DIR/must-use-ops.rs:28:5 @@ -144,7 +144,7 @@ LL | false || true; help: use `let _ = ...` to ignore the resulting value | LL | let _ = false || true; - | ^^^^^^^ + | +++++++ warning: unused bitwise operation that must be used --> $DIR/must-use-ops.rs:31:5 @@ -155,7 +155,7 @@ LL | 5 ^ val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 5 ^ val; - | ^^^^^^^ + | +++++++ warning: unused bitwise operation that must be used --> $DIR/must-use-ops.rs:32:5 @@ -166,7 +166,7 @@ LL | 5 & val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 5 & val; - | ^^^^^^^ + | +++++++ warning: unused bitwise operation that must be used --> $DIR/must-use-ops.rs:33:5 @@ -177,7 +177,7 @@ LL | 5 | val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 5 | val; - | ^^^^^^^ + | +++++++ warning: unused bitwise operation that must be used --> $DIR/must-use-ops.rs:34:5 @@ -188,7 +188,7 @@ LL | 5 << val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 5 << val; - | ^^^^^^^ + | +++++++ warning: unused bitwise operation that must be used --> $DIR/must-use-ops.rs:35:5 @@ -199,7 +199,7 @@ LL | 5 >> val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = 5 >> val; - | ^^^^^^^ + | +++++++ warning: unused unary operation that must be used --> $DIR/must-use-ops.rs:38:5 @@ -210,7 +210,7 @@ LL | !val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = !val; - | ^^^^^^^ + | +++++++ warning: unused unary operation that must be used --> $DIR/must-use-ops.rs:39:5 @@ -221,7 +221,7 @@ LL | -val; help: use `let _ = ...` to ignore the resulting value | LL | let _ = -val; - | ^^^^^^^ + | +++++++ warning: unused unary operation that must be used --> $DIR/must-use-ops.rs:40:5 @@ -232,7 +232,7 @@ LL | *val_pointer; help: use `let _ = ...` to ignore the resulting value | LL | let _ = *val_pointer; - | ^^^^^^^ + | +++++++ warning: 21 warnings emitted diff --git a/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr b/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr index 14db5f64b0c74..403367017c6e6 100644 --- a/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr +++ b/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr @@ -53,7 +53,7 @@ LL | | } help: you might have meant to return this value | LL | return true; - | ^^^^^^ ^ + | ++++++ + error: aborting due to 5 previous errors diff --git a/src/test/ui/loops/loop-break-value-no-repeat.stderr b/src/test/ui/loops/loop-break-value-no-repeat.stderr index 1c0d39a6e5ad7..605a1841cf376 100644 --- a/src/test/ui/loops/loop-break-value-no-repeat.stderr +++ b/src/test/ui/loops/loop-break-value-no-repeat.stderr @@ -9,7 +9,7 @@ LL | break 22 help: use `break` on its own without a value inside this `for` loop | LL | break - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index adb099f9b1769..ccb27c3507076 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -29,11 +29,11 @@ LL | break (); help: use `break` on its own without a value inside this `while` loop | LL | break; - | ^^^^^ + | ~~~~~ help: alternatively, you might have meant to use the available loop label | LL | break 'while_loop; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:30:13 @@ -47,7 +47,7 @@ LL | break 'while_loop 123; help: use `break` on its own without a value inside this `while` loop | LL | break 'while_loop; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:38:12 @@ -60,7 +60,7 @@ LL | if break () { help: use `break` on its own without a value inside this `while` loop | LL | if break { - | ^^^^^ + | ~~~~~ error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:43:9 @@ -73,7 +73,7 @@ LL | break None; help: use `break` on its own without a value inside this `while` loop | LL | break; - | ^^^^^ + | ~~~~~ error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:49:13 @@ -87,7 +87,7 @@ LL | break 'while_let_loop "nope"; help: use `break` on its own without a value inside this `while` loop | LL | break 'while_let_loop; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value.rs:56:9 @@ -100,7 +100,7 @@ LL | break (); help: use `break` on its own without a value inside this `for` loop | LL | break; - | ^^^^^ + | ~~~~~ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value.rs:57:9 @@ -114,7 +114,7 @@ LL | break [()]; help: use `break` on its own without a value inside this `for` loop | LL | break; - | ^^^^^ + | ~~~~~ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value.rs:64:13 @@ -128,7 +128,7 @@ LL | break 'for_loop Some(17); help: use `break` on its own without a value inside this `for` loop | LL | break 'for_loop; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:4:31 diff --git a/src/test/ui/loops/loop-no-implicit-break.stderr b/src/test/ui/loops/loop-no-implicit-break.stderr index 5087662e7bfa4..8a1afdea24936 100644 --- a/src/test/ui/loops/loop-no-implicit-break.stderr +++ b/src/test/ui/loops/loop-no-implicit-break.stderr @@ -7,7 +7,7 @@ LL | 1 help: you might have meant to break the loop with this value | LL | break 1; - | ^^^^^ ^ + | +++++ + error[E0308]: mismatched types --> $DIR/loop-no-implicit-break.rs:13:9 @@ -18,7 +18,7 @@ LL | 1 help: you might have meant to break the loop with this value | LL | break 1; - | ^^^^^ ^ + | +++++ + error[E0308]: mismatched types --> $DIR/loop-no-implicit-break.rs:21:9 @@ -29,7 +29,7 @@ LL | 1 help: you might have meant to return this value | LL | return 1; - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/loop-no-implicit-break.rs:29:9 @@ -40,7 +40,7 @@ LL | 1 help: you might have meant to return this value | LL | return 1; - | ^^^^^^ ^ + | ++++++ + error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/bad_hello.stderr b/src/test/ui/macros/bad_hello.stderr index 6ef4cdcb0200e..fc9bb82b7844c 100644 --- a/src/test/ui/macros/bad_hello.stderr +++ b/src/test/ui/macros/bad_hello.stderr @@ -7,7 +7,7 @@ LL | println!(3 + 4); help: you might be missing a string literal to format with | LL | println!("{}", 3 + 4); - | ^^^^^ + | +++++ error: format argument must be a string literal --> $DIR/bad_hello.rs:4:14 @@ -18,7 +18,7 @@ LL | println!(3, 4); help: you might be missing a string literal to format with | LL | println!("{} {}", 3, 4); - | ^^^^^^^^ + | ++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/derive-in-eager-expansion-hang.stderr b/src/test/ui/macros/derive-in-eager-expansion-hang.stderr index dfbbb07de588a..e0a4f3878d8bb 100644 --- a/src/test/ui/macros/derive-in-eager-expansion-hang.stderr +++ b/src/test/ui/macros/derive-in-eager-expansion-hang.stderr @@ -16,7 +16,7 @@ LL | format_args!(hang!()); help: you might be missing a string literal to format with | LL | format_args!("{}", hang!()); - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/macros/empty-trailing-stmt.stderr b/src/test/ui/macros/empty-trailing-stmt.stderr index 1db759a2181d5..97a2edd396605 100644 --- a/src/test/ui/macros/empty-trailing-stmt.stderr +++ b/src/test/ui/macros/empty-trailing-stmt.stderr @@ -7,7 +7,7 @@ LL | { true } help: you might have meant to return this value | LL | { return true; } - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/empty-trailing-stmt.rs:5:13 diff --git a/src/test/ui/macros/format-foreign.stderr b/src/test/ui/macros/format-foreign.stderr index e2f2f14dce319..ff5236dc949b2 100644 --- a/src/test/ui/macros/format-foreign.stderr +++ b/src/test/ui/macros/format-foreign.stderr @@ -12,7 +12,7 @@ LL | println!("%.*3$s %s!\n", "Hello,", "World", 4); help: format specifiers use curly braces | LL | println!("{:.2$} {}!\n", "Hello,", "World", 4); - | ^^^^^^ ^^ + | ~~~~~~ ~~ error: argument never used --> $DIR/format-foreign.rs:3:29 @@ -40,8 +40,8 @@ LL | | "###, "Hello,", "World", 4); = note: printf formatting not supported; see the documentation for `std::fmt` help: format specifiers use curly braces | -LL | println!(r###"{:.2$} -LL | {}!\n +LL ~ println!(r###"{:.2$} +LL ~ {}!\n | error: argument never used @@ -76,7 +76,7 @@ LL | println!("$1 $0 $$ $NAME", 1, 2, NAME=3); help: format specifiers use curly braces | LL | println!("{1} {0} $$ {NAME}", 1, 2, NAME=3); - | ^^^ ^^^ ^^^^^^ + | ~~~ ~~~ ~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/macros/format-parse-errors.stderr b/src/test/ui/macros/format-parse-errors.stderr index b479a2778e0ef..ef914cc1c6d5c 100644 --- a/src/test/ui/macros/format-parse-errors.stderr +++ b/src/test/ui/macros/format-parse-errors.stderr @@ -47,7 +47,7 @@ LL | format!(123); help: you might be missing a string literal to format with | LL | format!("{}", 123); - | ^^^^^ + | +++++ error: aborting due to 7 previous errors diff --git a/src/test/ui/macros/issue-30143.stderr b/src/test/ui/macros/issue-30143.stderr index 19d977f69a210..fd2378dbcb3f2 100644 --- a/src/test/ui/macros/issue-30143.stderr +++ b/src/test/ui/macros/issue-30143.stderr @@ -7,7 +7,7 @@ LL | println!(0); help: you might be missing a string literal to format with | LL | println!("{}", 0); - | ^^^^^ + | +++++ error: format argument must be a string literal --> $DIR/issue-30143.rs:6:15 @@ -18,7 +18,7 @@ LL | eprintln!('a'); help: you might be missing a string literal to format with | LL | eprintln!("{}", 'a'); - | ^^^^^ + | +++++ error: format argument must be a string literal --> $DIR/issue-30143.rs:9:17 @@ -29,7 +29,7 @@ LL | writeln!(s, true).unwrap(); help: you might be missing a string literal to format with | LL | writeln!(s, "{}", true).unwrap(); - | ^^^^^ + | +++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/issue-34421-mac-expr-bad-stmt-good-add-semi.stderr b/src/test/ui/macros/issue-34421-mac-expr-bad-stmt-good-add-semi.stderr index b7079158fb093..00139662d619b 100644 --- a/src/test/ui/macros/issue-34421-mac-expr-bad-stmt-good-add-semi.stderr +++ b/src/test/ui/macros/issue-34421-mac-expr-bad-stmt-good-add-semi.stderr @@ -12,7 +12,7 @@ LL | make_item!(A) help: add `;` to interpret the expansion as a statement | LL | make_item!(A); - | ^ + | + error: expected expression, found keyword `struct` --> $DIR/issue-34421-mac-expr-bad-stmt-good-add-semi.rs:3:9 @@ -28,7 +28,7 @@ LL | make_item!(B) help: add `;` to interpret the expansion as a statement | LL | make_item!(B); - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr index b4d20699221ab..5c8646008258b 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -44,7 +44,7 @@ LL | real_method_stmt!(); help: you must specify a concrete type for this numeric value, like `f32` | LL | 2.0_f32.neg() - | ^^^^^^^ + | ~~~~~~~ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:23:13 @@ -92,7 +92,7 @@ LL | let _ = real_method_expr!(); help: you must specify a concrete type for this numeric value, like `f32` | LL | 2.0_f32.neg() - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/macros/macro-in-expression-context-2.stderr b/src/test/ui/macros/macro-in-expression-context-2.stderr index 8f9660963937f..d0312c4850824 100644 --- a/src/test/ui/macros/macro-in-expression-context-2.stderr +++ b/src/test/ui/macros/macro-in-expression-context-2.stderr @@ -11,7 +11,7 @@ LL | _ => { empty!() } help: add `;` to interpret the expansion as a statement | LL | _ => { empty!(); } - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr index e0ed8522bf652..932732da4b0ec 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.stderr +++ b/src/test/ui/macros/macros-nonfatal-errors.stderr @@ -179,7 +179,7 @@ LL | format!(invalid); help: you might be missing a string literal to format with | LL | format!("{}", invalid); - | ^^^^^ + | +++++ error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:110:14 diff --git a/src/test/ui/malformed/malformed-meta-delim.stderr b/src/test/ui/malformed/malformed-meta-delim.stderr index 407193d4adebb..27636c3d546fd 100644 --- a/src/test/ui/malformed/malformed-meta-delim.stderr +++ b/src/test/ui/malformed/malformed-meta-delim.stderr @@ -7,7 +7,7 @@ LL | #[allow { foo_lint } ] help: the delimiters should be `(` and `)` | LL | #[allow ( foo_lint ) ] - | ^ ^ + | ~ ~ error: wrong meta list delimiters --> $DIR/malformed-meta-delim.rs:8:9 @@ -18,7 +18,7 @@ LL | #[allow [ foo_lint ] ] help: the delimiters should be `(` and `)` | LL | #[allow ( foo_lint ) ] - | ^ ^ + | ~ ~ error: aborting due to 2 previous errors diff --git a/src/test/ui/match/match-pattern-field-mismatch.stderr b/src/test/ui/match/match-pattern-field-mismatch.stderr index 37839482b31a2..e34164ec0db24 100644 --- a/src/test/ui/match/match-pattern-field-mismatch.stderr +++ b/src/test/ui/match/match-pattern-field-mismatch.stderr @@ -10,11 +10,11 @@ LL | Color::Rgb(_, _) => { } help: use `_` to explicitly ignore each field | LL | Color::Rgb(_, _, _) => { } - | ^^^ + | +++ help: use `..` to ignore all fields | LL | Color::Rgb(..) => { } - | ^^ + | ~~ error: aborting due to previous error diff --git a/src/test/ui/meta/expected-error-correct-rev.a.stderr b/src/test/ui/meta/expected-error-correct-rev.a.stderr index df4dbdbc8e62d..75c1f695d7e3a 100644 --- a/src/test/ui/meta/expected-error-correct-rev.a.stderr +++ b/src/test/ui/meta/expected-error-correct-rev.a.stderr @@ -9,7 +9,7 @@ LL | let x: u32 = 22_usize; help: change the type of the numeric literal from `usize` to `u32` | LL | let x: u32 = 22_u32; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr b/src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr index 583b2c4cfe039..aa7dd32f4d303 100644 --- a/src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr +++ b/src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr @@ -9,7 +9,7 @@ LL | let x: u32 = 22_usize; help: change the type of the numeric literal from `usize` to `u32` | LL | let x: u32 = 22_u32; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index 82660a7c41693..e725e74efc2b4 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -17,7 +17,7 @@ LL | let y: usize = x.foo(); help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | let y: usize = x.foo().try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr index 42802ba1d0ffb..ed03b37fde2b8 100644 --- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr @@ -13,11 +13,11 @@ LL | impl Me2 for usize { fn me(&self) -> usize { *self } } help: disambiguate the associated function for candidate #1 | LL | fn main() { Me2::me(&1_usize); } - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | fn main() { Me::me(&1_usize); } - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr index 5cbed652b0a40..1feaa2c73e040 100644 --- a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr @@ -17,11 +17,11 @@ LL | trait B { fn foo(&self); } help: disambiguate the associated function for candidate #1 | LL | A::foo(t); - | ^^^^^^^^^ + | ~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | B::foo(t); - | ^^^^^^^^^ + | ~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr b/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr index 8585929934e31..f69b56892392e 100644 --- a/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr @@ -17,11 +17,11 @@ LL | fn foo(self) {} help: disambiguate the associated function for candidate #1 | LL | A::foo(AB {}); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | B::foo(AB {}); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr b/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr index 7bfb8baa0c643..e0a58aed8f447 100644 --- a/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr @@ -17,11 +17,11 @@ LL | fn foo() {} help: disambiguate the associated function for candidate #1 | LL | A::foo(); - | ^^^ + | ~~~ help: disambiguate the associated function for candidate #2 | LL | B::foo(); - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr index 4ce7236ed96c5..e84dff8bab7b2 100644 --- a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr @@ -17,11 +17,11 @@ LL | trait Bar { fn method(&self) {} } help: disambiguate the associated function for candidate #1 | LL | Foo::method(&1_usize); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | Bar::method(&1_usize); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/methods/method-call-lifetime-args-fail.stderr b/src/test/ui/methods/method-call-lifetime-args-fail.stderr index ea50815ec1af7..835edb4b0ae94 100644 --- a/src/test/ui/methods/method-call-lifetime-args-fail.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-fail.stderr @@ -14,7 +14,7 @@ LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } help: add missing lifetime argument | LL | S.early::<'static, 'b>(); - | ^^^^ + | ++++ error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/method-call-lifetime-args-fail.rs:18:7 @@ -214,7 +214,7 @@ LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } help: add missing lifetime argument | LL | S::early::<'static, 'b>(S); - | ^^^^ + | ++++ error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/method-call-lifetime-args-fail.rs:65:8 diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr index 0a516c89a8b55..59075397ea5f0 100644 --- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr +++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr @@ -47,15 +47,15 @@ LL | fn foo(&self) -> u8; help: disambiguate the associated function for candidate #1 | LL | let z = X::foo(x); - | ^^^^^^^^^ + | ~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | let z = NuisanceFoo::foo(x); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #3 | LL | let z = FinalFoo::foo(x); - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:139:24 diff --git a/src/test/ui/methods/method-missing-call.stderr b/src/test/ui/methods/method-missing-call.stderr index 241c50d7ced21..045f9ab700420 100644 --- a/src/test/ui/methods/method-missing-call.stderr +++ b/src/test/ui/methods/method-missing-call.stderr @@ -7,7 +7,7 @@ LL | .get_x; help: use parentheses to call the method | LL | .get_x(); - | ^^ + | ++ error[E0615]: attempted to take value of method `filter_map` on type `Filter, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>` --> $DIR/method-missing-call.rs:29:16 @@ -18,7 +18,7 @@ LL | .filter_map; help: use parentheses to call the method | LL | .filter_map(_); - | ^^^ + | +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr index c6dde67cfeba6..09978b35f7e8a 100644 --- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr @@ -7,7 +7,7 @@ LL | let x = 2.0.neg(); help: you must specify a concrete type for this numeric value, like `f32` | LL | let x = 2.0_f32.neg(); - | ^^^^^^^ + | ~~~~~~~ error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` --> $DIR/method-on-ambiguous-numeric-type.rs:14:15 @@ -18,7 +18,7 @@ LL | let x = y.neg(); help: you must specify a type for this binding, like `f32` | LL | let y: f32 = 2.0; - | ^^^^^^ + | ~~~~~~ error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}` --> $DIR/method-on-ambiguous-numeric-type.rs:19:26 @@ -37,7 +37,7 @@ LL | local_bar.pow(2); help: you must specify a type for this binding, like `i32` | LL | ($ident:ident) => { let $ident: i32 = 42; } - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}` --> $DIR/method-on-ambiguous-numeric-type.rs:30:9 @@ -48,7 +48,7 @@ LL | bar.pow(2); help: you must specify a type for this binding, like `i32` | LL | ($ident:ident) => { let $ident: i32 = 42; } - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/mir/issue-80742.stderr b/src/test/ui/mir/issue-80742.stderr index 1ebd2b00aee0c..d3983f9aae8f4 100644 --- a/src/test/ui/mir/issue-80742.stderr +++ b/src/test/ui/mir/issue-80742.stderr @@ -62,7 +62,7 @@ LL | let dst = Inline::::new(0); help: consider relaxing the implicit `Sized` restriction | LL | struct Inline - | ^^^^^^^^ + | ++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index 7697a375fd8ae..db4e8589291b7 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -83,7 +83,7 @@ LL | 1+2 help: try using a conversion method | LL | (1+2).to_string() - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error[E0308]: mismatched types --> $DIR/abridged.rs:59:5 @@ -96,7 +96,7 @@ LL | -2 help: try using a conversion method | LL | (-2).to_string() - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error: aborting due to 8 previous errors diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 6a97d1ee3b813..a47eb87cff06c 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -29,7 +29,7 @@ LL | let _ = v as &u8; help: consider borrowing the value | LL | let _ = &*v as &u8; - | ^^ + | ++ error[E0605]: non-primitive cast: `*const u8` as `E` --> $DIR/cast-rfc0401.rs:30:13 diff --git a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr b/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr index a8da87d60bf94..d7db90e50e51b 100644 --- a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr @@ -9,7 +9,7 @@ LL | let _n = m.iter().map(|_, b| { help: change the closure to accept a tuple instead of individual arguments | LL | let _n = m.iter().map(|(_, b)| { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/src/test/ui/mismatched_types/closure-arg-count.stderr index 405343783de05..2bea9572b7096 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count.stderr @@ -9,7 +9,7 @@ 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!()); - | ^^^^^^ + | ~~~~~~ error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument --> $DIR/closure-arg-count.rs:7:15 @@ -30,7 +30,7 @@ LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); help: change the closure to take multiple arguments instead of a single tuple | LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument --> $DIR/closure-arg-count.rs:11:15 @@ -43,7 +43,7 @@ LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); help: change the closure to take multiple arguments instead of a single tuple | LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:13:5 @@ -59,7 +59,7 @@ LL | f(|| panic!()); help: consider changing the closure to take and ignore the expected argument | LL | f(|_| panic!()); - | ^^^ + | ~~~ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:15:5 @@ -75,7 +75,7 @@ LL | f( move || panic!()); help: consider changing the closure to take and ignore the expected argument | 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 @@ -88,7 +88,7 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); help: change the closure to accept a tuple instead of individual arguments | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); - | ^^^^^^^^ + | ~~~~~~~~ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:20:53 @@ -101,7 +101,7 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); help: change the closure to accept a tuple instead of individual arguments | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); - | ^^^^^^^^ + | ~~~~~~~~ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments --> $DIR/closure-arg-count.rs:22:53 diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index d0859726a49f6..e480bb250b2a5 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -11,7 +11,7 @@ LL | write!(hello); help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | ($arr.len() * size_of($arr[0])).try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0605]: non-primitive cast: `{integer}` as `()` --> $DIR/issue-26480.rs:22:19 diff --git a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr index 1e035ff99d0bc..c7e1f87f2d4d4 100644 --- a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr +++ b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr @@ -7,7 +7,7 @@ LL | type Item = IteratorChunk; help: consider introducing a named lifetime parameter | LL | type Item<'a> = IteratorChunk<'a, T, S>; - | ^^^^ ^^^ + | ++++ +++ error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.stderr b/src/test/ui/mismatched_types/numeric-literal-cast.stderr index 22a6df8902596..7ab5224979897 100644 --- a/src/test/ui/mismatched_types/numeric-literal-cast.stderr +++ b/src/test/ui/mismatched_types/numeric-literal-cast.stderr @@ -7,7 +7,7 @@ LL | foo(1u8); help: change the type of the numeric literal from `u8` to `u16` | LL | foo(1u16); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-literal-cast.rs:8:10 @@ -18,7 +18,7 @@ LL | foo1(2f32); help: change the type of the numeric literal from `f32` to `f64` | LL | foo1(2f64); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-literal-cast.rs:10:10 @@ -29,7 +29,7 @@ LL | foo2(3i16); help: change the type of the numeric literal from `i16` to `i32` | LL | foo2(3i32); - | ^^^^ + | ~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/mismatched_types/recovered-block.stderr b/src/test/ui/mismatched_types/recovered-block.stderr index f2b8404a328e2..f275321abe5eb 100644 --- a/src/test/ui/mismatched_types/recovered-block.stderr +++ b/src/test/ui/mismatched_types/recovered-block.stderr @@ -7,7 +7,7 @@ LL | pub Foo { text } help: add `struct` here to parse `Foo` as a public struct | LL | pub struct Foo { text } - | ^^^^^^ + | ++++++ error: expected one of `(` or `<`, found `{` --> $DIR/recovered-block.rs:17:9 diff --git a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr index a95b5bb94d24a..1fe9f5299aa08 100644 --- a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr +++ b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr @@ -7,7 +7,7 @@ LL | if let S { a, b, c, d } = S(1, 2, 3, 4) { help: use the tuple variant pattern syntax instead | LL | if let S(a, b, c, d) = S(1, 2, 3, 4) { - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr b/src/test/ui/missing/missing-items/missing-type-parameter2.stderr index 985a9bb2a3f6a..f955659f23d27 100644 --- a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr +++ b/src/test/ui/missing/missing-items/missing-type-parameter2.stderr @@ -10,11 +10,11 @@ LL | impl X {} help: a struct with a similar name exists | LL | impl X {} - | ^ + | ~ help: you might be missing a type parameter | LL | impl X {} - | ^^^ + | +++ error[E0412]: cannot find type `N` in this scope --> $DIR/missing-type-parameter2.rs:9:28 @@ -27,11 +27,11 @@ LL | impl X {} help: a type parameter with a similar name exists | LL | impl X {} - | ^ + | ~ help: you might be missing a type parameter | LL | impl X {} - | ^^^ + | +++ error[E0412]: cannot find type `T` in this scope --> $DIR/missing-type-parameter2.rs:14:20 @@ -45,11 +45,11 @@ LL | fn foo(_: T) where T: Send {} help: a struct with a similar name exists | LL | fn foo(_: T) where X: Send {} - | ^ + | ~ help: you might be missing a type parameter | LL | fn foo(_: T) where T: Send {} - | ^^^ + | +++ error[E0412]: cannot find type `T` in this scope --> $DIR/missing-type-parameter2.rs:14:11 @@ -63,11 +63,11 @@ LL | fn foo(_: T) where T: Send {} help: a struct with a similar name exists | LL | fn foo(_: X) where T: Send {} - | ^ + | ~ help: you might be missing a type parameter | LL | fn foo(_: T) where T: Send {} - | ^^^ + | +++ error[E0412]: cannot find type `A` in this scope --> $DIR/missing-type-parameter2.rs:18:24 @@ -81,11 +81,11 @@ LL | fn bar(_: A) {} help: a struct with a similar name exists | LL | fn bar(_: X) {} - | ^ + | ~ help: you might be missing a type parameter | LL | fn bar(_: A) {} - | ^^^ + | +++ error[E0747]: unresolved item provided when a constant was expected --> $DIR/missing-type-parameter2.rs:6:8 @@ -96,7 +96,7 @@ LL | impl X {} help: if this generic argument was intended as a const parameter, surround it with braces | LL | impl X<{ N }> {} - | ^ ^ + | + + error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions --> $DIR/missing-type-parameter2.rs:9:15 @@ -113,7 +113,7 @@ LL | impl X {} help: if this generic argument was intended as a const parameter, surround it with braces | LL | impl X<{ N }> {} - | ^ ^ + | + + error: aborting due to 8 previous errors diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr index f7e17815b6755..a315bbaab33c0 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr @@ -11,7 +11,7 @@ LL | consume(node) + r help: borrow this field in the pattern to avoid moving `node.next.0` | LL | Some(ref right) => consume(right), - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr index a30bfa66c5a9c..2adaf576adf5c 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr @@ -20,7 +20,7 @@ LL | f(&mut r, false) help: consider further restricting this bound | LL | fn conspirator(mut f: F) where F: FnMut(&mut R, bool) + Copy { - | ^^^^^^ + | ++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr index 71e35b445ef81..6c792c3314c97 100644 --- a/src/test/ui/namespace/namespace-mix.stderr +++ b/src/test/ui/namespace/namespace-mix.stderr @@ -11,7 +11,7 @@ LL | check(m1::S); help: a tuple struct with a similar name exists | LL | check(m1::TS); - | ^^ + | ~~ help: consider importing one of these items instead | LL | use m2::S; @@ -34,7 +34,7 @@ LL | pub struct TS(); help: a tuple struct with a similar name exists | LL | check(xm1::TS); - | ^^ + | ~~ help: consider importing one of these items instead | LL | use m2::S; @@ -56,11 +56,11 @@ LL | check(m7::V); help: use struct literal syntax instead | LL | check(m7::V {}); - | ^^^^^^^^ + | ~~~~~~~~ help: a tuple variant with a similar name exists | LL | check(m7::TV); - | ^^ + | ~~ help: consider importing one of these items instead | LL | use m8::V; @@ -84,11 +84,11 @@ LL | TV(), help: use struct literal syntax instead | LL | check(xm7::V { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | check(xm7::TV); - | ^^ + | ~~ help: consider importing one of these items instead | LL | use m8::V; diff --git a/src/test/ui/never_type/issue-52443.stderr b/src/test/ui/never_type/issue-52443.stderr index 3453f031623f4..216b56f705904 100644 --- a/src/test/ui/never_type/issue-52443.stderr +++ b/src/test/ui/never_type/issue-52443.stderr @@ -25,8 +25,9 @@ LL | [(); & { loop { continue } } ]; found reference `&_` help: consider removing the borrow | -LL | [(); { loop { continue } } ]; - | -- +LL - [(); & { loop { continue } } ]; +LL + [(); { loop { continue } } ]; + | error[E0308]: mismatched types --> $DIR/issue-52443.rs:4:17 diff --git a/src/test/ui/nll/issue-53807.stderr b/src/test/ui/nll/issue-53807.stderr index 6767f7cd6163b..574a114340f03 100644 --- a/src/test/ui/nll/issue-53807.stderr +++ b/src/test/ui/nll/issue-53807.stderr @@ -8,7 +8,7 @@ LL | if let Some(thing) = maybe { help: borrow this field in the pattern to avoid moving `maybe.0` | LL | if let Some(ref thing) = maybe { - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr b/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr index 2dca92e2be1f3..6dacfd1f264c6 100644 --- a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr +++ b/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr @@ -16,7 +16,7 @@ LL | ; help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | D("other").next(&_thing1); - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/src/test/ui/nll/issue-54556-niconii.stderr index 1bfebd755b4fc..70f063ca0e833 100644 --- a/src/test/ui/nll/issue-54556-niconii.stderr +++ b/src/test/ui/nll/issue-54556-niconii.stderr @@ -16,7 +16,7 @@ LL | } help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | if let Ok(_) = counter.lock() { }; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.stderr index bfb0eb74a56dd..a5a0fc415bb37 100644 --- a/src/test/ui/nll/issue-54556-stephaneyfx.stderr +++ b/src/test/ui/nll/issue-54556-stephaneyfx.stderr @@ -17,7 +17,7 @@ LL | } help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | let x = rows.map(|row| row).next(); x - | ^^^^^^^ ^^^ + | +++++++ +++ error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr index 047fdbc9148ac..68d3cef8aa13b 100644 --- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr +++ b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr @@ -15,7 +15,7 @@ LL | ; help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | D(&_thing1).end(); - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr b/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr index 85920a8e7394c..25226e2967353 100644 --- a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr +++ b/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr @@ -11,7 +11,7 @@ LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); } ; // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:13:55 @@ -26,7 +26,7 @@ LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } } ; // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); } } ; // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:16:55 @@ -41,7 +41,7 @@ LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; } // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); }; } // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:19:55 @@ -56,7 +56,7 @@ LL | let _ = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | let _ = { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); } ; // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:22:55 @@ -71,7 +71,7 @@ LL | let _u = { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } ; // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | let _u = { let mut _t1 = D(Box::new("t1")); D(&_t1).unit(); } ; // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:25:55 @@ -88,7 +88,7 @@ LL | let _x = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | let _x = { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x } ; // `let x = ...; x` - | ^^^^^^^ ^^^ + | +++++++ +++ error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:30:55 @@ -105,7 +105,7 @@ LL | _y = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `l help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | _y = { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x } ; // `let x = ...; x` - | ^^^^^^^ ^^^ + | +++++++ +++ error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:37:55 @@ -121,7 +121,7 @@ LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } // help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit(); } // suggest `;` - | ^ + | + error[E0597]: `_t1` does not live long enough --> $DIR/issue-54556-used-vs-unused-tails.rs:40:55 @@ -139,7 +139,7 @@ LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } // help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x } // `let x = ...; x` - | ^^^^^^^ ^^^ + | +++++++ +++ error: aborting due to 9 previous errors diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr index f6a86aa43b534..d05fc793967ae 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr @@ -7,7 +7,7 @@ LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> { help: add explicit lifetime `ReEarlyBound(0, 'a)` to the type of `x` | LL | fn foo<'a, T>(x: &ReEarlyBound(0, 'a) T) -> impl Foo<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/no-std-inject.stderr b/src/test/ui/no-std-inject.stderr index a82931e0fbdd0..8e226804890d9 100644 --- a/src/test/ui/no-std-inject.stderr +++ b/src/test/ui/no-std-inject.stderr @@ -8,7 +8,7 @@ LL | extern crate core; help: you can use `as` to change the binding name of the import | LL | extern crate core as other_core; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/non-fmt-panic.stderr b/src/test/ui/non-fmt-panic.stderr index 6aa2eb174e922..2c058f1f5a484 100644 --- a/src/test/ui/non-fmt-panic.stderr +++ b/src/test/ui/non-fmt-panic.stderr @@ -9,7 +9,7 @@ LL | panic!("here's a brace: {"); help: add a "{}" format string to use the message literally | LL | panic!("{}", "here's a brace: {"); - | ^^^^^ + | +++++ warning: panic message contains a brace --> $DIR/non-fmt-panic.rs:12:31 @@ -21,7 +21,7 @@ LL | std::panic!("another one: }"); help: add a "{}" format string to use the message literally | LL | std::panic!("{}", "another one: }"); - | ^^^^^ + | +++++ warning: panic message contains an unused formatting placeholder --> $DIR/non-fmt-panic.rs:13:25 @@ -33,11 +33,11 @@ LL | core::panic!("Hello {}"); help: add the missing argument | LL | core::panic!("Hello {}", ...); - | ^^^^^ + | +++++ help: or add a "{}" format string to use the message literally | LL | core::panic!("{}", "Hello {}"); - | ^^^^^ + | +++++ warning: panic message contains unused formatting placeholders --> $DIR/non-fmt-panic.rs:14:21 @@ -49,11 +49,11 @@ LL | assert!(false, "{:03x} {test} bla"); help: add the missing arguments | LL | assert!(false, "{:03x} {test} bla", ...); - | ^^^^^ + | +++++ help: or add a "{}" format string to use the message literally | LL | assert!(false, "{}", "{:03x} {test} bla"); - | ^^^^^ + | +++++ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:16:20 @@ -66,7 +66,7 @@ LL | assert!(false, S); help: add a "{}" format string to Display the message | LL | assert!(false, "{}", S); - | ^^^^^ + | +++++ warning: panic message contains braces --> $DIR/non-fmt-panic.rs:18:27 @@ -78,7 +78,7 @@ LL | debug_assert!(false, "{{}} bla"); help: add a "{}" format string to use the message literally | LL | debug_assert!(false, "{}", "{{}} bla"); - | ^^^^^ + | +++++ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:19:12 @@ -91,11 +91,11 @@ LL | panic!(C); help: add a "{}" format string to Display the message | LL | panic!("{}", C); - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(C); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:20:12 @@ -108,11 +108,11 @@ LL | panic!(S); help: add a "{}" format string to Display the message | LL | panic!("{}", S); - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(S); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:21:17 @@ -125,11 +125,11 @@ LL | std::panic!(123); help: add a "{}" format string to Display the message | LL | std::panic!("{}", 123); - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(123); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:22:18 @@ -142,7 +142,7 @@ LL | core::panic!(&*"abc"); help: add a "{}" format string to Display the message | LL | core::panic!("{}", &*"abc"); - | ^^^^^ + | +++++ warning: panic message contains an unused formatting placeholder --> $DIR/non-fmt-panic.rs:23:12 @@ -154,11 +154,11 @@ LL | panic!(concat!("{", "}")); help: add the missing argument | LL | panic!(concat!("{", "}"), ...); - | ^^^^^ + | +++++ help: or add a "{}" format string to use the message literally | LL | panic!("{}", concat!("{", "}")); - | ^^^^^ + | +++++ warning: panic message contains braces --> $DIR/non-fmt-panic.rs:24:5 @@ -170,7 +170,7 @@ LL | panic!(concat!("{", "{")); help: add a "{}" format string to use the message literally | LL | panic!("{}", concat!("{", "{")); - | ^^^^^ + | +++++ warning: panic message contains an unused formatting placeholder --> $DIR/non-fmt-panic.rs:26:37 @@ -200,11 +200,11 @@ LL | panic!(a!()); help: add a "{}" format string to Display the message | LL | panic!("{}", a!()); - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(a!()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:38:12 @@ -217,8 +217,9 @@ LL | panic!(format!("{}", 1)); = note: the panic!() macro supports formatting, so there's no need for the format!() macro here help: remove the `format!(..)` macro call | -LL | panic!("{}", 1); - | -- -- +LL - panic!(format!("{}", 1)); +LL + panic!("{}", 1); + | warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:39:20 @@ -231,8 +232,9 @@ LL | assert!(false, format!("{}", 1)); = note: the assert!() macro supports formatting, so there's no need for the format!() macro here help: remove the `format!(..)` macro call | -LL | assert!(false, "{}", 1); - | -- -- +LL - assert!(false, format!("{}", 1)); +LL + assert!(false, "{}", 1); + | warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:40:26 @@ -245,8 +247,9 @@ LL | debug_assert!(false, format!("{}", 1)); = note: the debug_assert!() macro supports formatting, so there's no need for the format!() macro here help: remove the `format!(..)` macro call | -LL | debug_assert!(false, "{}", 1); - | -- -- +LL - debug_assert!(false, format!("{}", 1)); +LL + debug_assert!(false, "{}", 1); + | warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:42:12 @@ -259,11 +262,11 @@ LL | panic![123]; help: add a "{}" format string to Display the message | LL | panic!["{}", 123]; - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(123); - | ^^^^^^^^^^^^^^^^^^^^^^ ^ + | ~~~~~~~~~~~~~~~~~~~~~~ ~ warning: panic message is not a string literal --> $DIR/non-fmt-panic.rs:43:12 @@ -276,11 +279,11 @@ LL | panic!{123}; help: add a "{}" format string to Display the message | LL | panic!{"{}", 123}; - | ^^^^^ + | +++++ help: or use std::panic::panic_any instead | LL | std::panic::panic_any(123); - | ^^^^^^^^^^^^^^^^^^^^^^ ^ + | ~~~~~~~~~~~~~~~~~~~~~~ ~ warning: 20 warnings emitted diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr index 5a275d5d089b1..6732391e1a1fb 100644 --- a/src/test/ui/numeric/const-scope.stderr +++ b/src/test/ui/numeric/const-scope.stderr @@ -7,7 +7,7 @@ LL | const C: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | const C: i32 = 1i32; - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:2:15 @@ -26,7 +26,7 @@ LL | let c: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | let c: i32 = 1i32; - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:6:17 @@ -47,7 +47,7 @@ LL | let c: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | let c: i32 = 1i32; - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:11:17 @@ -60,7 +60,7 @@ LL | let d: i8 = c; help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | let d: i8 = c.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr index 79b38b0698631..9a3248c5720db 100644 --- a/src/test/ui/numeric/len.stderr +++ b/src/test/ui/numeric/len.stderr @@ -7,7 +7,7 @@ LL | test(array.len()); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | test(array.len().try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr index 858990fe59bd5..83d8ce5eea9ac 100644 --- a/src/test/ui/numeric/numeric-cast-2.stderr +++ b/src/test/ui/numeric/numeric-cast-2.stderr @@ -9,7 +9,7 @@ LL | let x: u16 = foo(); help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit | LL | let x: u16 = foo().try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:7:18 diff --git a/src/test/ui/numeric/numeric-cast-binop.stderr b/src/test/ui/numeric/numeric-cast-binop.stderr index cb051aa123021..b0ff50748fef1 100644 --- a/src/test/ui/numeric/numeric-cast-binop.stderr +++ b/src/test/ui/numeric/numeric-cast-binop.stderr @@ -7,7 +7,7 @@ LL | x_u8 > x_u16; help: you can convert `x_u8` from `u8` to `u16`, matching the type of `x_u16` | LL | u16::from(x_u8) > x_u16; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:25:16 @@ -18,7 +18,7 @@ LL | x_u8 > x_u32; help: you can convert `x_u8` from `u8` to `u32`, matching the type of `x_u32` | LL | u32::from(x_u8) > x_u32; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:27:16 @@ -29,7 +29,7 @@ LL | x_u8 > x_u64; help: you can convert `x_u8` from `u8` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u8) > x_u64; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:29:16 @@ -40,7 +40,7 @@ LL | x_u8 > x_u128; help: you can convert `x_u8` from `u8` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u8) > x_u128; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:31:16 @@ -51,7 +51,7 @@ LL | x_u8 > x_usize; help: you can convert `x_u8` from `u8` to `usize`, matching the type of `x_usize` | LL | usize::from(x_u8) > x_usize; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:34:17 @@ -71,7 +71,7 @@ LL | x_u16 > x_u32; help: you can convert `x_u16` from `u16` to `u32`, matching the type of `x_u32` | LL | u32::from(x_u16) > x_u32; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:38:17 @@ -82,7 +82,7 @@ LL | x_u16 > x_u64; help: you can convert `x_u16` from `u16` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u16) > x_u64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:40:17 @@ -93,7 +93,7 @@ LL | x_u16 > x_u128; help: you can convert `x_u16` from `u16` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u16) > x_u128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:42:17 @@ -104,7 +104,7 @@ LL | x_u16 > x_usize; help: you can convert `x_u16` from `u16` to `usize`, matching the type of `x_usize` | LL | usize::from(x_u16) > x_usize; - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:45:17 @@ -133,7 +133,7 @@ LL | x_u32 > x_u64; help: you can convert `x_u32` from `u32` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u32) > x_u64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:51:17 @@ -144,7 +144,7 @@ LL | x_u32 > x_u128; help: you can convert `x_u32` from `u32` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u32) > x_u128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:53:17 @@ -155,7 +155,7 @@ LL | x_u32 > x_usize; help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:56:17 @@ -193,7 +193,7 @@ LL | x_u64 > x_u128; help: you can convert `x_u64` from `u64` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u64) > x_u128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:64:17 @@ -204,7 +204,7 @@ LL | x_u64 > x_usize; help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:67:18 @@ -251,7 +251,7 @@ LL | x_u128 > x_usize; help: you can convert a `usize` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:78:19 @@ -280,7 +280,7 @@ LL | x_usize > x_u32; help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:84:19 @@ -291,7 +291,7 @@ LL | x_usize > x_u64; help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:86:19 @@ -302,7 +302,7 @@ LL | x_usize > x_u128; help: you can convert a `u128` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:92:16 @@ -313,7 +313,7 @@ LL | x_i8 > x_i16; help: you can convert `x_i8` from `i8` to `i16`, matching the type of `x_i16` | LL | i16::from(x_i8) > x_i16; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:94:16 @@ -324,7 +324,7 @@ LL | x_i8 > x_i32; help: you can convert `x_i8` from `i8` to `i32`, matching the type of `x_i32` | LL | i32::from(x_i8) > x_i32; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:96:16 @@ -335,7 +335,7 @@ LL | x_i8 > x_i64; help: you can convert `x_i8` from `i8` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i8) > x_i64; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:98:16 @@ -346,7 +346,7 @@ LL | x_i8 > x_i128; help: you can convert `x_i8` from `i8` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i8) > x_i128; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:100:16 @@ -357,7 +357,7 @@ LL | x_i8 > x_isize; help: you can convert `x_i8` from `i8` to `isize`, matching the type of `x_isize` | LL | isize::from(x_i8) > x_isize; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:103:17 @@ -377,7 +377,7 @@ LL | x_i16 > x_i32; help: you can convert `x_i16` from `i16` to `i32`, matching the type of `x_i32` | LL | i32::from(x_i16) > x_i32; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:107:17 @@ -388,7 +388,7 @@ LL | x_i16 > x_i64; help: you can convert `x_i16` from `i16` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i16) > x_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:109:17 @@ -399,7 +399,7 @@ LL | x_i16 > x_i128; help: you can convert `x_i16` from `i16` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i16) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:111:17 @@ -410,7 +410,7 @@ LL | x_i16 > x_isize; help: you can convert `x_i16` from `i16` to `isize`, matching the type of `x_isize` | LL | isize::from(x_i16) > x_isize; - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:114:17 @@ -439,7 +439,7 @@ LL | x_i32 > x_i64; help: you can convert `x_i32` from `i32` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i32) > x_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:120:17 @@ -450,7 +450,7 @@ LL | x_i32 > x_i128; help: you can convert `x_i32` from `i32` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i32) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:122:17 @@ -461,7 +461,7 @@ LL | x_i32 > x_isize; help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:125:17 @@ -499,7 +499,7 @@ LL | x_i64 > x_i128; help: you can convert `x_i64` from `i64` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i64) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:133:17 @@ -510,7 +510,7 @@ LL | x_i64 > x_isize; help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:136:18 @@ -557,7 +557,7 @@ LL | x_i128 > x_isize; help: you can convert an `isize` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:147:19 @@ -586,7 +586,7 @@ LL | x_isize > x_i32; help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:153:19 @@ -597,7 +597,7 @@ LL | x_isize > x_i64; help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:155:19 @@ -608,7 +608,7 @@ LL | x_isize > x_i128; help: you can convert an `i128` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:161:16 @@ -619,7 +619,7 @@ LL | x_u8 > x_i8; help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit | LL | x_u8 > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:163:16 @@ -630,7 +630,7 @@ LL | x_u8 > x_i16; help: you can convert `x_u8` from `u8` to `i16`, matching the type of `x_i16` | LL | i16::from(x_u8) > x_i16; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:165:16 @@ -641,7 +641,7 @@ LL | x_u8 > x_i32; help: you can convert `x_u8` from `u8` to `i32`, matching the type of `x_i32` | LL | i32::from(x_u8) > x_i32; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:167:16 @@ -652,7 +652,7 @@ LL | x_u8 > x_i64; help: you can convert `x_u8` from `u8` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u8) > x_i64; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:169:16 @@ -663,7 +663,7 @@ LL | x_u8 > x_i128; help: you can convert `x_u8` from `u8` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u8) > x_i128; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:171:16 @@ -674,7 +674,7 @@ LL | x_u8 > x_isize; help: you can convert `x_u8` from `u8` to `isize`, matching the type of `x_isize` | LL | isize::from(x_u8) > x_isize; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:174:17 @@ -685,7 +685,7 @@ LL | x_u16 > x_i8; help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:176:17 @@ -696,7 +696,7 @@ LL | x_u16 > x_i16; help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_i16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:178:17 @@ -707,7 +707,7 @@ LL | x_u16 > x_i32; help: you can convert `x_u16` from `u16` to `i32`, matching the type of `x_i32` | LL | i32::from(x_u16) > x_i32; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:180:17 @@ -718,7 +718,7 @@ LL | x_u16 > x_i64; help: you can convert `x_u16` from `u16` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u16) > x_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:182:17 @@ -729,7 +729,7 @@ LL | x_u16 > x_i128; help: you can convert `x_u16` from `u16` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u16) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:184:17 @@ -740,7 +740,7 @@ LL | x_u16 > x_isize; help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:187:17 @@ -751,7 +751,7 @@ LL | x_u32 > x_i8; help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:189:17 @@ -762,7 +762,7 @@ LL | x_u32 > x_i16; help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:191:17 @@ -773,7 +773,7 @@ LL | x_u32 > x_i32; help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:193:17 @@ -784,7 +784,7 @@ LL | x_u32 > x_i64; help: you can convert `x_u32` from `u32` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u32) > x_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:195:17 @@ -795,7 +795,7 @@ LL | x_u32 > x_i128; help: you can convert `x_u32` from `u32` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u32) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:197:17 @@ -806,7 +806,7 @@ LL | x_u32 > x_isize; help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:200:17 @@ -817,7 +817,7 @@ LL | x_u64 > x_i8; help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:202:17 @@ -828,7 +828,7 @@ LL | x_u64 > x_i16; help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:204:17 @@ -839,7 +839,7 @@ LL | x_u64 > x_i32; help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:206:17 @@ -850,7 +850,7 @@ LL | x_u64 > x_i64; help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:208:17 @@ -861,7 +861,7 @@ LL | x_u64 > x_i128; help: you can convert `x_u64` from `u64` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u64) > x_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:210:17 @@ -872,7 +872,7 @@ LL | x_u64 > x_isize; help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:213:18 @@ -883,7 +883,7 @@ LL | x_u128 > x_i8; help: you can convert an `i8` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:215:18 @@ -894,7 +894,7 @@ LL | x_u128 > x_i16; help: you can convert an `i16` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:217:18 @@ -905,7 +905,7 @@ LL | x_u128 > x_i32; help: you can convert an `i32` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:219:18 @@ -916,7 +916,7 @@ LL | x_u128 > x_i64; help: you can convert an `i64` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:221:18 @@ -927,7 +927,7 @@ LL | x_u128 > x_i128; help: you can convert an `i128` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:223:18 @@ -938,7 +938,7 @@ LL | x_u128 > x_isize; help: you can convert an `isize` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:226:19 @@ -949,7 +949,7 @@ LL | x_usize > x_i8; help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:228:19 @@ -960,7 +960,7 @@ LL | x_usize > x_i16; help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:230:19 @@ -971,7 +971,7 @@ LL | x_usize > x_i32; help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:232:19 @@ -982,7 +982,7 @@ LL | x_usize > x_i64; help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:234:19 @@ -993,7 +993,7 @@ LL | x_usize > x_i128; help: you can convert an `i128` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:236:19 @@ -1004,7 +1004,7 @@ LL | x_usize > x_isize; help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_isize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:242:16 @@ -1015,7 +1015,7 @@ LL | x_i8 > x_u8; help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u8.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:244:16 @@ -1026,7 +1026,7 @@ LL | x_i8 > x_u16; help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:246:16 @@ -1037,7 +1037,7 @@ LL | x_i8 > x_u32; help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:248:16 @@ -1048,7 +1048,7 @@ LL | x_i8 > x_u64; help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:250:16 @@ -1059,7 +1059,7 @@ LL | x_i8 > x_u128; help: you can convert a `u128` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:252:16 @@ -1070,7 +1070,7 @@ LL | x_i8 > x_usize; help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:255:17 @@ -1090,7 +1090,7 @@ LL | x_i16 > x_u16; help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:259:17 @@ -1101,7 +1101,7 @@ LL | x_i16 > x_u32; help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:261:17 @@ -1112,7 +1112,7 @@ LL | x_i16 > x_u64; help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:263:17 @@ -1123,7 +1123,7 @@ LL | x_i16 > x_u128; help: you can convert a `u128` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:265:17 @@ -1134,7 +1134,7 @@ LL | x_i16 > x_usize; help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:268:17 @@ -1163,7 +1163,7 @@ LL | x_i32 > x_u32; help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:274:17 @@ -1174,7 +1174,7 @@ LL | x_i32 > x_u64; help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:276:17 @@ -1185,7 +1185,7 @@ LL | x_i32 > x_u128; help: you can convert a `u128` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:278:17 @@ -1196,7 +1196,7 @@ LL | x_i32 > x_usize; help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:281:17 @@ -1234,7 +1234,7 @@ LL | x_i64 > x_u64; help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:289:17 @@ -1245,7 +1245,7 @@ LL | x_i64 > x_u128; help: you can convert a `u128` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:291:17 @@ -1256,7 +1256,7 @@ LL | x_i64 > x_usize; help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:294:18 @@ -1303,7 +1303,7 @@ LL | x_i128 > x_u128; help: you can convert a `u128` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:304:18 @@ -1314,7 +1314,7 @@ LL | x_i128 > x_usize; help: you can convert a `usize` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:307:19 @@ -1334,7 +1334,7 @@ LL | x_isize > x_u16; help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u16.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:311:19 @@ -1345,7 +1345,7 @@ LL | x_isize > x_u32; help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u32.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:313:19 @@ -1356,7 +1356,7 @@ LL | x_isize > x_u64; help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u64.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:315:19 @@ -1367,7 +1367,7 @@ LL | x_isize > x_u128; help: you can convert a `u128` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u128.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:317:19 @@ -1378,7 +1378,7 @@ LL | x_isize > x_usize; help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_usize.try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 132 previous errors diff --git a/src/test/ui/numeric/numeric-cast-no-fix.stderr b/src/test/ui/numeric/numeric-cast-no-fix.stderr index 4852e7047b47a..4510ce10b3dc4 100644 --- a/src/test/ui/numeric/numeric-cast-no-fix.stderr +++ b/src/test/ui/numeric/numeric-cast-no-fix.stderr @@ -47,7 +47,7 @@ LL | x_u8 > -1_isize; help: you can convert `x_u8` from `u8` to `isize`, matching the type of `-1_isize` | LL | isize::from(x_u8) > -1_isize; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:23:15 @@ -74,7 +74,7 @@ LL | x_u64 > -1_i128; help: you can convert `x_u64` from `u64` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u64) > -1_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:29:13 @@ -85,7 +85,7 @@ LL | x_u32 > -1_i128; help: you can convert `x_u32` from `u32` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u32) > -1_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:31:13 @@ -96,7 +96,7 @@ LL | x_u16 > -1_i128; help: you can convert `x_u16` from `u16` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u16) > -1_i128; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:33:12 @@ -107,7 +107,7 @@ LL | x_u8 > -1_i128; help: you can convert `x_u8` from `u8` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u8) > -1_i128; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:36:15 @@ -142,7 +142,7 @@ LL | x_u32 > -1_i64; help: you can convert `x_u32` from `u32` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u32) > -1_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:44:13 @@ -153,7 +153,7 @@ LL | x_u16 > -1_i64; help: you can convert `x_u16` from `u16` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u16) > -1_i64; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:46:12 @@ -164,7 +164,7 @@ LL | x_u8 > -1_i64; help: you can convert `x_u8` from `u8` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u8) > -1_i64; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:49:15 @@ -207,7 +207,7 @@ LL | x_u16 > -1_i32; help: you can convert `x_u16` from `u16` to `i32`, matching the type of `-1_i32` | LL | i32::from(x_u16) > -1_i32; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:59:12 @@ -218,7 +218,7 @@ LL | x_u8 > -1_i32; help: you can convert `x_u8` from `u8` to `i32`, matching the type of `-1_i32` | LL | i32::from(x_u8) > -1_i32; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:62:15 @@ -269,7 +269,7 @@ LL | x_u8 > -1_i16; help: you can convert `x_u8` from `u8` to `i16`, matching the type of `-1_i16` | LL | i16::from(x_u8) > -1_i16; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:75:15 diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr index ffd6368bac15f..8bc617be57313 100644 --- a/src/test/ui/numeric/numeric-cast.stderr +++ b/src/test/ui/numeric/numeric-cast.stderr @@ -7,7 +7,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:25:18 @@ -18,7 +18,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:27:18 @@ -47,7 +47,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:33:18 @@ -58,7 +58,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:35:18 @@ -69,7 +69,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:37:18 @@ -80,7 +80,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:39:18 @@ -91,7 +91,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit | LL | foo::(x_i8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:44:18 @@ -102,7 +102,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:46:18 @@ -113,7 +113,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:48:18 @@ -124,7 +124,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:50:18 @@ -135,7 +135,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_u16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:52:18 @@ -155,7 +155,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:57:18 @@ -166,7 +166,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:59:18 @@ -195,7 +195,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:69:16 @@ -233,7 +233,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:77:16 @@ -244,7 +244,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:79:16 @@ -255,7 +255,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:81:16 @@ -266,7 +266,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:83:16 @@ -277,7 +277,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit | LL | foo::(x_i8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:88:16 @@ -288,7 +288,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:90:16 @@ -299,7 +299,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:92:16 @@ -337,7 +337,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:101:16 @@ -375,7 +375,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:112:16 @@ -386,7 +386,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:115:16 @@ -415,7 +415,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:121:16 @@ -426,7 +426,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:123:16 @@ -437,7 +437,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:125:16 @@ -448,7 +448,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:127:16 @@ -459,7 +459,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit | LL | foo::(x_i8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:132:16 @@ -470,7 +470,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:134:16 @@ -481,7 +481,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:136:16 @@ -492,7 +492,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:138:16 @@ -521,7 +521,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:144:16 @@ -532,7 +532,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:147:16 @@ -561,7 +561,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:156:16 @@ -572,7 +572,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:158:16 @@ -583,7 +583,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:161:16 @@ -603,7 +603,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:165:16 @@ -614,7 +614,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:167:16 @@ -625,7 +625,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:169:16 @@ -636,7 +636,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:171:16 @@ -647,7 +647,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit | LL | foo::(x_i8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:176:16 @@ -658,7 +658,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:178:16 @@ -669,7 +669,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:180:16 @@ -680,7 +680,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:182:16 @@ -691,7 +691,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_u16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:184:16 @@ -711,7 +711,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:188:16 @@ -722,7 +722,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:190:16 @@ -733,7 +733,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:193:16 @@ -753,7 +753,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:200:15 @@ -764,7 +764,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:202:15 @@ -775,7 +775,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:204:15 @@ -786,7 +786,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_u16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:207:15 @@ -797,7 +797,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:209:15 @@ -808,7 +808,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:211:15 @@ -819,7 +819,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:213:15 @@ -830,7 +830,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:215:15 @@ -841,7 +841,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit | LL | foo::(x_i8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:220:15 @@ -852,7 +852,7 @@ LL | foo::(x_usize); help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_usize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:222:15 @@ -863,7 +863,7 @@ LL | foo::(x_u64); help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_u64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:224:15 @@ -874,7 +874,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_u32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:226:15 @@ -885,7 +885,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_u16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:228:15 @@ -896,7 +896,7 @@ LL | foo::(x_u8); help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_u8.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:230:15 @@ -907,7 +907,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_isize.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:232:15 @@ -918,7 +918,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_i64.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:234:15 @@ -929,7 +929,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_i32.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:236:15 @@ -940,7 +940,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit | LL | foo::(x_i16.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:242:16 @@ -951,7 +951,7 @@ LL | foo::(x_usize); help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, | rounded if necessary LL | foo::(x_usize as f64); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:244:16 @@ -962,7 +962,7 @@ LL | foo::(x_u64); help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, | rounded if necessary LL | foo::(x_u64 as f64); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:246:16 @@ -973,7 +973,7 @@ LL | foo::(x_u32); help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_u32.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:248:16 @@ -984,7 +984,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:250:16 @@ -995,7 +995,7 @@ LL | foo::(x_u8); help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:252:16 @@ -1006,7 +1006,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `f64`, producing the floating point representation of the integer, rounded if necessary | LL | foo::(x_isize as f64); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:254:16 @@ -1017,7 +1017,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `f64`, producing the floating point representation of the integer, rounded if necessary | LL | foo::(x_i64 as f64); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:256:16 @@ -1028,7 +1028,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:258:16 @@ -1039,7 +1039,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:260:16 @@ -1050,7 +1050,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer | LL | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:263:16 @@ -1070,7 +1070,7 @@ LL | foo::(x_usize); help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::(x_usize as f32); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:268:16 @@ -1081,7 +1081,7 @@ LL | foo::(x_u64); help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::(x_u64 as f32); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:270:16 @@ -1092,7 +1092,7 @@ LL | foo::(x_u32); help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::(x_u32 as f32); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:272:16 @@ -1103,7 +1103,7 @@ LL | foo::(x_u16); help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer | LL | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:274:16 @@ -1114,7 +1114,7 @@ LL | foo::(x_u8); help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer | LL | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:276:16 @@ -1125,7 +1125,7 @@ LL | foo::(x_isize); help: you can convert an `isize` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::(x_isize as f32); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:278:16 @@ -1136,7 +1136,7 @@ LL | foo::(x_i64); help: you can convert an `i64` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::(x_i64 as f32); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:280:16 @@ -1147,7 +1147,7 @@ LL | foo::(x_i32); help: you can convert an `i32` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::(x_i32 as f32); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:282:16 @@ -1158,7 +1158,7 @@ LL | foo::(x_i16); help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer | LL | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:284:16 @@ -1169,7 +1169,7 @@ LL | foo::(x_i8); help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer | LL | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:289:16 diff --git a/src/test/ui/numeric/numeric-suffix.stderr b/src/test/ui/numeric/numeric-suffix.stderr index a62956ee8da8d..d3f02214e3b7a 100644 --- a/src/test/ui/numeric/numeric-suffix.stderr +++ b/src/test/ui/numeric/numeric-suffix.stderr @@ -7,7 +7,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:9:18 @@ -18,7 +18,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:11:18 @@ -29,7 +29,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:13:18 @@ -40,7 +40,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:15:18 @@ -51,7 +51,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:17:18 @@ -62,7 +62,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:19:18 @@ -73,7 +73,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:21:18 @@ -84,7 +84,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:23:18 @@ -95,7 +95,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `usize` | LL | foo::(42_usize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:25:18 @@ -106,7 +106,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `usize` | LL | foo::(42usize); - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:27:18 @@ -117,7 +117,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `usize` | LL | foo::(42usize); - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:30:18 @@ -128,7 +128,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:32:18 @@ -139,7 +139,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:34:18 @@ -150,7 +150,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:36:18 @@ -161,7 +161,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:38:18 @@ -172,7 +172,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:41:18 @@ -183,7 +183,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:43:18 @@ -194,7 +194,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:45:18 @@ -205,7 +205,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:47:18 @@ -216,7 +216,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `isize` | LL | foo::(42_isize); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:49:18 @@ -227,7 +227,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `isize` | LL | foo::(42isize); - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:51:18 @@ -238,7 +238,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `isize` | LL | foo::(42isize); - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:54:16 @@ -249,7 +249,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:57:16 @@ -260,7 +260,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:59:16 @@ -271,7 +271,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:61:16 @@ -282,7 +282,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:63:16 @@ -293,7 +293,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:65:16 @@ -304,7 +304,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:67:16 @@ -315,7 +315,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:69:16 @@ -326,7 +326,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:71:16 @@ -337,7 +337,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `u64` | LL | foo::(42_u64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:73:16 @@ -348,7 +348,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `u64` | LL | foo::(42u64); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:75:16 @@ -359,7 +359,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `u64` | LL | foo::(42u64); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:78:16 @@ -370,7 +370,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:80:16 @@ -381,7 +381,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:82:16 @@ -392,7 +392,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:84:16 @@ -403,7 +403,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:86:16 @@ -414,7 +414,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:88:16 @@ -425,7 +425,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:91:16 @@ -436,7 +436,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:93:16 @@ -447,7 +447,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:95:16 @@ -458,7 +458,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `i64` | LL | foo::(42_i64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:97:16 @@ -469,7 +469,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `i64` | LL | foo::(42i64); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:99:16 @@ -480,7 +480,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `i64` | LL | foo::(42i64); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:102:16 @@ -491,7 +491,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:104:16 @@ -502,7 +502,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:107:16 @@ -513,7 +513,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:109:16 @@ -524,7 +524,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:111:16 @@ -535,7 +535,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:113:16 @@ -546,7 +546,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:115:16 @@ -557,7 +557,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:117:16 @@ -568,7 +568,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:119:16 @@ -579,7 +579,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `u32` | LL | foo::(42_u32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:121:16 @@ -590,7 +590,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `u32` | LL | foo::(42u32); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:123:16 @@ -601,7 +601,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `u32` | LL | foo::(42u32); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:126:16 @@ -612,7 +612,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:128:16 @@ -623,7 +623,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:130:16 @@ -634,7 +634,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:132:16 @@ -645,7 +645,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:134:16 @@ -656,7 +656,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:136:16 @@ -667,7 +667,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:138:16 @@ -678,7 +678,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:141:16 @@ -689,7 +689,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:143:16 @@ -700,7 +700,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `i32` | LL | foo::(42_i32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:145:16 @@ -711,7 +711,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `i32` | LL | foo::(42i32); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:147:16 @@ -722,7 +722,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `i32` | LL | foo::(42i32); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:150:16 @@ -733,7 +733,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:152:16 @@ -744,7 +744,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:154:16 @@ -755,7 +755,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:157:16 @@ -766,7 +766,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:159:16 @@ -777,7 +777,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:161:16 @@ -788,7 +788,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:163:16 @@ -799,7 +799,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:165:16 @@ -810,7 +810,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:167:16 @@ -821,7 +821,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `u16` | LL | foo::(42_u16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:169:16 @@ -832,7 +832,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `u16` | LL | foo::(42u16); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:171:16 @@ -843,7 +843,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `u16` | LL | foo::(42u16); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:174:16 @@ -854,7 +854,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:176:16 @@ -865,7 +865,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:178:16 @@ -876,7 +876,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:180:16 @@ -887,7 +887,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:182:16 @@ -898,7 +898,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:184:16 @@ -909,7 +909,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:186:16 @@ -920,7 +920,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:188:16 @@ -931,7 +931,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:191:16 @@ -942,7 +942,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `i16` | LL | foo::(42_i16); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:193:16 @@ -953,7 +953,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `i16` | LL | foo::(42i16); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:195:16 @@ -964,7 +964,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `i16` | LL | foo::(42i16); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:198:15 @@ -975,7 +975,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:200:15 @@ -986,7 +986,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:202:15 @@ -997,7 +997,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:204:15 @@ -1008,7 +1008,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:207:15 @@ -1019,7 +1019,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:209:15 @@ -1030,7 +1030,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:211:15 @@ -1041,7 +1041,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:213:15 @@ -1052,7 +1052,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:215:15 @@ -1063,7 +1063,7 @@ LL | foo::(42_i8); help: change the type of the numeric literal from `i8` to `u8` | LL | foo::(42_u8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:217:15 @@ -1074,7 +1074,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `u8` | LL | foo::(42u8); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:219:15 @@ -1085,7 +1085,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `u8` | LL | foo::(42u8); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:222:15 @@ -1096,7 +1096,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:224:15 @@ -1107,7 +1107,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:226:15 @@ -1118,7 +1118,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:228:15 @@ -1129,7 +1129,7 @@ LL | foo::(42_u16); help: change the type of the numeric literal from `u16` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:230:15 @@ -1140,7 +1140,7 @@ LL | foo::(42_u8); help: change the type of the numeric literal from `u8` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:232:15 @@ -1151,7 +1151,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:234:15 @@ -1162,7 +1162,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:236:15 @@ -1173,7 +1173,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:238:15 @@ -1184,7 +1184,7 @@ LL | foo::(42_i16); help: change the type of the numeric literal from `i16` to `i8` | LL | foo::(42_i8); - | ^^^^^ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:241:15 @@ -1195,7 +1195,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `i8` | LL | foo::(42i8); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:243:15 @@ -1206,7 +1206,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `i8` | LL | foo::(42i8); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:246:16 @@ -1217,7 +1217,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `f64` | LL | foo::(42_f64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:248:16 @@ -1228,7 +1228,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `f64` | LL | foo::(42_f64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:250:16 @@ -1239,7 +1239,7 @@ LL | foo::(42_u32); help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_u32.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:252:16 @@ -1250,7 +1250,7 @@ LL | foo::(42_u16); help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_u16.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:254:16 @@ -1261,7 +1261,7 @@ LL | foo::(42_u8); help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_u8.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:256:16 @@ -1272,7 +1272,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `f64` | LL | foo::(42_f64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:258:16 @@ -1283,7 +1283,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `f64` | LL | foo::(42_f64); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:260:16 @@ -1294,7 +1294,7 @@ LL | foo::(42_i32); help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_i32.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:262:16 @@ -1305,7 +1305,7 @@ LL | foo::(42_i16); help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_i16.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:264:16 @@ -1316,7 +1316,7 @@ LL | foo::(42_i8); help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer | LL | foo::(42_i8.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:267:16 @@ -1327,7 +1327,7 @@ LL | foo::(42.0_f32); help: change the type of the numeric literal from `f32` to `f64` | LL | foo::(42.0_f64); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:270:16 @@ -1338,7 +1338,7 @@ LL | foo::(42_usize); help: change the type of the numeric literal from `usize` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:272:16 @@ -1349,7 +1349,7 @@ LL | foo::(42_u64); help: change the type of the numeric literal from `u64` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:274:16 @@ -1360,7 +1360,7 @@ LL | foo::(42_u32); help: change the type of the numeric literal from `u32` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:276:16 @@ -1371,7 +1371,7 @@ LL | foo::(42_u16); help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer | LL | foo::(42_u16.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:278:16 @@ -1382,7 +1382,7 @@ LL | foo::(42_u8); help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer | LL | foo::(42_u8.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:280:16 @@ -1393,7 +1393,7 @@ LL | foo::(42_isize); help: change the type of the numeric literal from `isize` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:282:16 @@ -1404,7 +1404,7 @@ LL | foo::(42_i64); help: change the type of the numeric literal from `i64` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:284:16 @@ -1415,7 +1415,7 @@ LL | foo::(42_i32); help: change the type of the numeric literal from `i32` to `f32` | LL | foo::(42_f32); - | ^^^^^^ + | ~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:286:16 @@ -1426,7 +1426,7 @@ LL | foo::(42_i16); help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer | LL | foo::(42_i16.into()); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:288:16 @@ -1437,7 +1437,7 @@ LL | foo::(42_i8); help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer | LL | foo::(42_i8.into()); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:290:16 @@ -1448,7 +1448,7 @@ LL | foo::(42.0_f64); help: change the type of the numeric literal from `f64` to `f32` | LL | foo::(42.0_f32); - | ^^^^^^^^ + | ~~~~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:294:16 diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr index 70b99ef7869ca..e0a8534cd28fa 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr @@ -10,7 +10,7 @@ LL | ss.r help: to declare that the trait object captures data from argument `ss`, you can add an explicit `'_` lifetime bound | LL | fn load(ss: &mut SomeStruct) -> Box { - | ^^^^ + | ++++ error[E0621]: explicit lifetime required in the type of `ss` --> $DIR/object-lifetime-default-from-box-error.rs:31:12 diff --git a/src/test/ui/object-safety/object-safety-no-static.curr.stderr b/src/test/ui/object-safety/object-safety-no-static.curr.stderr index e00d6bb2f4a36..bd8cf4e30f7fa 100644 --- a/src/test/ui/object-safety/object-safety-no-static.curr.stderr +++ b/src/test/ui/object-safety/object-safety-no-static.curr.stderr @@ -14,11 +14,11 @@ LL | fn foo() {} help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self) {} - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized {} - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr index 91a071f567813..ea1c575ff8c9a 100644 --- a/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr @@ -16,11 +16,11 @@ LL | fn foo() {} help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self) {} - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized {} - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/object-safety/object-safety-no-static.stderr b/src/test/ui/object-safety/object-safety-no-static.stderr deleted file mode 100644 index 0de783f60ea47..0000000000000 --- a/src/test/ui/object-safety/object-safety-no-static.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0038]: the trait `Foo` cannot be made into an object - --> $DIR/object-safety-no-static.rs:8:1 - | -LL | fn foo(); - | --- associated function `foo` has no `self` parameter -... -LL | fn foo_implicit(b: Box) -> Box { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0038`. diff --git a/src/test/ui/obsolete-in-place/bad.stderr b/src/test/ui/obsolete-in-place/bad.stderr index b9aad01b2929a..363dfb77628c4 100644 --- a/src/test/ui/obsolete-in-place/bad.stderr +++ b/src/test/ui/obsolete-in-place/bad.stderr @@ -7,7 +7,7 @@ LL | x <- y; help: if you meant to write a comparison against a negative value, add a space in between `<` and `-` | LL | x < - y; - | ^^^ + | ~~~ error: expected expression, found keyword `in` --> $DIR/bad.rs:10:5 diff --git a/src/test/ui/occurs-check-2.stderr b/src/test/ui/occurs-check-2.stderr index b2c8775e78c37..c004043307899 100644 --- a/src/test/ui/occurs-check-2.stderr +++ b/src/test/ui/occurs-check-2.stderr @@ -7,7 +7,7 @@ LL | f = box g; help: try using a conversion method | LL | f = (box g).to_string(); - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/occurs-check.stderr b/src/test/ui/occurs-check.stderr index a657106ad911f..452163e2fa5ee 100644 --- a/src/test/ui/occurs-check.stderr +++ b/src/test/ui/occurs-check.stderr @@ -7,7 +7,7 @@ LL | f = box f; help: try using a conversion method | LL | f = (box f).to_string(); - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/once-cant-call-twice-on-heap.stderr b/src/test/ui/once-cant-call-twice-on-heap.stderr index 8761b5261d51b..dde75724ed701 100644 --- a/src/test/ui/once-cant-call-twice-on-heap.stderr +++ b/src/test/ui/once-cant-call-twice-on-heap.stderr @@ -16,7 +16,7 @@ LL | blk(); help: consider further restricting this bound | LL | fn foo(blk: F) { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/or-patterns/issue-69875-should-have-been-expanded-earlier-non-exhaustive.stderr b/src/test/ui/or-patterns/issue-69875-should-have-been-expanded-earlier-non-exhaustive.stderr index 61175b84ee1de..8e6964e30623d 100644 --- a/src/test/ui/or-patterns/issue-69875-should-have-been-expanded-earlier-non-exhaustive.stderr +++ b/src/test/ui/or-patterns/issue-69875-should-have-been-expanded-earlier-non-exhaustive.stderr @@ -10,7 +10,7 @@ LL | let (0 | (1 | 2)) = 0; help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let (0 | (1 | 2)) = 0 { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0004]: non-exhaustive patterns: `i32::MIN..=-1_i32` and `3_i32..=i32::MAX` not covered --> $DIR/issue-69875-should-have-been-expanded-earlier-non-exhaustive.rs:3:11 diff --git a/src/test/ui/packed/issue-27060-2.stderr b/src/test/ui/packed/issue-27060-2.stderr index 64e061a89b410..8cd2ce6f36ca6 100644 --- a/src/test/ui/packed/issue-27060-2.stderr +++ b/src/test/ui/packed/issue-27060-2.stderr @@ -10,16 +10,17 @@ LL | data: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | pub struct Bad { - | -- +LL - pub struct Bad { +LL + pub struct Bad { + | help: borrowed types always have a statically known size | LL | data: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | data: Box, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/panics/panic-2021.stderr b/src/test/ui/panics/panic-2021.stderr index 59b1e4f7a9858..373c1c2c0b100 100644 --- a/src/test/ui/panics/panic-2021.stderr +++ b/src/test/ui/panics/panic-2021.stderr @@ -7,7 +7,7 @@ LL | panic!(123); help: you might be missing a string literal to format with | LL | panic!("{}", 123); - | ^^^^^ + | +++++ error: 1 positional argument in format string, but no arguments were given --> $DIR/panic-2021.rs:5:13 @@ -30,7 +30,7 @@ LL | assert!(false, 123); help: you might be missing a string literal to format with | LL | assert!(false, "{}", 123); - | ^^^^^ + | +++++ error: 1 positional argument in format string, but no arguments were given --> $DIR/panic-2021.rs:8:21 diff --git a/src/test/ui/parenthesized-deref-suggestion.stderr b/src/test/ui/parenthesized-deref-suggestion.stderr index 24be32ae9eba6..cafddbe262424 100644 --- a/src/test/ui/parenthesized-deref-suggestion.stderr +++ b/src/test/ui/parenthesized-deref-suggestion.stderr @@ -7,7 +7,7 @@ LL | (sess as *const Session).opts; help: `(sess as *const Session)` is a raw pointer; try dereferencing it | LL | (*(sess as *const Session)).opts; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0609]: no field `0` on type `[u32; 1]` --> $DIR/parenthesized-deref-suggestion.rs:10:21 diff --git a/src/test/ui/parser/bad-crate-name.stderr b/src/test/ui/parser/bad-crate-name.stderr index e015010da1396..c98a620f12371 100644 --- a/src/test/ui/parser/bad-crate-name.stderr +++ b/src/test/ui/parser/bad-crate-name.stderr @@ -7,7 +7,7 @@ LL | extern crate krate-name-here; help: if the original crate name uses dashes you need to use underscores in the code | LL | extern crate krate_name_here; - | ^ ^ + | ~ ~ error[E0463]: can't find crate for `krate_name_here` --> $DIR/bad-crate-name.rs:1:1 diff --git a/src/test/ui/parser/bad-value-ident-false.stderr b/src/test/ui/parser/bad-value-ident-false.stderr index b59ea97e3b1e0..b23322f2c8ced 100644 --- a/src/test/ui/parser/bad-value-ident-false.stderr +++ b/src/test/ui/parser/bad-value-ident-false.stderr @@ -7,7 +7,7 @@ LL | fn false() { } help: you can escape reserved keywords to use them as identifiers | LL | fn r#false() { } - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/bad-value-ident-true.stderr b/src/test/ui/parser/bad-value-ident-true.stderr index 12132b0856bf1..3eaa6004796cb 100644 --- a/src/test/ui/parser/bad-value-ident-true.stderr +++ b/src/test/ui/parser/bad-value-ident-true.stderr @@ -7,7 +7,7 @@ LL | fn true() { } help: you can escape reserved keywords to use them as identifiers | LL | fn r#true() { } - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/bare-struct-body.stderr b/src/test/ui/parser/bare-struct-body.stderr index df10b0ec2d2bc..c77992b2c3406 100644 --- a/src/test/ui/parser/bare-struct-body.stderr +++ b/src/test/ui/parser/bare-struct-body.stderr @@ -9,9 +9,9 @@ LL | | } | help: you might have forgotten to add the struct literal inside the block | -LL | fn foo() -> Foo { SomeStruct { +LL ~ fn foo() -> Foo { SomeStruct { LL | val: (), -LL | } } +LL ~ } } | error: struct literal body without path @@ -25,9 +25,9 @@ LL | | }; | help: you might have forgotten to add the struct literal inside the block | -LL | let x = { SomeStruct { +LL ~ let x = { SomeStruct { LL | val: (), -LL | } }; +LL ~ } }; | error[E0308]: mismatched types diff --git a/src/test/ui/parser/byte-literals.stderr b/src/test/ui/parser/byte-literals.stderr index b9fb42088d9d3..c3d0006163005 100644 --- a/src/test/ui/parser/byte-literals.stderr +++ b/src/test/ui/parser/byte-literals.stderr @@ -41,7 +41,7 @@ LL | b'é'; help: if you meant to use the unicode code point for 'é', use a \xHH escape | LL | b'\xE9'; - | ^^^^ + | ~~~~ error[E0763]: unterminated byte constant --> $DIR/byte-literals.rs:11:6 diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr index 4f22a16224f0c..3b8b3692e053f 100644 --- a/src/test/ui/parser/byte-string-literals.stderr +++ b/src/test/ui/parser/byte-string-literals.stderr @@ -29,7 +29,7 @@ LL | b"é"; help: if you meant to use the unicode code point for 'é', use a \xHH escape | LL | b"\xE9"; - | ^^^^ + | ~~~~ error: raw byte string must be ASCII --> $DIR/byte-string-literals.rs:7:10 diff --git a/src/test/ui/parser/chained-comparison-suggestion.stderr b/src/test/ui/parser/chained-comparison-suggestion.stderr index 067920d12f486..694b0b6eb028f 100644 --- a/src/test/ui/parser/chained-comparison-suggestion.stderr +++ b/src/test/ui/parser/chained-comparison-suggestion.stderr @@ -7,7 +7,7 @@ LL | 1 < 2 <= 3; help: split the comparison into two | LL | 1 < 2 && 2 <= 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:9:7 @@ -18,7 +18,7 @@ LL | 1 < 2 < 3; help: split the comparison into two | LL | 1 < 2 && 2 < 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:13:7 @@ -29,7 +29,7 @@ LL | 1 <= 2 < 3; help: split the comparison into two | LL | 1 <= 2 && 2 < 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:18:7 @@ -40,7 +40,7 @@ LL | 1 <= 2 <= 3; help: split the comparison into two | LL | 1 <= 2 && 2 <= 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:23:7 @@ -51,7 +51,7 @@ LL | 1 > 2 >= 3; help: split the comparison into two | LL | 1 > 2 && 2 >= 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:28:7 @@ -62,7 +62,7 @@ LL | 1 > 2 > 3; help: split the comparison into two | LL | 1 > 2 && 2 > 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:32:7 @@ -73,7 +73,7 @@ LL | 1 >= 2 > 3; help: split the comparison into two | LL | 1 >= 2 && 2 > 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:36:7 @@ -84,7 +84,7 @@ LL | 1 >= 2 >= 3; help: split the comparison into two | LL | 1 >= 2 && 2 >= 3; - | ^^^^ + | ++++ error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:41:7 @@ -95,7 +95,7 @@ LL | 1 == 2 < 3; help: parenthesize the comparison | LL | 1 == (2 < 3); - | ^ ^ + | + + error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:45:7 @@ -106,7 +106,7 @@ LL | 1 > 2 == false; help: parenthesize the comparison | LL | (1 > 2) == false; - | ^ ^ + | + + error: comparison operators cannot be chained --> $DIR/chained-comparison-suggestion.rs:49:7 @@ -117,7 +117,7 @@ LL | 1 == 2 == 3; help: split the comparison into two | LL | 1 == 2 && 2 == 3; - | ^^^^ + | ++++ error[E0308]: mismatched types --> $DIR/chained-comparison-suggestion.rs:4:14 diff --git a/src/test/ui/parser/doc-comment-in-stmt.stderr b/src/test/ui/parser/doc-comment-in-stmt.stderr index 5d94d6fe69b59..febfb600cc7a6 100644 --- a/src/test/ui/parser/doc-comment-in-stmt.stderr +++ b/src/test/ui/parser/doc-comment-in-stmt.stderr @@ -9,7 +9,7 @@ LL | //!self.allow_ty_infer() help: add a space before `!` to use a regular comment | LL | // !self.allow_ty_infer() - | ^^^^ + | ~~~~ error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! bar */` --> $DIR/doc-comment-in-stmt.rs:9:5 @@ -22,7 +22,7 @@ LL | /*! bar */ help: add a space before `!` to use a regular comment | LL | /* ! bar */ - | ^^^^ + | ~~~~ error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/** baz */` --> $DIR/doc-comment-in-stmt.rs:13:7 @@ -33,7 +33,7 @@ LL | 1 /** baz */ help: add a space before `*` to use a regular comment | LL | 1 /* * baz */ - | ^^^^ + | ~~~~ error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! quux */` --> $DIR/doc-comment-in-stmt.rs:17:7 @@ -44,7 +44,7 @@ LL | 2 /*! quux */ help: add a space before `!` to use a regular comment | LL | 2 /* ! quux */ - | ^^^^ + | ~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/dotdotdot-expr.stderr b/src/test/ui/parser/dotdotdot-expr.stderr index ec1335cfdb072..e7203f24d3f8d 100644 --- a/src/test/ui/parser/dotdotdot-expr.stderr +++ b/src/test/ui/parser/dotdotdot-expr.stderr @@ -7,11 +7,11 @@ LL | let _redemptive = 1...21; help: use `..` for an exclusive range | LL | let _redemptive = 1..21; - | ^^ + | ~~ help: or `..=` for an inclusive range | LL | let _redemptive = 1..=21; - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/expr-as-stmt-2.stderr b/src/test/ui/parser/expr-as-stmt-2.stderr index affcb6ed22425..2b6314c38ceb6 100644 --- a/src/test/ui/parser/expr-as-stmt-2.stderr +++ b/src/test/ui/parser/expr-as-stmt-2.stderr @@ -10,7 +10,7 @@ LL | if let Some(x) = a { true } else { false } help: you might have meant to return this value | LL | if let Some(x) = a { return true; } else { false } - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/expr-as-stmt-2.rs:3:40 @@ -24,7 +24,7 @@ LL | if let Some(x) = a { true } else { false } help: you might have meant to return this value | LL | if let Some(x) = a { true } else { return false; } - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/expr-as-stmt-2.rs:6:5 @@ -39,7 +39,7 @@ LL | | if let Some(y) = a { true } else { false } help: parentheses are required to parse this as an expression | LL | (if let Some(x) = a { true } else { false }) - | ^ ^ + | + + error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/expr-as-stmt.stderr b/src/test/ui/parser/expr-as-stmt.stderr index 2bb320e732185..ba5cd01abfcc7 100644 --- a/src/test/ui/parser/expr-as-stmt.stderr +++ b/src/test/ui/parser/expr-as-stmt.stderr @@ -7,7 +7,7 @@ LL | {2} + {2} help: parentheses are required to parse this as an expression | LL | ({2}) + {2} - | ^ ^ + | + + error: expected expression, found `+` --> $DIR/expr-as-stmt.rs:13:9 @@ -18,7 +18,7 @@ LL | {2} + 2 help: parentheses are required to parse this as an expression | LL | ({2}) + 2 - | ^ ^ + | + + error: expected expression, found `+` --> $DIR/expr-as-stmt.rs:19:12 @@ -29,7 +29,7 @@ LL | { 42 } + foo; help: parentheses are required to parse this as an expression | LL | ({ 42 }) + foo; - | ^ ^ + | + + error: expected expression, found `>` --> $DIR/expr-as-stmt.rs:32:7 @@ -39,9 +39,9 @@ LL | } > 0 | help: parentheses are required to parse this as an expression | -LL | (match x { +LL ~ (match x { LL | _ => 1, -LL | }) > 0 +LL ~ }) > 0 | error[E0308]: mismatched types @@ -53,7 +53,7 @@ LL | {2} + {2} help: you might have meant to return this value | LL | {return 2;} + {2} - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:13:6 @@ -64,7 +64,7 @@ LL | {2} + 2 help: you might have meant to return this value | LL | {return 2;} + 2 - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:19:7 @@ -75,7 +75,7 @@ LL | { 42 } + foo; help: you might have meant to return this value | LL | { return 42; } + foo; - | ^^^^^^ ^ + | ++++++ + error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:25:7 @@ -86,7 +86,7 @@ LL | { 3 } * 3 help: you might have meant to return this value | LL | { return 3; } * 3 - | ^^^^^^ ^ + | ++++++ + error[E0614]: type `{integer}` cannot be dereferenced --> $DIR/expr-as-stmt.rs:25:11 @@ -97,7 +97,7 @@ LL | { 3 } * 3 help: parentheses are required to parse this as an expression | LL | ({ 3 }) * 3 - | ^ ^ + | + + error: aborting due to 9 previous errors diff --git a/src/test/ui/parser/fn-body-eq-expr-semi.stderr b/src/test/ui/parser/fn-body-eq-expr-semi.stderr index fdc7a9409d733..f1255d8642a60 100644 --- a/src/test/ui/parser/fn-body-eq-expr-semi.stderr +++ b/src/test/ui/parser/fn-body-eq-expr-semi.stderr @@ -7,7 +7,7 @@ LL | fn foo() = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn foo() { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:5:20 @@ -18,7 +18,7 @@ LL | fn bar() -> u8 = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn bar() -> u8 { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:9:14 @@ -29,7 +29,7 @@ LL | fn foo() = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn foo() { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:11:20 @@ -40,7 +40,7 @@ LL | fn bar() -> u8 = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn bar() -> u8 { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:16:14 @@ -51,7 +51,7 @@ LL | fn foo() = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn foo() { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:17:20 @@ -62,7 +62,7 @@ LL | fn bar() -> u8 = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn bar() -> u8 { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:21:14 @@ -73,7 +73,7 @@ LL | fn foo() = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn foo() { 42 } - | ^ ^ + | ~ ~ error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:22:20 @@ -84,7 +84,7 @@ LL | fn bar() -> u8 = 42; help: surround the expression with `{` and `}` instead of `=` and `;` | LL | fn bar() -> u8 { 42 } - | ^ ^ + | ~ ~ error: incorrect function inside `extern` block --> $DIR/fn-body-eq-expr-semi.rs:9:8 diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr index b3f60b13b0f74..0adfa5b47a3e2 100644 --- a/src/test/ui/parser/fn-header-semantic-fail.stderr +++ b/src/test/ui/parser/fn-header-semantic-fail.stderr @@ -113,7 +113,7 @@ LL | async fn fe1(); help: remove the qualifiers | LL | fn fe1(); - | ^^ + | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:51:19 @@ -127,7 +127,7 @@ LL | unsafe fn fe2(); help: remove the qualifiers | LL | fn fe2(); - | ^^ + | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:52:18 @@ -141,7 +141,7 @@ LL | const fn fe3(); help: remove the qualifiers | LL | fn fe3(); - | ^^ + | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:53:23 @@ -155,7 +155,7 @@ LL | extern "C" fn fe4(); help: remove the qualifiers | LL | fn fe4(); - | ^^ + | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:54:42 @@ -169,7 +169,7 @@ LL | const async unsafe extern "C" fn fe5(); help: remove the qualifiers | LL | fn fe5(); - | ^^ + | ~~ error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:54:9 diff --git a/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr b/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr index 2add9fb33c70e..5367b986d2b8d 100644 --- a/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr +++ b/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr @@ -7,7 +7,7 @@ LL | let _ = move async { }; help: try switching the order | LL | let _ = async move { }; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/inverted-parameters.stderr b/src/test/ui/parser/inverted-parameters.stderr index ae180af93e373..d1a249389fe5c 100644 --- a/src/test/ui/parser/inverted-parameters.stderr +++ b/src/test/ui/parser/inverted-parameters.stderr @@ -38,15 +38,15 @@ LL | fn fizz(i32) {} help: if this is a `self` type, give it a parameter name | LL | fn fizz(self: i32) {} - | ^^^^^^^^^ + | ~~~~~~~~~ help: if this is a parameter name, give it a type | LL | fn fizz(i32: TypeName) {} - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn fizz(_: i32) {} - | ^^^^^^ + | ~~~~~~ error: expected one of `:`, `@`, or `|`, found `S` --> $DIR/inverted-parameters.rs:27:23 diff --git a/src/test/ui/parser/issue-32214.stderr b/src/test/ui/parser/issue-32214.stderr index bc61b3b74e217..d0a9b529983b1 100644 --- a/src/test/ui/parser/issue-32214.stderr +++ b/src/test/ui/parser/issue-32214.stderr @@ -9,7 +9,7 @@ LL | pub fn test >() {} help: move the constraint after the generic argument | LL | pub fn test >() {} - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/issue-35813-postfix-after-cast.stderr b/src/test/ui/parser/issue-35813-postfix-after-cast.stderr index 9ccf17a6cb10e..19b68556d79ad 100644 --- a/src/test/ui/parser/issue-35813-postfix-after-cast.stderr +++ b/src/test/ui/parser/issue-35813-postfix-after-cast.stderr @@ -7,7 +7,7 @@ LL | vec![1, 2, 3] as Vec[0]; help: try surrounding the expression in parentheses | LL | (vec![1, 2, 3] as Vec)[0]; - | ^ ^ + | + + error: casts cannot be followed by indexing --> $DIR/issue-35813-postfix-after-cast.rs:12:5 @@ -18,7 +18,7 @@ LL | vec![1, 2, 3]: Vec[0]; help: try surrounding the expression in parentheses | LL | (vec![1, 2, 3]: Vec)[0]; - | ^ ^ + | + + error: casts cannot be followed by indexing --> $DIR/issue-35813-postfix-after-cast.rs:17:5 @@ -29,7 +29,7 @@ LL | (&[0]) as &[i32][0]; help: try surrounding the expression in parentheses | LL | ((&[0]) as &[i32])[0]; - | ^ ^ + | + + error: casts cannot be followed by indexing --> $DIR/issue-35813-postfix-after-cast.rs:19:5 @@ -40,7 +40,7 @@ LL | (&[0i32]): &[i32; 1][0]; help: try surrounding the expression in parentheses | LL | ((&[0i32]): &[i32; 1])[0]; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:39:13 @@ -51,7 +51,7 @@ LL | let _ = 0i32: i32: i32.count_ones(); help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32: i32).count_ones(); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:41:13 @@ -62,7 +62,7 @@ LL | let _ = 0 as i32: i32.count_ones(); help: try surrounding the expression in parentheses | LL | let _ = (0 as i32: i32).count_ones(); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:43:13 @@ -73,7 +73,7 @@ LL | let _ = 0i32: i32 as i32.count_ones(); help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32 as i32).count_ones(); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:45:13 @@ -84,7 +84,7 @@ LL | let _ = 0 as i32 as i32.count_ones(); help: try surrounding the expression in parentheses | LL | let _ = (0 as i32 as i32).count_ones(); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:47:13 @@ -95,7 +95,7 @@ LL | let _ = 0i32: i32: i32 as u32 as i32.count_ones(); help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32: i32 as u32 as i32).count_ones(); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:49:13 @@ -106,7 +106,7 @@ LL | let _ = 0i32: i32.count_ones(): u32; help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32).count_ones(): u32; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:51:13 @@ -117,7 +117,7 @@ LL | let _ = 0 as i32.count_ones(): u32; help: try surrounding the expression in parentheses | LL | let _ = (0 as i32).count_ones(): u32; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:53:13 @@ -128,7 +128,7 @@ LL | let _ = 0i32: i32.count_ones() as u32; help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32).count_ones() as u32; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:55:13 @@ -139,7 +139,7 @@ LL | let _ = 0 as i32.count_ones() as u32; help: try surrounding the expression in parentheses | LL | let _ = (0 as i32).count_ones() as u32; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:57:13 @@ -150,7 +150,7 @@ LL | let _ = 0i32: i32: i32.count_ones() as u32 as i32; help: try surrounding the expression in parentheses | LL | let _ = (0i32: i32: i32).count_ones() as u32 as i32; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:62:13 @@ -162,8 +162,8 @@ LL | | as i32 | help: try surrounding the expression in parentheses | -LL | let _ = (0 -LL | as i32) +LL ~ let _ = (0 +LL ~ as i32) | error: casts cannot be followed by indexing @@ -175,7 +175,7 @@ LL | let x: i32 = &vec![1, 2, 3] as &Vec[0]; help: try surrounding the expression in parentheses | LL | let x: i32 = (&vec![1, 2, 3] as &Vec)[0]; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:75:5 @@ -186,7 +186,7 @@ LL | 0 as i32.max(0); help: try surrounding the expression in parentheses | LL | (0 as i32).max(0); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:77:5 @@ -197,7 +197,7 @@ LL | 0: i32.max(0); help: try surrounding the expression in parentheses | LL | (0: i32).max(0); - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:92:8 @@ -208,7 +208,7 @@ LL | if 5u64 as i32.max(0) == 0 { help: try surrounding the expression in parentheses | LL | if (5u64 as i32).max(0) == 0 { - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:95:8 @@ -219,7 +219,7 @@ LL | if 5u64: u64.max(0) == 0 { help: try surrounding the expression in parentheses | LL | if (5u64: u64).max(0) == 0 { - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:102:9 @@ -230,7 +230,7 @@ LL | 5u64 as u32.max(0) == 0 help: try surrounding the expression in parentheses | LL | (5u64 as u32).max(0) == 0 - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:106:9 @@ -241,7 +241,7 @@ LL | 5u64: u64.max(0) == 0 help: try surrounding the expression in parentheses | LL | (5u64: u64).max(0) == 0 - | ^ ^ + | + + error: casts cannot be followed by indexing --> $DIR/issue-35813-postfix-after-cast.rs:111:24 @@ -252,7 +252,7 @@ LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]); help: try surrounding the expression in parentheses | LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]); - | ^ ^ + | + + error: casts cannot be followed by indexing --> $DIR/issue-35813-postfix-after-cast.rs:114:25 @@ -263,7 +263,7 @@ LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]); help: try surrounding the expression in parentheses | LL | static bar2: &[i32] = &((&[1i32,2,3]: &[i32; 3])[0..1]); - | ^ ^ + | + + error: casts cannot be followed by ? --> $DIR/issue-35813-postfix-after-cast.rs:119:5 @@ -274,7 +274,7 @@ LL | Err(0u64) as Result?; help: try surrounding the expression in parentheses | LL | (Err(0u64) as Result)?; - | ^ ^ + | + + error: casts cannot be followed by ? --> $DIR/issue-35813-postfix-after-cast.rs:121:5 @@ -285,7 +285,7 @@ LL | Err(0u64): Result?; help: try surrounding the expression in parentheses | LL | (Err(0u64): Result)?; - | ^ ^ + | + + error: casts cannot be followed by a function call --> $DIR/issue-35813-postfix-after-cast.rs:145:5 @@ -296,7 +296,7 @@ LL | drop as fn(u8)(0); help: try surrounding the expression in parentheses | LL | (drop as fn(u8))(0); - | ^ ^ + | + + error: casts cannot be followed by a function call --> $DIR/issue-35813-postfix-after-cast.rs:147:5 @@ -307,7 +307,7 @@ LL | drop_ptr: fn(u8)(0); help: try surrounding the expression in parentheses | LL | (drop_ptr: fn(u8))(0); - | ^ ^ + | + + error: casts cannot be followed by `.await` --> $DIR/issue-35813-postfix-after-cast.rs:152:5 @@ -318,7 +318,7 @@ LL | Box::pin(noop()) as Pin>>.await; help: try surrounding the expression in parentheses | LL | (Box::pin(noop()) as Pin>>).await; - | ^ ^ + | + + error: casts cannot be followed by `.await` --> $DIR/issue-35813-postfix-after-cast.rs:155:5 @@ -329,7 +329,7 @@ LL | Box::pin(noop()): Pin>.await; help: try surrounding the expression in parentheses | LL | (Box::pin(noop()): Pin>).await; - | ^ ^ + | + + error: casts cannot be followed by a field access --> $DIR/issue-35813-postfix-after-cast.rs:167:5 @@ -340,7 +340,7 @@ LL | Foo::default() as Foo.bar; help: try surrounding the expression in parentheses | LL | (Foo::default() as Foo).bar; - | ^ ^ + | + + error: casts cannot be followed by a field access --> $DIR/issue-35813-postfix-after-cast.rs:169:5 @@ -351,7 +351,7 @@ LL | Foo::default(): Foo.bar; help: try surrounding the expression in parentheses | LL | (Foo::default(): Foo).bar; - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:84:9 @@ -362,7 +362,7 @@ LL | if true { 33 } else { 44 } as i32.max(0), help: try surrounding the expression in parentheses | LL | (if true { 33 } else { 44 } as i32).max(0), - | ^ ^ + | + + error: casts cannot be followed by a method call --> $DIR/issue-35813-postfix-after-cast.rs:86:9 @@ -373,7 +373,7 @@ LL | if true { 33 } else { 44 }: i32.max(0) help: try surrounding the expression in parentheses | LL | (if true { 33 } else { 44 }: i32).max(0) - | ^ ^ + | + + error[E0214]: parenthesized type parameters may only be used with a `Fn` trait --> $DIR/issue-35813-postfix-after-cast.rs:131:13 diff --git a/src/test/ui/parser/issue-44406.stderr b/src/test/ui/parser/issue-44406.stderr index 701c32d6236b6..372387131e54b 100644 --- a/src/test/ui/parser/issue-44406.stderr +++ b/src/test/ui/parser/issue-44406.stderr @@ -7,7 +7,7 @@ LL | foo!(true); help: you can escape reserved keywords to use them as identifiers | LL | foo!(r#true); - | ^^^^^^ + | ~~~~~~ error: expected type, found keyword `true` --> $DIR/issue-44406.rs:8:10 diff --git a/src/test/ui/parser/issue-57198.stderr b/src/test/ui/parser/issue-57198.stderr index 197c4cc967d4d..5a56d80a7d74e 100644 --- a/src/test/ui/parser/issue-57198.stderr +++ b/src/test/ui/parser/issue-57198.stderr @@ -7,7 +7,7 @@ LL | m::for(); help: you can escape reserved keywords to use them as identifiers | LL | m::r#for(); - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/issue-62524.stderr b/src/test/ui/parser/issue-62524.stderr index d5e07622b11b9..55eed0402a4c6 100644 --- a/src/test/ui/parser/issue-62524.stderr +++ b/src/test/ui/parser/issue-62524.stderr @@ -17,11 +17,11 @@ LL | | Ϥ, help: change the delimiters to curly braces | LL | y! { /* items */ } - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: add a semicolon | LL | Ϥ,; - | ^ + | + error: cannot find macro `y` in this scope --> $DIR/issue-62524.rs:5:1 diff --git a/src/test/ui/parser/issue-62554.stderr b/src/test/ui/parser/issue-62554.stderr index 935d3842cdf61..5dc9a9675bc21 100644 --- a/src/test/ui/parser/issue-62554.stderr +++ b/src/test/ui/parser/issue-62554.stderr @@ -63,8 +63,8 @@ LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s | help: try placing this code inside a block | -LL | fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { -LL | } +LL ~ fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { +LL + } | error: aborting due to 6 previous errors diff --git a/src/test/ui/parser/issue-62895.stderr b/src/test/ui/parser/issue-62895.stderr index ed4d2340fc5bb..2e7e500f47880 100644 --- a/src/test/ui/parser/issue-62895.stderr +++ b/src/test/ui/parser/issue-62895.stderr @@ -19,7 +19,7 @@ LL | pub g() -> is help: add `fn` here to parse `g` as a public function | LL | pub fn g() -> is - | ^^ + | ++ error: expected item, found `;` --> $DIR/issue-62895.rs:10:9 diff --git a/src/test/ui/parser/issue-62973.stderr b/src/test/ui/parser/issue-62973.stderr index 95ee52d810ddc..3065d642fe105 100644 --- a/src/test/ui/parser/issue-62973.stderr +++ b/src/test/ui/parser/issue-62973.stderr @@ -41,9 +41,9 @@ LL | | | help: surround the struct literal with parentheses | -LL | fn p() { match (s { v, E { [) {) } +LL ~ fn p() { match (s { v, E { [) {) } LL | -LL | ) +LL ~ ) | error: expected one of `.`, `?`, `{`, or an operator, found `}` diff --git a/src/test/ui/parser/issue-64732.stderr b/src/test/ui/parser/issue-64732.stderr index ac04258096280..8046254937763 100644 --- a/src/test/ui/parser/issue-64732.stderr +++ b/src/test/ui/parser/issue-64732.stderr @@ -7,7 +7,7 @@ LL | let _foo = b'hello\0'; help: if you meant to write a byte string literal, use double quotes | LL | let _foo = b"hello\0"; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: character literal may only contain one codepoint --> $DIR/issue-64732.rs:6:16 @@ -18,7 +18,7 @@ LL | let _bar = 'hello'; help: if you meant to write a `str` literal, use double quotes | LL | let _bar = "hello"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/issue-65257-invalid-var-decl-recovery.stderr b/src/test/ui/parser/issue-65257-invalid-var-decl-recovery.stderr index ad72dd30542c0..0a88dd2c4d31c 100644 --- a/src/test/ui/parser/issue-65257-invalid-var-decl-recovery.stderr +++ b/src/test/ui/parser/issue-65257-invalid-var-decl-recovery.stderr @@ -7,7 +7,7 @@ LL | auto n = 0; help: write `let` instead of `auto` to introduce a new variable | LL | let n = 0; - | ^^^ + | ~~~ error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5 @@ -18,7 +18,7 @@ LL | auto m; help: write `let` instead of `auto` to introduce a new variable | LL | let m; - | ^^^ + | ~~~ error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5 @@ -29,7 +29,7 @@ LL | var n = 0; help: write `let` instead of `var` to introduce a new variable | LL | let n = 0; - | ^^^ + | ~~~ error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5 @@ -40,7 +40,7 @@ LL | var m; help: write `let` instead of `var` to introduce a new variable | LL | let m; - | ^^^ + | ~~~ error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5 diff --git a/src/test/ui/parser/issue-68629.stderr b/src/test/ui/parser/issue-68629.stderr index 19c9ef30f9049..b2c7dddc8011c 100644 Binary files a/src/test/ui/parser/issue-68629.stderr and b/src/test/ui/parser/issue-68629.stderr differ diff --git a/src/test/ui/parser/issue-68730.stderr b/src/test/ui/parser/issue-68730.stderr index 8602abacabd32..6585a19d954ef 100644 Binary files a/src/test/ui/parser/issue-68730.stderr and b/src/test/ui/parser/issue-68730.stderr differ diff --git a/src/test/ui/parser/issue-72373.stderr b/src/test/ui/parser/issue-72373.stderr index dfde8624814f8..0bb99a01e55a3 100644 --- a/src/test/ui/parser/issue-72373.stderr +++ b/src/test/ui/parser/issue-72373.stderr @@ -7,7 +7,7 @@ LL | [h, ref ts..] => foo(c, n - h) + foo(ts, n), help: if you meant to bind the contents of the rest of the array pattern into `ts`, use `@` | LL | [h, ref ts @ ..] => foo(c, n - h) + foo(ts, n), - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/parser/issue-81806.stderr b/src/test/ui/parser/issue-81806.stderr index b8ada11d922b2..a62c9b0a1aac4 100644 --- a/src/test/ui/parser/issue-81806.stderr +++ b/src/test/ui/parser/issue-81806.stderr @@ -11,7 +11,7 @@ LL | } help: you can escape reserved keywords to use them as identifiers | LL | r#impl - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-abstract.stderr b/src/test/ui/parser/keyword-abstract.stderr index b355b3a708d45..730c5b64b5b7d 100644 --- a/src/test/ui/parser/keyword-abstract.stderr +++ b/src/test/ui/parser/keyword-abstract.stderr @@ -7,7 +7,7 @@ LL | let abstract = (); help: you can escape reserved keywords to use them as identifiers | LL | let r#abstract = (); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-as-as-identifier.stderr b/src/test/ui/parser/keyword-as-as-identifier.stderr index dea4afd5c0a1c..b9ebdf4b90912 100644 --- a/src/test/ui/parser/keyword-as-as-identifier.stderr +++ b/src/test/ui/parser/keyword-as-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let as = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#as = "foo"; - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-break-as-identifier.stderr b/src/test/ui/parser/keyword-break-as-identifier.stderr index db05f3956a2a9..05615b41756b9 100644 --- a/src/test/ui/parser/keyword-break-as-identifier.stderr +++ b/src/test/ui/parser/keyword-break-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let break = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#break = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-const-as-identifier.stderr b/src/test/ui/parser/keyword-const-as-identifier.stderr index 45c129960ecef..f7efa53a45e2c 100644 --- a/src/test/ui/parser/keyword-const-as-identifier.stderr +++ b/src/test/ui/parser/keyword-const-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let const = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#const = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-continue-as-identifier.stderr b/src/test/ui/parser/keyword-continue-as-identifier.stderr index 2ec4b28c94e09..aed6be2089967 100644 --- a/src/test/ui/parser/keyword-continue-as-identifier.stderr +++ b/src/test/ui/parser/keyword-continue-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let continue = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#continue = "foo"; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-else-as-identifier.stderr b/src/test/ui/parser/keyword-else-as-identifier.stderr index b622806e91669..3fc8af3d154a5 100644 --- a/src/test/ui/parser/keyword-else-as-identifier.stderr +++ b/src/test/ui/parser/keyword-else-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let else = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#else = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-enum-as-identifier.stderr b/src/test/ui/parser/keyword-enum-as-identifier.stderr index 0f3fa3fb624dc..4632814019dab 100644 --- a/src/test/ui/parser/keyword-enum-as-identifier.stderr +++ b/src/test/ui/parser/keyword-enum-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let enum = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#enum = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-final.stderr b/src/test/ui/parser/keyword-final.stderr index c74e3101729d4..f2edc3fa6b923 100644 --- a/src/test/ui/parser/keyword-final.stderr +++ b/src/test/ui/parser/keyword-final.stderr @@ -7,7 +7,7 @@ LL | let final = (); help: you can escape reserved keywords to use them as identifiers | LL | let r#final = (); - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-fn-as-identifier.stderr b/src/test/ui/parser/keyword-fn-as-identifier.stderr index 3219eaf24f94f..100295caf6348 100644 --- a/src/test/ui/parser/keyword-fn-as-identifier.stderr +++ b/src/test/ui/parser/keyword-fn-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let fn = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#fn = "foo"; - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-for-as-identifier.stderr b/src/test/ui/parser/keyword-for-as-identifier.stderr index 30974af74248f..312a635cddc2a 100644 --- a/src/test/ui/parser/keyword-for-as-identifier.stderr +++ b/src/test/ui/parser/keyword-for-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let for = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#for = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-if-as-identifier.stderr b/src/test/ui/parser/keyword-if-as-identifier.stderr index a72030befb38d..086a77742a7b9 100644 --- a/src/test/ui/parser/keyword-if-as-identifier.stderr +++ b/src/test/ui/parser/keyword-if-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let if = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#if = "foo"; - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-impl-as-identifier.stderr b/src/test/ui/parser/keyword-impl-as-identifier.stderr index e51c60ed494f3..a7493d2e60ba5 100644 --- a/src/test/ui/parser/keyword-impl-as-identifier.stderr +++ b/src/test/ui/parser/keyword-impl-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let impl = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#impl = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-let-as-identifier.stderr b/src/test/ui/parser/keyword-let-as-identifier.stderr index d580b4518098c..456e06dbfaa18 100644 --- a/src/test/ui/parser/keyword-let-as-identifier.stderr +++ b/src/test/ui/parser/keyword-let-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let let = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#let = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-loop-as-identifier.stderr b/src/test/ui/parser/keyword-loop-as-identifier.stderr index 15c008da35355..c3b33afb4a32d 100644 --- a/src/test/ui/parser/keyword-loop-as-identifier.stderr +++ b/src/test/ui/parser/keyword-loop-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let loop = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#loop = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-match-as-identifier.stderr b/src/test/ui/parser/keyword-match-as-identifier.stderr index 5ba63965c87be..1ca80dbbd09e4 100644 --- a/src/test/ui/parser/keyword-match-as-identifier.stderr +++ b/src/test/ui/parser/keyword-match-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let match = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#match = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-mod-as-identifier.stderr b/src/test/ui/parser/keyword-mod-as-identifier.stderr index 7fb1bda3fb053..ea161b004c141 100644 --- a/src/test/ui/parser/keyword-mod-as-identifier.stderr +++ b/src/test/ui/parser/keyword-mod-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let mod = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#mod = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-move-as-identifier.stderr b/src/test/ui/parser/keyword-move-as-identifier.stderr index 9721c88cb165d..8036cecd791dd 100644 --- a/src/test/ui/parser/keyword-move-as-identifier.stderr +++ b/src/test/ui/parser/keyword-move-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let move = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#move = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-override.stderr b/src/test/ui/parser/keyword-override.stderr index 8bbc6fc654750..7ae669b27193b 100644 --- a/src/test/ui/parser/keyword-override.stderr +++ b/src/test/ui/parser/keyword-override.stderr @@ -7,7 +7,7 @@ LL | let override = (); help: you can escape reserved keywords to use them as identifiers | LL | let r#override = (); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-pub-as-identifier.stderr b/src/test/ui/parser/keyword-pub-as-identifier.stderr index 10ff53e29161e..df9429a98f0bd 100644 --- a/src/test/ui/parser/keyword-pub-as-identifier.stderr +++ b/src/test/ui/parser/keyword-pub-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let pub = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#pub = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-return-as-identifier.stderr b/src/test/ui/parser/keyword-return-as-identifier.stderr index 5b5f2b7ed54fe..831f557c27a45 100644 --- a/src/test/ui/parser/keyword-return-as-identifier.stderr +++ b/src/test/ui/parser/keyword-return-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let return = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#return = "foo"; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-static-as-identifier.stderr b/src/test/ui/parser/keyword-static-as-identifier.stderr index 81aeb9e37abb3..d133e939d3a0d 100644 --- a/src/test/ui/parser/keyword-static-as-identifier.stderr +++ b/src/test/ui/parser/keyword-static-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let static = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#static = "foo"; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-struct-as-identifier.stderr b/src/test/ui/parser/keyword-struct-as-identifier.stderr index 1b287b60197f4..228ba7c2bc726 100644 --- a/src/test/ui/parser/keyword-struct-as-identifier.stderr +++ b/src/test/ui/parser/keyword-struct-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let struct = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#struct = "foo"; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-trait-as-identifier.stderr b/src/test/ui/parser/keyword-trait-as-identifier.stderr index c3d4d61dbb72a..ea90ed3f05e13 100644 --- a/src/test/ui/parser/keyword-trait-as-identifier.stderr +++ b/src/test/ui/parser/keyword-trait-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let trait = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#trait = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr b/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr index fcd717d6e6712..37ba0f27bc241 100644 --- a/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr +++ b/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr @@ -7,7 +7,7 @@ LL | let try = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#try = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-type-as-identifier.stderr b/src/test/ui/parser/keyword-type-as-identifier.stderr index dfe1958e78fd7..1c49811ae5c84 100644 --- a/src/test/ui/parser/keyword-type-as-identifier.stderr +++ b/src/test/ui/parser/keyword-type-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let type = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#type = "foo"; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-typeof.stderr b/src/test/ui/parser/keyword-typeof.stderr index 7cef6de0cee80..9fb8ac12db4e4 100644 --- a/src/test/ui/parser/keyword-typeof.stderr +++ b/src/test/ui/parser/keyword-typeof.stderr @@ -7,7 +7,7 @@ LL | let typeof = (); help: you can escape reserved keywords to use them as identifiers | LL | let r#typeof = (); - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-unsafe-as-identifier.stderr b/src/test/ui/parser/keyword-unsafe-as-identifier.stderr index d714a99dac449..ddd1bd53083bd 100644 --- a/src/test/ui/parser/keyword-unsafe-as-identifier.stderr +++ b/src/test/ui/parser/keyword-unsafe-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let unsafe = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#unsafe = "foo"; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-use-as-identifier.stderr b/src/test/ui/parser/keyword-use-as-identifier.stderr index 30a6c5b16a354..880afb0075f06 100644 --- a/src/test/ui/parser/keyword-use-as-identifier.stderr +++ b/src/test/ui/parser/keyword-use-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let use = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#use = "foo"; - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-where-as-identifier.stderr b/src/test/ui/parser/keyword-where-as-identifier.stderr index 38d734ab81244..7b6210b712d4f 100644 --- a/src/test/ui/parser/keyword-where-as-identifier.stderr +++ b/src/test/ui/parser/keyword-where-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let where = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#where = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-while-as-identifier.stderr b/src/test/ui/parser/keyword-while-as-identifier.stderr index 22b5454add8b9..8f744c3b1ad6f 100644 --- a/src/test/ui/parser/keyword-while-as-identifier.stderr +++ b/src/test/ui/parser/keyword-while-as-identifier.stderr @@ -7,7 +7,7 @@ LL | let while = "foo"; help: you can escape reserved keywords to use them as identifiers | LL | let r#while = "foo"; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/keyword.stderr b/src/test/ui/parser/keyword.stderr index c179f4ec56089..f7692f8c57fe2 100644 --- a/src/test/ui/parser/keyword.stderr +++ b/src/test/ui/parser/keyword.stderr @@ -7,7 +7,7 @@ LL | pub mod break { help: you can escape reserved keywords to use them as identifiers | LL | pub mod r#break { - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bad-char-literals-2.stderr b/src/test/ui/parser/lex-bad-char-literals-2.stderr index 3a545ee282660..c2b19a7ad5f2d 100644 --- a/src/test/ui/parser/lex-bad-char-literals-2.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-2.stderr @@ -7,7 +7,7 @@ LL | 'nope' help: if you meant to write a `str` literal, use double quotes | LL | "nope" - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bad-char-literals-3.stderr b/src/test/ui/parser/lex-bad-char-literals-3.stderr index ec661ee2a60d4..62a5e424cb469 100644 --- a/src/test/ui/parser/lex-bad-char-literals-3.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-3.stderr @@ -7,7 +7,7 @@ LL | static c: char = '●●'; help: if you meant to write a `str` literal, use double quotes | LL | static c: char = "●●"; - | ^^^^ + | ~~~~ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-3.rs:5:20 @@ -18,7 +18,7 @@ LL | let ch: &str = '●●'; help: if you meant to write a `str` literal, use double quotes | LL | let ch: &str = "●●"; - | ^^^^ + | ~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-5.stderr b/src/test/ui/parser/lex-bad-char-literals-5.stderr index 334165a962a06..184817a6579d0 100644 --- a/src/test/ui/parser/lex-bad-char-literals-5.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-5.stderr @@ -7,7 +7,7 @@ LL | static c: char = '\x10\x10'; help: if you meant to write a `str` literal, use double quotes | LL | static c: char = "\x10\x10"; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-5.rs:5:20 @@ -18,7 +18,7 @@ LL | let ch: &str = '\x10\x10'; help: if you meant to write a `str` literal, use double quotes | LL | let ch: &str = "\x10\x10"; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr index 48b8fc6a72917..4332bdefcb258 100644 --- a/src/test/ui/parser/lex-bad-char-literals-6.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-6.stderr @@ -7,7 +7,7 @@ LL | let x: &str = 'ab'; help: if you meant to write a `str` literal, use double quotes | LL | let x: &str = "ab"; - | ^^^^ + | ~~~~ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-6.rs:4:19 @@ -18,7 +18,7 @@ LL | let y: char = 'cd'; help: if you meant to write a `str` literal, use double quotes | LL | let y: char = "cd"; - | ^^^^ + | ~~~~ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-6.rs:6:13 @@ -29,7 +29,7 @@ LL | let z = 'ef'; help: if you meant to write a `str` literal, use double quotes | LL | let z = "ef"; - | ^^^^ + | ~~~~ error[E0277]: can't compare `&str` with `char` --> $DIR/lex-bad-char-literals-6.rs:9:10 diff --git a/src/test/ui/parser/lifetime-in-pattern.stderr b/src/test/ui/parser/lifetime-in-pattern.stderr index 4ffee657cabbe..bf73595e5b081 100644 --- a/src/test/ui/parser/lifetime-in-pattern.stderr +++ b/src/test/ui/parser/lifetime-in-pattern.stderr @@ -14,15 +14,15 @@ LL | fn test(&'a str) { help: if this is a `self` type, give it a parameter name | LL | fn test(self: &str) { - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: if this is a parameter name, give it a type | LL | fn test(str: &TypeName) { - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn test(_: &str) { - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/lifetime_starts_expressions.stderr b/src/test/ui/parser/lifetime_starts_expressions.stderr index 6f3320e283cdb..82e2743256b05 100644 --- a/src/test/ui/parser/lifetime_starts_expressions.stderr +++ b/src/test/ui/parser/lifetime_starts_expressions.stderr @@ -7,7 +7,7 @@ LL | loop { break 'label: loop { break 'label 42; }; } help: wrap the expression in parentheses | LL | loop { break ('label: loop { break 'label 42; }); } - | ^ ^ + | + + error: parentheses are required around this expression to avoid confusion with a labeled break expression --> $DIR/lifetime_starts_expressions.rs:33:15 @@ -22,11 +22,11 @@ LL | | }; | help: wrap the expression in parentheses | -LL | break ('inner_loop: loop { +LL ~ break ('inner_loop: loop { LL | LL | LL | break 'inner_loop 1; -LL | }); +LL ~ }); | warning: this labeled break expression is easy to confuse with an unlabeled break with a labeled value expression @@ -41,7 +41,7 @@ LL | | loop { break 42; }; help: wrap this expression in parentheses | LL | (loop { break 42; }); - | ^ ^ + | + + error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/parser/macro-keyword.stderr b/src/test/ui/parser/macro-keyword.stderr index 9fe95c3fd3dd0..22f3ccd0de6fb 100644 --- a/src/test/ui/parser/macro-keyword.stderr +++ b/src/test/ui/parser/macro-keyword.stderr @@ -7,7 +7,7 @@ LL | fn macro() { help: you can escape reserved keywords to use them as identifiers | LL | fn r#macro() { - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/macros-no-semicolon-items.stderr b/src/test/ui/parser/macros-no-semicolon-items.stderr index f9019b78c8d38..6d2431c4aec47 100644 --- a/src/test/ui/parser/macros-no-semicolon-items.stderr +++ b/src/test/ui/parser/macros-no-semicolon-items.stderr @@ -7,11 +7,11 @@ LL | macro_rules! foo() help: change the delimiters to curly braces | LL | macro_rules! foo{} - | ^^ + | ~~ help: add a semicolon | LL | macro_rules! foo(); - | ^ + | + error: macros that expand to items must be delimited with braces or followed by a semicolon --> $DIR/macros-no-semicolon-items.rs:8:5 @@ -26,16 +26,16 @@ LL | | ) | help: change the delimiters to curly braces | -LL | bar!{ +LL ~ bar!{ LL | blah LL | blah LL | blah -LL | } +LL + } | help: add a semicolon | LL | ); - | ^ + | + error: unexpected end of macro invocation --> $DIR/macros-no-semicolon-items.rs:1:1 diff --git a/src/test/ui/parser/match-arm-without-braces.stderr b/src/test/ui/parser/match-arm-without-braces.stderr index 03ae351bf7902..4831d79ef2bb3 100644 --- a/src/test/ui/parser/match-arm-without-braces.stderr +++ b/src/test/ui/parser/match-arm-without-braces.stderr @@ -18,8 +18,8 @@ LL | | 8; | help: surround the statements with a body | -LL | { 7; -LL | 8; } +LL ~ { 7; +LL ~ 8; } | error: `match` arm body without braces @@ -33,8 +33,8 @@ LL | | 12; | help: surround the statements with a body | -LL | { 11; -LL | 12; } +LL ~ { 11; +LL ~ 12; } | error: `match` arm body without braces @@ -48,8 +48,8 @@ LL | | 15; | help: surround the statements with a body | -LL | { 14; -LL | 15; } +LL ~ { 14; +LL ~ 15; } | error: expected one of `,`, `.`, `?`, `}`, or an operator, found reserved identifier `_` @@ -73,8 +73,8 @@ LL | | 21 | help: surround the statements with a body | -LL | { 20; -LL | 21 } +LL ~ { 20; +LL ~ 21 } | error: `match` arm body without braces @@ -88,8 +88,8 @@ LL | | 25 | help: surround the statements with a body | -LL | { 24; -LL | 25 } +LL ~ { 24; +LL ~ 25 } | error: `match` arm body without braces @@ -103,8 +103,8 @@ LL | | 28 | help: surround the statements with a body | -LL | { 27; -LL | 28 } +LL ~ { 27; +LL ~ 28 } | error: expected one of `,`, `.`, `?`, `}`, or an operator, found `;` diff --git a/src/test/ui/parser/match-arrows-block-then-binop.stderr b/src/test/ui/parser/match-arrows-block-then-binop.stderr index 3bc451e84e606..cb361a3db5380 100644 --- a/src/test/ui/parser/match-arrows-block-then-binop.stderr +++ b/src/test/ui/parser/match-arrows-block-then-binop.stderr @@ -6,9 +6,9 @@ LL | } + 5 | help: parentheses are required to parse this as an expression | -LL | 0 => ({ +LL ~ 0 => ({ LL | 0 -LL | }) + 5 +LL ~ }) + 5 | error: aborting due to previous error diff --git a/src/test/ui/parser/mbe_missing_right_paren.stderr b/src/test/ui/parser/mbe_missing_right_paren.stderr index ec04b937b9ace..ccaf77d3995e0 100644 --- a/src/test/ui/parser/mbe_missing_right_paren.stderr +++ b/src/test/ui/parser/mbe_missing_right_paren.stderr @@ -15,11 +15,11 @@ LL | macro_rules! abc(ؼ help: change the delimiters to curly braces | LL | macro_rules! abc { /* items */ } - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: add a semicolon | LL | macro_rules! abc(ؼ; - | ^ + | + error: unexpected end of macro invocation --> $DIR/mbe_missing_right_paren.rs:3:19 diff --git a/src/test/ui/parser/mut-patterns.stderr b/src/test/ui/parser/mut-patterns.stderr index 88a77adcd31cd..bfa443a7f0113 100644 --- a/src/test/ui/parser/mut-patterns.stderr +++ b/src/test/ui/parser/mut-patterns.stderr @@ -59,7 +59,7 @@ LL | let mut mut yield(become, await) = r#yield(0, 0); help: you can escape reserved keywords to use them as identifiers | LL | let mut mut r#yield(become, await) = r#yield(0, 0); - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found reserved keyword `become` --> $DIR/mut-patterns.rs:28:23 @@ -70,7 +70,7 @@ LL | let mut mut yield(become, await) = r#yield(0, 0); help: you can escape reserved keywords to use them as identifiers | LL | let mut mut yield(r#become, await) = r#yield(0, 0); - | ^^^^^^^^ + | ~~~~~~~~ error: expected identifier, found keyword `await` --> $DIR/mut-patterns.rs:28:31 @@ -81,7 +81,7 @@ LL | let mut mut yield(become, await) = r#yield(0, 0); help: you can escape reserved keywords to use them as identifiers | LL | let mut mut yield(become, r#await) = r#yield(0, 0); - | ^^^^^^^ + | ~~~~~~~ error: `mut` must be attached to each individual binding --> $DIR/mut-patterns.rs:28:9 diff --git a/src/test/ui/parser/new-unicode-escapes-1.stderr b/src/test/ui/parser/new-unicode-escapes-1.stderr index 1ffdc0401e59c..d133e46b4b0d2 100644 --- a/src/test/ui/parser/new-unicode-escapes-1.stderr +++ b/src/test/ui/parser/new-unicode-escapes-1.stderr @@ -7,7 +7,7 @@ LL | let s = "\u{2603"; help: terminate the unicode escape | LL | let s = "\u{2603}"; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/parser/no-const-fn-in-extern-block.stderr b/src/test/ui/parser/no-const-fn-in-extern-block.stderr index 04fc8c85e4f03..4ac0e265501f2 100644 --- a/src/test/ui/parser/no-const-fn-in-extern-block.stderr +++ b/src/test/ui/parser/no-const-fn-in-extern-block.stderr @@ -9,7 +9,7 @@ LL | const fn foo(); help: remove the qualifiers | LL | fn foo(); - | ^^ + | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/no-const-fn-in-extern-block.rs:4:21 @@ -23,7 +23,7 @@ LL | const unsafe fn bar(); help: remove the qualifiers | LL | fn bar(); - | ^^ + | ~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/omitted-arg-in-item-fn.stderr b/src/test/ui/parser/omitted-arg-in-item-fn.stderr index bc3329dcbc23d..329fa8776f5af 100644 --- a/src/test/ui/parser/omitted-arg-in-item-fn.stderr +++ b/src/test/ui/parser/omitted-arg-in-item-fn.stderr @@ -8,15 +8,15 @@ LL | fn foo(x) { help: if this is a `self` type, give it a parameter name | LL | fn foo(self: x) { - | ^^^^^^^ + | ~~~~~~~ help: if this is a parameter name, give it a type | LL | fn foo(x: TypeName) { - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn foo(_: x) { - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/pat-lt-bracket-2.stderr b/src/test/ui/parser/pat-lt-bracket-2.stderr index 6db9a4a0f15a6..762733cc97ba3 100644 --- a/src/test/ui/parser/pat-lt-bracket-2.stderr +++ b/src/test/ui/parser/pat-lt-bracket-2.stderr @@ -8,11 +8,11 @@ LL | fn a(B<) {} help: if this is a `self` type, give it a parameter name | LL | fn a(self: B<) {} - | ^^^^^^^ + | ~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn a(_: B<) {} - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/parser/range_inclusive_dotdotdot.stderr b/src/test/ui/parser/range_inclusive_dotdotdot.stderr index f129e1e372f1a..2dc2c87eb7baa 100644 --- a/src/test/ui/parser/range_inclusive_dotdotdot.stderr +++ b/src/test/ui/parser/range_inclusive_dotdotdot.stderr @@ -7,11 +7,11 @@ LL | return ...1; help: use `..` for an exclusive range | LL | return ..1; - | ^^ + | ~~ help: or `..=` for an inclusive range | LL | return ..=1; - | ^^^ + | ~~~ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:12:13 @@ -22,11 +22,11 @@ LL | let x = ...0; help: use `..` for an exclusive range | LL | let x = ..0; - | ^^ + | ~~ help: or `..=` for an inclusive range | LL | let x = ..=0; - | ^^^ + | ~~~ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:16:14 @@ -37,11 +37,11 @@ LL | let x = 5...5; help: use `..` for an exclusive range | LL | let x = 5..5; - | ^^ + | ~~ help: or `..=` for an inclusive range | LL | let x = 5..=5; - | ^^^ + | ~~~ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:20:15 @@ -52,11 +52,11 @@ LL | for _ in 0...1 {} help: use `..` for an exclusive range | LL | for _ in 0..1 {} - | ^^ + | ~~ help: or `..=` for an inclusive range | LL | for _ in 0..=1 {} - | ^^^ + | ~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/recover-assoc-eq-missing-term.stderr b/src/test/ui/parser/recover-assoc-eq-missing-term.stderr index 6e41e139220ae..f3ed77cbde215 100644 --- a/src/test/ui/parser/recover-assoc-eq-missing-term.stderr +++ b/src/test/ui/parser/recover-assoc-eq-missing-term.stderr @@ -7,11 +7,12 @@ LL | bar::(); help: to constrain the associated type, add a type after `=` | LL | bar::(); - | ^^^^^^^ + | +++++++ help: remove the `=` if `Item` is a type | -LL | bar::(); - | -- +LL - bar::(); +LL + bar::(); + | error: aborting due to previous error diff --git a/src/test/ui/parser/recover-from-bad-variant.stderr b/src/test/ui/parser/recover-from-bad-variant.stderr index 9b9d2bc4972b4..61ea3695eee0b 100644 --- a/src/test/ui/parser/recover-from-bad-variant.stderr +++ b/src/test/ui/parser/recover-from-bad-variant.stderr @@ -27,7 +27,7 @@ LL | Enum::Bar { a, b } => {} help: use the tuple variant pattern syntax instead | LL | Enum::Bar(a, b) => {} - | ^^^^^^ + | ~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/recover-from-homoglyph.stderr b/src/test/ui/parser/recover-from-homoglyph.stderr index c807931beee19..f11ca9fd58407 100644 --- a/src/test/ui/parser/recover-from-homoglyph.stderr +++ b/src/test/ui/parser/recover-from-homoglyph.stderr @@ -7,7 +7,7 @@ LL | println!(""); help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not | LL | println!(""); - | ^ + | ~ error[E0308]: mismatched types --> $DIR/recover-from-homoglyph.rs:3:20 diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.stderr b/src/test/ui/parser/require-parens-for-chained-comparison.stderr index afb964c17e255..74429cb438c73 100644 --- a/src/test/ui/parser/require-parens-for-chained-comparison.stderr +++ b/src/test/ui/parser/require-parens-for-chained-comparison.stderr @@ -7,7 +7,7 @@ LL | false == false == false; help: split the comparison into two | LL | false == false && false == false; - | ^^^^^^^^ + | ++++++++ error: comparison operators cannot be chained --> $DIR/require-parens-for-chained-comparison.rs:9:11 @@ -18,7 +18,7 @@ LL | false == 0 < 2; help: parenthesize the comparison | LL | false == (0 < 2); - | ^ ^ + | + + error: comparison operators cannot be chained --> $DIR/require-parens-for-chained-comparison.rs:13:6 @@ -29,7 +29,7 @@ LL | f(); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | f::(); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/require-parens-for-chained-comparison.rs:17:6 @@ -40,7 +40,7 @@ LL | f, Option>>(1, 2); help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | f::, Option>>(1, 2); - | ^^ + | ++ error: comparison operators cannot be chained --> $DIR/require-parens-for-chained-comparison.rs:22:21 diff --git a/src/test/ui/parser/struct-literal-in-for.stderr b/src/test/ui/parser/struct-literal-in-for.stderr index 5c229431ad34c..feabd8f5813b8 100644 --- a/src/test/ui/parser/struct-literal-in-for.stderr +++ b/src/test/ui/parser/struct-literal-in-for.stderr @@ -9,9 +9,9 @@ LL | | }.hi() { | help: surround the struct literal with parentheses | -LL | for x in (Foo { +LL ~ for x in (Foo { LL | x: 3 -LL | }).hi() { +LL ~ }).hi() { | error[E0277]: `bool` is not an iterator diff --git a/src/test/ui/parser/struct-literal-in-if.stderr b/src/test/ui/parser/struct-literal-in-if.stderr index 7a64a42e3c8aa..b5a9864bbc4c4 100644 --- a/src/test/ui/parser/struct-literal-in-if.stderr +++ b/src/test/ui/parser/struct-literal-in-if.stderr @@ -9,9 +9,9 @@ LL | | }.hi() { | help: surround the struct literal with parentheses | -LL | if (Foo { +LL ~ if (Foo { LL | x: 3 -LL | }).hi() { +LL ~ }).hi() { | error: aborting due to previous error diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr index 98077761e01cc..692b4d73503a4 100644 --- a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr +++ b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr @@ -9,9 +9,9 @@ LL | | } { | help: surround the struct literal with parentheses | -LL | match (Foo { +LL ~ match (Foo { LL | x: 3 -LL | }) { +LL ~ }) { | error: aborting due to previous error diff --git a/src/test/ui/parser/struct-literal-in-while.stderr b/src/test/ui/parser/struct-literal-in-while.stderr index a14df3a220e75..17e9277e07413 100644 --- a/src/test/ui/parser/struct-literal-in-while.stderr +++ b/src/test/ui/parser/struct-literal-in-while.stderr @@ -9,9 +9,9 @@ LL | | }.hi() { | help: surround the struct literal with parentheses | -LL | while (Foo { +LL ~ while (Foo { LL | x: 3 -LL | }).hi() { +LL ~ }).hi() { | error: aborting due to previous error diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr index d12ea0b2fcb9a..b948ab2abb508 100644 --- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr +++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr @@ -9,9 +9,9 @@ LL | | }.hi() { | help: surround the struct literal with parentheses | -LL | while || (Foo { +LL ~ while || (Foo { LL | x: 3 -LL | }).hi() { +LL ~ }).hi() { | error[E0308]: mismatched types diff --git a/src/test/ui/parser/struct-literal-variant-in-if.stderr b/src/test/ui/parser/struct-literal-variant-in-if.stderr index 3ea5ca565c5e5..4cffbe433b87d 100644 --- a/src/test/ui/parser/struct-literal-variant-in-if.stderr +++ b/src/test/ui/parser/struct-literal-variant-in-if.stderr @@ -7,7 +7,7 @@ LL | if x == E::I { field1: true, field2: 42 } {} help: surround the struct literal with parentheses | LL | if x == (E::I { field1: true, field2: 42 }) {} - | ^ ^ + | + + error: struct literals are not allowed here --> $DIR/struct-literal-variant-in-if.rs:15:13 @@ -18,7 +18,7 @@ LL | if x == E::V { field: false } {} help: surround the struct literal with parentheses | LL | if x == (E::V { field: false }) {} - | ^ ^ + | + + error: struct literals are not allowed here --> $DIR/struct-literal-variant-in-if.rs:17:13 @@ -29,7 +29,7 @@ LL | if x == E::J { field: -42 } {} help: surround the struct literal with parentheses | LL | if x == (E::J { field: -42 }) {} - | ^ ^ + | + + error: struct literals are not allowed here --> $DIR/struct-literal-variant-in-if.rs:19:13 @@ -40,7 +40,7 @@ LL | if x == E::K { field: "" } {} help: surround the struct literal with parentheses | LL | if x == (E::K { field: "" }) {} - | ^ ^ + | + + error[E0423]: expected value, found struct variant `E::V` --> $DIR/struct-literal-variant-in-if.rs:10:13 @@ -51,7 +51,7 @@ LL | if x == E::V { field } {} help: surround the struct literal with parentheses | LL | if x == (E::V { field }) {} - | ^ ^ + | + + error[E0308]: mismatched types --> $DIR/struct-literal-variant-in-if.rs:10:20 diff --git a/src/test/ui/parser/trait-object-delimiters.stderr b/src/test/ui/parser/trait-object-delimiters.stderr index 18b1b24122ecf..1ae0205615cb1 100644 --- a/src/test/ui/parser/trait-object-delimiters.stderr +++ b/src/test/ui/parser/trait-object-delimiters.stderr @@ -12,8 +12,9 @@ LL | fn foo2(_: &dyn (Drop + AsRef)) {} | help: remove the parentheses | -LL | fn foo2(_: &dyn Drop + AsRef) {} - | -- -- +LL - fn foo2(_: &dyn (Drop + AsRef)) {} +LL + fn foo2(_: &dyn Drop + AsRef) {} + | error: expected parameter name, found `{` --> $DIR/trait-object-delimiters.rs:8:17 diff --git a/src/test/ui/parser/unicode-chars.stderr b/src/test/ui/parser/unicode-chars.stderr index 4e14eda8f2bfa..0cfe9240e8514 100644 --- a/src/test/ui/parser/unicode-chars.stderr +++ b/src/test/ui/parser/unicode-chars.stderr @@ -7,7 +7,7 @@ LL | let y = 0; help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not | LL | let y = 0; - | ^ + | ~ error: aborting due to previous error diff --git a/src/test/ui/parser/unicode-quote-chars.stderr b/src/test/ui/parser/unicode-quote-chars.stderr index 04ea0c6e95f39..092abeb53cd40 100644 --- a/src/test/ui/parser/unicode-quote-chars.stderr +++ b/src/test/ui/parser/unicode-quote-chars.stderr @@ -7,7 +7,7 @@ LL | println!(“hello world”); help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not | LL | println!("hello world"); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: unknown start of token: \u{201d} --> $DIR/unicode-quote-chars.rs:2:26 @@ -18,7 +18,7 @@ LL | println!(“hello world”); help: Unicode character '”' (Right Double Quotation Mark) looks like '"' (Quotation Mark), but it is not | LL | println!(“hello world"); - | ^ + | ~ error: expected `,`, found `world` --> $DIR/unicode-quote-chars.rs:2:21 diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index e14e17c162233..528306b22dd5a 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -8,7 +8,7 @@ LL | a == b; help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | fn foo(a: &T, b: T) where &T: PartialEq { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr index 6ff0dadf0d1f3..4249a74b3ed62 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr @@ -49,7 +49,7 @@ LL | Some(ref _y @ _z) => {} help: borrow this field in the pattern to avoid moving `x.0` | LL | Some(ref _y @ ref _z) => {} - | ^^^ + | +++ error[E0382]: borrow of moved value --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14 @@ -64,7 +64,7 @@ LL | Some(ref mut _y @ _z) => {} help: borrow this field in the pattern to avoid moving `x.0` | LL | Some(ref mut _y @ ref _z) => {} - | ^^^ + | +++ error: aborting due to 6 previous errors diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr index e6a1e5ef07ce4..c019aae3dfc9c 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr @@ -299,7 +299,7 @@ LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} help: borrow this field in the pattern to avoid moving the value | LL | ref a @ Some((ref b @ ref mut c, ref d @ e)) => {} - | ^^^ + | +++ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:69:38 @@ -314,7 +314,7 @@ LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} help: borrow this field in the pattern to avoid moving the value | LL | ref a @ Some((ref b @ mut c, ref d @ ref e)) => {} - | ^^^ + | +++ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11 diff --git a/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr b/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr index 9bdbf0bf9f40d..7f5da8f3c2dcc 100644 --- a/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr +++ b/src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr @@ -21,11 +21,11 @@ LL | let P() = U {}; help: use `_` to explicitly ignore each field | LL | let P(_) = U {}; - | ^ + | + help: use `..` to ignore all fields | LL | let P(..) = U {}; - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/pattern/issue-74539.stderr b/src/test/ui/pattern/issue-74539.stderr index f7644c19ea0d9..7d998af7fb388 100644 --- a/src/test/ui/pattern/issue-74539.stderr +++ b/src/test/ui/pattern/issue-74539.stderr @@ -8,7 +8,7 @@ LL | E::A(x @ ..) => { help: if you don't need to use the contents of x, discard the tuple's remaining fields | LL | E::A(..) => { - | ^^ + | ~~ error: `..` patterns are not allowed here --> $DIR/issue-74539.rs:8:18 @@ -30,7 +30,7 @@ LL | E::A(x @ ..) => { help: use `_` to explicitly ignore each field | LL | E::A(x @ .., _) => { - | ^^^ + | +++ error: aborting due to 3 previous errors diff --git a/src/test/ui/pattern/issue-74702.stderr b/src/test/ui/pattern/issue-74702.stderr index aca5c9aed9624..f2e2c8f021bad 100644 --- a/src/test/ui/pattern/issue-74702.stderr +++ b/src/test/ui/pattern/issue-74702.stderr @@ -8,7 +8,7 @@ LL | let (foo @ ..,) = (0, 0); help: if you don't need to use the contents of foo, discard the tuple's remaining fields | LL | let (..,) = (0, 0); - | ^^ + | ~~ error: `..` patterns are not allowed here --> $DIR/issue-74702.rs:2:16 diff --git a/src/test/ui/pattern/pat-tuple-underfield.stderr b/src/test/ui/pattern/pat-tuple-underfield.stderr index 70c21dbafe9fc..2fbcb6d67ba36 100644 --- a/src/test/ui/pattern/pat-tuple-underfield.stderr +++ b/src/test/ui/pattern/pat-tuple-underfield.stderr @@ -19,7 +19,7 @@ LL | S(x) => {} help: use `_` to explicitly ignore each field | LL | S(x, _) => {} - | ^^^ + | +++ error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields --> $DIR/pat-tuple-underfield.rs:14:9 @@ -33,11 +33,11 @@ LL | S(_) => {} help: use `_` to explicitly ignore each field | LL | S(_, _) => {} - | ^^^ + | +++ help: use `..` to ignore all fields | LL | S(..) => {} - | ^^ + | ~~ error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields --> $DIR/pat-tuple-underfield.rs:20:9 @@ -51,11 +51,11 @@ LL | S() => {} help: use `_` to explicitly ignore each field | LL | S(_, _) => {} - | ^^^^ + | ++++ help: use `..` to ignore all fields | LL | S(..) => {} - | ^^ + | ++ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/pat-tuple-underfield.rs:27:9 @@ -69,7 +69,7 @@ LL | E::S(x) => {} help: use `_` to explicitly ignore each field | LL | E::S(x, _) => {} - | ^^^ + | +++ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/pat-tuple-underfield.rs:32:9 @@ -83,11 +83,11 @@ LL | E::S(_) => {} help: use `_` to explicitly ignore each field | LL | E::S(_, _) => {} - | ^^^ + | +++ help: use `..` to ignore all fields | LL | E::S(..) => {} - | ^^ + | ~~ error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields --> $DIR/pat-tuple-underfield.rs:38:9 @@ -101,11 +101,11 @@ LL | E::S() => {} help: use `_` to explicitly ignore each field | LL | E::S(_, _) => {} - | ^^^^ + | ++++ help: use `..` to ignore all fields | LL | E::S(..) => {} - | ^^ + | ++ error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 4 fields --> $DIR/pat-tuple-underfield.rs:50:9 @@ -119,11 +119,11 @@ LL | Point4( a , _ ) => {} help: use `_` to explicitly ignore each field | LL | Point4( a , _ , _, _) => {} - | ^^^^^^ + | ++++++ help: use `..` to ignore the rest of the fields | LL | Point4( a, ..) => {} - | ^^^^ + | ~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr index 44d6a854b3db6..3f28ffed29162 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -19,11 +19,11 @@ LL | A::D(_) => (), help: use this syntax instead | LL | A::D => (), - | ^^^^ + | ~~~~ help: a tuple variant with a similar name exists | LL | A::B(_) => (), - | ^ + | ~ error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/pattern-error-continue.rs:17:9 diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.stderr index 29aa0c1c92670..02eff28015d17 100644 --- a/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.stderr +++ b/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.stderr @@ -49,7 +49,7 @@ LL | let E::A = e; help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let E::A = e { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0004]: non-exhaustive patterns: `&B` and `&C` not covered --> $DIR/non-exhaustive-defined-here.rs:40:11 @@ -102,7 +102,7 @@ LL | let E::A = e; help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let E::A = e { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0004]: non-exhaustive patterns: `&&mut &B` and `&&mut &C` not covered --> $DIR/non-exhaustive-defined-here.rs:48:11 @@ -198,7 +198,7 @@ LL | let Opt::Some(ref _x) = e; help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Opt::Some(ref _x) = e { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/phantom-auto-trait.stderr b/src/test/ui/phantom-auto-trait.stderr index de13176ddc2a5..acd33e0a41686 100644 --- a/src/test/ui/phantom-auto-trait.stderr +++ b/src/test/ui/phantom-auto-trait.stderr @@ -21,7 +21,7 @@ LL | struct Guard<'a, T: 'a> { help: consider restricting type parameter `T` | LL | fn not_sync(x: Guard) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-auto-trait.rs:26:12 @@ -51,7 +51,7 @@ LL | struct Nested(T); help: consider restricting type parameter `T` | LL | fn nested_not_sync(x: Nested>) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/placement-syntax.stderr b/src/test/ui/placement-syntax.stderr index 1a76f7c222fc2..3fdaf4cd0f55d 100644 --- a/src/test/ui/placement-syntax.stderr +++ b/src/test/ui/placement-syntax.stderr @@ -7,7 +7,7 @@ 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 { - | ^^^ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/pptypedef.stderr b/src/test/ui/pptypedef.stderr index 40155de9c7702..c42d9e6bbf0fc 100644 --- a/src/test/ui/pptypedef.stderr +++ b/src/test/ui/pptypedef.stderr @@ -7,7 +7,7 @@ LL | let_in(3u32, |i| { assert!(i == 3i32); }); help: change the type of the numeric literal from `i32` to `u32` | LL | let_in(3u32, |i| { assert!(i == 3u32); }); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/pptypedef.rs:8:37 @@ -18,7 +18,7 @@ LL | let_in(3i32, |i| { assert!(i == 3u32); }); help: change the type of the numeric literal from `u32` to `i32` | LL | let_in(3i32, |i| { assert!(i == 3i32); }); - | ^^^^ + | ~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/privacy-ns1.stderr b/src/test/ui/privacy/privacy-ns1.stderr index d09a8aae74801..91bc84e70ac51 100644 --- a/src/test/ui/privacy/privacy-ns1.stderr +++ b/src/test/ui/privacy/privacy-ns1.stderr @@ -10,7 +10,7 @@ LL | Bar(); help: a unit struct with a similar name exists | LL | Baz(); - | ^^^ + | ~~~ help: consider importing this function instead | LL | use foo2::Bar; @@ -28,7 +28,7 @@ LL | Bar(); help: a unit struct with a similar name exists | LL | Baz(); - | ^^^ + | ~~~ help: consider importing this function | LL | use foo2::Bar; @@ -46,7 +46,7 @@ LL | let _x: Box; help: a struct with a similar name exists | LL | let _x: Box; - | ^^^ + | ~~~ help: consider importing this trait | LL | use foo1::Bar; diff --git a/src/test/ui/privacy/privacy-ns2.stderr b/src/test/ui/privacy/privacy-ns2.stderr index fdf0549cf50bc..904e9013f94a8 100644 --- a/src/test/ui/privacy/privacy-ns2.stderr +++ b/src/test/ui/privacy/privacy-ns2.stderr @@ -21,7 +21,7 @@ LL | Bar(); help: a unit struct with a similar name exists | LL | Baz(); - | ^^^ + | ~~~ help: consider importing this function instead | LL | use foo2::Bar; @@ -36,7 +36,7 @@ LL | let _x : Bar(); help: use `=` if you meant to assign | LL | let _x = Bar(); - | ^ + | ~ help: consider importing this trait instead | LL | use foo1::Bar; diff --git a/src/test/ui/privacy/private-in-public-warn.stderr b/src/test/ui/privacy/private-in-public-warn.stderr index 8240cc3649d07..f51cfc836a8d5 100644 --- a/src/test/ui/privacy/private-in-public-warn.stderr +++ b/src/test/ui/privacy/private-in-public-warn.stderr @@ -336,8 +336,9 @@ LL | pub type Alias = T; = note: `#[warn(type_alias_bounds)]` on by default help: the bound will not be checked when the type alias is used, and should be removed | -LL | pub type Alias = T; - | -- +LL - pub type Alias = T; +LL + pub type Alias = T; + | warning: where clauses are not enforced in type aliases --> $DIR/private-in-public-warn.rs:75:29 @@ -347,8 +348,9 @@ LL | pub type Alias where T: PrivTr = T; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | pub type Alias = T; - | -- +LL - pub type Alias where T: PrivTr = T; +LL + pub type Alias = T; + | error: aborting due to 36 previous errors; 2 warnings emitted diff --git a/src/test/ui/proc-macro/item-error.stderr b/src/test/ui/proc-macro/item-error.stderr index 27f7639d213d2..b544be6e96a27 100644 --- a/src/test/ui/proc-macro/item-error.stderr +++ b/src/test/ui/proc-macro/item-error.stderr @@ -6,8 +6,8 @@ LL | a: &u64 | help: consider introducing a named lifetime parameter | -LL | struct A<'a> { -LL | a: &'a u64 +LL ~ struct A<'a> { +LL ~ a: &'a u64 | error: aborting due to previous error diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index 9e91ed4068b1f..713560772ee4c 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -18,7 +18,7 @@ LL | Some(x) => { return x }, help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | Some(x) => { return x.try_into().unwrap() }, - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/span-preservation.rs:33:22 diff --git a/src/test/ui/pub/pub-ident-fn-2.stderr b/src/test/ui/pub/pub-ident-fn-2.stderr index b830b0e90098a..b5b667b41b67b 100644 --- a/src/test/ui/pub/pub-ident-fn-2.stderr +++ b/src/test/ui/pub/pub-ident-fn-2.stderr @@ -7,7 +7,7 @@ LL | pub foo(_s: usize) { bar() } help: add `fn` here to parse `foo` as a public function | LL | pub fn foo(_s: usize) { bar() } - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-ident-fn-with-lifetime-2.stderr b/src/test/ui/pub/pub-ident-fn-with-lifetime-2.stderr index 0df6c00a31656..6a9aeaf4a56ac 100644 --- a/src/test/ui/pub/pub-ident-fn-with-lifetime-2.stderr +++ b/src/test/ui/pub/pub-ident-fn-with-lifetime-2.stderr @@ -7,7 +7,7 @@ LL | pub bar<'a>(&self, _s: &'a usize) -> bool { true } help: add `fn` here to parse `bar` as a public method | LL | pub fn bar<'a>(&self, _s: &'a usize) -> bool { true } - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-ident-fn-with-lifetime.stderr b/src/test/ui/pub/pub-ident-fn-with-lifetime.stderr index 5b378df04b025..c1ca0136b18fb 100644 --- a/src/test/ui/pub/pub-ident-fn-with-lifetime.stderr +++ b/src/test/ui/pub/pub-ident-fn-with-lifetime.stderr @@ -7,7 +7,7 @@ LL | pub foo<'a>(_s: &'a usize) -> bool { true } help: add `fn` here to parse `foo` as a public function | LL | pub fn foo<'a>(_s: &'a usize) -> bool { true } - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-ident-fn.stderr b/src/test/ui/pub/pub-ident-fn.stderr index 928f62133a95b..cb94c48add4be 100644 --- a/src/test/ui/pub/pub-ident-fn.stderr +++ b/src/test/ui/pub/pub-ident-fn.stderr @@ -7,7 +7,7 @@ LL | pub foo(_s: usize) -> bool { true } help: add `fn` here to parse `foo` as a public function | LL | pub fn foo(_s: usize) -> bool { true } - | ^^ + | ++ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-ident-struct-with-lifetime.stderr b/src/test/ui/pub/pub-ident-struct-with-lifetime.stderr index 79597c54e68e2..562b68e354249 100644 --- a/src/test/ui/pub/pub-ident-struct-with-lifetime.stderr +++ b/src/test/ui/pub/pub-ident-struct-with-lifetime.stderr @@ -7,7 +7,7 @@ LL | pub S<'a> { help: add `struct` here to parse `S` as a public struct | LL | pub struct S<'a> { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-ident-struct.stderr b/src/test/ui/pub/pub-ident-struct.stderr index 8af24904ef24c..d3a378786e4d2 100644 --- a/src/test/ui/pub/pub-ident-struct.stderr +++ b/src/test/ui/pub/pub-ident-struct.stderr @@ -7,7 +7,7 @@ LL | pub S { help: add `struct` here to parse `S` as a public struct | LL | pub struct S { - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/question-mark-type-infer.stderr b/src/test/ui/question-mark-type-infer.stderr index db5042b40d8bc..86c533d7a59c9 100644 --- a/src/test/ui/question-mark-type-infer.stderr +++ b/src/test/ui/question-mark-type-infer.stderr @@ -8,7 +8,7 @@ LL | l.iter().map(f).collect()? help: consider specifying the type argument in the method call | LL | l.iter().map(f).collect::()? - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/recursion/recursive-enum.stderr b/src/test/ui/recursion/recursive-enum.stderr index ab4709d8e709e..f5d25c5641dd1 100644 --- a/src/test/ui/recursion/recursive-enum.stderr +++ b/src/test/ui/recursion/recursive-enum.stderr @@ -9,7 +9,7 @@ LL | enum List { Cons(T, List), Nil } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable | LL | enum List { Cons(T, Box>), Nil } - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/ref-suggestion.stderr b/src/test/ui/ref-suggestion.stderr index 332dbb79cfa48..a973c583a9d66 100644 --- a/src/test/ui/ref-suggestion.stderr +++ b/src/test/ui/ref-suggestion.stderr @@ -31,7 +31,7 @@ LL | x; help: borrow this field in the pattern to avoid moving `x.0.0` | LL | (Some(ref y), ()) => {}, - | ^^^ + | +++ error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr index 4bd16c71137a1..561dd64b49d4b 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr +++ b/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr @@ -14,7 +14,7 @@ LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | WrapB::new().set(move |t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-big.rs:67:26 @@ -32,7 +32,7 @@ LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | WrapB::new().set(move |t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr index f70e4ea9fbcc6..e446f2a0027e4 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr +++ b/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr @@ -14,7 +14,7 @@ LL | return f; help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:9:17 @@ -32,7 +32,7 @@ LL | return f; help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 @@ -50,7 +50,7 @@ LL | f help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 @@ -68,7 +68,7 @@ LL | f help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:55:17 @@ -86,7 +86,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:55:17 @@ -104,7 +104,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:66:17 @@ -122,7 +122,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:66:17 @@ -140,7 +140,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:90:21 @@ -158,7 +158,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:90:21 @@ -176,7 +176,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:104:21 @@ -194,7 +194,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:104:21 @@ -212,7 +212,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:132:21 @@ -230,7 +230,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:132:21 @@ -248,7 +248,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:147:21 @@ -266,7 +266,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:147:21 @@ -284,7 +284,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:175:21 @@ -302,7 +302,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:175:21 @@ -320,7 +320,7 @@ LL | return Box::new(f); help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:189:21 @@ -338,7 +338,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:189:21 @@ -356,7 +356,7 @@ LL | Box::new(f) help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^ + | ++++ error: aborting due to 20 previous errors diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr index 3607d6a722c72..1c8840f540e76 100644 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr @@ -9,11 +9,11 @@ LL | let x: Box = Box::new(v); help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` | LL | fn a(v: &[u8]) -> Box { - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn a(v: &'static [u8]) -> Box { - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/region-object-lifetime-in-coercion.rs:13:14 @@ -26,11 +26,11 @@ LL | Box::new(v) help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` | LL | fn b(v: &[u8]) -> Box { - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn b(v: &'static [u8]) -> Box { - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/region-object-lifetime-in-coercion.rs:19:14 @@ -44,7 +44,7 @@ LL | Box::new(v) help: to declare that the trait object captures data from argument `v`, you can add an explicit `'_` lifetime bound | LL | fn c(v: &[u8]) -> Box { - | ^^^^ + | ++++ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/region-object-lifetime-in-coercion.rs:23:14 diff --git a/src/test/ui/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr index da995a96310c2..78d2371cf53b2 100644 --- a/src/test/ui/regions/regions-close-object-into-object-2.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr @@ -9,11 +9,11 @@ LL | box B(&*v) as Box help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` | LL | fn g<'a, T: 'static>(v: Box + 'a>) -> Box { - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn g<'a, T: 'static>(v: Box<(dyn A + 'static)>) -> Box { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr index 7dc880849a629..8c94b44f20037 100644 --- a/src/test/ui/regions/regions-close-object-into-object-4.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr @@ -9,11 +9,11 @@ LL | box B(&*v) as Box help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` | LL | fn i<'a, T, U>(v: Box+'a>) -> Box { - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn i<'a, T, U>(v: Box<(dyn A + 'static)>) -> Box { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-in-enums-anon.stderr b/src/test/ui/regions/regions-in-enums-anon.stderr index b3649c5b48530..ed547aa9c4100 100644 --- a/src/test/ui/regions/regions-in-enums-anon.stderr +++ b/src/test/ui/regions/regions-in-enums-anon.stderr @@ -6,8 +6,8 @@ LL | Bar(&isize) | help: consider introducing a named lifetime parameter | -LL | enum Foo<'a> { -LL | Bar(&'a isize) +LL ~ enum Foo<'a> { +LL ~ Bar(&'a isize) | error: aborting due to previous error diff --git a/src/test/ui/regions/regions-in-structs-anon.stderr b/src/test/ui/regions/regions-in-structs-anon.stderr index 60a6fb9a0fad9..992d25c9fd124 100644 --- a/src/test/ui/regions/regions-in-structs-anon.stderr +++ b/src/test/ui/regions/regions-in-structs-anon.stderr @@ -6,8 +6,8 @@ LL | x: &isize | help: consider introducing a named lifetime parameter | -LL | struct Foo<'a> { -LL | x: &'a isize +LL ~ struct Foo<'a> { +LL ~ x: &'a isize | error: aborting due to previous error diff --git a/src/test/ui/regions/regions-name-undeclared.stderr b/src/test/ui/regions/regions-name-undeclared.stderr index 5f6ff280e6531..250752c9b9e68 100644 --- a/src/test/ui/regions/regions-name-undeclared.stderr +++ b/src/test/ui/regions/regions-name-undeclared.stderr @@ -28,11 +28,11 @@ LL | fn m4(&self, arg: &'b isize) { } help: consider introducing lifetime `'b` here | LL | impl<'b, 'a> Foo<'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn m4<'b>(&self, arg: &'b isize) { } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:17:12 @@ -44,11 +44,11 @@ LL | fn m5(&'b self) { } help: consider introducing lifetime `'b` here | LL | impl<'b, 'a> Foo<'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn m5<'b>(&'b self) { } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:18:27 @@ -60,11 +60,11 @@ LL | fn m6(&self, arg: Foo<'b>) { } help: consider introducing lifetime `'b` here | LL | impl<'b, 'a> Foo<'a> { - | ^^^ + | +++ help: consider introducing lifetime `'b` here | LL | fn m6<'b>(&self, arg: Foo<'b>) { } - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:26:22 @@ -107,11 +107,11 @@ LL | ... &'b isize, help: consider introducing lifetime `'b` here | LL | fn fn_types<'b>(a: &'a isize, - | ^^^^ + | ++++ help: consider making the bound lifetime-generic with a new `'b` lifetime | LL | b: Box FnOnce(&'a isize, - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:46:36 @@ -124,11 +124,11 @@ LL | ... &'b isize)>, help: consider introducing lifetime `'b` here | LL | fn fn_types<'b>(a: &'a isize, - | ^^^^ + | ++++ help: consider making the bound lifetime-generic with a new `'b` lifetime | LL | b: Box FnOnce(&'a isize, - | ^^^^ + | ++++ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:47:17 @@ -151,11 +151,11 @@ LL | async fn buggy(&self) -> &'a str { help: consider introducing lifetime `'a` here | LL | impl<'a> Bug { - | ^^^^ + | ++++ help: consider introducing lifetime `'a` here | LL | async fn buggy<'a>(&self) -> &'a str { - | ^^^^ + | ++++ error: aborting due to 12 previous errors diff --git a/src/test/ui/regions/regions-proc-bound-capture.stderr b/src/test/ui/regions/regions-proc-bound-capture.stderr index e76073f4f6b13..50b3748bf40e9 100644 --- a/src/test/ui/regions/regions-proc-bound-capture.stderr +++ b/src/test/ui/regions/regions-proc-bound-capture.stderr @@ -10,11 +10,11 @@ LL | Box::new(move || { *x }) help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x` | LL | fn static_proc(x: &isize) -> Box (isize) + '_> { - | ^^ + | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn static_proc(x: &'static isize) -> Box (isize) + 'static> { - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/reify-intrinsic.stderr b/src/test/ui/reify-intrinsic.stderr index 69c11b5c56fd3..dff4ca68d3103 100644 --- a/src/test/ui/reify-intrinsic.stderr +++ b/src/test/ui/reify-intrinsic.stderr @@ -11,7 +11,7 @@ LL | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::tr help: use parentheses to call this function | LL | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute(...); - | ^^^^^ + | +++++ error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid --> $DIR/reify-intrinsic.rs:11:13 diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index e90754e9118d2..cd07e5b8935f2 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -61,7 +61,7 @@ LL | let f = [0; 4u8]; help: change the type of the numeric literal from `u8` to `usize` | LL | let f = [0; 4usize]; - | ^^^^^^ + | ~~~~~~ error: aborting due to 9 previous errors diff --git a/src/test/ui/reserved/reserved-become.stderr b/src/test/ui/reserved/reserved-become.stderr index 47e5b803970b5..7878efeebe996 100644 --- a/src/test/ui/reserved/reserved-become.stderr +++ b/src/test/ui/reserved/reserved-become.stderr @@ -7,7 +7,7 @@ LL | let become = 0; help: you can escape reserved keywords to use them as identifiers | LL | let r#become = 0; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-2356.stderr b/src/test/ui/resolve/issue-2356.stderr index 8083233c01b92..d187267388577 100644 --- a/src/test/ui/resolve/issue-2356.stderr +++ b/src/test/ui/resolve/issue-2356.stderr @@ -19,7 +19,7 @@ LL | default(); help: you might have meant to call the associated function | LL | Self::default(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: consider importing this function | LL | use std::default::default; @@ -78,7 +78,7 @@ LL | if self.whiskers > 3 { help: add a `self` receiver parameter to make the associated `fn` a method | LL | fn meow(&self) { - | ^^^^^ + | +++++ error[E0425]: cannot find function `grow_older` in this scope --> $DIR/issue-2356.rs:72:5 diff --git a/src/test/ui/resolve/issue-39226.stderr b/src/test/ui/resolve/issue-39226.stderr index 72d66b0f6a2a1..5045ec6c30e35 100644 --- a/src/test/ui/resolve/issue-39226.stderr +++ b/src/test/ui/resolve/issue-39226.stderr @@ -10,11 +10,11 @@ LL | handle: Handle help: use struct literal syntax instead | LL | handle: Handle {} - | ^^^^^^^^^ + | ~~~~~~~~~ help: a local variable with a similar name exists | LL | handle: handle - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-5035-2.stderr b/src/test/ui/resolve/issue-5035-2.stderr index e94877fded784..939392733f0e9 100644 --- a/src/test/ui/resolve/issue-5035-2.stderr +++ b/src/test/ui/resolve/issue-5035-2.stderr @@ -9,7 +9,7 @@ LL | fn foo(_x: K) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(_x: &K) {} - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-5035.stderr b/src/test/ui/resolve/issue-5035.stderr index a8aa50b7c3ab2..32b972b21ffad 100644 --- a/src/test/ui/resolve/issue-5035.stderr +++ b/src/test/ui/resolve/issue-5035.stderr @@ -20,7 +20,7 @@ LL | trait K = dyn I; help: a trait with a similar name exists | LL | impl I for isize {} - | ^ + | ~ error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index 807dadf417bf5..192349e0fafe3 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -18,13 +18,13 @@ LL | | } help: you might have meant to use the following enum variant | LL | m::Z::Unit; - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: the following enum variants are available | LL | (m::Z::Fn(/* fields */)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ LL | (m::Z::Struct { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected value, found enum `Z` --> $DIR/privacy-enum-ctor.rs:25:9 @@ -46,13 +46,13 @@ LL | | } help: you might have meant to use the following enum variant | LL | m::Z::Unit; - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: the following enum variants are available | LL | (m::Z::Fn(/* fields */)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ LL | (m::Z::Struct { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0423]: expected value, found struct variant `Z::Struct` --> $DIR/privacy-enum-ctor.rs:29:20 @@ -88,17 +88,17 @@ LL | | } help: you might have meant to use the following enum variant | LL | let _: E = E::Unit; - | ^^^^^^^ + | ~~~~~~~ help: the following enum variants are available | LL | let _: E = (E::Fn(/* fields */)); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ LL | let _: E = (E::Struct { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: a function with a similar name exists | LL | let _: E = m::f; - | ^ + | ~ help: consider importing one of these items instead | LL | use std::f32::consts::E; @@ -137,13 +137,13 @@ LL | | } help: you might have meant to use the following enum variant | LL | let _: E = E::Unit; - | ^^^^^^^ + | ~~~~~~~ help: the following enum variants are available | LL | let _: E = (E::Fn(/* fields */)); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ LL | let _: E = (E::Struct { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: consider importing one of these items instead | LL | use std::f32::consts::E; @@ -174,7 +174,7 @@ LL | let _: Z = m::n::Z; help: an enum with a similar name exists | LL | let _: E = m::n::Z; - | ^ + | ~ help: consider importing this enum | LL | use m::Z; @@ -200,13 +200,13 @@ LL | | } help: you might have meant to use the following enum variant | LL | let _: Z = m::Z::Unit; - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: the following enum variants are available | LL | let _: Z = (m::Z::Fn(/* fields */)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ LL | let _: Z = (m::Z::Struct { /* fields */ }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:61:12 @@ -220,7 +220,7 @@ LL | let _: Z = m::n::Z::Fn; help: an enum with a similar name exists | LL | let _: E = m::n::Z::Fn; - | ^ + | ~ help: consider importing this enum | LL | use m::Z; @@ -238,7 +238,7 @@ LL | let _: Z = m::n::Z::Struct; help: an enum with a similar name exists | LL | let _: E = m::n::Z::Struct; - | ^ + | ~ help: consider importing this enum | LL | use m::Z; @@ -267,7 +267,7 @@ LL | let _: Z = m::n::Z::Unit {}; help: an enum with a similar name exists | LL | let _: E = m::n::Z::Unit {}; - | ^ + | ~ help: consider importing this enum | LL | use m::Z; @@ -337,7 +337,7 @@ LL | let _: Z = Z::Fn; help: use parentheses to instantiate this tuple variant | LL | let _: Z = Z::Fn(_); - | ^^^ + | +++ error[E0618]: expected function, found enum variant `Z::Unit` --> $DIR/privacy-enum-ctor.rs:31:17 @@ -353,7 +353,7 @@ LL | let _ = Z::Unit(); help: `Z::Unit` is a unit variant, you need to write it without the parenthesis | LL | let _ = Z::Unit; - | ^^^^^^^ + | ~~~~~~~ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:43:16 @@ -371,7 +371,7 @@ LL | let _: E = m::E::Fn; help: use parentheses to instantiate this tuple variant | LL | let _: E = m::E::Fn(_); - | ^^^ + | +++ error[E0618]: expected function, found enum variant `m::E::Unit` --> $DIR/privacy-enum-ctor.rs:47:16 @@ -387,7 +387,7 @@ LL | let _: E = m::E::Unit(); help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis | LL | let _: E = m::E::Unit; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:51:16 @@ -405,7 +405,7 @@ LL | let _: E = E::Fn; help: use parentheses to instantiate this tuple variant | LL | let _: E = E::Fn(_); - | ^^^ + | +++ error[E0618]: expected function, found enum variant `E::Unit` --> $DIR/privacy-enum-ctor.rs:55:16 @@ -421,7 +421,7 @@ LL | let _: E = E::Unit(); help: `E::Unit` is a unit variant, you need to write it without the parenthesis | LL | let _: E = E::Unit; - | ^^^^^^^ + | ~~~~~~~ error: aborting due to 23 previous errors diff --git a/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr b/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr index a0a858209019d..abf068a1f68b7 100644 --- a/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr +++ b/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr @@ -8,7 +8,7 @@ LL | use std::slice as std; help: you can use `as` to change the binding name of the import | LL | use std::slice as other_std; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-conflict-item-vs-import.stderr b/src/test/ui/resolve/resolve-conflict-item-vs-import.stderr index 83beb20fe90b3..922753a00db17 100644 --- a/src/test/ui/resolve/resolve-conflict-item-vs-import.stderr +++ b/src/test/ui/resolve/resolve-conflict-item-vs-import.stderr @@ -11,7 +11,7 @@ LL | fn transmute() {} help: you can use `as` to change the binding name of the import | LL | use std::mem::transmute as other_transmute; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-conflict-type-vs-import.stderr b/src/test/ui/resolve/resolve-conflict-type-vs-import.stderr index 104ed9bdc29e1..b63495458a02d 100644 --- a/src/test/ui/resolve/resolve-conflict-type-vs-import.stderr +++ b/src/test/ui/resolve/resolve-conflict-type-vs-import.stderr @@ -11,7 +11,7 @@ LL | struct Iter; help: you can use `as` to change the binding name of the import | LL | use std::slice::Iter as OtherIter; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-hint-macro.stderr b/src/test/ui/resolve/resolve-hint-macro.stderr index efcfc7198ab51..78d77678083c3 100644 --- a/src/test/ui/resolve/resolve-hint-macro.stderr +++ b/src/test/ui/resolve/resolve-hint-macro.stderr @@ -7,7 +7,7 @@ LL | assert_eq(1, 1); help: use `!` to invoke the macro | LL | assert_eq!(1, 1); - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr b/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr index 2d35159ec9a22..54b242123eb8f 100644 --- a/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr +++ b/src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr @@ -38,7 +38,7 @@ LL | a::b::J help: a constant with a similar name exists | LL | a::I.J - | ^ + | ~ error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:37:5 @@ -71,11 +71,11 @@ LL | a::b.f() help: use the path separator to refer to an item | LL | a::b::f() - | ^^^^^^^ + | ~~~~~~~ help: a constant with a similar name exists | LL | a::I.f() - | ^ + | ~ error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:50:5 diff --git a/src/test/ui/return/issue-82612-return-mutable-reference.stderr b/src/test/ui/return/issue-82612-return-mutable-reference.stderr index a8045e043ad89..eb2322d51fd51 100644 --- a/src/test/ui/return/issue-82612-return-mutable-reference.stderr +++ b/src/test/ui/return/issue-82612-return-mutable-reference.stderr @@ -13,15 +13,15 @@ LL | | } help: consider using a semicolon here | LL | value.get_or_insert_with(func); - | ^ + | + help: consider using a semicolon here | LL | }; - | ^ + | + help: you might have meant to return this value | LL | return value.get_or_insert_with(func); - | ^^^^^^ ^ + | ++++++ + error: aborting due to previous error diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr index 6ef921bef3d7a..5af136e601123 100644 --- a/src/test/ui/return/return-type.stderr +++ b/src/test/ui/return/return-type.stderr @@ -9,11 +9,11 @@ LL | foo(4 as usize) help: consider using a semicolon here | LL | foo(4 as usize); - | ^ + | + help: try adding a return type | LL | fn bar() -> S { - | ^^^^^^^^^^^ + | +++++++++++ error: aborting due to previous error diff --git a/src/test/ui/return/tail-expr-as-potential-return.stderr b/src/test/ui/return/tail-expr-as-potential-return.stderr index f8527961374dd..87ef18878d6f1 100644 --- a/src/test/ui/return/tail-expr-as-potential-return.stderr +++ b/src/test/ui/return/tail-expr-as-potential-return.stderr @@ -12,7 +12,7 @@ LL | | } help: you might have meant to return this value | LL | return Err(42); - | ^^^^^^ ^ + | ++++++ + error: aborting due to previous error diff --git a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr index 141363fc32caa..b0c319f2c7f41 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr @@ -66,7 +66,7 @@ LL | let NormalStruct { first_field, second_field } = ns; help: add `..` at the end of the field list to ignore all other fields | LL | let NormalStruct { first_field, second_field , .. } = ns; - | ^^^^^^ + | ~~~~~~ error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/struct.rs:26:9 @@ -77,7 +77,7 @@ LL | let TupleStruct { 0: first_field, 1: second_field } = ts; help: add `..` at the end of the field list to ignore all other fields | LL | let TupleStruct { 0: first_field, 1: second_field , .. } = ts; - | ^^^^^^ + | ~~~~~~ error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/struct.rs:35:9 @@ -88,7 +88,7 @@ LL | let UnitStruct { } = us; help: add `..` at the end of the field list to ignore all other fields | LL | let UnitStruct { .. } = us; - | ^^^^ + | ~~~~ error: aborting due to 9 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr index fbdbb0c9930a6..64cae3748c91e 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr @@ -73,7 +73,7 @@ LL | NonExhaustiveVariants::Struct { field } => "" help: add `..` at the end of the field list to ignore all other fields | LL | NonExhaustiveVariants::Struct { field , .. } => "" - | ^^^^^^ + | ~~~~~~ error[E0638]: `..` required with variant marked as non-exhaustive --> $DIR/variant.rs:30:12 @@ -84,7 +84,7 @@ LL | if let NonExhaustiveVariants::Struct { field } = variant_struct { help: add `..` at the end of the field list to ignore all other fields | LL | if let NonExhaustiveVariants::Struct { field , .. } = variant_struct { - | ^^^^^^ + | ~~~~~~ error: aborting due to 8 previous errors diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index 23eabfa3b3edc..996d0ea476d5c 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -7,7 +7,7 @@ LL | true && let 1 = 1 help: enclose the `const` expression in braces | LL | { true && let 1 = 1 } - | ^ ^ + | + + error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:32:9 @@ -482,8 +482,9 @@ LL | if &let 0 = 0 {} | help: consider removing the borrow | -LL | if let 0 = 0 {} - | -- +LL - if &let 0 = 0 {} +LL + if let 0 = 0 {} + | error[E0614]: type `bool` cannot be dereferenced --> $DIR/disallowed-positions.rs:36:8 @@ -541,7 +542,7 @@ LL | if x = let 0 = 0 {} help: you might have meant to compare for equality | LL | if x == let 0 = 0 {} - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:59:8 @@ -684,8 +685,9 @@ LL | while &let 0 = 0 {} | help: consider removing the borrow | -LL | while let 0 = 0 {} - | -- +LL - while &let 0 = 0 {} +LL + while let 0 = 0 {} + | error[E0614]: type `bool` cannot be dereferenced --> $DIR/disallowed-positions.rs:100:11 @@ -743,7 +745,7 @@ LL | while x = let 0 = 0 {} help: you might have meant to compare for equality | LL | while x == let 0 = 0 {} - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:123:11 diff --git a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr index 7364f62c92229..db464ad03f5f0 100644 --- a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr @@ -335,8 +335,9 @@ LL | if (let 0 = 1) {} | help: `if let` needs to be written without parentheses | -LL | if let 0 = 1 {} - | -- -- +LL - if (let 0 = 1) {} +LL + if let 0 = 1 {} + | error: invalid parentheses around `let` expression in `if let` --> $DIR/feature-gate.rs:18:8 @@ -346,8 +347,9 @@ LL | if (((let 0 = 1))) {} | help: `if let` needs to be written without parentheses | -LL | if let 0 = 1 {} - | -- -- +LL - if (((let 0 = 1))) {} +LL + if let 0 = 1 {} + | error: `let` expressions are not supported here --> $DIR/feature-gate.rs:22:16 @@ -581,8 +583,9 @@ LL | use_expr!((let 0 = 1)); | help: `if let` needs to be written without parentheses | -LL | use_expr!(let 0 = 1); - | -- -- +LL - use_expr!((let 0 = 1)); +LL + use_expr!(let 0 = 1); + | error: `let` expressions are not supported here --> $DIR/feature-gate.rs:127:16 diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr b/src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr index 5516d4a4c1c1c..4514fd96c2edd 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr @@ -8,15 +8,15 @@ LL | trait Trait2015 { fn foo(#[allow(C)] i32); } help: if this is a `self` type, give it a parameter name | LL | trait Trait2015 { fn foo(#[allow(C)] self: i32); } - | ^^^^^^^^^ + | ~~~~~~~~~ help: if this is a parameter name, give it a type | LL | trait Trait2015 { fn foo(#[allow(C)] i32: TypeName); } - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | trait Trait2015 { fn foo(#[allow(C)] _: i32); } - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.stderr index f815389ff01c3..79d170cdd1b61 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.stderr @@ -6,8 +6,9 @@ LL | const impl Foo for i32 {} | help: you might have meant to write a const trait impl | -LL | impl const Foo for i32 {} - |-- ^^^^^ +LL - const impl Foo for i32 {} +LL + impl const Foo for i32 {} + | error: expected identifier, found keyword `impl` --> $DIR/const-impl-recovery.rs:9:7 @@ -17,8 +18,9 @@ LL | const impl Bar for T {} | help: you might have meant to write a const trait impl | -LL | impl const Bar for T {} - |-- ^^^^^ +LL - const impl Bar for T {} +LL + impl const Bar for T {} + | error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc1623-2.stderr b/src/test/ui/rfc1623-2.stderr index 732bb61e6eebb..8ed606cf90510 100644 --- a/src/test/ui/rfc1623-2.stderr +++ b/src/test/ui/rfc1623-2.stderr @@ -9,7 +9,7 @@ LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 = help: consider making the type lifetime-generic with a new `'a` lifetime | LL | static NON_ELIDABLE_FN: &for<'a> fn(&'a u8, &'a u8) -> &'a u8 = - | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^ + | +++++++ ~~~~~~ ~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/rfc1623-2.rs:10:39 @@ -22,7 +22,7 @@ LL | &(non_elidable as fn(&u8, &u8) -> &u8); help: consider making the type lifetime-generic with a new `'a` lifetime | LL | &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8); - | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^ + | +++++++ ~~~~~~ ~~~~~~ ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr b/src/test/ui/rust-2018/dyn-trait-compatibility.stderr index 01c4737de5ec7..495b06fd2ccff 100644 --- a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr +++ b/src/test/ui/rust-2018/dyn-trait-compatibility.stderr @@ -7,7 +7,7 @@ LL | type A1 = dyn::dyn; help: you can escape reserved keywords to use them as identifiers | LL | type A1 = dyn::r#dyn; - | ^^^^^ + | ~~~~~ error: expected identifier, found `<` --> $DIR/dyn-trait-compatibility.rs:5:14 diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr b/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr index 45bc5dbc44676..b8eba3e075d3e 100644 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr +++ b/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr @@ -11,8 +11,9 @@ LL | #![deny(explicit_outlives_requirements)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these bounds | -LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- +LL - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { +LL + struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:18:61 @@ -22,8 +23,9 @@ LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b | help: remove these bounds | -LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- +LL - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { +LL + struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:23:53 @@ -33,8 +35,9 @@ LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { | help: remove these bounds | -LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { +LL + struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:29:48 @@ -44,8 +47,9 @@ LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { | help: remove these bounds | -LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | -- -- +LL - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { +LL + struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:35:48 @@ -55,8 +59,9 @@ LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { | help: remove these bounds | -LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { +LL + struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:41:46 @@ -66,8 +71,9 @@ LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | -- -- +LL - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { +LL + struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:47:67 @@ -77,8 +83,9 @@ LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debu | help: remove these bounds | -LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { +LL + struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:53:53 @@ -88,8 +95,9 @@ LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { +LL + struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:59:53 @@ -99,8 +107,9 @@ LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { +LL + struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:65:69 @@ -110,8 +119,9 @@ LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, | help: remove these bounds | -LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { +LL + struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:71:69 @@ -121,8 +131,9 @@ LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, | help: remove these bounds | -LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { +LL + struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:77:38 @@ -132,8 +143,9 @@ LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { | help: remove these bounds | -LL | struct BeeOutlivesAyTeeBee<'a, 'b, T> { - | -- -- +LL - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { +LL + struct BeeOutlivesAyTeeBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:82:40 @@ -143,8 +155,9 @@ LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { | help: remove these bounds | -LL | struct BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | -- -- +LL - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { +LL + struct BeeOutlivesAyTeeAyBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:87:55 @@ -154,8 +167,9 @@ LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + | help: remove these bounds | -LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- -- +LL - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { +LL + struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:92:68 @@ -165,8 +179,9 @@ LL | struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, | help: remove these bounds | -LL | struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- -- +LL - struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { +LL + struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:97:58 @@ -176,8 +191,9 @@ LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + D | help: remove these bounds | -LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- -- +LL - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { +LL + struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:104:18 @@ -187,8 +203,9 @@ LL | where U: 'a + Debug + 'b, 'b: 'a | help: remove these bounds | -LL | where U: Debug, - | -- ---- +LL - where U: 'a + Debug + 'b, 'b: 'a +LL + where U: Debug, + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:115:47 @@ -198,8 +215,9 @@ LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T); | help: remove these bounds | -LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); - | -- -- +LL - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T); +LL + struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:118:72 @@ -209,8 +227,9 @@ LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + | help: remove these bounds | -LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; - | -- -- +LL - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b; +LL + struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:121:53 @@ -220,8 +239,9 @@ LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a | help: remove these bounds | -LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); - | -- -- +LL - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U); +LL + struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:124:48 @@ -231,8 +251,9 @@ LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, | help: remove these bounds | -LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U); - | -- -- +LL - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U); +LL + struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:127:48 @@ -242,8 +263,9 @@ LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, | help: remove these bounds | -LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U); - | -- -- +LL - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U); +LL + struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:130:46 @@ -253,8 +275,9 @@ LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ; - | -- -- +LL - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b; +LL + struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:133:81 @@ -264,8 +287,9 @@ LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) wher | help: remove these bounds | -LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug; - | -- -- +LL - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b; +LL + struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:136:53 @@ -275,8 +299,9 @@ LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | -- -- +LL - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug; +LL + struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:139:53 @@ -286,8 +311,9 @@ LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) | help: remove these bounds | -LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | -- -- +LL - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b; +LL + struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:142:75 @@ -297,8 +323,9 @@ LL | struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T | help: remove these bounds | -LL | struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | -- -- +LL - struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug; +LL + struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:145:75 @@ -308,8 +335,9 @@ LL | struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T | help: remove these bounds | -LL | struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | -- -- +LL - struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b; +LL + struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:148:38 @@ -319,8 +347,9 @@ LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T); | help: remove these bounds | -LL | struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T); - | -- -- +LL - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T); +LL + struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:151:40 @@ -330,8 +359,9 @@ LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T); | help: remove these bounds | -LL | struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T); - | -- -- +LL - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T); +LL + struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:154:55 @@ -341,8 +371,9 @@ LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + | help: remove these bounds | -LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); - | -- -- -- +LL - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T); +LL + struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:157:71 @@ -352,8 +383,9 @@ LL | struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: ' | help: remove these bounds | -LL | struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; - | -- -- -- +LL - struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b; +LL + struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:160:58 @@ -363,8 +395,9 @@ LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + D | help: remove these bounds | -LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); - | -- -- -- +LL - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U); +LL + struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:164:18 @@ -374,8 +407,9 @@ LL | where U: 'a + Debug + 'b, 'b: 'a; | help: remove these bounds | -LL | where U: Debug, ; - | -- ---- +LL - where U: 'a + Debug + 'b, 'b: 'a; +LL + where U: Debug, ; + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:171:45 @@ -385,8 +419,9 @@ LL | enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { | help: remove these bounds | -LL | enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- +LL - enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { +LL + enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:176:59 @@ -396,8 +431,9 @@ LL | enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { | help: remove these bounds | -LL | enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- +LL - enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { +LL + enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:181:51 @@ -407,8 +443,9 @@ LL | enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { | help: remove these bounds | -LL | enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { +LL + enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:187:46 @@ -418,8 +455,9 @@ LL | enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { | help: remove these bounds | -LL | enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | -- -- +LL - enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { +LL + enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:193:46 @@ -429,8 +467,9 @@ LL | enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { | help: remove these bounds | -LL | enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { +LL + enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:199:44 @@ -440,8 +479,9 @@ LL | enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { | help: remove these bounds | -LL | enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | -- -- +LL - enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { +LL + enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:205:65 @@ -451,8 +491,9 @@ LL | enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug | help: remove these bounds | -LL | enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { +LL + enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:211:51 @@ -462,8 +503,9 @@ LL | enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + De | help: remove these bounds | -LL | enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { +LL + enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:217:51 @@ -473,8 +515,9 @@ LL | enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + | help: remove these bounds | -LL | enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { +LL + enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:223:67 @@ -484,8 +527,9 @@ LL | enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: | help: remove these bounds | -LL | enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { +LL + enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:229:67 @@ -495,8 +539,9 @@ LL | enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: | help: remove these bounds | -LL | enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { +LL + enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:235:36 @@ -506,8 +551,9 @@ LL | enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { | help: remove these bounds | -LL | enum BeeOutlivesAyTeeBee<'a, 'b, T> { - | -- -- +LL - enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { +LL + enum BeeOutlivesAyTeeBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:240:38 @@ -517,8 +563,9 @@ LL | enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { | help: remove these bounds | -LL | enum BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | -- -- +LL - enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { +LL + enum BeeOutlivesAyTeeAyBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:246:53 @@ -528,8 +575,9 @@ LL | enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + ' | help: remove these bounds | -LL | enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- -- +LL - enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { +LL + enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:251:66 @@ -539,8 +587,9 @@ LL | enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: | help: remove these bounds | -LL | enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- -- +LL - enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { +LL + enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:256:56 @@ -550,8 +599,9 @@ LL | enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Deb | help: remove these bounds | -LL | enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- -- +LL - enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { +LL + enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:262:75 @@ -561,8 +611,9 @@ LL | enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: ' | help: remove these bounds | -LL | enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { - | -- ---- +LL - enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { +LL + enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:271:46 @@ -572,8 +623,9 @@ LL | union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { | help: remove these bounds | -LL | union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- +LL - union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { +LL + union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:276:60 @@ -583,8 +635,9 @@ LL | union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b | help: remove these bounds | -LL | union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- +LL - union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { +LL + union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:281:52 @@ -594,8 +647,9 @@ LL | union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { | help: remove these bounds | -LL | union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { +LL + union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:287:47 @@ -605,8 +659,9 @@ LL | union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { | help: remove these bounds | -LL | union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | -- -- +LL - union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { +LL + union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:293:47 @@ -616,8 +671,9 @@ LL | union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { | help: remove these bounds | -LL | union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- +LL - union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { +LL + union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:299:45 @@ -627,8 +683,9 @@ LL | union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { | help: remove these bounds | -LL | union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | -- -- +LL - union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { +LL + union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:305:66 @@ -638,8 +695,9 @@ LL | union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug | help: remove these bounds | -LL | union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { +LL + union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:311:52 @@ -649,8 +707,9 @@ LL | union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + D | help: remove these bounds | -LL | union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { +LL + union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:317:52 @@ -660,8 +719,9 @@ LL | union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug | help: remove these bounds | -LL | union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { +LL + union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:323:68 @@ -671,8 +731,9 @@ LL | union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U | help: remove these bounds | -LL | union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | -- -- +LL - union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { +LL + union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:329:68 @@ -682,8 +743,9 @@ LL | union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U | help: remove these bounds | -LL | union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | -- -- +LL - union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { +LL + union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:335:37 @@ -693,8 +755,9 @@ LL | union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { | help: remove these bounds | -LL | union BeeOutlivesAyTeeBee<'a, 'b, T> { - | -- -- +LL - union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { +LL + union BeeOutlivesAyTeeBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:340:39 @@ -704,8 +767,9 @@ LL | union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { | help: remove these bounds | -LL | union BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | -- -- +LL - union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { +LL + union BeeOutlivesAyTeeAyBee<'a, 'b, T> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:345:54 @@ -715,8 +779,9 @@ LL | union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + | help: remove these bounds | -LL | union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | -- -- -- +LL - union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { +LL + union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:350:67 @@ -726,8 +791,9 @@ LL | union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T | help: remove these bounds | -LL | union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | -- -- -- +LL - union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { +LL + union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:355:57 @@ -737,8 +803,9 @@ LL | union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + De | help: remove these bounds | -LL | union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | -- -- -- +LL - union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { +LL + union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { + | error: outlives requirements can be inferred --> $DIR/edition-lint-infer-outlives-multispan.rs:361:76 @@ -748,8 +815,9 @@ LL | union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: | help: remove these bounds | -LL | union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { - | -- ---- +LL - union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { +LL + union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { + | error: aborting due to 68 previous errors diff --git a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr index 7a63e6f6e686a..e60f9c039be36 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr @@ -21,19 +21,19 @@ LL | fn try_into(self) -> Result; help: consider wrapping the receiver expression with the appropriate type | LL | let _: u32 = Box::new(3u8).try_into().unwrap(); - | ^^^^^^^^^ ^ + | +++++++++ + help: consider wrapping the receiver expression with the appropriate type | LL | let _: u32 = Pin::new(3u8).try_into().unwrap(); - | ^^^^^^^^^ ^ + | +++++++++ + help: consider wrapping the receiver expression with the appropriate type | LL | let _: u32 = Arc::new(3u8).try_into().unwrap(); - | ^^^^^^^^^ ^ + | +++++++++ + help: consider wrapping the receiver expression with the appropriate type | LL | let _: u32 = Rc::new(3u8).try_into().unwrap(); - | ^^^^^^^^ ^ + | ++++++++ + error: aborting due to previous error diff --git a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr index 95105f932dcbd..a2ce9d42b675d 100644 --- a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr +++ b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr @@ -13,8 +13,9 @@ LL | #![warn(rust_2021_prefixes_incompatible_syntax)] = note: for more information, see issue #84978 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL | m2!(z "hey"); - | -- +LL - m2!(z"hey"); +LL + m2!(z "hey"); + | warning: prefix `prefix` is unknown --> $DIR/reserved-prefixes-migration.rs:19:9 @@ -26,8 +27,9 @@ LL | m2!(prefix"hey"); = note: for more information, see issue #84978 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL | m2!(prefix "hey"); - | -- +LL - m2!(prefix"hey"); +LL + m2!(prefix "hey"); + | warning: prefix `hey` is unknown --> $DIR/reserved-prefixes-migration.rs:22:9 @@ -39,8 +41,9 @@ LL | m3!(hey#123); = note: for more information, see issue #84978 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL | m3!(hey #123); - | -- +LL - m3!(hey#123); +LL + m3!(hey #123); + | warning: prefix `hey` is unknown --> $DIR/reserved-prefixes-migration.rs:25:9 @@ -52,8 +55,9 @@ LL | m3!(hey#hey); = note: for more information, see issue #84978 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL | m3!(hey #hey); - | -- +LL - m3!(hey#hey); +LL + m3!(hey #hey); + | warning: prefix `kind` is unknown --> $DIR/reserved-prefixes-migration.rs:35:14 @@ -65,8 +69,9 @@ LL | #name = #kind#value = note: for more information, see issue #84978 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL | #name = #kind #value - | -- +LL - #name = #kind#value +LL + #name = #kind #value + | warning: 5 warnings emitted diff --git a/src/test/ui/rust-2021/reserved-prefixes.stderr b/src/test/ui/rust-2021/reserved-prefixes.stderr index 32e1856332925..2755688c17f97 100644 --- a/src/test/ui/rust-2021/reserved-prefixes.stderr +++ b/src/test/ui/rust-2021/reserved-prefixes.stderr @@ -7,8 +7,9 @@ LL | demo3!(foo#bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo3!(foo #bar); - | -- +LL - demo3!(foo#bar); +LL + demo3!(foo #bar); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:17:12 @@ -19,8 +20,9 @@ LL | demo2!(foo"bar"); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo2!(foo "bar"); - | -- +LL - demo2!(foo"bar"); +LL + demo2!(foo "bar"); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:18:12 @@ -31,8 +33,9 @@ LL | demo2!(foo'b'); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo2!(foo 'b'); - | -- +LL - demo2!(foo'b'); +LL + demo2!(foo 'b'); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:20:12 @@ -43,8 +46,9 @@ LL | demo2!(foo'b); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo2!(foo 'b); - | -- +LL - demo2!(foo'b); +LL + demo2!(foo 'b); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:21:12 @@ -55,8 +59,9 @@ LL | demo3!(foo# bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo3!(foo # bar); - | -- +LL - demo3!(foo# bar); +LL + demo3!(foo # bar); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:22:12 @@ -67,8 +72,9 @@ LL | demo4!(foo#! bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo4!(foo #! bar); - | -- +LL - demo4!(foo#! bar); +LL + demo4!(foo #! bar); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:23:12 @@ -79,8 +85,9 @@ LL | demo4!(foo## bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo4!(foo ## bar); - | -- +LL - demo4!(foo## bar); +LL + demo4!(foo ## bar); + | error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:25:12 @@ -91,8 +98,9 @@ LL | demo4!(foo#bar#); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo4!(foo #bar#); - | -- +LL - demo4!(foo#bar#); +LL + demo4!(foo #bar#); + | error: prefix `bar` is unknown --> $DIR/reserved-prefixes.rs:25:16 @@ -103,8 +111,9 @@ LL | demo4!(foo#bar#); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL | demo4!(foo#bar #); - | -- +LL - demo4!(foo#bar#); +LL + demo4!(foo#bar #); + | error: aborting due to 9 previous errors diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr index e25c6363515be..5d0b2c2ebdf68 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr @@ -9,7 +9,7 @@ LL | async fn f(self: Pin<&Self>) -> impl Clone { self } help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound | LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self } - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr index 9cd0fd328ffa0..04cd2b78da124 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr @@ -10,7 +10,7 @@ LL | async fn f(self: Pin<&Self>) -> impl Clone { self } help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self } - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr index 962593e411e92..4301d8f767a51 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr @@ -9,7 +9,7 @@ LL | fn f(self: Pin<&Self>) -> impl Clone { self } help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound | LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr index cb9d5b56dbc5c..54e75aeec3e36 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr @@ -14,7 +14,7 @@ LL | fn f(self: Pin<&Self>) -> impl Clone { self } help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr index b804ddfb024bf..a0ef7e3f2cbab 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr @@ -13,7 +13,7 @@ LL | A.foo(); help: consider wrapping the receiver expression with the appropriate type | LL | Box::new(A).foo(); - | ^^^^^^^^^ ^ + | +++++++++ + error: aborting due to previous error diff --git a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr index e1ed0e42f985c..440676482835c 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr @@ -14,7 +14,7 @@ LL | A.foo() help: consider wrapping the receiver expression with the appropriate type | LL | Box::new(A).foo() - | ^^^^^^^^^ ^ + | +++++++++ + error: aborting due to previous error diff --git a/src/test/ui/self/self-infer.stderr b/src/test/ui/self/self-infer.stderr index 8d70c6287e55a..d3bf63efa40d8 100644 --- a/src/test/ui/self/self-infer.stderr +++ b/src/test/ui/self/self-infer.stderr @@ -7,7 +7,7 @@ LL | fn f(self: _) {} help: use type parameters instead | LL | fn f(self: T) {} - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/self-infer.rs:5:17 @@ -18,7 +18,7 @@ LL | fn g(self: &_) {} help: use type parameters instead | LL | fn g(self: &T) {} - | ^^^ ^ + | +++ ~ error: aborting due to 2 previous errors diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr index 63b70f7fcd95c..7c16581686a00 100644 --- a/src/test/ui/shift-various-bad-types.stderr +++ b/src/test/ui/shift-various-bad-types.stderr @@ -33,7 +33,7 @@ LL | let _: i32 = 22_i64 >> 1_i32; help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit | LL | let _: i32 = (22_i64 >> 1_i32).try_into().unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr index f78970ac0a41d..d22508998a616 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr @@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn a(x: &u32) { - | -- -- +LL - fn a<'a>(x: &'a u32) { +LL + fn a(x: &u32) { + | error: lifetime parameter `'m` only used once --> $DIR/one-use-in-fn-argument.rs:15:11 @@ -26,8 +27,9 @@ LL | fn center<'m>(_: Single<'m>) {} | help: elide the single-use lifetime | -LL | fn center(_: Single<'_>) {} - | -- ^^ +LL - fn center<'m>(_: Single<'m>) {} +LL + fn center(_: Single<'_>) {} + | error: lifetime parameter `'y` only used once --> $DIR/one-use-in-fn-argument.rs:17:13 @@ -37,8 +39,9 @@ LL | fn left<'x, 'y>(foo: Double<'x, 'y>) -> &'x u32 { foo.f } | help: elide the single-use lifetime | -LL | fn left<'x>(foo: Double<'x, '_>) -> &'x u32 { foo.f } - | -- ^^ +LL - fn left<'x, 'y>(foo: Double<'x, 'y>) -> &'x u32 { foo.f } +LL + fn left<'x>(foo: Double<'x, '_>) -> &'x u32 { foo.f } + | error: lifetime parameter `'x` only used once --> $DIR/one-use-in-fn-argument.rs:19:10 @@ -48,8 +51,9 @@ LL | fn right<'x, 'y>(foo: Double<'x, 'y>) -> &'y u32 { foo.f } | help: elide the single-use lifetime | -LL | fn right<'y>(foo: Double<'_, 'y>) -> &'y u32 { foo.f } - | -- ^^ +LL - fn right<'x, 'y>(foo: Double<'x, 'y>) -> &'y u32 { foo.f } +LL + fn right<'y>(foo: Double<'_, 'y>) -> &'y u32 { foo.f } + | error: aborting due to 4 previous errors diff --git a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr index 10fb40b9d142d..b8b78cd87b003 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr @@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn inherent_a(&self, data: &u32) { - | -- -- +LL - fn inherent_a<'a>(&self, data: &'a u32) { +LL + fn inherent_a(&self, data: &u32) { + | error: lifetime parameter `'f` only used once --> $DIR/one-use-in-inherent-method-argument.rs:11:6 diff --git a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr index 55d11add7b6b1..05944e04bd8bc 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr @@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn next(&mut self) -> Option { - | ---- +LL - fn next<'g>(&'g mut self) -> Option { +LL + fn next(&mut self) -> Option { + | error: aborting due to previous error diff --git a/src/test/ui/sized-cycle-note.stderr b/src/test/ui/sized-cycle-note.stderr index 45062c2ea6c72..0726b16a91948 100644 --- a/src/test/ui/sized-cycle-note.stderr +++ b/src/test/ui/sized-cycle-note.stderr @@ -9,7 +9,7 @@ LL | struct Baz { q: Option } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Baz` representable | LL | struct Baz { q: Box> } - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `Foo` has infinite size --> $DIR/sized-cycle-note.rs:11:1 @@ -22,7 +22,7 @@ LL | struct Foo { q: Option } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | struct Foo { q: Box> } - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index 06493f05142e6..98e92751360cf 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -10,7 +10,7 @@ LL | tail: Option, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ListNode` representable | LL | tail: Box>, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 2595cd91dc1f3..2487684c1dd7f 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -43,7 +43,7 @@ LL | f = box f; help: try using a conversion method | LL | f = (box f).to_string(); - | ^ ^^^^^^^^^^^^^ + | + +++++++++++++ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:21:9 diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index f63d97780c1f9..8f75c388f6576 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -16,7 +16,7 @@ LL | }; help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | let x = *a.borrow() + 1; x - | ^^^^^^^ ^^^ + | +++++++ +++ error: aborting due to previous error diff --git a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr index e04ca0f5265d4..8d4709d660fa9 100644 --- a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr +++ b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr @@ -17,7 +17,7 @@ LL | } help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | let x = y.borrow().clone(); x - | ^^^^^^^ ^^^ + | +++++++ +++ error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:17:9 @@ -37,7 +37,7 @@ LL | }; help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block | LL | let x = y.borrow().clone(); x - | ^^^^^^^ ^^^ + | +++++++ +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index 5cda17fd6a1fc..da0a3c8b47602 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -8,11 +8,11 @@ LL | fn foo(Option, String) {} help: if this is a `self` type, give it a parameter name | LL | fn foo(self: Option, String) {} - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn foo(_: Option, String) {} - | ^^^^^^^^^ + | ~~~~~~~~~ error: expected one of `:`, `@`, or `|`, found `)` --> $DIR/issue-34264.rs:1:27 @@ -24,11 +24,11 @@ LL | fn foo(Option, String) {} help: if this is a parameter name, give it a type | LL | fn foo(Option, String: TypeName) {} - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn foo(Option, _: String) {} - | ^^^^^^^^^ + | ~~~~~~~~~ error: expected one of `:`, `@`, or `|`, found `,` --> $DIR/issue-34264.rs:3:9 @@ -40,15 +40,15 @@ LL | fn bar(x, y: usize) {} help: if this is a `self` type, give it a parameter name | LL | fn bar(self: x, y: usize) {} - | ^^^^^^^ + | ~~~~~~~ help: if this is a parameter name, give it a type | LL | fn bar(x: TypeName, y: usize) {} - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn bar(_: x, y: usize) {} - | ^^^^ + | ~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/issue-34264.rs:7:5 diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index fc6c556c16d88..f7732847a2860 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -17,11 +17,11 @@ LL | fn foo(&mut self) {} help: disambiguate the associated function for candidate #1 | LL | A::foo(&a) - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | B::foo(&a) - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:22:7 @@ -42,11 +42,11 @@ LL | fn foo(&self) {} help: disambiguate the associated function for candidate #1 | LL | C::foo(&a) - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | D::foo(&a) - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:34:7 @@ -67,11 +67,11 @@ LL | fn foo(self) {} help: disambiguate the associated function for candidate #1 | LL | E::foo(a) - | ^^^^^^^^^ + | ~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | F::foo(a) - | ^^^^^^^^^ + | ~~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index a7131ab8af56f..c5a0448e798d1 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -10,7 +10,7 @@ LL | let x = "Hello " + "World!"; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let x = "Hello ".to_owned() + "World!"; - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error[E0369]: cannot add `World` to `World` --> $DIR/issue-39018.rs:8:26 @@ -34,7 +34,7 @@ LL | let x = "Hello " + "World!".to_owned(); help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let x = "Hello ".to_owned() + &"World!".to_owned(); - | ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ error[E0369]: cannot add `&String` to `&String` --> $DIR/issue-39018.rs:26:16 @@ -48,7 +48,7 @@ LL | let _ = &a + &b; help: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = a + &b; - | ^ + | ~ error[E0369]: cannot add `String` to `&String` --> $DIR/issue-39018.rs:27:16 @@ -62,7 +62,7 @@ LL | let _ = &a + b; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = a + &b; - | ^ ^^ + | ~ ~~ error[E0308]: mismatched types --> $DIR/issue-39018.rs:29:17 @@ -85,7 +85,7 @@ LL | let _ = e + b; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + &b; - | ^^^^^^^^^^^^ ^^ + | ~~~~~~~~~~~~ ~~ error[E0369]: cannot add `&String` to `&String` --> $DIR/issue-39018.rs:31:15 @@ -99,7 +99,7 @@ LL | let _ = e + &b; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + &b; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0369]: cannot add `&str` to `&String` --> $DIR/issue-39018.rs:32:15 @@ -113,7 +113,7 @@ LL | let _ = e + d; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + d; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0369]: cannot add `&&str` to `&String` --> $DIR/issue-39018.rs:33:15 @@ -127,7 +127,7 @@ LL | let _ = e + &d; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + &d; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0369]: cannot add `&&str` to `&&str` --> $DIR/issue-39018.rs:34:16 @@ -157,7 +157,7 @@ LL | let _ = c + &d; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = c.to_owned() + &d; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error[E0369]: cannot add `&str` to `&str` --> $DIR/issue-39018.rs:37:15 @@ -171,7 +171,7 @@ LL | let _ = c + d; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = c.to_owned() + d; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to 14 previous errors diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index f789441378fe4..288c1042a26c7 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -28,15 +28,15 @@ LL | fn f9(_: usize) -> usize; help: disambiguate the associated function for candidate #1 | LL | u.f8(42) + CtxtFn::f9(u, 342) + m.fff(42) - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | u.f8(42) + OtherTrait::f9(u, 342) + m.fff(42) - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the associated function for candidate #3 | LL | u.f8(42) + UnusedTrait::f9(u, 342) + m.fff(42) - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0599]: no method named `fff` found for struct `Myisize` in the current scope --> $DIR/issue-7575.rs:62:30 diff --git a/src/test/ui/span/issue-81800.stderr b/src/test/ui/span/issue-81800.stderr index d37f13a6683b0..86c64573b140f 100644 --- a/src/test/ui/span/issue-81800.stderr +++ b/src/test/ui/span/issue-81800.stderr @@ -7,7 +7,7 @@ LL | fn x˂- help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not | LL | fn x<- - | ^ + | ~ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `-` --> $DIR/issue-81800.rs:1:6 diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index 7a24ffbd81c88..99c57322d8651 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -7,7 +7,7 @@ LL | let _: Result<(), String> = Ok(); help: expected the unit value `()`; create it with empty parentheses | LL | let _: Result<(), String> = Ok(()); - | ^^ + | ++ error[E0061]: this function takes 2 arguments but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:12:5 @@ -51,7 +51,7 @@ LL | fn bar(():()) {} help: expected the unit value `()`; create it with empty parentheses | LL | bar(()); - | ^^ + | ++ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:15:7 @@ -67,7 +67,7 @@ LL | fn baz(self, (): ()) { } help: expected the unit value `()`; create it with empty parentheses | LL | S.baz(()); - | ^^ + | ++ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:16:7 @@ -83,7 +83,7 @@ LL | fn generic(self, _: T) { } help: expected the unit value `()`; create it with empty parentheses | LL | S.generic::<()>(()); - | ^^ + | ++ error: aborting due to 6 previous errors diff --git a/src/test/ui/span/multiline-span-E0072.stderr b/src/test/ui/span/multiline-span-E0072.stderr index 55128347f7404..cb71a55b09eaf 100644 --- a/src/test/ui/span/multiline-span-E0072.stderr +++ b/src/test/ui/span/multiline-span-E0072.stderr @@ -13,7 +13,7 @@ LL | | } help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ListNode` representable | LL | tail: Box>, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index fb1d98b58dfbe..08e97e750c31a 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -9,7 +9,7 @@ LL | bar: Bar<'a>, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | bar: Box>, - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `Bar` has infinite size --> $DIR/recursive-type-field.rs:8:1 diff --git a/src/test/ui/span/type-annotations-needed-expr.stderr b/src/test/ui/span/type-annotations-needed-expr.stderr index 3e6d350b36c33..fbfbefd078202 100644 --- a/src/test/ui/span/type-annotations-needed-expr.stderr +++ b/src/test/ui/span/type-annotations-needed-expr.stderr @@ -8,7 +8,7 @@ LL | let _ = (vec![1,2,3]).into_iter().sum() as f64; help: consider specifying the type argument in the method call | LL | let _ = (vec![1,2,3]).into_iter().sum::() as f64; - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr b/src/test/ui/specialization/deafult-associated-type-bound-2.stderr index 0e8a774bce37f..8d110d50e2876 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr +++ b/src/test/ui/specialization/deafult-associated-type-bound-2.stderr @@ -21,7 +21,7 @@ LL | default type U = &'static B; help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | impl X for T where &'static B: PartialEq { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr index e646c1640b1c6..ff56c77c8f8b8 100644 --- a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr +++ b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr @@ -21,7 +21,7 @@ LL | default type U<'a> = &'a T; help: consider further restricting this bound | LL | impl X for T { - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr index e416f30cb415d..a8f6cf6839963 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -20,7 +20,7 @@ LL | default impl Foo<'static, U> for () {} help: consider restricting type parameter `U` | LL | default impl Foo<'static, U> for () {} - | ^^^^^^^^^^^^^^ + | ++++++++++++++ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/issue-33017.stderr b/src/test/ui/specialization/issue-33017.stderr index bff4618d0be4c..0d4976c665dea 100644 --- a/src/test/ui/specialization/issue-33017.stderr +++ b/src/test/ui/specialization/issue-33017.stderr @@ -10,7 +10,7 @@ LL | default type Output = Self; help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index 73c03f09f2ebc..c23400a1d14a7 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -27,7 +27,7 @@ LL | let v = s[..2]; help: consider borrowing here | LL | let v = &s[..2]; - | ^ + | + error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:9:17 diff --git a/src/test/ui/str/str-as-char.stderr b/src/test/ui/str/str-as-char.stderr index 27d6336974c85..c3cb488e3d1bb 100644 --- a/src/test/ui/str/str-as-char.stderr +++ b/src/test/ui/str/str-as-char.stderr @@ -7,7 +7,7 @@ LL | println!('●●'); help: if you meant to write a `str` literal, use double quotes | LL | println!("●●"); - | ^^^^ + | ~~~~ error: aborting due to previous error diff --git a/src/test/ui/str/str-concat-on-double-ref.stderr b/src/test/ui/str/str-concat-on-double-ref.stderr index ac87d6ecca578..dee28897f4ddd 100644 --- a/src/test/ui/str/str-concat-on-double-ref.stderr +++ b/src/test/ui/str/str-concat-on-double-ref.stderr @@ -10,7 +10,7 @@ LL | let c = a + b; help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let c = a.to_owned() + b; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/str/str-lit-type-mismatch.stderr b/src/test/ui/str/str-lit-type-mismatch.stderr index e8e2c4e24f55e..90590b70dfe9f 100644 --- a/src/test/ui/str/str-lit-type-mismatch.stderr +++ b/src/test/ui/str/str-lit-type-mismatch.stderr @@ -11,7 +11,7 @@ LL | let x: &[u8] = "foo"; help: consider adding a leading `b` | LL | let x: &[u8] = b"foo"; - | ^ + | + error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:3:23 @@ -26,7 +26,7 @@ LL | let y: &[u8; 4] = "baaa"; help: consider adding a leading `b` | LL | let y: &[u8; 4] = b"baaa"; - | ^ + | + error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:4:19 @@ -40,8 +40,9 @@ LL | let z: &str = b"foo"; found reference `&'static [u8; 3]` help: consider removing the leading `b` | -LL | let z: &str = "foo"; - | -- +LL - let z: &str = b"foo"; +LL + let z: &str = "foo"; + | error: aborting due to 3 previous errors diff --git a/src/test/ui/str/str-mut-idx.stderr b/src/test/ui/str/str-mut-idx.stderr index 405542820a394..567f5d8e1e73a 100644 --- a/src/test/ui/str/str-mut-idx.stderr +++ b/src/test/ui/str/str-mut-idx.stderr @@ -11,7 +11,7 @@ LL | s[1..2] = bot(); help: consider relaxing the implicit `Sized` restriction | LL | fn bot() -> T { loop {} } - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/str-mut-idx.rs:4:5 diff --git a/src/test/ui/structs-enums/struct-rec/issue-74224.stderr b/src/test/ui/structs-enums/struct-rec/issue-74224.stderr index d61ab1952f9f1..6199178467fcf 100644 --- a/src/test/ui/structs-enums/struct-rec/issue-74224.stderr +++ b/src/test/ui/structs-enums/struct-rec/issue-74224.stderr @@ -10,7 +10,7 @@ LL | y: A>, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable | LL | y: Box>>, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/structs-enums/struct-rec/issue-84611.stderr b/src/test/ui/structs-enums/struct-rec/issue-84611.stderr index 0a898e5c46dbe..2e99435e033d5 100644 --- a/src/test/ui/structs-enums/struct-rec/issue-84611.stderr +++ b/src/test/ui/structs-enums/struct-rec/issue-84611.stderr @@ -10,7 +10,7 @@ LL | x: Foo<[T; 1]>, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable | LL | x: Box>, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr b/src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr index efc4ba93f0a2b..c6d2434e424b1 100644 --- a/src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr +++ b/src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr @@ -10,7 +10,7 @@ LL | y: B, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable | LL | y: Box>, - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `B` has infinite size --> $DIR/mutual-struct-recursion.rs:7:1 @@ -24,7 +24,7 @@ LL | z: A help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `B` representable | LL | z: Box> - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `C` has infinite size --> $DIR/mutual-struct-recursion.rs:12:1 @@ -38,7 +38,7 @@ LL | y: Option>>, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `C` representable | LL | y: Box>>>, - | ^^^^ ^ + | ++++ + error[E0072]: recursive type `D` has infinite size --> $DIR/mutual-struct-recursion.rs:18:1 @@ -52,7 +52,7 @@ LL | z: Option>>, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `D` representable | LL | z: Box>>>, - | ^^^^ ^ + | ++++ + error: aborting due to 4 previous errors diff --git a/src/test/ui/structs/struct-field-cfg.stderr b/src/test/ui/structs/struct-field-cfg.stderr index 740ea3829dc51..5ec47c093a9b0 100644 --- a/src/test/ui/structs/struct-field-cfg.stderr +++ b/src/test/ui/structs/struct-field-cfg.stderr @@ -21,11 +21,11 @@ LL | let Foo { #[cfg(any())] present: () } = foo; help: include the missing field in the pattern | LL | let Foo { present } = foo; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | let Foo { .. } = foo; - | ^^^^^^ + | ~~~~~~ error[E0026]: struct `Foo` does not have a field named `absent` --> $DIR/struct-field-cfg.rs:16:42 diff --git a/src/test/ui/structs/struct-pat-derived-error.stderr b/src/test/ui/structs/struct-pat-derived-error.stderr index c1a95636d34cb..a91e47657ab91 100644 --- a/src/test/ui/structs/struct-pat-derived-error.stderr +++ b/src/test/ui/structs/struct-pat-derived-error.stderr @@ -19,11 +19,11 @@ LL | let A { x, y } = self.d; help: include the missing fields in the pattern | LL | let A { x, y, b, c } = self.d; - | ^^^^^^^^ + | ~~~~~~~~ help: if you don't care about these missing fields, you can explicitly ignore them | LL | let A { x, y, .. } = self.d; - | ^^^^^^ + | ~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/structs/struct-tuple-field-names.stderr b/src/test/ui/structs/struct-tuple-field-names.stderr index 29e721465215d..5494c29a6fd25 100644 --- a/src/test/ui/structs/struct-tuple-field-names.stderr +++ b/src/test/ui/structs/struct-tuple-field-names.stderr @@ -7,7 +7,7 @@ LL | E::S { 0, 1 } => {} help: use the tuple variant pattern syntax instead | LL | E::S(_, _) => {} - | ^^^^^^ + | ~~~~~~ error[E0769]: tuple variant `S` written as struct variant --> $DIR/struct-tuple-field-names.rs:13:9 @@ -18,7 +18,7 @@ LL | S { } => {} help: use the tuple variant pattern syntax instead | LL | S(_, _) => {} - | ^^^^^^ + | ~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index 5bbf4225812b6..10abdfc333aaa 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -14,7 +14,7 @@ LL | let x: () = >::bar::<'static, char>; help: use parentheses to call this function | LL | let x: () = >::bar::<'static, char>(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:25:17 @@ -32,7 +32,7 @@ LL | let x: () = >::bar::<'static, char>; help: use parentheses to call this function | LL | let x: () = >::bar::<'static, char>(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:33:17 @@ -50,7 +50,7 @@ LL | let x: () = >::baz; help: use parentheses to call this function | LL | let x: () = >::baz(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:41:17 @@ -68,7 +68,7 @@ LL | let x: () = foo::<'static>; help: use parentheses to call this function | LL | let x: () = foo::<'static>(); - | ^^ + | ++ error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/substs-ppaux.rs:49:5 diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index 20d7655337448..136e269b21010 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -14,7 +14,7 @@ LL | let x: () = >::bar::<'static, char>; help: use parentheses to call this function | LL | let x: () = >::bar::<'static, char>(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:25:17 @@ -32,7 +32,7 @@ LL | let x: () = >::bar::<'static, char>; help: use parentheses to call this function | LL | let x: () = >::bar::<'static, char>(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:33:17 @@ -50,7 +50,7 @@ LL | let x: () = >::baz; help: use parentheses to call this function | LL | let x: () = >::baz(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:41:17 @@ -68,7 +68,7 @@ LL | let x: () = foo::<'static>; help: use parentheses to call this function | LL | let x: () = foo::<'static>(); - | ^^ + | ++ error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/substs-ppaux.rs:49:5 diff --git a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr index ac3902dc6de9a..c64205411bb7e 100644 --- a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr +++ b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr @@ -10,11 +10,11 @@ LL | struct Struct1{ help: consider further restricting `Self` | LL | fn func1() -> Struct1 where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct1{ - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/adt-param-with-implicit-sized-bound.rs:3:23 @@ -28,11 +28,11 @@ LL | struct Struct2<'a, T>{ help: consider further restricting `Self` | LL | fn func2<'a>() -> Struct2<'a, Self> where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct2<'a, T: ?Sized>{ - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/adt-param-with-implicit-sized-bound.rs:4:19 @@ -53,7 +53,7 @@ LL | _t: T, help: consider further restricting `Self` | LL | fn func3() -> Struct3 where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/adt-param-with-implicit-sized-bound.rs:5:19 @@ -67,11 +67,11 @@ LL | struct Struct4{ help: consider further restricting `Self` | LL | fn func4() -> Struct4 where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct4{ - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/adt-param-with-implicit-sized-bound.rs:25:9 @@ -93,8 +93,9 @@ LL | struct X(T); | this could be changed to `T: ?Sized`... help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | struct Struct5{ - | -- +LL - struct Struct5{ +LL + struct Struct5{ + | error: aborting due to 5 previous errors diff --git a/src/test/ui/suggestions/as-ref-2.stderr b/src/test/ui/suggestions/as-ref-2.stderr index f2eddf2fb098e..86a175098c6be 100644 --- a/src/test/ui/suggestions/as-ref-2.stderr +++ b/src/test/ui/suggestions/as-ref-2.stderr @@ -16,7 +16,7 @@ LL | pub fn map U>(self, f: F) -> Option { help: consider calling `.as_ref()` to borrow the type's contents | LL | let _x: Option = foo.as_ref().map(|s| bar(&s)); - | ^^^^^^^^^ + | +++++++++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr index dc5d7efd752cf..8d93ac5079667 100644 --- a/src/test/ui/suggestions/as-ref.stderr +++ b/src/test/ui/suggestions/as-ref.stderr @@ -56,7 +56,7 @@ LL | let y: Result<&usize, &usize> = x; help: you can convert from `&Result` to `Result<&T, &E>` using `.as_ref()` | LL | let y: Result<&usize, &usize> = x.as_ref(); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/as-ref.rs:19:36 diff --git a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index cb4acc4c392e3..81c9b0378e706 100644 --- a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -14,7 +14,7 @@ LL | bar(foo); help: use parentheses to call the function | LL | bar(foo()); - | ^^ + | ++ error[E0277]: `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` is not a future --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:12:9 @@ -31,7 +31,7 @@ LL | bar(async_closure); help: use parentheses to call the closure | LL | bar(async_closure()); - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/const-in-struct-pat.stderr b/src/test/ui/suggestions/const-in-struct-pat.stderr index df9c230eefdc9..784f1bdb6cf3d 100644 --- a/src/test/ui/suggestions/const-in-struct-pat.stderr +++ b/src/test/ui/suggestions/const-in-struct-pat.stderr @@ -13,7 +13,7 @@ LL | let Thing { foo } = t; help: bind the struct field to a different name instead | LL | let Thing { foo: other_foo } = t; - | ^^^^^^^^^^^ + | +++++++++++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/constrain-trait.stderr b/src/test/ui/suggestions/constrain-trait.stderr index f1c50e59a845e..a26f86917bc1f 100644 --- a/src/test/ui/suggestions/constrain-trait.stderr +++ b/src/test/ui/suggestions/constrain-trait.stderr @@ -8,7 +8,7 @@ LL | println!("{:?}", self.get_a()); help: the following trait defines an item `get_a`, perhaps you need to add another supertrait for it: | LL | trait UseString: std::fmt::Debug + GetString { - | ^^^^^^^^^^^ + | +++++++++++ error[E0599]: no method named `get_a` found for reference `&Self` in the current scope --> $DIR/constrain-trait.rs:21:31 @@ -20,7 +20,7 @@ LL | println!("{:?}", self.get_a()); help: the following trait defines an item `get_a`, perhaps you need to add a supertrait for it: | LL | trait UseString2: GetString { - | ^^^^^^^^^^^ + | +++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr index 612fae208cc9d..40ad671f96630 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr @@ -52,11 +52,11 @@ LL | &(Either::Two(_t), Either::One(_u)) => (), help: consider removing the `&` | LL | (Either::One(_t), Either::Two(_u)) => (), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: consider removing the `&` | LL | (Either::Two(_t), Either::One(_u)) => (), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:61:11 @@ -72,10 +72,10 @@ LL | &(Either::One(_t), Either::Two(_u)) = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&` | -LL | (Either::One(_t), Either::Two(_u)) -LL | -LL | -LL | | &(Either::Two(_t), Either::One(_u)) => (), +LL ~ (Either::One(_t), Either::Two(_u)) +LL + +LL + +LL ~ | &(Either::Two(_t), Either::One(_u)) => (), | error[E0507]: cannot move out of a shared reference @@ -162,11 +162,11 @@ LL | &mut (Either::Two(_t), Either::One(_u)) => (), help: consider removing the `&mut` | LL | (Either::One(_t), Either::Two(_u)) => (), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: consider removing the `&mut` | LL | (Either::Two(_t), Either::One(_u)) => (), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:113:11 @@ -182,10 +182,10 @@ LL | &mut (Either::One(_t), Either::Two(_u)) = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&mut` | -LL | (Either::One(_t), Either::Two(_u)) -LL | -LL | -LL | | &mut (Either::Two(_t), Either::One(_u)) => (), +LL ~ (Either::One(_t), Either::Two(_u)) +LL + +LL + +LL ~ | &mut (Either::Two(_t), Either::One(_u)) => (), | error[E0507]: cannot move out of a mutable reference diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr index f7528b5ccd298..ca09c3d5ff1f0 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr @@ -270,10 +270,10 @@ LL | &Either::One(_t) | help: consider removing the `&` | -LL | Either::One(_t) -LL | -LL | -LL | | &Either::Two(_t) => (), +LL ~ Either::One(_t) +LL + +LL + +LL ~ | &Either::Two(_t) => (), | error[E0507]: cannot move out of `r.0` which is behind a shared reference @@ -348,11 +348,11 @@ LL | &mut Either::Two(_t) => (), help: consider removing the `&mut` | LL | Either::One(_t) => (), - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: consider removing the `&mut` | LL | Either::Two(_t) => (), - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error[E0507]: cannot move out of `rm.0` which is behind a mutable reference --> $DIR/simple.rs:228:11 @@ -516,10 +516,10 @@ LL | &Either::One(_t) | help: consider removing the `&` | -LL | Either::One(_t) -LL | -LL | -LL | | &Either::Two(_t) => (), +LL ~ Either::One(_t) +LL + +LL + +LL ~ | &Either::Two(_t) => (), | error[E0507]: cannot move out of a shared reference @@ -592,10 +592,10 @@ LL | &mut Either::One(_t) | help: consider removing the `&mut` | -LL | Either::One(_t) -LL | -LL | -LL | | &mut Either::Two(_t) => (), +LL ~ Either::One(_t) +LL + +LL + +LL ~ | &mut Either::Two(_t) => (), | error[E0507]: cannot move out of a mutable reference diff --git a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr index c4eeb3aaa5709..ff08178cb7470 100644 --- a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr +++ b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr @@ -12,7 +12,7 @@ LL | x help: you need to pin and box this expression | LL | Box::pin(x) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0308]: mismatched types --> $DIR/expected-boxed-future-isnt-pinned.rs:18:5 @@ -40,7 +40,7 @@ LL | Pin::new(x) help: store this in the heap by calling `Box::new` | LL | Pin::new(Box::new(x)) - | ^^^^^^^^^ ^ + | +++++++++ + error[E0277]: `dyn Future + Send` cannot be unpinned --> $DIR/expected-boxed-future-isnt-pinned.rs:22:5 @@ -87,9 +87,9 @@ LL | pub const fn from_generator(gen: T) -> impl Future found opaque type `impl Future` help: you need to pin and box this expression | -LL | Box::pin(async { +LL ~ Box::pin(async { LL | 42 -LL | }) +LL ~ }) | error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/field-access.stderr b/src/test/ui/suggestions/field-access.stderr index b113b3746d87e..b9f0f788b8c3c 100644 --- a/src/test/ui/suggestions/field-access.stderr +++ b/src/test/ui/suggestions/field-access.stderr @@ -12,7 +12,7 @@ LL | if let B::Fst = a {}; help: you might have meant to use field `b` whose type is `B` | LL | if let B::Fst = a.b {}; - | ^^^ + | ~~~ error[E0308]: mismatched types --> $DIR/field-access.rs:25:9 @@ -29,7 +29,7 @@ LL | B::Fst => (), help: you might have meant to use field `b` whose type is `B` | LL | match a.b { - | ^^^ + | ~~~ error[E0308]: mismatched types --> $DIR/field-access.rs:26:9 @@ -46,7 +46,7 @@ LL | B::Snd => (), help: you might have meant to use field `b` whose type is `B` | LL | match a.b { - | ^^^ + | ~~~ error[E0308]: mismatched types --> $DIR/field-access.rs:32:9 @@ -60,7 +60,7 @@ LL | 1u32 => (), help: you might have meant to use field `bar` whose type is `u32` | LL | match unsafe { foo.bar } { - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 8589a2757e91d..1916fe54cc5df 100644 --- a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -13,7 +13,7 @@ LL | bar(foo); help: use parentheses to call the function | LL | bar(foo()); - | ^^ + | ++ error[E0277]: the trait bound `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:23]: T` is not satisfied --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9 @@ -29,7 +29,7 @@ LL | bar(closure); help: use parentheses to call the closure | LL | bar(closure()); - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr b/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr index fe9c3445fc46f..20468cef20ba2 100644 --- a/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr +++ b/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr @@ -8,11 +8,11 @@ LL | struct S1 &'a i32>(F); help: consider introducing lifetime `'a` here | LL | struct S1<'a, F: Fn(&i32, &i32) -> &'a i32>(F); - | ^^^ + | +++ help: consider making the bound lifetime-generic with a new `'a` lifetime | LL | struct S1 Fn(&i32, &i32) -> &'a i32>(F); - | ^^^^^^^ + | +++++++ error[E0106]: missing lifetime specifier --> $DIR/fn-missing-lifetime-in-item.rs:2:32 @@ -25,11 +25,11 @@ LL | struct S2 &i32>(F); help: consider making the bound lifetime-generic with a new `'a` lifetime | LL | struct S2 Fn(&'a i32, &'a i32) -> &'a i32>(F); - | ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ + | +++++++ ~~~~~~~ ~~~~~~~ ~~~ help: consider introducing a named lifetime parameter | LL | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F); - | ^^^ ^^^^^^^ ^^^^^^^ ^^^ + | +++ ~~~~~~~ ~~~~~~~ ~~~ error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types --> $DIR/fn-missing-lifetime-in-item.rs:3:40 diff --git a/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr index 9b2febb1393e1..1ed784e8f5bc9 100644 --- a/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr +++ b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr @@ -12,11 +12,11 @@ LL | let _: E = E::B; help: use struct literal syntax instead | LL | let _: E = E::B { a: val }; - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: a tuple variant with a similar name exists | LL | let _: E = E::A; - | ^ + | ~ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:29:20 @@ -34,7 +34,7 @@ LL | let _: usize = foo; help: use parentheses to call this function | LL | let _: usize = foo(a, b); - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:30:16 @@ -52,7 +52,7 @@ LL | let _: S = S; help: use parentheses to instantiate this tuple struct | LL | let _: S = S(_, _); - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:31:20 @@ -70,7 +70,7 @@ LL | let _: usize = bar; help: use parentheses to call this function | LL | let _: usize = bar(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:32:16 @@ -88,7 +88,7 @@ LL | let _: V = V; help: use parentheses to instantiate this tuple struct | LL | let _: V = V(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:33:20 @@ -106,7 +106,7 @@ LL | let _: usize = T::baz; help: use parentheses to call this function | LL | let _: usize = T::baz(x, y); - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:34:20 @@ -124,7 +124,7 @@ LL | let _: usize = T::bat; help: use parentheses to call this function | LL | let _: usize = T::bat(x); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:35:16 @@ -142,7 +142,7 @@ LL | let _: E = E::A; help: use parentheses to instantiate this tuple variant | LL | let _: E = E::A(_); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:37:20 @@ -160,7 +160,7 @@ LL | let _: usize = X::baz; help: use parentheses to call this function | LL | let _: usize = X::baz(x, y); - | ^^^^^^ + | ++++++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:38:20 @@ -178,7 +178,7 @@ LL | let _: usize = X::bat; help: use parentheses to call this function | LL | let _: usize = X::bat(x); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:39:20 @@ -196,7 +196,7 @@ LL | let _: usize = X::bax; help: use parentheses to call this function | LL | let _: usize = X::bax(x); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:40:20 @@ -214,7 +214,7 @@ LL | let _: usize = X::bach; help: use parentheses to call this function | LL | let _: usize = X::bach(x); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:41:20 @@ -232,7 +232,7 @@ LL | let _: usize = X::ban; help: use parentheses to call this function | LL | let _: usize = X::ban(_); - | ^^^ + | +++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:42:20 @@ -250,7 +250,7 @@ LL | let _: usize = X::bal; help: use parentheses to call this function | LL | let _: usize = X::bal(_); - | ^^^ + | +++ error[E0615]: attempted to take value of method `ban` on type `X` --> $DIR/fn-or-tuple-struct-without-args.rs:43:22 @@ -261,7 +261,7 @@ LL | let _: usize = X.ban; help: use parentheses to call the method | LL | let _: usize = X.ban(); - | ^^ + | ++ error[E0615]: attempted to take value of method `bal` on type `X` --> $DIR/fn-or-tuple-struct-without-args.rs:44:22 @@ -272,7 +272,7 @@ LL | let _: usize = X.bal; help: use parentheses to call the method | LL | let _: usize = X.bal(); - | ^^ + | ++ error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:46:20 @@ -289,7 +289,7 @@ LL | let _: usize = closure; help: use parentheses to call this closure | LL | let _: usize = closure(); - | ^^ + | ++ error: aborting due to 17 previous errors diff --git a/src/test/ui/suggestions/for-i-in-vec.stderr b/src/test/ui/suggestions/for-i-in-vec.stderr index 011fdf34c28b5..49cee6abc4eb4 100644 --- a/src/test/ui/suggestions/for-i-in-vec.stderr +++ b/src/test/ui/suggestions/for-i-in-vec.stderr @@ -7,7 +7,7 @@ LL | for _ in self.v { help: consider iterating over a slice of the `Vec`'s content | LL | for _ in &self.v { - | ^ + | + error[E0507]: cannot move out of `self.h` which is behind a shared reference --> $DIR/for-i-in-vec.rs:13:18 @@ -18,7 +18,7 @@ LL | for _ in self.h { help: consider iterating over a slice of the `HashMap`'s content | LL | for _ in &self.h { - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr index 15cb845a06d54..8a2941cb6a4de 100644 --- a/src/test/ui/suggestions/format-borrow.stderr +++ b/src/test/ui/suggestions/format-borrow.stderr @@ -8,8 +8,9 @@ LL | let a: String = &String::from("a"); | help: consider removing the borrow | -LL | let a: String = String::from("a"); - | -- +LL - let a: String = &String::from("a"); +LL + let a: String = String::from("a"); + | error[E0308]: mismatched types --> $DIR/format-borrow.rs:4:21 @@ -21,8 +22,9 @@ LL | let b: String = &format!("b"); | help: consider removing the borrow | -LL | let b: String = format!("b"); - | -- +LL - let b: String = &format!("b"); +LL + let b: String = format!("b"); + | error[E0308]: mismatched types --> $DIR/format-borrow.rs:6:21 @@ -34,8 +36,9 @@ LL | let c: String = &mut format!("c"); | help: consider removing the borrow | -LL | let c: String = format!("c"); - | -- +LL - let c: String = &mut format!("c"); +LL + let c: String = format!("c"); + | error[E0308]: mismatched types --> $DIR/format-borrow.rs:8:21 @@ -47,8 +50,9 @@ LL | let d: String = &mut (format!("d")); | help: consider removing the borrow | -LL | let d: String = format!("d")); - | -- +LL - let d: String = &mut (format!("d")); +LL + let d: String = format!("d")); + | error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/if-let-typo.stderr b/src/test/ui/suggestions/if-let-typo.stderr index ce1ee0cd06d48..1e23ede7adc87 100644 --- a/src/test/ui/suggestions/if-let-typo.stderr +++ b/src/test/ui/suggestions/if-let-typo.stderr @@ -7,7 +7,7 @@ LL | if Some(x) = foo {} help: you might have meant to use pattern matching | LL | if let Some(x) = foo {} - | ^^^ + | +++ error[E0658]: destructuring assignments are unstable --> $DIR/if-let-typo.rs:4:16 @@ -63,7 +63,7 @@ LL | if 3 = foo {} help: you might have meant to use pattern matching | LL | if let 3 = foo {} - | ^^^ + | +++ error[E0070]: invalid left-hand side of assignment --> $DIR/if-let-typo.rs:10:16 diff --git a/src/test/ui/suggestions/imm-ref-trait-object-literal.stderr b/src/test/ui/suggestions/imm-ref-trait-object-literal.stderr index bd060c92cd469..a12b6bd2128a8 100644 --- a/src/test/ui/suggestions/imm-ref-trait-object-literal.stderr +++ b/src/test/ui/suggestions/imm-ref-trait-object-literal.stderr @@ -12,7 +12,7 @@ LL | foo(&s); help: consider changing this borrow's mutability | LL | foo(&mut s); - | ^^^^ + | ~~~~ error[E0277]: the trait bound `S: Trait` is not satisfied --> $DIR/imm-ref-trait-object-literal.rs:13:7 diff --git a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.nll.stderr b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.nll.stderr index acf0c0ece4020..043a771129a61 100644 --- a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.nll.stderr +++ b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.nll.stderr @@ -11,7 +11,7 @@ LL | } help: you can add a bound to the opaque type to make it last less than `'static` and match `'a` | LL | fn use_it<'a>(val: Box>) -> impl OtherTrait<'a> + 'a { - | ^^^^ + | ++++ error[E0515]: cannot return value referencing function parameter `val` --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:43:9 diff --git a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr index 00971b41c7ce6..29991b6572fb4 100644 --- a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr +++ b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr @@ -11,7 +11,7 @@ LL | } help: you can add a bound to the opaque type to make it last less than `'static` and match `'a` | LL | fn use_it<'a>(val: Box>) -> impl OtherTrait<'a> + 'a { - | ^^^^ + | ++++ error[E0515]: cannot return value referencing function parameter `val` --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:43:9 @@ -49,7 +49,7 @@ LL | fn use_self(&self) -> &() { panic!() } help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for Box + '_> { - | ^^^^ + | ++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr index 2fb6c25fd1702..6d9f0811b2735 100644 --- a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr +++ b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr @@ -16,7 +16,7 @@ LL | fn use_self(&self) -> &() { panic!() } help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for dyn ObjectTrait + '_ { - | ^^^^ + | ++++ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:69:13 @@ -36,7 +36,7 @@ LL | fn use_self(&self) -> &() { panic!() } help: consider relaxing the implicit `'static` requirement | LL | impl dyn ObjectTrait + '_ { - | ^^^^ + | ++++ error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:88:13 @@ -57,11 +57,11 @@ LL | impl MyTrait for dyn ObjectTrait {} help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for dyn ObjectTrait + '_ {} - | ^^^^ + | ++++ help: to declare that the `impl Trait` captures data from argument `val`, you can add an explicit `'a` lifetime bound | LL | fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> + 'a { - | ^^^^ + | ++++ error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:108:27 @@ -87,7 +87,7 @@ LL | impl MyTrait for dyn ObjectTrait {} help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for dyn ObjectTrait + '_ {} - | ^^^^ + | ++++ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:37:13 @@ -107,7 +107,7 @@ LL | fn use_self(&self) -> &() { panic!() } help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for dyn ObjectTrait + '_ { - | ^^^^ + | ++++ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:54:13 @@ -127,7 +127,7 @@ LL | fn use_self(&self) -> &() { panic!() } help: consider relaxing the implicit `'static` requirement | LL | impl MyTrait for Box { - | ^^^^ + | ++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/impl-trait-missing-lifetime.stderr b/src/test/ui/suggestions/impl-trait-missing-lifetime.stderr index e31f25ab60304..a3a339b13c478 100644 --- a/src/test/ui/suggestions/impl-trait-missing-lifetime.stderr +++ b/src/test/ui/suggestions/impl-trait-missing-lifetime.stderr @@ -7,7 +7,7 @@ LL | fn f(_: impl Iterator) {} help: consider introducing a named lifetime parameter | LL | fn f<'a>(_: impl Iterator) {} - | ^^^^ ^^ + | ++++ ~~ error: aborting due to previous error diff --git a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr index 0de3b9aec19e1..7d8a34ed01889 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr +++ b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr @@ -11,7 +11,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn foo(constraints: I) where ::Item: Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++ ~ ++++++++++++++++++++++++++++++++++ error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:14:13 @@ -26,7 +26,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn bar(t: T, constraints: I) where T: std::fmt::Debug, ::Item: Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++ ~ ++++++++++++++++++++++++++++++ error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:22:13 @@ -41,7 +41,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn baz(t: impl std::fmt::Debug, constraints: I) where ::Item: Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++ ~ ++++++++++++++++++++++++++++++++++ error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:30:13 @@ -56,7 +56,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn bat(t: T, constraints: U, _: I) where ::Item: Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++ ~ ++++++++++++++++++++++++++++++++++ error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:37:13 @@ -71,7 +71,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn bak(constraints: I) where ::Item: Debug { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++ ~ ++++++++++++++++++++++++++++++++++ error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:45:13 @@ -86,7 +86,7 @@ LL | fn qux(_: impl std::fmt::Debug) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | fn baw(constraints: I) where ::Item: Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ ~ ++++++++++++++++++++++++++++++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr index db54d044d9e92..6255df06efb6a 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr +++ b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr @@ -8,7 +8,7 @@ LL | foo.hello(); help: the following trait defines an item `hello`, perhaps you need to restrict type parameter `impl Foo` with it: | LL | fn test(foo: impl Foo + Bar) { - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-21673.stderr b/src/test/ui/suggestions/issue-21673.stderr index 14c7b18ea51d3..eda29f876d8fc 100644 --- a/src/test/ui/suggestions/issue-21673.stderr +++ b/src/test/ui/suggestions/issue-21673.stderr @@ -8,7 +8,7 @@ LL | x.method() help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it: | LL | fn call_method(x: &T) { - | ^^^^^^^^ + | ~~~~~~~~ error[E0599]: no method named `method` found for type parameter `T` in the current scope --> $DIR/issue-21673.rs:10:7 @@ -20,7 +20,7 @@ LL | x.method() help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it: | LL | fn call_method_2(x: T) { - | ^^^^^^ + | ~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-52820.stderr b/src/test/ui/suggestions/issue-52820.stderr index 62c04584d3c75..7b46584450192 100644 --- a/src/test/ui/suggestions/issue-52820.stderr +++ b/src/test/ui/suggestions/issue-52820.stderr @@ -7,7 +7,7 @@ LL | guts, help: try using a conversion method | LL | guts: guts.to_string(), - | ^^^^^ ^^^^^^^^^^^^ + | +++++ ++++++++++++ error[E0308]: mismatched types --> $DIR/issue-52820.rs:10:17 diff --git a/src/test/ui/suggestions/issue-59819.stderr b/src/test/ui/suggestions/issue-59819.stderr index ac9b6d975f425..40e4c7b78499c 100644 --- a/src/test/ui/suggestions/issue-59819.stderr +++ b/src/test/ui/suggestions/issue-59819.stderr @@ -9,7 +9,7 @@ LL | let y: i32 = x; help: consider dereferencing the type | LL | let y: i32 = *x; - | ^ + | + error[E0308]: mismatched types --> $DIR/issue-59819.rs:30:18 @@ -22,7 +22,7 @@ LL | let b: i32 = a; help: consider dereferencing the borrow | LL | let b: i32 = *a; - | ^ + | + error[E0308]: mismatched types --> $DIR/issue-59819.rs:34:21 diff --git a/src/test/ui/suggestions/issue-64252-self-type.stderr b/src/test/ui/suggestions/issue-64252-self-type.stderr index e96db3f1e8630..009707a3a6449 100644 --- a/src/test/ui/suggestions/issue-64252-self-type.stderr +++ b/src/test/ui/suggestions/issue-64252-self-type.stderr @@ -8,11 +8,11 @@ LL | pub fn foo(Box) { } help: if this is a `self` type, give it a parameter name | LL | pub fn foo(self: Box) { } - | ^^^^^^^^^ + | ~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | pub fn foo(_: Box) { } - | ^^^^^^ + | ~~~~~~ error: expected one of `:`, `@`, or `|`, found `<` --> $DIR/issue-64252-self-type.rs:10:15 @@ -24,11 +24,11 @@ LL | fn bar(Box) { } help: if this is a `self` type, give it a parameter name | LL | fn bar(self: Box) { } - | ^^^^^^^^^ + | ~~~~~~~~~ help: if this is a type, explicitly ignore the parameter name | LL | fn bar(_: Box) { } - | ^^^^^^ + | ~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-72766.stderr b/src/test/ui/suggestions/issue-72766.stderr index fcc49ef59d129..43ba35d0205bd 100644 --- a/src/test/ui/suggestions/issue-72766.stderr +++ b/src/test/ui/suggestions/issue-72766.stderr @@ -13,7 +13,7 @@ LL | fn branch(self) -> ControlFlow; help: consider `await`ing on the `Future` | LL | SadGirl {}.call().await?; - | ^^^^^^ + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr b/src/test/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr index 9404c3bb58317..be91eb876d0e0 100644 --- a/src/test/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr +++ b/src/test/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr @@ -11,7 +11,7 @@ LL | fn assert_is_send(_: &T) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | async fn run(_: &(), foo: F) -> std::io::Result<()> where ::Bar: Send { - | ^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++ ~ +++++++++++++++++++++++++++ error[E0277]: `::Bar` cannot be sent between threads safely --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:24:20 @@ -26,7 +26,7 @@ LL | fn assert_is_send(_: &T) {} help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL | async fn run2(_: &(), foo: F) -> std::io::Result<()> where ::Bar: Send { - | ^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~ ~ +++++++++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-82361.stderr b/src/test/ui/suggestions/issue-82361.stderr index 91b380e4e0d32..c09ad17f82acd 100644 --- a/src/test/ui/suggestions/issue-82361.stderr +++ b/src/test/ui/suggestions/issue-82361.stderr @@ -13,7 +13,7 @@ LL | | }; help: consider dereferencing the borrow | LL | *b - | ^ + | + error[E0308]: `if` and `else` have incompatible types --> $DIR/issue-82361.rs:16:9 @@ -29,8 +29,9 @@ LL | | }; | help: consider removing the borrow | -LL | 1 - | -- +LL - &1 +LL + 1 + | error[E0308]: `if` and `else` have incompatible types --> $DIR/issue-82361.rs:22:9 @@ -46,8 +47,9 @@ LL | | }; | help: consider removing the borrow | -LL | 1 - | -- +LL - &mut 1 +LL + 1 + | error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/issue-82566-1.stderr b/src/test/ui/suggestions/issue-82566-1.stderr index 5a9099a894c8f..a05c59c786b0a 100644 --- a/src/test/ui/suggestions/issue-82566-1.stderr +++ b/src/test/ui/suggestions/issue-82566-1.stderr @@ -7,7 +7,7 @@ LL | T1<1>::C; help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | T1::<1>::C; - | ^^ + | ++ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` --> $DIR/issue-82566-1.rs:19:9 @@ -18,7 +18,7 @@ LL | T2<1, 2>::C; help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | T2::<1, 2>::C; - | ^^ + | ++ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` --> $DIR/issue-82566-1.rs:20:9 @@ -29,7 +29,7 @@ LL | T3<1, 2, 3>::C; help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | T3::<1, 2, 3>::C; - | ^^ + | ++ error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/issue-82566-2.stderr b/src/test/ui/suggestions/issue-82566-2.stderr index ea391ee078c81..8f30a301bb82f 100644 --- a/src/test/ui/suggestions/issue-82566-2.stderr +++ b/src/test/ui/suggestions/issue-82566-2.stderr @@ -7,7 +7,7 @@ LL | fn foo1() -> [(); Foo1<10>::SUM] { help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | fn foo1() -> [(); Foo1::<10>::SUM] { - | ^^ + | ++ error: expected one of `.`, `?`, `]`, or an operator, found `,` --> $DIR/issue-82566-2.rs:21:26 @@ -18,7 +18,7 @@ LL | fn foo2() -> [(); Foo2<10, 20>::SUM] { help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | fn foo2() -> [(); Foo2::<10, 20>::SUM] { - | ^^ + | ++ error: expected one of `.`, `?`, `]`, or an operator, found `,` --> $DIR/issue-82566-2.rs:26:26 @@ -29,7 +29,7 @@ LL | fn foo3() -> [(); Foo3<10, 20, 30>::SUM] { help: use `::<...>` instead of `<...>` to specify type or const arguments | LL | fn foo3() -> [(); Foo3::<10, 20, 30>::SUM] { - | ^^ + | ++ error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/issue-84592.stderr b/src/test/ui/suggestions/issue-84592.stderr index 02f9241a6d2da..fe301e41277fc 100644 --- a/src/test/ui/suggestions/issue-84592.stderr +++ b/src/test/ui/suggestions/issue-84592.stderr @@ -10,7 +10,7 @@ LL | fn two_lifetimes_needed(a: &(), b: &()) -> TwoLifetimes<'_, '_> { help: consider introducing a named lifetime parameter | LL | fn two_lifetimes_needed<'a>(a: &'a (), b: &'a ()) -> TwoLifetimes<'a, 'a> { - | ^^^^ ^^^^^^ ^^^^^^ ^^ ^^ + | ++++ ~~~~~~ ~~~~~~ ~~ ~~ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-85347.stderr b/src/test/ui/suggestions/issue-85347.stderr index 60594baa29cb6..fccd2ef8df77c 100644 --- a/src/test/ui/suggestions/issue-85347.stderr +++ b/src/test/ui/suggestions/issue-85347.stderr @@ -12,7 +12,7 @@ LL | type Bar<'a>: Deref::Bar>; help: add missing lifetime argument | LL | type Bar<'a>: Deref::Bar<'a, Target = Self>>; - | ^^^ + | +++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr b/src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr index 575379690b46f..9c8356a528470 100644 --- a/src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr +++ b/src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr @@ -11,7 +11,7 @@ LL | let _x: (i32,) = (5); help: use a trailing comma to create a tuple with one element | LL | let _x: (i32,) = (5,); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/issue-86100-tuple-paren-comma.rs:13:9 @@ -24,7 +24,7 @@ LL | foo((Some(3))); help: use a trailing comma to create a tuple with one element | LL | foo((Some(3),)); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-86100-tuple-paren-comma.rs:17:22 @@ -37,7 +37,7 @@ LL | let _s = S { _s: ("abc".to_string()) }; help: use a trailing comma to create a tuple with one element | LL | let _s = S { _s: ("abc".to_string(),) }; - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-86100-tuple-paren-comma.rs:23:22 diff --git a/src/test/ui/suggestions/issue-86667.stderr b/src/test/ui/suggestions/issue-86667.stderr index 77f7f874a4e42..c1319165a7040 100644 --- a/src/test/ui/suggestions/issue-86667.stderr +++ b/src/test/ui/suggestions/issue-86667.stderr @@ -8,7 +8,7 @@ LL | async fn a(s1: &str, s2: &str) -> &str { help: consider introducing a named lifetime parameter | LL | async fn a<'a>(s1: &'a str, s2: &'a str) -> &'a str { - | ^^^^ ^^^^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~~~ ~~~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/issue-86667.rs:11:29 @@ -20,7 +20,7 @@ LL | fn b(s1: &str, s2: &str) -> &str { help: consider introducing a named lifetime parameter | LL | fn b<'a>(s1: &'a str, s2: &'a str) -> &'a str { - | ^^^^ ^^^^^^^ ^^^^^^^ ^^^ + | ++++ ~~~~~~~ ~~~~~~~ ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.nll.stderr b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.nll.stderr index 05ba7808600b0..b27980300325b 100644 --- a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.nll.stderr +++ b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.nll.stderr @@ -9,7 +9,7 @@ LL | fn iter(&self) -> impl Iterator> { help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound | LL | fn iter(&self) -> impl Iterator> + '_ { - | ^^^^ + | ++++ error: lifetime may not live long enough --> $DIR/trait-object-nested-in-impl-trait.rs:39:9 @@ -47,7 +47,7 @@ LL | fn iter<'a>(&'a self) -> impl Iterator> { help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound | LL | fn iter<'a>(&'a self) -> impl Iterator> + 'a { - | ^^^^ + | ++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr index 9f30787f07cc6..1ca22ebeef479 100644 --- a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr +++ b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr @@ -17,11 +17,11 @@ LL | fn iter(&self) -> impl Iterator> { help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | fn iter(&self) -> impl Iterator> + '_ { - | ^^^^ + | ++++ help: to declare that the trait object captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | fn iter(&self) -> impl Iterator> { - | ^^^^ + | ++++ error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/trait-object-nested-in-impl-trait.rs:41:31 @@ -42,7 +42,7 @@ LL | fn iter(&self) -> impl Iterator> + '_ { help: to declare that the trait object captures data from argument `self`, you can add an explicit `'_` lifetime bound | LL | fn iter(&self) -> impl Iterator> + '_ { - | ^^^^ + | ++++ error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/trait-object-nested-in-impl-trait.rs:52:31 @@ -63,7 +63,7 @@ LL | fn iter<'a>(&'a self) -> impl Iterator> + 'a { help: to declare that the trait object captures data from argument `self`, you can add an explicit `'a` lifetime bound | LL | fn iter<'a>(&'a self) -> impl Iterator> + 'a { - | ^^^^ + | ++++ error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/trait-object-nested-in-impl-trait.rs:63:31 @@ -84,11 +84,11 @@ LL | fn iter<'a>(&'a self) -> impl Iterator> { help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'a` lifetime bound | LL | fn iter<'a>(&'a self) -> impl Iterator> + 'a { - | ^^^^ + | ++++ help: to declare that the trait object captures data from argument `self`, you can add an explicit `'a` lifetime bound | LL | fn iter<'a>(&'a self) -> impl Iterator> { - | ^^^^ + | ++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/match-needing-semi.stderr b/src/test/ui/suggestions/match-needing-semi.stderr index 3739c9940f0cc..b5f01d7038c0d 100644 --- a/src/test/ui/suggestions/match-needing-semi.stderr +++ b/src/test/ui/suggestions/match-needing-semi.stderr @@ -14,11 +14,11 @@ LL | | } help: consider using a semicolon here | LL | foo(); - | ^ + | + help: consider using a semicolon here | LL | }; - | ^ + | + error[E0308]: mismatched types --> $DIR/match-needing-semi.rs:11:5 diff --git a/src/test/ui/suggestions/match-prev-arm-needing-semi.stderr b/src/test/ui/suggestions/match-prev-arm-needing-semi.stderr index 9e64b539f0fdc..a8f7f3cb17779 100644 --- a/src/test/ui/suggestions/match-prev-arm-needing-semi.stderr +++ b/src/test/ui/suggestions/match-prev-arm-needing-semi.stderr @@ -25,11 +25,12 @@ LL | async fn async_dummy() {} help: consider `await`ing on the `Future` | LL | false => async_dummy().await, - | ^^^^^^ + | ++++++ help: consider removing this semicolon | -LL | async_dummy() - | -- +LL - async_dummy(); +LL + async_dummy() + | error[E0308]: `match` arms have incompatible types --> $DIR/match-prev-arm-needing-semi.rs:45:18 @@ -58,13 +59,13 @@ LL | async fn async_dummy2() {} help: consider `await`ing on the `Future` | LL | false => async_dummy2().await, - | ^^^^^^ + | ++++++ help: consider removing this semicolon and boxing the expressions | -LL | Box::new(async_dummy()) +LL ~ Box::new(async_dummy()) LL | LL | } -LL | false => Box::new(async_dummy2()), +LL ~ false => Box::new(async_dummy2()), | error[E0308]: `match` arms have incompatible types @@ -92,9 +93,9 @@ LL | async fn async_dummy2() {} = note: distinct uses of `impl Trait` result in different opaque types help: consider `await`ing on both `Future`s | -LL | true => async_dummy().await, +LL ~ true => async_dummy().await, LL | -LL | false => async_dummy2().await, +LL ~ false => async_dummy2().await, | error[E0308]: `match` arms have incompatible types diff --git a/src/test/ui/suggestions/method-missing-parentheses.stderr b/src/test/ui/suggestions/method-missing-parentheses.stderr index 04c67ec6a06b6..1bfff56a6a906 100644 --- a/src/test/ui/suggestions/method-missing-parentheses.stderr +++ b/src/test/ui/suggestions/method-missing-parentheses.stderr @@ -13,7 +13,7 @@ LL | let _ = vec![].into_iter().collect::; help: use parentheses to call the method | LL | let _ = vec![].into_iter().collect::(); - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr b/src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr index b20778ce20817..1ecaade93c8ca 100644 --- a/src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr +++ b/src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr @@ -7,11 +7,11 @@ LL | const A: &str = ""; help: consider using the `'static` lifetime | LL | const A: &'static str = ""; - | ^^^^^^^ + | +++++++ help: consider introducing a named lifetime parameter | -LL | trait ZstAssert<'a>: Sized { -LL | const A: &'a str = ""; +LL ~ trait ZstAssert<'a>: Sized { +LL ~ const A: &'a str = ""; | error[E0106]: missing lifetime specifier @@ -23,12 +23,12 @@ LL | const B: S = S { s: &() }; help: consider using the `'static` lifetime | LL | const B: S<'static> = S { s: &() }; - | ^^^^^^^^^ + | +++++++++ help: consider introducing a named lifetime parameter | -LL | trait ZstAssert<'a>: Sized { +LL ~ trait ZstAssert<'a>: Sized { LL | const A: &str = ""; -LL | const B: S<'a> = S { s: &() }; +LL ~ const B: S<'a> = S { s: &() }; | error[E0106]: missing lifetime specifier @@ -40,13 +40,13 @@ LL | const C: &'_ str = ""; help: consider using the `'static` lifetime | LL | const C: &'static str = ""; - | ^^^^^^^ + | ~~~~~~~ help: consider introducing a named lifetime parameter | -LL | trait ZstAssert<'a>: Sized { +LL ~ trait ZstAssert<'a>: Sized { LL | const A: &str = ""; LL | const B: S = S { s: &() }; -LL | const C: &'a str = ""; +LL ~ const C: &'a str = ""; | error[E0106]: missing lifetime specifiers @@ -58,14 +58,14 @@ LL | const D: T = T { a: &(), b: &() }; help: consider using the `'static` lifetime | LL | const D: T<'static, 'static> = T { a: &(), b: &() }; - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ help: consider introducing a named lifetime parameter | -LL | trait ZstAssert<'a>: Sized { +LL ~ trait ZstAssert<'a>: Sized { LL | const A: &str = ""; LL | const B: S = S { s: &() }; LL | const C: &'_ str = ""; -LL | const D: T<'a, 'a> = T { a: &(), b: &() }; +LL ~ const D: T<'a, 'a> = T { a: &(), b: &() }; | error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/missing-lifetime-specifier.stderr b/src/test/ui/suggestions/missing-lifetime-specifier.stderr index 8ddd2f7d52221..bf546384124c0 100644 --- a/src/test/ui/suggestions/missing-lifetime-specifier.stderr +++ b/src/test/ui/suggestions/missing-lifetime-specifier.stderr @@ -8,7 +8,7 @@ LL | static a: RefCell>>> = RefCell::new(HashMap:: help: consider using the `'static` lifetime | LL | static a: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:18:44 @@ -20,7 +20,7 @@ LL | static a: RefCell>>> = RefCell::new(HashMap:: help: consider using the `'static` lifetime | LL | static a: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:23:44 @@ -32,7 +32,7 @@ LL | static b: RefCell>>> = RefCell::new(HashMap: help: consider using the `'static` lifetime | LL | static b: RefCell>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:23:45 @@ -44,7 +44,7 @@ LL | static b: RefCell>>> = RefCell::new(HashMap: help: consider using the `'static` lifetime | LL | static b: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:23:44 @@ -56,7 +56,7 @@ LL | static b: RefCell>>> = RefCell::new(HashMap: help: consider using the `'static` lifetime | LL | static b: RefCell>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:23:45 @@ -68,7 +68,7 @@ LL | static b: RefCell>>> = RefCell::new(HashMap: help: consider using the `'static` lifetime | LL | static b: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:30:48 @@ -80,7 +80,7 @@ LL | static c: RefCell>>>> = RefCell::new(Hash help: consider using the `'static` lifetime | LL | static c: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:30:48 @@ -92,7 +92,7 @@ LL | static c: RefCell>>>> = RefCell::new(Hash help: consider using the `'static` lifetime | LL | static c: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:35:44 @@ -104,7 +104,7 @@ LL | static d: RefCell>>>> = RefCell::new(Has help: consider using the `'static` lifetime | LL | static d: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:35:49 @@ -116,7 +116,7 @@ LL | static d: RefCell>>>> = RefCell::new(Has help: consider using the `'static` lifetime | LL | static d: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:35:44 @@ -128,7 +128,7 @@ LL | static d: RefCell>>>> = RefCell::new(Has help: consider using the `'static` lifetime | LL | static d: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifiers --> $DIR/missing-lifetime-specifier.rs:35:49 @@ -140,7 +140,7 @@ LL | static d: RefCell>>>> = RefCell::new(Has help: consider using the `'static` lifetime | LL | static d: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:43:44 @@ -158,7 +158,7 @@ LL | pub union Qux<'t, 'k, I> { help: add missing lifetime argument | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:43:44 @@ -176,7 +176,7 @@ LL | pub union Qux<'t, 'k, I> { help: add missing lifetime argument | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:43:44 @@ -194,7 +194,7 @@ LL | pub union Qux<'t, 'k, I> { help: add missing lifetime argument | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:43:44 @@ -212,7 +212,7 @@ LL | pub union Qux<'t, 'k, I> { help: add missing lifetime argument | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:50:45 @@ -230,7 +230,7 @@ LL | trait Tar<'t, 'k, I> {} help: add missing lifetime argument | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:50:44 @@ -242,7 +242,7 @@ LL | static f: RefCell>>>> = RefCell help: consider using the `'static` lifetime | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:50:45 @@ -260,7 +260,7 @@ LL | trait Tar<'t, 'k, I> {} help: add missing lifetime argument | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0106]: missing lifetime specifier --> $DIR/missing-lifetime-specifier.rs:50:44 @@ -272,7 +272,7 @@ LL | static f: RefCell>>>> = RefCell help: consider using the `'static` lifetime | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^^^^^ + | ~~~~~~~~ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:50:45 @@ -290,7 +290,7 @@ LL | trait Tar<'t, 'k, I> {} help: add missing lifetime argument | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:50:45 @@ -308,7 +308,7 @@ LL | trait Tar<'t, 'k, I> {} help: add missing lifetime argument | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); - | ^^^^ + | ++++ error: aborting due to 22 previous errors diff --git a/src/test/ui/suggestions/missing-lt-for-hrtb.stderr b/src/test/ui/suggestions/missing-lt-for-hrtb.stderr index a7a44b511db8d..b1caaea9aed7b 100644 --- a/src/test/ui/suggestions/missing-lt-for-hrtb.stderr +++ b/src/test/ui/suggestions/missing-lt-for-hrtb.stderr @@ -9,11 +9,11 @@ LL | struct S<'a>(&'a dyn Fn(&X) -> &X); help: consider making the bound lifetime-generic with a new `'b` lifetime | LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &'b X); - | ^^^^^^^ ^^^^^ ^^^ + | +++++++ ~~~~~ ~~~ help: consider using the `'a` lifetime | LL | struct S<'a>(&'a dyn Fn(&X) -> &'a X); - | ^^^ + | ~~~ error[E0106]: missing lifetime specifier --> $DIR/missing-lt-for-hrtb.rs:2:33 @@ -26,11 +26,11 @@ LL | struct S<'a>(&'a dyn Fn(&X) -> &X); help: consider making the bound lifetime-generic with a new `'b` lifetime | LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &X<'b>); - | ^^^^^^^ ^^^^^ ^^^^^ + | +++++++ ~~~~~ ~~~~~ help: consider using the `'a` lifetime | LL | struct S<'a>(&'a dyn Fn(&X) -> &X<'a>); - | ^^^^^ + | ~~~~~ error[E0106]: missing lifetime specifier --> $DIR/missing-lt-for-hrtb.rs:5:40 @@ -47,7 +47,7 @@ LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X); help: consider using one of the available lifetimes here | LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &'lifetime X); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/missing-lt-for-hrtb.rs:5:41 diff --git a/src/test/ui/suggestions/missing-trait-bound-for-op.stderr b/src/test/ui/suggestions/missing-trait-bound-for-op.stderr index 0e0d397d6fc15..cde0755012594 100644 --- a/src/test/ui/suggestions/missing-trait-bound-for-op.stderr +++ b/src/test/ui/suggestions/missing-trait-bound-for-op.stderr @@ -9,7 +9,7 @@ LL | let _ = s == t; help: consider restricting type parameter `T` | LL | pub fn foo(s: &[T], t: &[T]) { - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr index 0a64a0d7d5ebc..2f0fd692a444a 100644 --- a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr +++ b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr @@ -15,7 +15,7 @@ LL | self.foo(); help: consider restricting the type parameters to satisfy the trait bounds | LL | struct Foo where T: Bar, T: Default { - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++ error[E0599]: the method `foo` exists for reference `&Fin`, but its trait bounds were not satisfied --> $DIR/missing-trait-bounds-for-method-call.rs:27:14 @@ -32,7 +32,7 @@ LL | self.foo(); help: consider restricting the type parameter to satisfy the trait bound | LL | struct Fin where T: Bar, T: Default { - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/multibyte-escapes.stderr b/src/test/ui/suggestions/multibyte-escapes.stderr index bb4f8e8c304a1..6e26bc1f01cef 100644 --- a/src/test/ui/suggestions/multibyte-escapes.stderr +++ b/src/test/ui/suggestions/multibyte-escapes.stderr @@ -7,7 +7,7 @@ LL | b'µ'; help: if you meant to use the unicode code point for 'µ', use a \xHH escape | LL | b'\xB5'; - | ^^^^ + | ~~~~ error: non-ASCII character in byte constant --> $DIR/multibyte-escapes.rs:9:7 @@ -27,7 +27,7 @@ LL | b"字"; help: if you meant to use the UTF-8 encoding of '字', use \xHH escapes | LL | b"\xE5\xAD\x97"; - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr index 13b6182c0f5f6..fd5677898e656 100644 --- a/src/test/ui/suggestions/mut-ref-reassignment.stderr +++ b/src/test/ui/suggestions/mut-ref-reassignment.stderr @@ -9,7 +9,7 @@ LL | opt = None; help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = None; - | ^ + | + error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:6:11 @@ -31,7 +31,7 @@ LL | opt = Some(String::new()) help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = Some(String::new()) - | ^ + | + error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:14:11 diff --git a/src/test/ui/suggestions/non-existent-field-present-in-subfield.stderr b/src/test/ui/suggestions/non-existent-field-present-in-subfield.stderr index ddb7476ec6e34..cc991b915d339 100644 --- a/src/test/ui/suggestions/non-existent-field-present-in-subfield.stderr +++ b/src/test/ui/suggestions/non-existent-field-present-in-subfield.stderr @@ -8,7 +8,7 @@ LL | let _test = &fooer.c; help: one of the expressions' fields has a field of the same name | LL | let _test = &fooer.first.bar.c; - | ^^^^^^^^^^ + | ++++++++++ error[E0609]: no field `test` on type `Foo` --> $DIR/non-existent-field-present-in-subfield.rs:40:24 @@ -20,7 +20,7 @@ LL | let _test2 = fooer.test; help: one of the expressions' fields has a field of the same name | LL | let _test2 = fooer.first.bar.c.test; - | ^^^^^^^^^^^^ + | ++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr b/src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr index 67491b0446f90..55047b42698b5 100644 --- a/src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr +++ b/src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr @@ -9,7 +9,7 @@ LL | fn f(a: A) -> A; help: you might have meant to use `Self` to refer to the implementing type | LL | fn f(a: Self) -> Self; - | ^^^^ ^^^^ + | ~~~~ ~~~~ error[E0038]: the trait `A` cannot be made into an object --> $DIR/object-unsafe-trait-should-use-self.rs:3:13 @@ -36,7 +36,7 @@ LL | fn f(a: B) -> B; help: you might have meant to use `Self` to refer to the implementing type | LL | fn f(a: Self) -> Self; - | ^^^^ ^^^^ + | ~~~~ ~~~~ error[E0038]: the trait `B` cannot be made into an object --> $DIR/object-unsafe-trait-should-use-self.rs:8:13 @@ -54,11 +54,11 @@ LL | fn f(a: B) -> B; help: consider turning `f` into a method by giving it a `&self` argument | LL | fn f(&self, a: B) -> B; - | ^^^^^^ + | ++++++ help: alternatively, consider constraining `f` so it does not apply to trait objects | LL | fn f(a: B) -> B where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr b/src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr index 4a53706f9772e..74237e6e6c638 100644 --- a/src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr +++ b/src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr @@ -25,15 +25,15 @@ LL | fn bar(self: ()) {} help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self) where Self: Other, { } - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Other, Self: Sized, { } - | ^^^^^^^^^^^^^ + | +++++++++++++ help: consider changing method `bar`'s `self` parameter to be `&self` | LL | fn bar(self: &Self) {} - | ^^^^^ + | ~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/opaque-type-error.stderr b/src/test/ui/suggestions/opaque-type-error.stderr index d74076cbc9b8e..851073734515d 100644 --- a/src/test/ui/suggestions/opaque-type-error.stderr +++ b/src/test/ui/suggestions/opaque-type-error.stderr @@ -18,9 +18,9 @@ LL | | }.await = note: distinct uses of `impl Trait` result in different opaque types help: consider `await`ing on both `Future`s | -LL | thing_one().await +LL ~ thing_one().await LL | } else { -LL | thing_two().await +LL ~ thing_two().await | error: aborting due to previous error diff --git a/src/test/ui/suggestions/option-content-move.stderr b/src/test/ui/suggestions/option-content-move.stderr index 9476653009155..a9e540084e590 100644 --- a/src/test/ui/suggestions/option-content-move.stderr +++ b/src/test/ui/suggestions/option-content-move.stderr @@ -7,7 +7,7 @@ LL | if selection.1.unwrap().contains(selection.0) { help: consider borrowing the `Option`'s content | LL | if selection.1.as_ref().unwrap().contains(selection.0) { - | ^^^^^^^^^ + | +++++++++ error[E0507]: cannot move out of `selection.1` which is behind a shared reference --> $DIR/option-content-move.rs:29:20 @@ -18,7 +18,7 @@ LL | if selection.1.unwrap().contains(selection.0) { help: consider borrowing the `Result`'s content | LL | if selection.1.as_ref().unwrap().contains(selection.0) { - | ^^^^^^^^^ + | +++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/path-by-value.stderr b/src/test/ui/suggestions/path-by-value.stderr index 5919a6f749205..bbeaa26a93a0b 100644 --- a/src/test/ui/suggestions/path-by-value.stderr +++ b/src/test/ui/suggestions/path-by-value.stderr @@ -10,7 +10,7 @@ LL | fn f(p: Path) { } help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn f(p: &Path) { } - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/suggestions/raw-byte-string-prefix.stderr b/src/test/ui/suggestions/raw-byte-string-prefix.stderr index 1498f5ac93513..4f5106849d5eb 100644 --- a/src/test/ui/suggestions/raw-byte-string-prefix.stderr +++ b/src/test/ui/suggestions/raw-byte-string-prefix.stderr @@ -8,7 +8,7 @@ LL | rb"abc"; help: use `br` for a raw byte string | LL | br"abc"; - | ^^ + | ~~ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"abc"` --> $DIR/raw-byte-string-prefix.rs:6:7 diff --git a/src/test/ui/suggestions/raw-name-use-suggestion.stderr b/src/test/ui/suggestions/raw-name-use-suggestion.stderr index 7447cf87ce168..bfefc14469835 100644 --- a/src/test/ui/suggestions/raw-name-use-suggestion.stderr +++ b/src/test/ui/suggestions/raw-name-use-suggestion.stderr @@ -7,7 +7,7 @@ LL | pub fn break() {} help: you can escape reserved keywords to use them as identifiers | LL | pub fn r#break() {} - | ^^^^^^^ + | ~~~~~~~ error: expected identifier, found keyword `let` --> $DIR/raw-name-use-suggestion.rs:7:10 @@ -18,7 +18,7 @@ LL | foo::let(); help: you can escape reserved keywords to use them as identifiers | LL | foo::r#let(); - | ^^^^^ + | ~~~~~ error[E0425]: cannot find function `r#break` in this scope --> $DIR/raw-name-use-suggestion.rs:8:5 diff --git a/src/test/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr b/src/test/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr index 981f95749d3ba..618ccba0d3d12 100644 --- a/src/test/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr +++ b/src/test/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr @@ -7,7 +7,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>(); help: surround the type parameters with angle brackets | LL | let _ = vec![1, 2, 3].into_iter().collect::>(); - | ^ ^ + | + + error: generic parameters without surrounding angle brackets --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:4:48 @@ -18,7 +18,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>>(); help: surround the type parameters with angle brackets | LL | let _ = vec![1, 2, 3].into_iter().collect::>(); - | ^ ^ + | + ~ error: generic parameters without surrounding angle brackets --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:6:48 @@ -29,7 +29,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>(); help: surround the type parameters with angle brackets | LL | let _ = vec![1, 2, 3].into_iter().collect::>(); - | ^ ^ + | + ~ error: generic parameters without surrounding angle brackets --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:8:48 @@ -40,7 +40,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>(); help: surround the type parameters with angle brackets | LL | let _ = vec![1, 2, 3].into_iter().collect::>(); - | ^ ^ + | + ~ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/restrict-type-argument.stderr b/src/test/ui/suggestions/restrict-type-argument.stderr index 33af13d943f74..95a0cb192f335 100644 --- a/src/test/ui/suggestions/restrict-type-argument.stderr +++ b/src/test/ui/suggestions/restrict-type-argument.stderr @@ -10,7 +10,7 @@ LL | is_send(val); help: consider further restricting this bound | LL | fn use_impl_sync(val: impl Sync + std::marker::Send) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:8:13 @@ -24,7 +24,7 @@ LL | is_send(val); help: consider further restricting this bound | LL | fn use_where(val: S) where S: Sync + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:12:13 @@ -38,7 +38,7 @@ LL | is_send(val); help: consider further restricting this bound | LL | fn use_bound(val: S) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:20:13 @@ -52,7 +52,7 @@ LL | is_send(val); help: consider further restricting this bound | LL | Sync + std::marker::Send - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:24:13 @@ -66,7 +66,7 @@ LL | is_send(val); help: consider further restricting this bound | LL | fn use_bound_and_where(val: S) where S: std::fmt::Debug + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:28:13 @@ -80,7 +80,7 @@ LL | is_send(val); help: consider restricting type parameter `S` | LL | fn use_unbound(val: S) { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/return-elided-lifetime.stderr b/src/test/ui/suggestions/return-elided-lifetime.stderr index 888cd5e58abec..cdc3f5e85d142 100644 --- a/src/test/ui/suggestions/return-elided-lifetime.stderr +++ b/src/test/ui/suggestions/return-elided-lifetime.stderr @@ -8,7 +8,7 @@ LL | fn f1() -> &i32 { loop {} } help: consider using the `'static` lifetime | LL | fn f1() -> &'static i32 { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:8:14 @@ -20,7 +20,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} } help: consider using the `'static` lifetime | LL | fn f1_() -> (&'static i32, &i32) { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:8:20 @@ -32,7 +32,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} } help: consider using the `'static` lifetime | LL | fn f1_() -> (&i32, &'static i32) { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:12:26 @@ -44,7 +44,7 @@ LL | fn f2(a: i32, b: i32) -> &i32 { loop {} } help: consider using the `'static` lifetime | LL | fn f2(a: i32, b: i32) -> &'static i32 { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:14:28 @@ -56,7 +56,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} } help: consider using the `'static` lifetime | LL | fn f2_(a: i32, b: i32) -> (&'static i32, &i32) { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:14:34 @@ -68,7 +68,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} } help: consider using the `'static` lifetime | LL | fn f2_(a: i32, b: i32) -> (&i32, &'static i32) { loop {} } - | ^^^^^^^^ + | ~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:19:17 @@ -80,7 +80,7 @@ LL | fn f3(s: &S) -> &i32 { loop {} } help: consider introducing a named lifetime parameter | LL | fn f3<'a>(s: &'a S) -> &'a i32 { loop {} } - | ^^^^ ^^^^^ ^^^ + | ++++ ~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:21:26 @@ -92,7 +92,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} } help: consider introducing a named lifetime parameter | LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&'a i32, &i32) { loop {} } - | ^^^^ ^^^^^ ^^^^^ ^^^ + | ++++ ~~~~~ ~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:21:32 @@ -104,7 +104,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} } help: consider introducing a named lifetime parameter | LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&i32, &'a i32) { loop {} } - | ^^^^ ^^^^^ ^^^^^ ^^^ + | ++++ ~~~~~ ~~~~~ ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:25:42 @@ -121,7 +121,7 @@ LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &i32 { loop {} } help: consider using one of the available lifetimes here | LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &'lifetime i32 { loop {} } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:27:44 @@ -138,7 +138,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} } help: consider using one of the available lifetimes here | LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&'lifetime i32, &i32) { loop {} } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:27:50 @@ -155,7 +155,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} } help: consider using one of the available lifetimes here | LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &'lifetime i32) { loop {} } - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:31:35 @@ -167,7 +167,7 @@ LL | fn f5<'a>(a: &'a i32, b: &i32) -> &i32 { loop {} } help: consider using the `'a` lifetime | LL | fn f5<'a>(a: &'a i32, b: &i32) -> &'a i32 { loop {} } - | ^^^ + | ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:33:37 @@ -179,7 +179,7 @@ LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &i32) { loop {} } help: consider using the `'a` lifetime | LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&'a i32, &i32) { loop {} } - | ^^^ + | ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-elided-lifetime.rs:33:43 @@ -191,7 +191,7 @@ LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &i32) { loop {} } help: consider using the `'a` lifetime | LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &'a i32) { loop {} } - | ^^^ + | ~~~ error: aborting due to 15 previous errors diff --git a/src/test/ui/suggestions/return-without-lifetime.stderr b/src/test/ui/suggestions/return-without-lifetime.stderr index 2a237d61f50fe..449a61d48090c 100644 --- a/src/test/ui/suggestions/return-without-lifetime.stderr +++ b/src/test/ui/suggestions/return-without-lifetime.stderr @@ -7,7 +7,7 @@ LL | struct Foo<'a>(&usize); help: consider using the `'a` lifetime | LL | struct Foo<'a>(&'a usize); - | ^^^ + | ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-without-lifetime.rs:5:34 @@ -19,7 +19,7 @@ LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() } help: consider using the `'a` lifetime | LL | fn func1<'a>(_arg: &'a Thing) -> &'a () { unimplemented!() } - | ^^^ + | ~~~ error[E0106]: missing lifetime specifier --> $DIR/return-without-lifetime.rs:7:35 @@ -31,7 +31,7 @@ LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() } help: consider using the `'a` lifetime | LL | fn func2<'a>(_arg: &Thing<'a>) -> &'a () { unimplemented!() } - | ^^^ + | ~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr index 8107fd862122a..d5c49a477b028 100644 --- a/src/test/ui/suggestions/suggest-box.stderr +++ b/src/test/ui/suggestions/suggest-box.stderr @@ -15,10 +15,10 @@ LL | | }; = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html help: store this in the heap by calling `Box::new` | -LL | let _x: Box Result<(), ()>> = Box::new(|| { +LL ~ let _x: Box Result<(), ()>> = Box::new(|| { LL | Err(())?; LL | Ok(()) -LL | }); +LL ~ }); | error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-change-mut.stderr b/src/test/ui/suggestions/suggest-change-mut.stderr index 8384f952b6849..1f14ebae84127 100644 --- a/src/test/ui/suggestions/suggest-change-mut.stderr +++ b/src/test/ui/suggestions/suggest-change-mut.stderr @@ -11,16 +11,17 @@ LL | pub fn new(inner: R) -> BufReader { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the leading `&`-reference | -LL | let mut stream_reader = BufReader::new(stream); - | -- +LL - let mut stream_reader = BufReader::new(&stream); +LL + let mut stream_reader = BufReader::new(stream); + | help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | fn issue_81421(mut stream: T) where &T: std::io::Read { - | ^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++ help: consider changing this borrow's mutability | LL | let mut stream_reader = BufReader::new(&mut stream); - | ^^^^ + | ~~~~ error[E0599]: the method `read_until` exists for struct `BufReader<&T>`, but its trait bounds were not satisfied --> $DIR/suggest-change-mut.rs:16:23 diff --git a/src/test/ui/suggestions/suggest-closure-return-type-1.stderr b/src/test/ui/suggestions/suggest-closure-return-type-1.stderr index 7ef959053805b..7161ca3903e61 100644 --- a/src/test/ui/suggestions/suggest-closure-return-type-1.stderr +++ b/src/test/ui/suggestions/suggest-closure-return-type-1.stderr @@ -7,7 +7,7 @@ LL | let _v = || -> _ { [] }; help: give this closure an explicit return type without `_` placeholders | LL | let _v = || -> [_; 0] { [] }; - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-closure-return-type-2.stderr b/src/test/ui/suggestions/suggest-closure-return-type-2.stderr index 2a8d7dd5b85db..a7f5b58c4da76 100644 --- a/src/test/ui/suggestions/suggest-closure-return-type-2.stderr +++ b/src/test/ui/suggestions/suggest-closure-return-type-2.stderr @@ -7,7 +7,7 @@ LL | let _v = || { [] }; help: give this closure an explicit return type without `_` placeholders | LL | let _v = || -> [_; 0] { [] }; - | ^^^^^^^^^ + | +++++++++ error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-closure-return-type-3.stderr b/src/test/ui/suggestions/suggest-closure-return-type-3.stderr index 67dc4d8fd69b2..eeec23e0da030 100644 --- a/src/test/ui/suggestions/suggest-closure-return-type-3.stderr +++ b/src/test/ui/suggestions/suggest-closure-return-type-3.stderr @@ -7,7 +7,7 @@ LL | let _v = || []; help: give this closure an explicit return type without `_` placeholders | LL | let _v = || -> [_; 0] { [] }; - | ^^^^^^^^^^^ ^ + | +++++++++++ + error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-move-types.stderr b/src/test/ui/suggestions/suggest-move-types.stderr index df064f22f3584..1a6032db0010a 100644 --- a/src/test/ui/suggestions/suggest-move-types.stderr +++ b/src/test/ui/suggestions/suggest-move-types.stderr @@ -9,7 +9,7 @@ LL | struct A> { help: move the constraint after the generic argument | LL | struct A> { - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:33:43 @@ -22,7 +22,7 @@ LL | struct Al<'a, T, M: OneWithLifetime> { help: move the constraint after the generic arguments | LL | struct Al<'a, T, M: OneWithLifetime<'a, T, A = ()>> { - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:40:46 @@ -35,7 +35,7 @@ LL | struct B> { help: move the constraints after the generic arguments | LL | struct B> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:48:71 @@ -48,7 +48,7 @@ LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:57:28 @@ -61,7 +61,7 @@ LL | struct C> { help: move the constraints after the generic arguments | LL | struct C> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:65:53 @@ -74,7 +74,7 @@ LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:74:28 @@ -87,7 +87,7 @@ LL | struct D> { help: move the constraints after the generic arguments | LL | struct D> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: generic arguments must come before the first constraint --> $DIR/suggest-move-types.rs:82:53 @@ -100,7 +100,7 @@ LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0747]: type provided when a lifetime was expected --> $DIR/suggest-move-types.rs:33:43 diff --git a/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr b/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr index 28fef511e04b1..0c91e2feed3ad 100644 --- a/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr +++ b/src/test/ui/suggestions/suggest-on-bare-closure-call.stderr @@ -9,7 +9,7 @@ LL | let _ = ||{}(); help: if you meant to create this closure and immediately call it, surround the closure with parenthesis | LL | let _ = (||{})(); - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-std-when-using-type.stderr b/src/test/ui/suggestions/suggest-std-when-using-type.stderr index 7f4c80f50e267..4255281d9a7ac 100644 --- a/src/test/ui/suggestions/suggest-std-when-using-type.stderr +++ b/src/test/ui/suggestions/suggest-std-when-using-type.stderr @@ -7,7 +7,7 @@ LL | let pi = f32::consts::PI; help: you are looking for the module in `std`, not the primitive type | LL | let pi = std::f32::consts::PI; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope --> $DIR/suggest-std-when-using-type.rs:5:14 @@ -18,7 +18,7 @@ LL | str::from_utf8(bytes) help: you are looking for the module in `std`, not the primitive type | LL | std::str::from_utf8(bytes) - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr index f785f7b84a76f..19fc772544d59 100644 --- a/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr +++ b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr @@ -9,7 +9,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait, _: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13 @@ -22,7 +22,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn ban(x: T) where T: Trait { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9 @@ -35,7 +35,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait, _: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9 @@ -48,7 +48,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn bar>(x: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9 @@ -61,7 +61,7 @@ LL | qux(x.func()) help: consider constraining the associated type ` as Trait>::A` to `usize` | LL | fn foo2(x: impl Trait) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9 @@ -74,7 +74,7 @@ LL | qux(x.func()) help: consider constraining the associated type `>::A` to `usize` | LL | fn bar2>(x: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9 @@ -87,7 +87,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn ban(x: T) where T: Trait { - | ^^^^^^^^^^^ + | +++++++++++ error: aborting due to 7 previous errors diff --git a/src/test/ui/suggestions/trait-with-missing-associated-type-restriction.stderr b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction.stderr index e629f8f970d32..943cbcbc81a22 100644 --- a/src/test/ui/suggestions/trait-with-missing-associated-type-restriction.stderr +++ b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction.stderr @@ -23,7 +23,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn foo(_: impl Trait, x: impl Trait) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:18:9 @@ -36,7 +36,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn bar>(x: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:22:9 @@ -49,7 +49,7 @@ LL | qux(x.func()) help: consider constraining the associated type ` as Trait>::A` to `usize` | LL | fn foo2(x: impl Trait) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:26:12 @@ -70,7 +70,7 @@ LL | fn funq(&self) -> Self::A {} help: consider constraining the associated type `>::A` to `{integer}` | LL | fn bar2>(x: T) { - | ^^^^^^^^^^^^^^^ + | +++++++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:27:9 @@ -83,7 +83,7 @@ LL | qux(x.func()) help: consider constraining the associated type `>::A` to `usize` | LL | fn bar2>(x: T) { - | ^^^^^^^^^^^ + | +++++++++++ error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:31:9 @@ -113,7 +113,7 @@ LL | qux(x.func()) help: consider constraining the associated type `::A` to `usize` | LL | fn ban(x: T) where T: Trait { - | ^^^^^^^^^^^ + | +++++++++++ error: aborting due to 9 previous errors diff --git a/src/test/ui/suggestions/try-operator-dont-suggest-semicolon.stderr b/src/test/ui/suggestions/try-operator-dont-suggest-semicolon.stderr index 4f7e18742e22e..939285498fb69 100644 --- a/src/test/ui/suggestions/try-operator-dont-suggest-semicolon.stderr +++ b/src/test/ui/suggestions/try-operator-dont-suggest-semicolon.stderr @@ -22,11 +22,11 @@ LL | | } help: consider using a semicolon here | LL | x?; - | ^ + | + help: consider using a semicolon here | LL | }; - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/unsized-function-parameter.stderr b/src/test/ui/suggestions/unsized-function-parameter.stderr index 8cbd8bf3f3458..55d8d1ab1bc06 100644 --- a/src/test/ui/suggestions/unsized-function-parameter.stderr +++ b/src/test/ui/suggestions/unsized-function-parameter.stderr @@ -9,7 +9,7 @@ LL | fn foo1(bar: str) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo1(bar: &str) {} - | ^ + | + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-function-parameter.rs:11:9 @@ -22,7 +22,7 @@ LL | fn foo2(_bar: str) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo2(_bar: &str) {} - | ^ + | + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-function-parameter.rs:17:9 @@ -35,7 +35,7 @@ LL | fn foo3(_: str) {} help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo3(_: &str) {} - | ^ + | + error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr index f1248643105eb..5a158e5876a06 100644 --- a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr +++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr @@ -27,7 +27,7 @@ LL | i: Box>, help: specify the associated types | LL | i: Box>, - | ^^^^^^^^^ ^^^^^^^^^ + | ~~~~~~~~~ ~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/tag-type-args.stderr b/src/test/ui/tag-type-args.stderr index 7523a931dd58f..107af76413d39 100644 --- a/src/test/ui/tag-type-args.stderr +++ b/src/test/ui/tag-type-args.stderr @@ -12,7 +12,7 @@ LL | enum Quux { Bar } help: add missing generic argument | LL | fn foo(c: Quux) { assert!((false)); } - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/tail-typeck.stderr b/src/test/ui/tail-typeck.stderr index cff0991072103..422aa904e1d93 100644 --- a/src/test/ui/tail-typeck.stderr +++ b/src/test/ui/tail-typeck.stderr @@ -9,7 +9,7 @@ LL | fn f() -> isize { return g(); } help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | fn f() -> isize { return g().try_into().unwrap(); } - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr index 69daa93412a3a..480f442fedd28 100644 --- a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr +++ b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr @@ -10,7 +10,7 @@ LL | ...ཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔ help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇ཈ཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬ཭཮཯཰ཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗ྘ྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྽྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!"; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/trait-bounds/unsized-bound.stderr b/src/test/ui/trait-bounds/unsized-bound.stderr index 30163ab797813..c2f176c4b46b2 100644 --- a/src/test/ui/trait-bounds/unsized-bound.stderr +++ b/src/test/ui/trait-bounds/unsized-bound.stderr @@ -11,12 +11,13 @@ LL | impl Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {} = note: required because it appears within the type `(A, B)` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait<(A, B)> for (A, B) where A: ?Sized, {} - | -- +LL - impl Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {} +LL + impl Trait<(A, B)> for (A, B) where A: ?Sized, {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/unsized-bound.rs:2:30 @@ -29,8 +30,9 @@ LL | impl Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {} = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait<(A, B)> for (A, B) where B: ?Sized, {} - | -- +LL - impl Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {} +LL + impl Trait<(A, B)> for (A, B) where B: ?Sized, {} + | error[E0277]: the size for values of type `C` cannot be known at compilation time --> $DIR/unsized-bound.rs:5:31 @@ -46,12 +48,13 @@ LL | impl Trait<(A, B, C)> for (A, B, C) where A: ?Size = note: required because it appears within the type `(A, B, C)` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} - | -- +LL - impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} +LL + impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/unsized-bound.rs:5:52 @@ -64,8 +67,9 @@ LL | impl Trait<(A, B, C)> for (A, B, C) where A: ?Size = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait<(A, B, C)> for (A, B, C) {} - | -- +LL - impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} +LL + impl Trait<(A, B, C)> for (A, B, C) {} + | error[E0277]: the size for values of type `B` cannot be known at compilation time --> $DIR/unsized-bound.rs:5:52 @@ -78,8 +82,9 @@ LL | impl Trait<(A, B, C)> for (A, B, C) where A: ?Size = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} - | -- +LL - impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} +LL + impl Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} + | error[E0277]: the size for values of type `B` cannot be known at compilation time --> $DIR/unsized-bound.rs:10:28 @@ -94,12 +99,13 @@ LL | impl Trait2<(A, B)> for (A, B) {} = note: required because it appears within the type `(A, B)` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait2<(A, B)> for (A, B) {} - | -- +LL - impl Trait2<(A, B)> for (A, B) {} +LL + impl Trait2<(A, B)> for (A, B) {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait2 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/unsized-bound.rs:10:47 @@ -112,8 +118,9 @@ LL | impl Trait2<(A, B)> for (A, B) {} = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait2<(A, B)> for (A, B) {} - | -- +LL - impl Trait2<(A, B)> for (A, B) {} +LL + impl Trait2<(A, B)> for (A, B) {} + | error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/unsized-bound.rs:14:9 @@ -127,12 +134,13 @@ LL | impl Trait3 for A where A: ?Sized {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait3 for A {} - | -- +LL - impl Trait3 for A where A: ?Sized {} +LL + impl Trait3 for A {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait3 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time --> $DIR/unsized-bound.rs:17:17 @@ -146,12 +154,13 @@ LL | impl Trait4 for A {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait4 for A {} - | -- +LL - impl Trait4 for A {} +LL + impl Trait4 for A {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait4 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized-bound.rs:20:12 @@ -165,12 +174,13 @@ LL | impl Trait5 for X where X: ?Sized {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait5 for X {} - | -- +LL - impl Trait5 for X where X: ?Sized {} +LL + impl Trait5 for X {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait5 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized-bound.rs:23:20 @@ -184,12 +194,13 @@ LL | impl Trait6 for X {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait6 for X {} - | -- +LL - impl Trait6 for X {} +LL + impl Trait6 for X {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait6 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `Y` cannot be known at compilation time --> $DIR/unsized-bound.rs:26:12 @@ -203,12 +214,13 @@ LL | impl Trait7 for X where Y: ?Sized {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait7 for X {} - | -- +LL - impl Trait7 for X where Y: ?Sized {} +LL + impl Trait7 for X {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait7 {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `Y` cannot be known at compilation time --> $DIR/unsized-bound.rs:29:20 @@ -222,12 +234,13 @@ LL | impl Trait8 for X {} | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl Trait8 for X {} - | -- +LL - impl Trait8 for X {} +LL + impl Trait8 for X {} + | help: consider relaxing the implicit `Sized` restriction | LL | trait Trait8 {} - | ^^^^^^^^ + | ++++++++ error: aborting due to 13 previous errors diff --git a/src/test/ui/trait-impl-bound-suggestions.stderr b/src/test/ui/trait-impl-bound-suggestions.stderr index 110ca79908079..c9dad2ef896f6 100644 --- a/src/test/ui/trait-impl-bound-suggestions.stderr +++ b/src/test/ui/trait-impl-bound-suggestions.stderr @@ -10,7 +10,7 @@ LL | fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { help: consider further restricting type parameter `X` | LL | trait InsufficientlyConstrainedGeneric where X: std::marker::Copy { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/traits/alias/ambiguous.stderr b/src/test/ui/traits/alias/ambiguous.stderr index 649ce72604e2d..0fe1a79678da5 100644 --- a/src/test/ui/traits/alias/ambiguous.stderr +++ b/src/test/ui/traits/alias/ambiguous.stderr @@ -17,11 +17,11 @@ LL | fn foo(&self) {} help: disambiguate the associated function for candidate #1 | LL | A::foo(&t); - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: disambiguate the associated function for candidate #2 | LL | B::foo(&t); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/traits/alias/wf.stderr b/src/test/ui/traits/alias/wf.stderr index b07145f4d38f0..44b194cea402a 100644 --- a/src/test/ui/traits/alias/wf.stderr +++ b/src/test/ui/traits/alias/wf.stderr @@ -9,7 +9,7 @@ LL | trait B = A; help: consider restricting type parameter `T` | LL | trait B = A; - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr index bfdd121012ae0..38b2e5ae9b9c0 100644 --- a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr +++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr @@ -12,11 +12,11 @@ LL | pub trait ToString { help: constrain the associated type to `String` | LL | struct Foo where T: Bar, T: Bar { - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ help: a trait with a similar name exists | LL | struct Foo where T: Bar, ::Baz: ToString { - | ^^^^^^^^ + | ~~~~~~~~ error[E0404]: expected trait, found struct `String` --> $DIR/assoc_type_bound_with_struct.rs:9:54 @@ -32,11 +32,11 @@ LL | pub trait ToString { help: constrain the associated type to `String` | LL | struct Qux<'a, T> where T: Bar, &'a T: Bar { - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ help: a trait with a similar name exists | LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: ToString { - | ^^^^^^^^ + | ~~~~~~~~ error[E0404]: expected trait, found struct `String` --> $DIR/assoc_type_bound_with_struct.rs:13:45 @@ -52,11 +52,11 @@ LL | pub trait ToString { help: constrain the associated type to `String` | LL | fn foo(_: T) where T: Bar { - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ help: a trait with a similar name exists | LL | fn foo(_: T) where ::Baz: ToString { - | ^^^^^^^^ + | ~~~~~~~~ error[E0404]: expected trait, found struct `String` --> $DIR/assoc_type_bound_with_struct.rs:16:57 @@ -72,11 +72,11 @@ LL | pub trait ToString { help: constrain the associated type to `String` | LL | fn qux<'a, T: Bar>(_: &'a T) where &'a T: Bar { - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ help: a trait with a similar name exists | LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: ToString { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/traits/bad-method-typaram-kind.stderr b/src/test/ui/traits/bad-method-typaram-kind.stderr index fd3999ae6fbec..1e9d151629f2f 100644 --- a/src/test/ui/traits/bad-method-typaram-kind.stderr +++ b/src/test/ui/traits/bad-method-typaram-kind.stderr @@ -7,7 +7,7 @@ LL | 1.bar::(); help: consider further restricting this bound | LL | fn foo() { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/traits/bound/not-on-bare-trait.stderr b/src/test/ui/traits/bound/not-on-bare-trait.stderr index e65b8989e0b1e..1b8cd6ad078a2 100644 --- a/src/test/ui/traits/bound/not-on-bare-trait.stderr +++ b/src/test/ui/traits/bound/not-on-bare-trait.stderr @@ -19,7 +19,7 @@ LL | fn foo(_x: Foo + Send) { help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(_x: &Foo + Send) { - | ^ + | + error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/traits/bound/not-on-struct.stderr b/src/test/ui/traits/bound/not-on-struct.stderr index 951e974ad2677..407a4f0ef1486 100644 --- a/src/test/ui/traits/bound/not-on-struct.stderr +++ b/src/test/ui/traits/bound/not-on-struct.stderr @@ -45,8 +45,9 @@ LL | fn a() -> A + 'static { | expected this type to be a trait... help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn a() -> A { - | -- +LL - fn a() -> A + 'static { +LL + fn a() -> A { + | error[E0404]: expected trait, found enum `Result` --> $DIR/not-on-struct.rs:16:34 @@ -63,8 +64,9 @@ LL | fn b<'a,T,E>(iter: Iterator + 'a>) { | expected this type to be a trait... help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn b<'a,T,E>(iter: Iterator>) { - | -- +LL - fn b<'a,T,E>(iter: Iterator + 'a>) { +LL + fn b<'a,T,E>(iter: Iterator>) { + | error[E0404]: expected trait, found struct `A` --> $DIR/not-on-struct.rs:19:21 @@ -81,8 +83,9 @@ LL | fn c() -> 'static + A { | ...because of this bound help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn c() -> A { - | -- +LL - fn c() -> 'static + A { +LL + fn c() -> A { + | error[E0404]: expected trait, found enum `Result` --> $DIR/not-on-struct.rs:22:39 @@ -99,8 +102,9 @@ LL | fn d<'a,T,E>(iter: Iterator>) { | ...because of this bound help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn d<'a,T,E>(iter: Iterator>) { - | -- +LL - fn d<'a,T,E>(iter: Iterator>) { +LL + fn d<'a,T,E>(iter: Iterator>) { + | error[E0404]: expected trait, found struct `A` --> $DIR/not-on-struct.rs:25:21 @@ -117,8 +121,9 @@ LL | fn e() -> 'static + A + 'static { | expected this type to be a trait... help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn e() -> A { - | --- +LL - fn e() -> 'static + A + 'static { +LL + fn e() -> A { + | error[E0404]: expected trait, found enum `Result` --> $DIR/not-on-struct.rs:29:39 @@ -135,8 +140,9 @@ LL | fn f<'a,T,E>(iter: Iterator + 'a>) { | expected this type to be a trait... help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn f<'a,T,E>(iter: Iterator>) { - | -- -- +LL - fn f<'a,T,E>(iter: Iterator + 'a>) { +LL + fn f<'a,T,E>(iter: Iterator>) { + | error[E0404]: expected trait, found struct `Traitor` --> $DIR/not-on-struct.rs:35:11 @@ -155,12 +161,13 @@ LL | fn g() -> Traitor + 'static { | expected this type to be a trait... help: if you meant to use a type and not a trait here, remove the bounds | -LL | fn g() -> Traitor { - | -- +LL - fn g() -> Traitor + 'static { +LL + fn g() -> Traitor { + | help: a trait with a similar name exists | LL | fn g() -> Trait + 'static { - | ^^^^^ + | ~~~~~ error: aborting due to 11 previous errors diff --git a/src/test/ui/traits/bound/on-structs-and-enums.stderr b/src/test/ui/traits/bound/on-structs-and-enums.stderr index 0c69e7b6feef6..cc09b80898cf1 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums.stderr @@ -10,7 +10,7 @@ LL | impl Foo { help: consider restricting type parameter `T` | LL | impl Foo { - | ^^^^^^^ + | +++++++ error[E0277]: the trait bound `isize: Trait` is not satisfied --> $DIR/on-structs-and-enums.rs:19:8 @@ -42,7 +42,7 @@ LL | b: Foo, help: consider restricting type parameter `U` | LL | struct Badness { - | ^^^^^^^ + | +++++++ error[E0277]: the trait bound `V: Trait` is not satisfied --> $DIR/on-structs-and-enums.rs:31:21 @@ -56,7 +56,7 @@ LL | EvenMoreBadness(Bar), help: consider restricting type parameter `V` | LL | enum MoreBadness { - | ^^^^^^^ + | +++++++ error[E0277]: the trait bound `i32: Trait` is not satisfied --> $DIR/on-structs-and-enums.rs:35:5 diff --git a/src/test/ui/traits/inductive-overflow/two-traits.stderr b/src/test/ui/traits/inductive-overflow/two-traits.stderr index 508a12d859a62..bf2acd350aef9 100644 --- a/src/test/ui/traits/inductive-overflow/two-traits.stderr +++ b/src/test/ui/traits/inductive-overflow/two-traits.stderr @@ -10,7 +10,7 @@ LL | type X = Self; help: consider further restricting this bound | LL | impl Magic for T { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error[E0275]: overflow evaluating the requirement `*mut (): Magic` --> $DIR/two-traits.rs:20:5 diff --git a/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr index bc7b863ca4f51..fa8799bf7d8a1 100644 --- a/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr +++ b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr @@ -13,7 +13,7 @@ LL | c.same_as(22) help: consider further restricting this bound | LL | fn with_trait>(c: &C) -> bool { - | ^^^^^^^^^^^^^^^^ + | ++++++++++++++++ error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied --> $DIR/repeated-supertrait-ambig.rs:34:5 @@ -41,7 +41,7 @@ LL | fn same_as(&self, t: T) -> bool; help: consider further restricting this bound | LL | fn with_ufcs2>(c: &C) -> bool { - | ^^^^^^^^^^^^^^^^ + | ++++++++++++++++ error[E0277]: the trait bound `i64: CompareTo` is not satisfied --> $DIR/repeated-supertrait-ambig.rs:42:23 diff --git a/src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr b/src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr index 4807a0930e7d0..cb1128fe5c669 100644 --- a/src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr +++ b/src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr @@ -8,7 +8,7 @@ LL | t.foo() help: the following trait defines an item `foo`, perhaps you need to restrict type parameter `T` with it: | LL | fn do_stuff(t : T) { - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/traits/issue-72410.stderr b/src/test/ui/traits/issue-72410.stderr index c91d1db4d764a..c7beb834b57f3 100644 --- a/src/test/ui/traits/issue-72410.stderr +++ b/src/test/ui/traits/issue-72410.stderr @@ -14,11 +14,11 @@ LL | fn map() help: consider turning `map` into a method by giving it a `&self` argument | LL | fn map(&self) - | ^^^^^ + | +++++ help: alternatively, consider constraining `map` so it does not apply to trait objects | LL | where for<'a> &'a mut [dyn Bar]:, Self: Sized ; - | ^^^^^^^^^^^^^ + | +++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/traits/issue-78372.stderr b/src/test/ui/traits/issue-78372.stderr index e63740c4ea928..0150ff41303ae 100644 --- a/src/test/ui/traits/issue-78372.stderr +++ b/src/test/ui/traits/issue-78372.stderr @@ -20,11 +20,11 @@ LL | impl DispatchFromDyn> for T {} help: a type parameter with a similar name exists | LL | impl DispatchFromDyn> for T {} - | ^ + | ~ help: you might be missing a type parameter | LL | impl DispatchFromDyn> for T {} - | ^^^ + | +++ error[E0412]: cannot find type `MISC` in this scope --> $DIR/issue-78372.rs:3:34 diff --git a/src/test/ui/traits/multidispatch-bad.stderr b/src/test/ui/traits/multidispatch-bad.stderr index 8d4813c453e17..ccdace1957d39 100644 --- a/src/test/ui/traits/multidispatch-bad.stderr +++ b/src/test/ui/traits/multidispatch-bad.stderr @@ -7,7 +7,7 @@ LL | test(22i32, 44i32); help: change the type of the numeric literal from `i32` to `u32` | LL | test(22i32, 44u32); - | ^^^^^ + | ~~~~~ error: aborting due to previous error diff --git a/src/test/ui/traits/object/safety.stderr b/src/test/ui/traits/object/safety.stderr index 6784689072e70..cf534d984c2d8 100644 --- a/src/test/ui/traits/object/safety.stderr +++ b/src/test/ui/traits/object/safety.stderr @@ -16,11 +16,11 @@ LL | fn foo(); help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self); - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0038]: the trait `Tr` cannot be made into an object --> $DIR/safety.rs:15:12 @@ -38,11 +38,11 @@ LL | fn foo(); help: consider turning `foo` into a method by giving it a `&self` argument | LL | fn foo(&self); - | ^^^^^ + | +++++ help: alternatively, consider constraining `foo` so it does not apply to trait objects | LL | fn foo() where Self: Sized; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/object/vs-lifetime.stderr b/src/test/ui/traits/object/vs-lifetime.stderr index 40f5fcbceaf0b..22446522852cc 100644 --- a/src/test/ui/traits/object/vs-lifetime.stderr +++ b/src/test/ui/traits/object/vs-lifetime.stderr @@ -32,7 +32,7 @@ LL | struct S<'a, T>(&'a u8, T); help: add missing generic argument | LL | let _: S<'static, 'static, T>; - | ^^^ + | +++ error[E0224]: at least one trait is required for an object type --> $DIR/vs-lifetime.rs:14:14 diff --git a/src/test/ui/traits/resolution-in-overloaded-op.stderr b/src/test/ui/traits/resolution-in-overloaded-op.stderr index 6a641ed214dfa..049fffe165ab5 100644 --- a/src/test/ui/traits/resolution-in-overloaded-op.stderr +++ b/src/test/ui/traits/resolution-in-overloaded-op.stderr @@ -9,7 +9,7 @@ LL | a * b help: consider further restricting this bound | LL | fn foo + std::ops::Mul>(a: &T, b: f64) -> f64 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/traits/suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr index c34e3261fe185..a6b0837e7d4ed 100644 --- a/src/test/ui/traits/suggest-where-clause.stderr +++ b/src/test/ui/traits/suggest-where-clause.stderr @@ -14,8 +14,9 @@ LL | pub const fn size_of() -> usize { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn check() { - | -- +LL - fn check() { +LL + fn check() { + | error[E0277]: the size for values of type `U` cannot be known at compilation time --> $DIR/suggest-where-clause.rs:10:5 @@ -38,8 +39,9 @@ LL | struct Misc(T); | ^^^^ help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn check() { - | -- +LL - fn check() { +LL + fn check() { + | error[E0277]: the trait bound `u64: From` is not satisfied --> $DIR/suggest-where-clause.rs:15:5 @@ -55,7 +57,7 @@ LL | fn from(_: T) -> Self; help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | fn check() where u64: From { - | ^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++ error[E0277]: the trait bound `u64: From<::Item>` is not satisfied --> $DIR/suggest-where-clause.rs:18:5 @@ -71,7 +73,7 @@ LL | fn from(_: T) -> Self; help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | fn check() where u64: From<::Item> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++++ error[E0277]: the trait bound `Misc<_>: From` is not satisfied --> $DIR/suggest-where-clause.rs:23:5 diff --git a/src/test/ui/traits/trait-upcasting/type-checking-test-1.stderr b/src/test/ui/traits/trait-upcasting/type-checking-test-1.stderr index 6aaa8a4a90437..da647f16c3d56 100644 --- a/src/test/ui/traits/trait-upcasting/type-checking-test-1.stderr +++ b/src/test/ui/traits/trait-upcasting/type-checking-test-1.stderr @@ -7,7 +7,7 @@ LL | let _ = x as &dyn Bar; // FIXME: OK, eventually help: consider borrowing the value | LL | let _ = &x as &dyn Bar; // FIXME: OK, eventually - | ^ + | + error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar` --> $DIR/type-checking-test-1.rs:15:13 @@ -18,7 +18,7 @@ LL | let _ = x as &dyn Bar; // FIXME: OK, eventually help: consider borrowing the value | LL | let _ = &x as &dyn Bar; // FIXME: OK, eventually - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar` is not satisfied --> $DIR/type-checking-test-1.rs:12:13 @@ -45,7 +45,7 @@ LL | let _ = x as &dyn Bar<_>; // Ambiguous help: consider borrowing the value | LL | let _ = &x as &dyn Bar<_>; // Ambiguous - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar<_>` is not satisfied --> $DIR/type-checking-test-1.rs:21:13 @@ -64,7 +64,7 @@ LL | let a = x as &dyn Bar<_>; // FIXME: OK, eventually help: consider borrowing the value | LL | let a = &x as &dyn Bar<_>; // FIXME: OK, eventually - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar` is not satisfied --> $DIR/type-checking-test-1.rs:27:13 diff --git a/src/test/ui/traits/trait-upcasting/type-checking-test-2.stderr b/src/test/ui/traits/trait-upcasting/type-checking-test-2.stderr index a38f8a146043e..582eddc7aa053 100644 --- a/src/test/ui/traits/trait-upcasting/type-checking-test-2.stderr +++ b/src/test/ui/traits/trait-upcasting/type-checking-test-2.stderr @@ -7,7 +7,7 @@ LL | let _ = x as &dyn Bar; // FIXME: OK, eventually help: consider borrowing the value | LL | let _ = &x as &dyn Bar; // FIXME: OK, eventually - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar` is not satisfied --> $DIR/type-checking-test-2.rs:16:13 @@ -26,7 +26,7 @@ LL | let _ = x as &dyn Bar; // Error help: consider borrowing the value | LL | let _ = &x as &dyn Bar; // Error - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar` is not satisfied --> $DIR/type-checking-test-2.rs:22:13 @@ -45,7 +45,7 @@ LL | let a = x as &dyn Bar<_>; // Ambiguous help: consider borrowing the value | LL | let a = &x as &dyn Bar<_>; // Ambiguous - | ^ + | + error[E0277]: the trait bound `&dyn Foo: Bar<_>` is not satisfied --> $DIR/type-checking-test-2.rs:28:13 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr index edb48b6625ee2..6508e6a6e767f 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr @@ -10,7 +10,7 @@ LL | B::get_x() help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit | LL | B::get_x().try_into().unwrap() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr index 38245010c781c..94c51c5788a32 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr @@ -33,8 +33,9 @@ LL | type Y where i32: Foo = (); = note: `#[warn(type_alias_bounds)]` on by default help: the clause will not be checked when the type alias is used, and should be removed | -LL | type Y = (); - | -- +LL - type Y where i32: Foo = (); +LL + type Y = (); + | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:22:19 diff --git a/src/test/ui/try-block/try-block-in-edition2015.stderr b/src/test/ui/try-block/try-block-in-edition2015.stderr index 0f3c14b1386e7..a00064c44d2dc 100644 --- a/src/test/ui/try-block/try-block-in-edition2015.stderr +++ b/src/test/ui/try-block/try-block-in-edition2015.stderr @@ -17,7 +17,7 @@ LL | let try_result: Option<_> = try { help: use `!` to invoke the macro | LL | let try_result: Option<_> = try! { - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/try-macro-suggestion.stderr b/src/test/ui/try-macro-suggestion.stderr index 9d833ef5ed9fb..c7dde7eeac33e 100644 --- a/src/test/ui/try-macro-suggestion.stderr +++ b/src/test/ui/try-macro-suggestion.stderr @@ -8,7 +8,7 @@ LL | Ok(try!()); help: you can still access the deprecated `try!()` macro using the "raw identifier" syntax | LL | Ok(r#try!()); - | ^^ + | ++ error: use of deprecated `try` macro --> $DIR/try-macro-suggestion.rs:4:8 @@ -19,12 +19,13 @@ LL | Ok(try!(Ok(()))) = note: in the 2018 edition `try` is a reserved keyword, and the `try!()` macro is deprecated help: you can use the `?` operator instead | -LL | Ok(Ok(())?) - | -- ^ +LL - Ok(try!(Ok(()))) +LL + Ok(Ok(())?) + | help: alternatively, you can still access the deprecated `try!()` macro using the "raw identifier" syntax | LL | Ok(r#try!(Ok(()))) - | ^^ + | ++ error: aborting due to 2 previous errors diff --git a/src/test/ui/tutorial-suffix-inference-test.stderr b/src/test/ui/tutorial-suffix-inference-test.stderr index f9974acfb7071..ac1027ff34a13 100644 --- a/src/test/ui/tutorial-suffix-inference-test.stderr +++ b/src/test/ui/tutorial-suffix-inference-test.stderr @@ -16,7 +16,7 @@ LL | identity_u16(y); help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit | LL | identity_u16(y.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/tutorial-suffix-inference-test.rs:21:18 @@ -27,7 +27,7 @@ LL | identity_u16(a); help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit | LL | identity_u16(a.try_into().unwrap()); - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr index f80abade0fd54..2e12b768f7066 100644 --- a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr +++ b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr @@ -30,7 +30,7 @@ LL | Alias::Unit(); help: `Alias::Unit` is a unit variant, you need to write it without the parenthesis | LL | Alias::Unit; - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error[E0164]: expected tuple struct or tuple variant, found unit variant `Alias::Unit` --> $DIR/incorrect-variant-form-through-alias-caught.rs:17:9 diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr new file mode 100644 index 0000000000000..3ba04af9046dc --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr @@ -0,0 +1,23 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bounds-are-checked-2.rs:6:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0277]: the trait bound `T: Clone` is not satisfied + --> $DIR/bounds-are-checked-2.rs:9:13 + | +LL | type X = impl Clone; + | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | type X = impl Clone; + | +++++++++++++++++++ + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr index c1f58aa6de663..5ee7c72bf730d 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr @@ -7,7 +7,7 @@ LL | type X = impl Clone; help: consider restricting type parameter `T` | LL | type X = impl Clone; - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr new file mode 100644 index 0000000000000..918121cce9dbf --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr @@ -0,0 +1,48 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_duplicate_param_use5.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use5.rs:19:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use5.rs:15:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use5.rs:11:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, U)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error[E0277]: `U` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use5.rs:11:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, U)` +help: consider restricting type parameter `U` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error: aborting due to 3 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr index cb43b897cf9be..6cc6b35668c94 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr @@ -20,7 +20,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `T` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `U` doesn't implement `Debug` --> $DIR/generic_duplicate_param_use5.rs:8:18 @@ -32,7 +32,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `U` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr new file mode 100644 index 0000000000000..394b4280ab958 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr @@ -0,0 +1,36 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_duplicate_param_use6.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use6.rs:18:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use6.rs:14:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use6.rs:11:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, T)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error: aborting due to 2 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr index 509da2320e862..e7520988e34bd 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr @@ -20,7 +20,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `T` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr new file mode 100644 index 0000000000000..8c6ea3b342199 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr @@ -0,0 +1,36 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_duplicate_param_use8.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use8.rs:17:1 + | +LL | fn three(_: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use8.rs:13:1 + | +LL | fn two(t: T, _: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use8.rs:10:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, u32)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error: aborting due to 2 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr index a09f2506258fb..44bdbdc95cc26 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr @@ -20,7 +20,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `T` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr new file mode 100644 index 0000000000000..d0176b1e36d7a --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr @@ -0,0 +1,60 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_duplicate_param_use9.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use9.rs:24:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use9.rs:20:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` + --> $DIR/generic_duplicate_param_use9.rs:10:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` + | + = note: required because it appears within the type `(A, B, ::Bar)` +help: consider restricting type parameter `A` + | +LL | type Two = impl Debug; + | +++++ + +error[E0277]: `A` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use9.rs:10:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` +help: consider restricting type parameter `A` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error[E0277]: `B` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use9.rs:10:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` +help: consider restricting type parameter `B` + | +LL | type Two = impl Debug; + | +++++++++++++++++ + +error: aborting due to 4 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr index 68a30820951fa..a8eb53a50e38b 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr @@ -20,7 +20,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `A` | LL | type Two = impl Debug; - | ^^^^^ + | +++++ error[E0277]: `A` doesn't implement `Debug` --> $DIR/generic_duplicate_param_use9.rs:7:18 @@ -32,7 +32,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `A` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `B` doesn't implement `Debug` --> $DIR/generic_duplicate_param_use9.rs:7:18 @@ -44,7 +44,7 @@ LL | type Two = impl Debug; help: consider restricting type parameter `B` | LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr new file mode 100644 index 0000000000000..74d5c0c968860 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr @@ -0,0 +1,32 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained.rs:9:35 + | +LL | type Underconstrained = impl 'static; + | ^^^^^^^^^^^^ + +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_underconstrained.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0277]: the trait bound `T: Trait` is not satisfied + --> $DIR/generic_underconstrained.rs:13:31 + | +LL | type Underconstrained = impl 'static; + | ----- required by this bound in `Underconstrained` +... +LL | fn underconstrain(_: T) -> Underconstrained { + | ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | fn underconstrain(_: T) -> Underconstrained { + | +++++++ + +error: aborting due to 2 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr index cefc5d99b379e..c2671f7ae605d 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr @@ -16,7 +16,7 @@ LL | fn underconstrain(_: T) -> Underconstrained { help: consider restricting type parameter `T` | LL | fn underconstrain(_: T) -> Underconstrained { - | ^^^^^^^ + | +++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr new file mode 100644 index 0000000000000..348563b94de15 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr @@ -0,0 +1,52 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:8:45 + | +LL | type Underconstrained = impl 'static; + | ^^^^^^^^^^^^ + +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:17:46 + | +LL | type Underconstrained2 = impl 'static; + | ^^^^^^^^^^^^ + +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/generic_underconstrained2.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0277]: `U` doesn't implement `Debug` + --> $DIR/generic_underconstrained2.rs:12:33 + | +LL | type Underconstrained = impl 'static; + | --------------- required by this bound in `Underconstrained` +... +LL | fn underconstrained(_: U) -> Underconstrained { + | ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | +help: consider restricting type parameter `U` + | +LL | fn underconstrained(_: U) -> Underconstrained { + | +++++++++++++++++ + +error[E0277]: `V` doesn't implement `Debug` + --> $DIR/generic_underconstrained2.rs:21:43 + | +LL | type Underconstrained2 = impl 'static; + | --------------- required by this bound in `Underconstrained2` +... +LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { + | ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | +help: consider restricting type parameter `V` + | +LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { + | +++++++++++++++++ + +error: aborting due to 4 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr index 8bba62a913e11..3213b26456dc4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr @@ -22,7 +22,7 @@ LL | fn underconstrained(_: U) -> Underconstrained { help: consider restricting type parameter `U` | LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: `V` doesn't implement `Debug` --> $DIR/generic_underconstrained2.rs:18:43 @@ -36,7 +36,7 @@ LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { help: consider restricting type parameter `V` | LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr new file mode 100644 index 0000000000000..16b1830e9851c --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr @@ -0,0 +1,23 @@ +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/issue-52843.rs:3:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0277]: the trait bound `T: Default` is not satisfied + --> $DIR/issue-52843.rs:6:15 + | +LL | type Foo = impl Default; + | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | type Foo = impl Default; + | +++++++++++++++++++++++ + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.stderr index 8718a57d9d4f3..2463ed9c71a61 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843.stderr @@ -7,7 +7,7 @@ LL | type Foo = impl Default; help: consider restricting type parameter `T` | LL | type Foo = impl Default; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr index 734f15a9283de..4df2f52a9e427 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr @@ -8,7 +8,7 @@ LL | fn f(a: &'static A, b: B) -> (X, X) { help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | fn f(a: &'static A, b: B) -> (X, X) where &'static B: From<&A> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/type-inference/or_else-multiple-type-params.stderr b/src/test/ui/type-inference/or_else-multiple-type-params.stderr index 047728dc1ea4e..12a98e4d783e7 100644 --- a/src/test/ui/type-inference/or_else-multiple-type-params.stderr +++ b/src/test/ui/type-inference/or_else-multiple-type-params.stderr @@ -7,7 +7,7 @@ LL | .or_else(|err| { help: consider specifying the type arguments in the method call | LL | .or_else::(|err| { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/type-inference/sort_by_key.stderr b/src/test/ui/type-inference/sort_by_key.stderr index 0b6630ec89423..78b7386c03e1f 100644 --- a/src/test/ui/type-inference/sort_by_key.stderr +++ b/src/test/ui/type-inference/sort_by_key.stderr @@ -7,7 +7,7 @@ LL | lst.sort_by_key(|&(v, _)| v.iter().sum()); help: consider specifying the type argument in the method call | LL | lst.sort_by_key(|&(v, _)| v.iter().sum::()); - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/type/ascription/issue-34255-1.stderr b/src/test/ui/type/ascription/issue-34255-1.stderr index 00449af6a459f..96ee422b7b9dd 100644 --- a/src/test/ui/type/ascription/issue-34255-1.stderr +++ b/src/test/ui/type/ascription/issue-34255-1.stderr @@ -24,7 +24,7 @@ LL | pub struct Vec::new() - | ^^^^^^ + | ~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr b/src/test/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr index c1c76659c6745..db215d2810a01 100644 --- a/src/test/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr +++ b/src/test/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr @@ -7,8 +7,9 @@ LL | pub type T = P; = note: `#[warn(type_alias_bounds)]` on by default help: the bound will not be checked when the type alias is used, and should be removed | -LL | pub type T

= P; - | -- +LL - pub type T = P; +LL + pub type T

= P; + | warning: 1 warning emitted diff --git a/src/test/ui/type/type-alias-bounds.stderr b/src/test/ui/type/type-alias-bounds.stderr index d4188b5f01a41..dc44dede13b14 100644 --- a/src/test/ui/type/type-alias-bounds.stderr +++ b/src/test/ui/type/type-alias-bounds.stderr @@ -7,8 +7,9 @@ LL | type SVec = Vec; = note: `#[warn(type_alias_bounds)]` on by default help: the bound will not be checked when the type alias is used, and should be removed | -LL | type SVec = Vec; - | -- +LL - type SVec = Vec; +LL + type SVec = Vec; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias-bounds.rs:10:21 @@ -18,8 +19,9 @@ LL | type S2Vec where T: Send = Vec; | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type S2Vec = Vec; - | -- +LL - type S2Vec where T: Send = Vec; +LL + type S2Vec = Vec; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:12:19 @@ -29,8 +31,9 @@ LL | type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>); | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type VVec<'b, 'a> = (&'b u32, Vec<&'a i32>); - | -- +LL - type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>); +LL + type VVec<'b, 'a> = (&'b u32, Vec<&'a i32>); + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:14:18 @@ -40,8 +43,9 @@ LL | type WVec<'b, T: 'b + 'b> = (&'b u32, Vec); | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type WVec<'b, T> = (&'b u32, Vec); - | -- +LL - type WVec<'b, T: 'b + 'b> = (&'b u32, Vec); +LL + type WVec<'b, T> = (&'b u32, Vec); + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias-bounds.rs:16:25 @@ -51,8 +55,9 @@ LL | type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec); | help: the clause will not be checked when the type alias is used, and should be removed | -LL | type W2Vec<'b, T> = (&'b u32, Vec); - | -- +LL - type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec); +LL + type W2Vec<'b, T> = (&'b u32, Vec); + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:47:12 @@ -67,8 +72,9 @@ LL | type T1 = U::Assoc; | ^^^^^^^^ help: the bound will not be checked when the type alias is used, and should be removed | -LL | type T1 = U::Assoc; - | -- +LL - type T1 = U::Assoc; +LL + type T1 = U::Assoc; + | warning: where clauses are not enforced in type aliases --> $DIR/type-alias-bounds.rs:48:18 @@ -83,8 +89,9 @@ LL | type T2 where U: Bound = U::Assoc; | ^^^^^^^^ help: the clause will not be checked when the type alias is used, and should be removed | -LL | type T2 = U::Assoc; - | -- +LL - type T2 where U: Bound = U::Assoc; +LL + type T2 = U::Assoc; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:56:12 @@ -94,8 +101,9 @@ LL | type T5 = ::Assoc; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type T5 = ::Assoc; - | -- +LL - type T5 = ::Assoc; +LL + type T5 = ::Assoc; + | warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:57:12 @@ -105,8 +113,9 @@ LL | type T6 = ::std::vec::Vec; | help: the bound will not be checked when the type alias is used, and should be removed | -LL | type T6 = ::std::vec::Vec; - | -- +LL - type T6 = ::std::vec::Vec; +LL + type T6 = ::std::vec::Vec; + | warning: 9 warnings emitted diff --git a/src/test/ui/type/type-annotation-needed.stderr b/src/test/ui/type/type-annotation-needed.stderr index 97817a1f9fda9..3052ff5490a9f 100644 --- a/src/test/ui/type/type-annotation-needed.stderr +++ b/src/test/ui/type/type-annotation-needed.stderr @@ -11,7 +11,7 @@ LL | foo(42); help: consider specifying the type argument in the function call | LL | foo::(42); - | ^^^^^ + | +++++ error: aborting due to previous error diff --git a/src/test/ui/type/type-check-defaults.stderr b/src/test/ui/type/type-check-defaults.stderr index adf3fa2c80748..6a2f4beb98aac 100644 --- a/src/test/ui/type/type-check-defaults.stderr +++ b/src/test/ui/type/type-check-defaults.stderr @@ -66,7 +66,7 @@ LL | trait Base: Super { } help: consider further restricting type parameter `T` | LL | trait Base: Super where T: std::marker::Copy { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++ error[E0277]: cannot add `u8` to `i32` --> $DIR/type-check-defaults.rs:24:66 diff --git a/src/test/ui/type/type-check/assignment-expected-bool.stderr b/src/test/ui/type/type-check/assignment-expected-bool.stderr index d1c13a33f7f4b..862ac65bc24e4 100644 --- a/src/test/ui/type/type-check/assignment-expected-bool.stderr +++ b/src/test/ui/type/type-check/assignment-expected-bool.stderr @@ -7,7 +7,7 @@ LL | let _: bool = 0 = 0; help: you might have meant to compare for equality | LL | let _: bool = 0 == 0; - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:9:14 @@ -18,7 +18,7 @@ LL | 0 => 0 = 0, help: you might have meant to compare for equality | LL | 0 => 0 == 0, - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:10:14 @@ -29,7 +29,7 @@ LL | _ => 0 = 0, help: you might have meant to compare for equality | LL | _ => 0 == 0, - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:14:17 @@ -40,7 +40,7 @@ LL | true => 0 = 0, help: you might have meant to compare for equality | LL | true => 0 == 0, - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:18:8 @@ -51,11 +51,11 @@ LL | if 0 = 0 {} help: you might have meant to use pattern matching | LL | if let 0 = 0 {} - | ^^^ + | +++ help: you might have meant to compare for equality | LL | if 0 == 0 {} - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:20:24 @@ -66,7 +66,7 @@ LL | let _: bool = if { 0 = 0 } { help: you might have meant to compare for equality | LL | let _: bool = if { 0 == 0 } { - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:21:9 @@ -77,7 +77,7 @@ LL | 0 = 0 help: you might have meant to compare for equality | LL | 0 == 0 - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:23:9 @@ -88,7 +88,7 @@ LL | 0 = 0 help: you might have meant to compare for equality | LL | 0 == 0 - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:26:13 @@ -99,7 +99,7 @@ LL | let _ = (0 = 0) help: you might have meant to compare for equality | LL | let _ = (0 == 0) - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:27:14 @@ -110,7 +110,7 @@ LL | && { 0 = 0 } help: you might have meant to compare for equality | LL | && { 0 == 0 } - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:28:12 @@ -121,7 +121,7 @@ LL | || (0 = 0); help: you might have meant to compare for equality | LL | || (0 == 0); - | ^^ + | ~~ error[E0070]: invalid left-hand side of assignment --> $DIR/assignment-expected-bool.rs:31:22 diff --git a/src/test/ui/type/type-check/assignment-in-if.stderr b/src/test/ui/type/type-check/assignment-in-if.stderr index f5306a1226416..710be9d6a0420 100644 --- a/src/test/ui/type/type-check/assignment-in-if.stderr +++ b/src/test/ui/type/type-check/assignment-in-if.stderr @@ -7,7 +7,7 @@ LL | if x = x { help: you might have meant to compare for equality | LL | if x == x { - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:20:8 @@ -18,7 +18,7 @@ LL | if (x = x) { help: you might have meant to compare for equality | LL | if (x == x) { - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:25:8 @@ -29,7 +29,7 @@ LL | if y = (Foo { foo: x }) { help: you might have meant to compare for equality | LL | if y == (Foo { foo: x }) { - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:30:8 @@ -40,11 +40,11 @@ LL | if 3 = x { help: you might have meant to use pattern matching | LL | if let 3 = x { - | ^^^ + | +++ help: you might have meant to compare for equality | LL | if 3 == x { - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:36:13 @@ -55,7 +55,7 @@ LL | x = 4 help: you might have meant to compare for equality | LL | x == 4 - | ^^ + | ~~ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:38:13 @@ -66,7 +66,7 @@ LL | x = 5 help: you might have meant to compare for equality | LL | x == 5 - | ^^ + | ~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/type/type-check/issue-41314.stderr b/src/test/ui/type/type-check/issue-41314.stderr index c3d41ae68cd6a..4a9bf610647a7 100644 --- a/src/test/ui/type/type-check/issue-41314.stderr +++ b/src/test/ui/type/type-check/issue-41314.stderr @@ -7,7 +7,7 @@ LL | X::Y { number } => {} help: use the tuple variant pattern syntax instead | LL | X::Y(number) => {} - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/type/type-check/missing_trait_impl.stderr b/src/test/ui/type/type-check/missing_trait_impl.stderr index 30df1261cefa1..45f2e845735ea 100644 --- a/src/test/ui/type/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type/type-check/missing_trait_impl.stderr @@ -9,7 +9,7 @@ LL | let z = x + y; help: consider restricting type parameter `T` | LL | fn foo>(x: T, y: T) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++ error[E0368]: binary assignment operation `+=` cannot be applied to type `T` --> $DIR/missing_trait_impl.rs:9:5 @@ -22,7 +22,7 @@ LL | x += x; help: consider restricting type parameter `T` | LL | fn bar(x: T) { - | ^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-params-in-different-spaces-2.stderr b/src/test/ui/type/type-params-in-different-spaces-2.stderr index a6b41520d67b1..368adb456d61a 100644 --- a/src/test/ui/type/type-params-in-different-spaces-2.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-2.stderr @@ -12,7 +12,7 @@ LL | fn op(_: T) -> Self; help: consider further restricting `Self` | LL | fn test(u: U) -> Self where Self: Tr { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error[E0277]: the trait bound `Self: Tr` is not satisfied --> $DIR/type-params-in-different-spaces-2.rs:16:9 @@ -28,7 +28,7 @@ LL | fn op(_: T) -> Self; help: consider further restricting `Self` | LL | fn test(u: U) -> Self where Self: Tr { - | ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-recursive.stderr b/src/test/ui/type/type-recursive.stderr index d6d32cc5d6f39..5a94a0fd6831a 100644 --- a/src/test/ui/type/type-recursive.stderr +++ b/src/test/ui/type/type-recursive.stderr @@ -10,7 +10,7 @@ LL | foolish: T1 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T1` representable | LL | foolish: Box - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/typeck/conversion-methods.stderr b/src/test/ui/typeck/conversion-methods.stderr index 15848c66c1504..091502bdda34a 100644 --- a/src/test/ui/typeck/conversion-methods.stderr +++ b/src/test/ui/typeck/conversion-methods.stderr @@ -38,7 +38,7 @@ LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; help: try using a conversion method | LL | let _prove_piercing_earnest: Vec = (&[1, 2, 3]).to_vec(); - | ^ ^^^^^^^^^^ + | + ++++++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/typeck/issue-75883.stderr b/src/test/ui/typeck/issue-75883.stderr index a722c4b5e3ea6..5e42c817e030b 100644 --- a/src/test/ui/typeck/issue-75883.stderr +++ b/src/test/ui/typeck/issue-75883.stderr @@ -14,7 +14,7 @@ LL | pub enum Result { help: add missing generic argument | LL | pub fn run() -> Result<_, E> { - | ^^^ + | +++ error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/issue-75883.rs:15:35 @@ -32,7 +32,7 @@ LL | pub enum Result { help: add missing generic argument | LL | pub fn interact(&mut self) -> Result<_, E> { - | ^^^ + | +++ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types --> $DIR/issue-75883.rs:15:42 diff --git a/src/test/ui/typeck/issue-81943.stderr b/src/test/ui/typeck/issue-81943.stderr index 7a1846529761c..041ff10752cf0 100644 --- a/src/test/ui/typeck/issue-81943.stderr +++ b/src/test/ui/typeck/issue-81943.stderr @@ -18,11 +18,11 @@ LL | f(|x| match x { tmp => { g(tmp) } }); help: consider using a semicolon here | LL | f(|x| match x { tmp => { g(tmp); } }); - | ^ + | + help: consider using a semicolon here | LL | f(|x| match x { tmp => { g(tmp) } };); - | ^ + | + error[E0308]: mismatched types --> $DIR/issue-81943.rs:10:38 @@ -40,11 +40,11 @@ LL | f(|x| d!(x)); help: consider using a semicolon here | LL | ($e:expr) => { match $e { x => { g(x); } } } - | ^ + | + help: consider using a semicolon here | LL | ($e:expr) => { match $e { x => { g(x) } }; } - | ^ + | + error: aborting due to 3 previous errors diff --git a/src/test/ui/typeck/issue-84831.stderr b/src/test/ui/typeck/issue-84831.stderr index e3cce10a00fd1..461ccb142f978 100644 --- a/src/test/ui/typeck/issue-84831.stderr +++ b/src/test/ui/typeck/issue-84831.stderr @@ -7,7 +7,7 @@ LL | std::<_ as _>; help: expressions must be enclosed in braces to be used as const generic arguments | LL | std::<{ _ as _ }>; - | ^ ^ + | + + error[E0423]: expected value, found crate `std` --> $DIR/issue-84831.rs:2:5 diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr index 51b8e39b101a3..dc30975103ccc 100644 --- a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr +++ b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr @@ -7,11 +7,11 @@ LL | let foo::Foo {} = foo::Foo::default(); help: include the missing field in the pattern and ignore the inaccessible fields | LL | let foo::Foo { visible, .. } = foo::Foo::default(); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | let foo::Foo { .. } = foo::Foo::default(); - | ^^^^^^ + | ~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index 17ad0172941a6..11c2fbbcda267 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -11,7 +11,7 @@ LL | fn is_send() { help: consider further restricting the associated type | LL | fn bar() where ::AssocType: Send { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr index 7398b48a238d1..b73ed49ce6557 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -10,7 +10,7 @@ LL | fn is_send() { help: consider restricting type parameter `T` | LL | fn foo() { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr new file mode 100644 index 0000000000000..6ba28c3463add --- /dev/null +++ b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr @@ -0,0 +1,647 @@ +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:157:18 + | +LL | struct BadStruct<_>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:160:16 + | +LL | trait BadTrait<_> {} + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:170:19 + | +LL | struct BadStruct1<_, _>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:170:22 + | +LL | struct BadStruct1<_, _>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:175:19 + | +LL | struct BadStruct2<_, T>(_, T); + | ^ expected identifier, found reserved identifier + +error: associated constant in `impl` without body + --> $DIR/typeck_type_placeholder_item.rs:208:5 + | +LL | const C: _; + | ^^^^^^^^^^- + | | + | help: provide a definition for the constant: `= ;` + +error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters + --> $DIR/typeck_type_placeholder_item.rs:170:22 + | +LL | struct BadStruct1<_, _>(_); + | - ^ already used + | | + | first use of `_` + +warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/typeck_type_placeholder_item.rs:5:32 + | +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #63063 for more information + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:10:14 + | +LL | fn test() -> _ { 5 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:13:16 + | +LL | fn test2() -> (_, _) { (5, 5) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:16:15 + | +LL | static TEST3: _ = "test"; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `&str` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:19:15 + | +LL | static TEST4: _ = 145; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:22:15 + | +LL | static TEST5: (_, _) = (1, 2); + | ^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:25:13 + | +LL | fn test6(_: _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6(_: T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:28:18 + | +LL | fn test6_b(_: _, _: T) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6_b(_: U, _: T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:31:30 + | +LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:34:13 + | +LL | fn test7(x: _) { let _x: usize = x; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test7(x: T) { let _x: usize = x; } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:37:22 + | +LL | fn test8(_f: fn() -> _) { } + | ^ + | | + | not allowed in type signatures + | help: use type parameters instead: `T` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:37:22 + | +LL | fn test8(_f: fn() -> _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test8(_f: fn() -> T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:51:26 + | +LL | fn test11(x: &usize) -> &_ { + | -^ + | || + | |not allowed in type signatures + | help: replace with the correct return type: `&'static &'static usize` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:56:52 + | +LL | unsafe fn test12(x: *const usize) -> *const *const _ { + | --------------^ + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `*const *const usize` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:70:8 + | +LL | a: _, + | ^ not allowed in type signatures +LL | +LL | b: (_, _), + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL ~ struct Test10 { +LL ~ a: T, +LL | +LL ~ b: (T, T), + | + +error: missing type for `static` item + --> $DIR/typeck_type_placeholder_item.rs:76:12 + | +LL | static A = 42; + | ^ help: provide a type for the static variable: `A: i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:78:15 + | +LL | static B: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:80:15 + | +LL | static C: Option<_> = Some(42); + | ^^^^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:82:21 + | +LL | fn fn_test() -> _ { 5 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:85:23 + | +LL | fn fn_test2() -> (_, _) { (5, 5) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:88:22 + | +LL | static FN_TEST3: _ = "test"; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `&str` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:91:22 + | +LL | static FN_TEST4: _ = 145; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:94:22 + | +LL | static FN_TEST5: (_, _) = (1, 2); + | ^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:97:20 + | +LL | fn fn_test6(_: _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test6(_: T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:100:20 + | +LL | fn fn_test7(x: _) { let _x: usize = x; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test7(x: T) { let _x: usize = x; } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:103:29 + | +LL | fn fn_test8(_f: fn() -> _) { } + | ^ + | | + | not allowed in type signatures + | help: use type parameters instead: `T` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:103:29 + | +LL | fn fn_test8(_f: fn() -> _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test8(_f: fn() -> T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:126:12 + | +LL | a: _, + | ^ not allowed in type signatures +LL | +LL | b: (_, _), + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL ~ struct FnTest10 { +LL ~ a: T, +LL | +LL ~ b: (T, T), + | + +error[E0282]: type annotations needed + --> $DIR/typeck_type_placeholder_item.rs:131:18 + | +LL | fn fn_test11(_: _) -> (_, _) { panic!() } + | ^ cannot infer type + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:131:28 + | +LL | fn fn_test11(_: _) -> (_, _) { panic!() } + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:135:30 + | +LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:138:33 + | +LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } + | ------^- + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:157:21 + | +LL | struct BadStruct<_>(_); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct(T); + | ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations + --> $DIR/typeck_type_placeholder_item.rs:162:15 + | +LL | impl BadTrait<_> for BadStruct<_> {} + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | impl BadTrait for BadStruct {} + | +++ ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types + --> $DIR/typeck_type_placeholder_item.rs:165:34 + | +LL | fn impl_trait() -> impl BadTrait<_> { + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:170:25 + | +LL | struct BadStruct1<_, _>(_); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct1(T); + | ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:175:25 + | +LL | struct BadStruct2<_, T>(_, T); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct2(U, T); + | ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases + --> $DIR/typeck_type_placeholder_item.rs:179:14 + | +LL | type X = Box<_>; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types + --> $DIR/typeck_type_placeholder_item.rs:185:21 + | +LL | type Y = impl Trait<_>; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:219:31 + | +LL | fn value() -> Option<&'static _> { + | ----------------^- + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `Option<&'static u8>` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:224:10 + | +LL | const _: Option<_> = map(value); + | ^^^^^^^^^ + | | + | not allowed in type signatures + | help: replace with the correct type: `Option` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:143:31 + | +LL | fn method_test1(&self, x: _); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test1(&self, x: T); + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:145:31 + | +LL | fn method_test2(&self, x: _) -> _; + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test2(&self, x: T) -> T; + | +++ ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:147:31 + | +LL | fn method_test3(&self) -> _; + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test3(&self) -> T; + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:149:26 + | +LL | fn assoc_fn_test1(x: _); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test1(x: T); + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:151:26 + | +LL | fn assoc_fn_test2(x: _) -> _; + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test2(x: T) -> T; + | +++ ~ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:153:28 + | +LL | fn assoc_fn_test3() -> _; + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test3() -> T; + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:193:14 + | +LL | type B = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:195:14 + | +LL | const C: _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:197:14 + | +LL | const D: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:200:26 + | +LL | type F: std::ops::Fn(_); + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:44:24 + | +LL | fn test9(&self) -> _ { () } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:47:27 + | +LL | fn test10(&self, _x : _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test10(&self, _x : T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:62:24 + | +LL | fn clone(&self) -> _ { Test9 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `Test9` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:65:37 + | +LL | fn clone_from(&mut self, other: _) { *self = Test9; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn clone_from(&mut self, other: T) { *self = Test9; } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:110:31 + | +LL | fn fn_test9(&self) -> _ { () } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:113:34 + | +LL | fn fn_test10(&self, _x : _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test10(&self, _x : T) { } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:118:28 + | +LL | fn clone(&self) -> _ { FnTest9 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `FnTest9` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:121:41 + | +LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } + | +++ ~ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:204:14 + | +LL | type A = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:206:14 + | +LL | type B = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:208:14 + | +LL | const C: _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:211:14 + | +LL | const D: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error: aborting due to 69 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0121, E0282, E0403. +For more information about an error, try `rustc --explain E0121`. diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.stderr index 4827439bfbfe4..e1f66afdacc11 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_item.stderr @@ -96,7 +96,7 @@ LL | fn test6(_: _) { } help: use type parameters instead | LL | fn test6(_: T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:25:18 @@ -107,7 +107,7 @@ LL | fn test6_b(_: _, _: T) { } help: use type parameters instead | LL | fn test6_b(_: U, _: T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:28:30 @@ -118,7 +118,7 @@ LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } help: use type parameters instead | LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:31:13 @@ -129,7 +129,7 @@ LL | fn test7(x: _) { let _x: usize = x; } help: use type parameters instead | LL | fn test7(x: T) { let _x: usize = x; } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:34:22 @@ -149,7 +149,7 @@ LL | fn test8(_f: fn() -> _) { } help: use type parameters instead | LL | fn test8(_f: fn() -> T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types --> $DIR/typeck_type_placeholder_item.rs:48:26 @@ -182,10 +182,10 @@ LL | b: (_, _), | help: use type parameters instead | -LL | struct Test10 { -LL | a: T, +LL ~ struct Test10 { +LL ~ a: T, LL | -LL | b: (T, T), +LL ~ b: (T, T), | error: missing type for `static` item @@ -261,7 +261,7 @@ LL | fn fn_test6(_: _) { } help: use type parameters instead | LL | fn fn_test6(_: T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:97:20 @@ -272,7 +272,7 @@ LL | fn fn_test7(x: _) { let _x: usize = x; } help: use type parameters instead | LL | fn fn_test7(x: T) { let _x: usize = x; } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:100:29 @@ -292,7 +292,7 @@ LL | fn fn_test8(_f: fn() -> _) { } help: use type parameters instead | LL | fn fn_test8(_f: fn() -> T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs --> $DIR/typeck_type_placeholder_item.rs:123:12 @@ -307,10 +307,10 @@ LL | b: (_, _), | help: use type parameters instead | -LL | struct FnTest10 { -LL | a: T, +LL ~ struct FnTest10 { +LL ~ a: T, LL | -LL | b: (T, T), +LL ~ b: (T, T), | error[E0282]: type annotations needed @@ -355,7 +355,7 @@ LL | struct BadStruct<_>(_); help: use type parameters instead | LL | struct BadStruct(T); - | ^ ^ + | ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations --> $DIR/typeck_type_placeholder_item.rs:159:15 @@ -368,7 +368,7 @@ LL | impl BadTrait<_> for BadStruct<_> {} help: use type parameters instead | LL | impl BadTrait for BadStruct {} - | ^^^ ^ ^ + | +++ ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types --> $DIR/typeck_type_placeholder_item.rs:162:34 @@ -385,7 +385,7 @@ LL | struct BadStruct1<_, _>(_); help: use type parameters instead | LL | struct BadStruct1(T); - | ^ ^ + | ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs --> $DIR/typeck_type_placeholder_item.rs:172:25 @@ -396,7 +396,7 @@ LL | struct BadStruct2<_, T>(_, T); help: use type parameters instead | LL | struct BadStruct2(U, T); - | ^ ^ + | ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases --> $DIR/typeck_type_placeholder_item.rs:176:14 @@ -437,7 +437,7 @@ LL | fn method_test1(&self, x: _); help: use type parameters instead | LL | fn method_test1(&self, x: T); - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:142:31 @@ -450,7 +450,7 @@ LL | fn method_test2(&self, x: _) -> _; help: use type parameters instead | LL | fn method_test2(&self, x: T) -> T; - | ^^^ ^ ^ + | +++ ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:144:31 @@ -461,7 +461,7 @@ LL | fn method_test3(&self) -> _; help: use type parameters instead | LL | fn method_test3(&self) -> T; - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:146:26 @@ -472,7 +472,7 @@ LL | fn assoc_fn_test1(x: _); help: use type parameters instead | LL | fn assoc_fn_test1(x: T); - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:148:26 @@ -485,7 +485,7 @@ LL | fn assoc_fn_test2(x: _) -> _; help: use type parameters instead | LL | fn assoc_fn_test2(x: T) -> T; - | ^^^ ^ ^ + | +++ ~ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions --> $DIR/typeck_type_placeholder_item.rs:150:28 @@ -496,7 +496,7 @@ LL | fn assoc_fn_test3() -> _; help: use type parameters instead | LL | fn assoc_fn_test3() -> T; - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types --> $DIR/typeck_type_placeholder_item.rs:190:14 @@ -543,7 +543,7 @@ LL | fn test10(&self, _x : _) { } help: use type parameters instead | LL | fn test10(&self, _x : T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types --> $DIR/typeck_type_placeholder_item.rs:59:24 @@ -563,7 +563,7 @@ LL | fn clone_from(&mut self, other: _) { *self = Test9; } help: use type parameters instead | LL | fn clone_from(&mut self, other: T) { *self = Test9; } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types --> $DIR/typeck_type_placeholder_item.rs:107:31 @@ -583,7 +583,7 @@ LL | fn fn_test10(&self, _x : _) { } help: use type parameters instead | LL | fn fn_test10(&self, _x : T) { } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types --> $DIR/typeck_type_placeholder_item.rs:115:28 @@ -603,7 +603,7 @@ LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } help: use type parameters instead | LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } - | ^^^ ^ + | +++ ~ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types --> $DIR/typeck_type_placeholder_item.rs:201:14 diff --git a/src/test/ui/typeof/type_mismatch.stderr b/src/test/ui/typeof/type_mismatch.stderr index 12fd7c9963cfc..5c58e29fa0027 100644 --- a/src/test/ui/typeof/type_mismatch.stderr +++ b/src/test/ui/typeof/type_mismatch.stderr @@ -15,7 +15,7 @@ LL | let b: typeof(a) = 1i8; help: change the type of the numeric literal from `i8` to `u8` | LL | let b: typeof(a) = 1u8; - | ^^^ + | ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr b/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr index 37aa4d949daea..a832964d220a7 100644 --- a/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr @@ -12,7 +12,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { help: add missing generic argument | LL | >::into_cow("foo".to_string()); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0107]: missing generics for trait `IntoCow` --> $DIR/ufcs-qpath-missing-params.rs:17:16 @@ -28,7 +28,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { help: add missing generic argument | LL | >::into_cow::("foo".to_string()); - | ^^^^^^^^^^ + | ~~~~~~~~~~ error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/ufcs-qpath-missing-params.rs:17:26 diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr index e30e4f5e7d3fd..8dc024697d7fc 100644 --- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr @@ -20,7 +20,7 @@ LL | >::add(1u32, 2); help: change the type of the numeric literal from `u32` to `i32` | LL | >::add(1i32, 2); - | ^^^^ + | ~~~~ error[E0308]: mismatched types --> $DIR/ufcs-qpath-self-mismatch.rs:8:31 @@ -31,7 +31,7 @@ LL | >::add(1, 2u32); help: change the type of the numeric literal from `u32` to `i32` | LL | >::add(1, 2i32); - | ^^^^ + | ~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/unboxed-closures/issue-53448.stderr b/src/test/ui/unboxed-closures/issue-53448.stderr index 29273a5babefd..8f9d918fdba2b 100644 --- a/src/test/ui/unboxed-closures/issue-53448.stderr +++ b/src/test/ui/unboxed-closures/issue-53448.stderr @@ -9,11 +9,11 @@ LL | let f: &mut dyn FnMut<(_,), Output = ()> = &mut |_: <() as Lt<'_>>::T| help: consider further restricting the associated type | LL | fn main() where <() as Lt<'_>>::T: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | let f: &mut dyn FnMut<(_,), Output = ()> = &mut |_: &<() as Lt<'_>>::T| {}; - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr index 1719a99d421d0..64d14d0fc5fa4 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr @@ -7,7 +7,7 @@ LL | let _: dyn Foo(&isize, &usize) -> &usize; = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 help: consider introducing a named lifetime parameter | -LL | fn main<'a>() { +LL ~ fn main<'a>() { LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>, LL | dyn Foo(&isize) -> &isize >(); LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>, diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr index 90bef7ba11808..29ea5735cad47 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr @@ -18,7 +18,7 @@ LL | struct Bar { help: add missing generic argument | LL | let x: Box = panic!(); - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr index 931675afd83f0..427ba3414f8fa 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr @@ -18,7 +18,7 @@ LL | struct Bar { help: add missing generic argument | LL | fn foo(b: Box) { - | ^ + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr index 482b3ace65b4a..67bf4be54e621 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr @@ -7,7 +7,7 @@ LL | let z = f(1_usize, 2); help: change the type of the numeric literal from `usize` to `isize` | LL | let z = f(1_isize, 2); - | ^^^^^^^ + | ~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr index 2c595833cd1b0..b865278e25fd8 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr @@ -6,8 +6,8 @@ LL | x: Box, | help: consider introducing a named lifetime parameter | -LL | struct Foo<'a> { -LL | x: Box, +LL ~ struct Foo<'a> { +LL ~ x: Box, | error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index dd804864dab4f..de3a6bbae1795 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -10,7 +10,7 @@ LL | Box::new(items.iter()) help: to declare that the trait object captures data from argument `items`, you can add an explicit `'_` lifetime bound | LL | fn a(items: &[T]) -> Box + '_> { - | ^^^^ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr index 8d2c82e59edc1..89d36bfc92662 100644 --- a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr +++ b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr @@ -8,7 +8,7 @@ LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } help: consider introducing a named lifetime parameter | LL | fn foo<'a>(x: &'a u32, y: &'a u32) -> &'a u32 { loop { } } - | ^^^^ ^^^^^^^ ^^^^^^^ ^^ + | ++++ ~~~~~~~ ~~~~~~~ ~~ error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/in-struct.stderr b/src/test/ui/underscore-lifetime/in-struct.stderr index 4275cc26f735f..84183f61e3f81 100644 --- a/src/test/ui/underscore-lifetime/in-struct.stderr +++ b/src/test/ui/underscore-lifetime/in-struct.stderr @@ -6,8 +6,8 @@ LL | x: &'_ u32, | help: consider introducing a named lifetime parameter | -LL | struct Foo<'a> { -LL | x: &'a u32, +LL ~ struct Foo<'a> { +LL ~ x: &'a u32, | error[E0106]: missing lifetime specifier @@ -18,8 +18,8 @@ LL | Variant(&'_ u32), | help: consider introducing a named lifetime parameter | -LL | enum Bar<'a> { -LL | Variant(&'a u32), +LL ~ enum Bar<'a> { +LL ~ Variant(&'a u32), | error: aborting due to 2 previous errors diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr index 594cdd245b3ec..4c207bd3e68d8 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr @@ -19,7 +19,7 @@ LL | struct Baz<'a>(&'_ &'a u8); help: consider using the `'a` lifetime | LL | struct Baz<'a>(&'a &'a u8); - | ^^ + | ~~ error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:10:33 @@ -31,7 +31,7 @@ LL | fn meh() -> Box Meh<'_>> help: consider using the `'static` lifetime | LL | fn meh() -> Box Meh<'static>> - | ^^^^^^^ + | ~~~~~~~ error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:16:35 @@ -43,7 +43,7 @@ LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } help: consider introducing a named lifetime parameter | LL | fn foo2<'a>(_: &'a u8, y: &'a u8) -> &'a u8 { y } - | ^^^^ ^^^^^^ ^^^^^^ ^^ + | ++++ ~~~~~~ ~~~~~~ ~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr index e1ff38f3057f1..3cb9955674800 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr @@ -19,7 +19,7 @@ LL | let Foo::D(_y) = x; help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Foo::D(_y) = x { /* */ } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/union/union-nonrepresentable.stderr b/src/test/ui/union/union-nonrepresentable.stderr index c54d04de12c50..7da7c870e704b 100644 --- a/src/test/ui/union/union-nonrepresentable.stderr +++ b/src/test/ui/union/union-nonrepresentable.stderr @@ -10,7 +10,7 @@ LL | b: U, help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `U` representable | LL | b: Box, - | ^^^^ ^ + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index ef86c624e9b19..0f66f6c541b3f 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -10,16 +10,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | union Foo { - | -- +LL - union Foo { +LL + union Foo { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/union-sized-field.rs:9:12 @@ -33,16 +34,17 @@ LL | value: T, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | struct Foo2 { - | -- +LL - struct Foo2 { +LL + struct Foo2 { + | help: borrowed types always have a statically known size | LL | value: &T, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | value: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/union-sized-field.rs:15:11 @@ -56,16 +58,17 @@ LL | Value(T), = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum Foo3 { - | -- +LL - enum Foo3 { +LL + enum Foo3 { + | help: borrowed types always have a statically known size | LL | Value(&T), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | Value(Box), - | ^^^^ ^ + | ++++ + error: aborting due to 3 previous errors diff --git a/src/test/ui/union/union-suggest-field.mirunsafeck.stderr b/src/test/ui/union/union-suggest-field.mirunsafeck.stderr index 26fc25b96bd42..58b1f5cb0786a 100644 --- a/src/test/ui/union/union-suggest-field.mirunsafeck.stderr +++ b/src/test/ui/union/union-suggest-field.mirunsafeck.stderr @@ -19,7 +19,7 @@ LL | let y = u.calculate; help: use parentheses to call the method | LL | let y = u.calculate(); - | ^^ + | ++ error: aborting due to 3 previous errors diff --git a/src/test/ui/union/union-suggest-field.thirunsafeck.stderr b/src/test/ui/union/union-suggest-field.thirunsafeck.stderr index 26fc25b96bd42..58b1f5cb0786a 100644 --- a/src/test/ui/union/union-suggest-field.thirunsafeck.stderr +++ b/src/test/ui/union/union-suggest-field.thirunsafeck.stderr @@ -19,7 +19,7 @@ LL | let y = u.calculate; help: use parentheses to call the method | LL | let y = u.calculate(); - | ^^ + | ++ error: aborting due to 3 previous errors diff --git a/src/test/ui/union/union-unsized.mirunsafeck.stderr b/src/test/ui/union/union-unsized.mirunsafeck.stderr index 86a13c1e7ca90..36e782ac0424d 100644 --- a/src/test/ui/union/union-unsized.mirunsafeck.stderr +++ b/src/test/ui/union/union-unsized.mirunsafeck.stderr @@ -10,11 +10,11 @@ LL | a: str, help: borrowed types always have a statically known size | LL | a: &str, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | a: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/union-unsized.rs:15:8 @@ -28,11 +28,11 @@ LL | b: str, help: borrowed types always have a statically known size | LL | b: &str, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | b: Box, - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/union/union-unsized.thirunsafeck.stderr b/src/test/ui/union/union-unsized.thirunsafeck.stderr index 86a13c1e7ca90..36e782ac0424d 100644 --- a/src/test/ui/union/union-unsized.thirunsafeck.stderr +++ b/src/test/ui/union/union-unsized.thirunsafeck.stderr @@ -10,11 +10,11 @@ LL | a: str, help: borrowed types always have a statically known size | LL | a: &str, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | a: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/union-unsized.rs:15:8 @@ -28,11 +28,11 @@ LL | b: str, help: borrowed types always have a statically known size | LL | b: &str, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | b: Box, - | ^^^^ ^ + | ++++ + error: aborting due to 2 previous errors diff --git a/src/test/ui/unop-move-semantics.stderr b/src/test/ui/unop-move-semantics.stderr index c20d3ddefcdb7..95a0f4f5fabee 100644 --- a/src/test/ui/unop-move-semantics.stderr +++ b/src/test/ui/unop-move-semantics.stderr @@ -17,7 +17,7 @@ LL | fn not(self) -> Self::Output; help: consider further restricting this bound | LL | fn move_then_borrow + Clone + Copy>(x: T) { - | ^^^^^^ + | ++++++ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/unop-move-semantics.rs:15:6 diff --git a/src/test/ui/unsized/unsized-bare-typaram.stderr b/src/test/ui/unsized/unsized-bare-typaram.stderr index 35bba1c103a05..9af9cd24481e7 100644 --- a/src/test/ui/unsized/unsized-bare-typaram.stderr +++ b/src/test/ui/unsized/unsized-bare-typaram.stderr @@ -10,8 +10,9 @@ LL | fn foo() { bar::() } | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn foo() { bar::() } - | -- +LL - fn foo() { bar::() } +LL + fn foo() { bar::() } + | error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-enum.stderr b/src/test/ui/unsized/unsized-enum.stderr index f66ce2af30416..88678307de21f 100644 --- a/src/test/ui/unsized/unsized-enum.stderr +++ b/src/test/ui/unsized/unsized-enum.stderr @@ -18,8 +18,9 @@ LL | enum Foo { FooSome(U), FooNone } | this could be changed to `U: ?Sized`... help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn foo2() { not_sized::>() } - | -- +LL - fn foo2() { not_sized::>() } +LL + fn foo2() { not_sized::>() } + | error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-enum2.stderr b/src/test/ui/unsized/unsized-enum2.stderr index b9a03d904af4d..3985f73f118bb 100644 --- a/src/test/ui/unsized/unsized-enum2.stderr +++ b/src/test/ui/unsized/unsized-enum2.stderr @@ -11,16 +11,17 @@ LL | VA(W), = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum E { - | -- +LL - enum E { +LL + enum E { + | help: borrowed types always have a statically known size | LL | VA(&W), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VA(Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized-enum2.rs:25:11 @@ -35,16 +36,17 @@ LL | VB{x: X}, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum E { - | -- +LL - enum E { +LL + enum E { + | help: borrowed types always have a statically known size | LL | VB{x: &X}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VB{x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `Y` cannot be known at compilation time --> $DIR/unsized-enum2.rs:27:15 @@ -59,16 +61,17 @@ LL | VC(isize, Y), = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum E { - | -- +LL - enum E { +LL + enum E { + | help: borrowed types always have a statically known size | LL | VC(isize, &Y), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VC(isize, Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `Z` cannot be known at compilation time --> $DIR/unsized-enum2.rs:29:21 @@ -83,16 +86,17 @@ LL | VD{u: isize, x: Z}, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum E { - | -- +LL - enum E { +LL + enum E { + | help: borrowed types always have a statically known size | LL | VD{u: isize, x: &Z}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VD{u: isize, x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:33:8 @@ -106,11 +110,11 @@ LL | VE([u8]), help: borrowed types always have a statically known size | LL | VE(&[u8]), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VE(Box<[u8]>), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-enum2.rs:35:11 @@ -124,11 +128,11 @@ LL | VF{x: str}, help: borrowed types always have a statically known size | LL | VF{x: &str}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VF{x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[f32]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:37:15 @@ -142,11 +146,11 @@ LL | VG(isize, [f32]), help: borrowed types always have a statically known size | LL | VG(isize, &[f32]), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VG(isize, Box<[f32]>), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[u32]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:39:21 @@ -160,11 +164,11 @@ LL | VH{u: isize, x: [u32]}, help: borrowed types always have a statically known size | LL | VH{u: isize, x: &[u32]}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VH{u: isize, x: Box<[u32]>}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:53:8 @@ -178,11 +182,11 @@ LL | VM(dyn Foo), help: borrowed types always have a statically known size | LL | VM(&dyn Foo), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VM(Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:55:11 @@ -196,11 +200,11 @@ LL | VN{x: dyn Bar}, help: borrowed types always have a statically known size | LL | VN{x: &dyn Bar}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VN{x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:57:15 @@ -214,11 +218,11 @@ LL | VO(isize, dyn FooBar), help: borrowed types always have a statically known size | LL | VO(isize, &dyn FooBar), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VO(isize, Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:59:21 @@ -232,11 +236,11 @@ LL | VP{u: isize, x: dyn BarFoo}, help: borrowed types always have a statically known size | LL | VP{u: isize, x: &dyn BarFoo}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VP{u: isize, x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[i8]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:63:8 @@ -250,11 +254,11 @@ LL | VQ(<&'static [i8] as Deref>::Target), help: borrowed types always have a statically known size | LL | VQ(&<&'static [i8] as Deref>::Target), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VQ(Box<<&'static [i8] as Deref>::Target>), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[char]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:65:11 @@ -268,11 +272,11 @@ LL | VR{x: <&'static [char] as Deref>::Target}, help: borrowed types always have a statically known size | LL | VR{x: &<&'static [char] as Deref>::Target}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VR{x: Box<<&'static [char] as Deref>::Target>}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[f64]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:67:15 @@ -286,11 +290,11 @@ LL | VS(isize, <&'static [f64] as Deref>::Target), help: borrowed types always have a statically known size | LL | VS(isize, &<&'static [f64] as Deref>::Target), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VS(isize, Box<<&'static [f64] as Deref>::Target>), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[i32]` cannot be known at compilation time --> $DIR/unsized-enum2.rs:69:21 @@ -304,11 +308,11 @@ LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, help: borrowed types always have a statically known size | LL | VT{u: isize, x: &<&'static [i32] as Deref>::Target}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VT{u: isize, x: Box<<&'static [i32] as Deref>::Target>}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:43:8 @@ -327,11 +331,11 @@ LL | struct Path1(dyn PathHelper1); help: borrowed types always have a statically known size | LL | VI(&Path1), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VI(Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:45:11 @@ -350,11 +354,11 @@ LL | struct Path2(dyn PathHelper2); help: borrowed types always have a statically known size | LL | VJ{x: &Path2}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VJ{x: Box}, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:47:15 @@ -373,11 +377,11 @@ LL | struct Path3(dyn PathHelper3); help: borrowed types always have a statically known size | LL | VK(isize, &Path3), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VK(isize, Box), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time --> $DIR/unsized-enum2.rs:49:21 @@ -396,11 +400,11 @@ LL | struct Path4(dyn PathHelper4); help: borrowed types always have a statically known size | LL | VL{u: isize, x: &Path4}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | VL{u: isize, x: Box}, - | ^^^^ ^ + | ++++ + error: aborting due to 20 previous errors diff --git a/src/test/ui/unsized/unsized-fn-arg.stderr b/src/test/ui/unsized/unsized-fn-arg.stderr index acb8a598d2c8a..d81dd7f342cf0 100644 --- a/src/test/ui/unsized/unsized-fn-arg.stderr +++ b/src/test/ui/unsized/unsized-fn-arg.stderr @@ -9,12 +9,13 @@ LL | fn f(t: T) {} = help: unsized fn params are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f(t: T) {} - | -- +LL - fn f(t: T) {} +LL + fn f(t: T) {} + | help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn f(t: &T) {} - | ^ + | + error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr index 99f75d8c5b303..7cd8383c52cbb 100644 --- a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr @@ -18,8 +18,9 @@ LL | struct S5(Y); | this could be changed to `Y: ?Sized`... help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl S5 { - | -- +LL - impl S5 { +LL + impl S5 { + | error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-struct.stderr b/src/test/ui/unsized/unsized-struct.stderr index 71693b8130dee..fc2df2977ce2e 100644 --- a/src/test/ui/unsized/unsized-struct.stderr +++ b/src/test/ui/unsized/unsized-struct.stderr @@ -18,8 +18,9 @@ LL | struct Foo { data: T } | this could be changed to `T: ?Sized`... help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn foo2() { not_sized::>() } - | -- +LL - fn foo2() { not_sized::>() } +LL + fn foo2() { not_sized::>() } + | error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/unsized-struct.rs:13:24 @@ -39,8 +40,9 @@ LL | struct Bar { data: T } | ^^^ help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn bar2() { is_sized::>() } - | -- +LL - fn bar2() { is_sized::>() } +LL + fn bar2() { is_sized::>() } + | error: aborting due to 2 previous errors diff --git a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr index 201dbf85d2042..55cdffec8c3cf 100644 --- a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr @@ -18,8 +18,9 @@ LL | struct S5(Y); | this could be changed to `Y: ?Sized`... help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl T3 for S5 { - | -- +LL - impl T3 for S5 { +LL + impl T3 for S5 { + | error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr index f8f8aa8e3e9ba..7dfd0e43974a8 100644 --- a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr @@ -11,12 +11,13 @@ LL | impl T2 for S4 { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl T2 for S4 { - | -- +LL - impl T2 for S4 { +LL + impl T2 for S4 { + | help: consider relaxing the implicit `Sized` restriction | LL | trait T2 { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized3.stderr b/src/test/ui/unsized/unsized3.stderr index 10ddfe34eace6..e2331774ebe75 100644 --- a/src/test/ui/unsized/unsized3.stderr +++ b/src/test/ui/unsized/unsized3.stderr @@ -11,12 +11,13 @@ LL | fn f2(x: &X) { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f1(x: &X) { - | -- +LL - fn f1(x: &X) { +LL + fn f1(x: &X) { + | help: consider relaxing the implicit `Sized` restriction | LL | fn f2(x: &X) { - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:18:13 @@ -31,12 +32,13 @@ LL | fn f4(x: &X) { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f3(x: &X) { - | -- +LL - fn f3(x: &X) { +LL + fn f3(x: &X) { + | help: consider relaxing the implicit `Sized` restriction | LL | fn f4(x: &X) { - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:33:8 @@ -56,12 +58,13 @@ LL | struct S { | ^ help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f8(x1: &S, x2: &S) { - | -- +LL - fn f8(x1: &S, x2: &S) { +LL + fn f8(x1: &S, x2: &S) { + | help: consider relaxing the implicit `Sized` restriction | LL | fn f5(x: &Y) {} - | ^^^^^^^^ + | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:40:8 @@ -79,8 +82,9 @@ LL | struct S { = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f9(x1: Box>) { - | -- +LL - fn f9(x1: Box>) { +LL + fn f9(x1: Box>) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:45:9 @@ -99,8 +103,9 @@ LL | struct S { = note: tuples must have a statically known size to be initialized help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f10(x1: Box>) { - | -- +LL - fn f10(x1: Box>) { +LL + fn f10(x1: Box>) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:45:8 @@ -121,12 +126,13 @@ LL | struct S { = note: required because it appears within the type `({integer}, S)` help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f10(x1: Box>) { - | -- +LL - fn f10(x1: Box>) { +LL + fn f10(x1: Box>) { + | help: consider relaxing the implicit `Sized` restriction | LL | fn f5(x: &Y) {} - | ^^^^^^^^ + | ++++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/unsized/unsized5.stderr b/src/test/ui/unsized/unsized5.stderr index 6e5b355642932..43463ff8266d6 100644 --- a/src/test/ui/unsized/unsized5.stderr +++ b/src/test/ui/unsized/unsized5.stderr @@ -10,16 +10,17 @@ LL | f1: X, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | struct S1 { - | -- +LL - struct S1 { +LL + struct S1 { + | help: borrowed types always have a statically known size | LL | f1: &X, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | f1: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized5.rs:10:8 @@ -34,16 +35,17 @@ LL | g: X, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | struct S2 { - | -- +LL - struct S2 { +LL + struct S2 { + | help: borrowed types always have a statically known size | LL | g: &X, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | g: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized5.rs:15:8 @@ -57,11 +59,11 @@ LL | f: str, help: borrowed types always have a statically known size | LL | f: &str, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | f: Box, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/unsized5.rs:20:8 @@ -75,11 +77,11 @@ LL | f: [u8], help: borrowed types always have a statically known size | LL | f: &[u8], - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | f: Box<[u8]>, - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized5.rs:25:8 @@ -93,16 +95,17 @@ LL | V1(X, isize), = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum E { - | -- +LL - enum E { +LL + enum E { + | help: borrowed types always have a statically known size | LL | V1(&X, isize), - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | V1(Box, isize), - | ^^^^ ^ + | ++++ + error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized5.rs:29:12 @@ -116,16 +119,17 @@ LL | V2{f1: X, f: isize}, = help: change the field's type to have a statically known size help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | enum F { - | -- +LL - enum F { +LL + enum F { + | help: borrowed types always have a statically known size | LL | V2{f1: &X, f: isize}, - | ^ + | + help: the `Box` type always has a statically known size and allocates its contents in the heap | LL | V2{f1: Box, f: isize}, - | ^^^^ ^ + | ++++ + error: aborting due to 6 previous errors diff --git a/src/test/ui/unsized/unsized6.stderr b/src/test/ui/unsized/unsized6.stderr index 5eff89d971fbb..38ed50daa1d49 100644 --- a/src/test/ui/unsized/unsized6.stderr +++ b/src/test/ui/unsized/unsized6.stderr @@ -11,8 +11,9 @@ LL | let y: Y; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f1(x: &X) { - | -- +LL - fn f1(x: &X) { +LL + fn f1(x: &X) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:7:12 @@ -26,8 +27,9 @@ LL | let _: (isize, (X, isize)); = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f1(x: &X) { - | -- +LL - fn f1(x: &X) { +LL + fn f1(x: &X) { + | error[E0277]: the size for values of type `Z` cannot be known at compilation time --> $DIR/unsized6.rs:11:12 @@ -41,8 +43,9 @@ LL | let y: (isize, (Z, usize)); = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f1(x: &X) { - | -- +LL - fn f1(x: &X) { +LL + fn f1(x: &X) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:15:9 @@ -56,8 +59,9 @@ LL | let y: X; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f2(x: &X) { - | -- +LL - fn f2(x: &X) { +LL + fn f2(x: &X) { + | error[E0277]: the size for values of type `Y` cannot be known at compilation time --> $DIR/unsized6.rs:17:12 @@ -71,8 +75,9 @@ LL | let y: (isize, (Y, isize)); = note: only the last element of a tuple may have a dynamically sized type help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f2(x: &X) { - | -- +LL - fn f2(x: &X) { +LL + fn f2(x: &X) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:22:9 @@ -86,8 +91,9 @@ LL | let y: X = *x1; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f3(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f3(x1: Box, x2: Box, x3: Box) { +LL + fn f3(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:24:9 @@ -102,8 +108,9 @@ LL | let y = *x2; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f3(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f3(x1: Box, x2: Box, x3: Box) { +LL + fn f3(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:26:10 @@ -118,8 +125,9 @@ LL | let (y, z) = (*x3, 4); = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f3(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f3(x1: Box, x2: Box, x3: Box) { +LL + fn f3(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:30:9 @@ -133,8 +141,9 @@ LL | let y: X = *x1; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f4(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f4(x1: Box, x2: Box, x3: Box) { +LL + fn f4(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:32:9 @@ -149,8 +158,9 @@ LL | let y = *x2; = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f4(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f4(x1: Box, x2: Box, x3: Box) { +LL + fn f4(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:34:10 @@ -165,8 +175,9 @@ LL | let (y, z) = (*x3, 4); = help: unsized locals are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn f4(x1: Box, x2: Box, x3: Box) { - | -- +LL - fn f4(x1: Box, x2: Box, x3: Box) { +LL + fn f4(x1: Box, x2: Box, x3: Box) { + | error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:38:18 @@ -179,12 +190,13 @@ LL | fn g1(x: X) {} = help: unsized fn params are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn g1(x: X) {} - | -- +LL - fn g1(x: X) {} +LL + fn g1(x: X) {} + | help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn g1(x: &X) {} - | ^ + | + error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized6.rs:40:22 @@ -197,12 +209,13 @@ LL | fn g2(x: X) {} = help: unsized fn params are gated as an unstable feature help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | fn g2(x: X) {} - | -- +LL - fn g2(x: X) {} +LL + fn g2(x: X) {} + | help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn g2(x: &X) {} - | ^ + | + error: aborting due to 13 previous errors diff --git a/src/test/ui/unsized/unsized7.stderr b/src/test/ui/unsized/unsized7.stderr index e0d95e212964d..f176b8863f8fd 100644 --- a/src/test/ui/unsized/unsized7.stderr +++ b/src/test/ui/unsized/unsized7.stderr @@ -11,12 +11,13 @@ LL | impl T1 for S3 { | help: consider removing the `?Sized` bound to make the type parameter `Sized` | -LL | impl T1 for S3 { - | -- +LL - impl T1 for S3 { +LL + impl T1 for S3 { + | help: consider relaxing the implicit `Sized` restriction | LL | trait T1 { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/use/use-mod/use-mod-4.stderr b/src/test/ui/use/use-mod/use-mod-4.stderr index a29bd07ac4419..5bb04b2633b60 100644 --- a/src/test/ui/use/use-mod/use-mod-4.stderr +++ b/src/test/ui/use/use-mod/use-mod-4.stderr @@ -6,12 +6,13 @@ LL | use foo::self; | help: consider importing the module directly | -LL | use foo; - | -- +LL - use foo::self; +LL + use foo; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use foo::{self}; - | ^ ^ + | + + error[E0429]: `self` imports are only allowed within a { } list --> $DIR/use-mod-4.rs:4:13 @@ -21,12 +22,13 @@ LL | use std::mem::self; | help: consider importing the module directly | -LL | use std::mem; - | -- +LL - use std::mem::self; +LL + use std::mem; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use std::mem::{self}; - | ^ ^ + | + + error[E0432]: unresolved import `foo` --> $DIR/use-mod-4.rs:1:5 diff --git a/src/test/ui/use/use-mod/use-mod-5.stderr b/src/test/ui/use/use-mod/use-mod-5.stderr index ebb71c51293ec..627cf73c3148c 100644 --- a/src/test/ui/use/use-mod/use-mod-5.stderr +++ b/src/test/ui/use/use-mod/use-mod-5.stderr @@ -6,12 +6,13 @@ LL | use foo::bar::self; | help: consider importing the module directly | -LL | use foo::bar; - | -- +LL - use foo::bar::self; +LL + use foo::bar; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use foo::bar::{self}; - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/use/use-mod/use-mod-6.stderr b/src/test/ui/use/use-mod/use-mod-6.stderr index 36fdf9c75c704..7be6e7525cbc9 100644 --- a/src/test/ui/use/use-mod/use-mod-6.stderr +++ b/src/test/ui/use/use-mod/use-mod-6.stderr @@ -6,12 +6,13 @@ LL | use foo::bar::self as abc; | help: consider importing the module directly | -LL | use foo::bar as abc; - | -- +LL - use foo::bar::self as abc; +LL + use foo::bar as abc; + | help: alternatively, use the multi-path `use` syntax to import `self` | LL | use foo::bar::{self as abc}; - | ^ ^ + | + + error: aborting due to previous error diff --git a/src/test/ui/variants/variant-namespacing.stderr b/src/test/ui/variants/variant-namespacing.stderr index 3954da4ec2919..9e91ff7178d98 100644 --- a/src/test/ui/variants/variant-namespacing.stderr +++ b/src/test/ui/variants/variant-namespacing.stderr @@ -11,7 +11,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit}; help: you can use `as` to change the binding name of the import | LL | pub use variant_namespacing::XE::{XStruct as OtherXStruct, XTuple, XUnit}; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `XTuple` is defined multiple times --> $DIR/variant-namespacing.rs:24:44 @@ -26,7 +26,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit}; help: you can use `as` to change the binding name of the import | LL | pub use variant_namespacing::XE::{XStruct, XTuple as OtherXTuple, XUnit}; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `XUnit` is defined multiple times --> $DIR/variant-namespacing.rs:24:52 @@ -41,7 +41,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit}; help: you can use `as` to change the binding name of the import | LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit as OtherXUnit}; - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Struct` is defined multiple times --> $DIR/variant-namespacing.rs:28:13 @@ -56,7 +56,7 @@ LL | pub use E::{Struct, Tuple, Unit}; help: you can use `as` to change the binding name of the import | LL | pub use E::{Struct as OtherStruct, Tuple, Unit}; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Tuple` is defined multiple times --> $DIR/variant-namespacing.rs:28:21 @@ -71,7 +71,7 @@ LL | pub use E::{Struct, Tuple, Unit}; help: you can use `as` to change the binding name of the import | LL | pub use E::{Struct, Tuple as OtherTuple, Unit}; - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error[E0255]: the name `Unit` is defined multiple times --> $DIR/variant-namespacing.rs:28:28 @@ -86,7 +86,7 @@ LL | pub use E::{Struct, Tuple, Unit}; help: you can use `as` to change the binding name of the import | LL | pub use E::{Struct, Tuple, Unit as OtherUnit}; - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/variants/variant-used-as-type.stderr b/src/test/ui/variants/variant-used-as-type.stderr index 096dd16c63431..64424abbcecce 100644 --- a/src/test/ui/variants/variant-used-as-type.stderr +++ b/src/test/ui/variants/variant-used-as-type.stderr @@ -7,9 +7,9 @@ LL | B(Ty::A), help: try using the variant's enum | LL | B(E), - | ^ + | ~ LL | B(Ty), - | ^^ + | ~~ error[E0573]: expected type, found variant `E::A` --> $DIR/variant-used-as-type.rs:17:6 @@ -20,9 +20,9 @@ LL | impl E::A {} help: try using the variant's enum | LL | impl E {} - | ^ + | ~ LL | impl Ty {} - | ^^ + | ~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/wf/wf-enum-bound.stderr b/src/test/ui/wf/wf-enum-bound.stderr index 7819110dd98b5..d62a6828ca3a1 100644 --- a/src/test/ui/wf/wf-enum-bound.stderr +++ b/src/test/ui/wf/wf-enum-bound.stderr @@ -10,7 +10,7 @@ LL | where T: ExtraCopy help: consider further restricting type parameter `U` | LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr index 4bfb2413fe99f..295037efb5427 100644 --- a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr +++ b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr @@ -10,7 +10,7 @@ LL | f: IsCopy help: consider restricting type parameter `A` | LL | enum AnotherEnum { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-enum-fields.stderr b/src/test/ui/wf/wf-enum-fields.stderr index c8a75afbab7cb..496216a7fa8f9 100644 --- a/src/test/ui/wf/wf-enum-fields.stderr +++ b/src/test/ui/wf/wf-enum-fields.stderr @@ -10,7 +10,7 @@ LL | SomeVariant(IsCopy) help: consider restricting type parameter `A` | LL | enum SomeEnum { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-fn-where-clause.stderr b/src/test/ui/wf/wf-fn-where-clause.stderr index e463e3db887a5..1302d0e1761f9 100644 --- a/src/test/ui/wf/wf-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-fn-where-clause.stderr @@ -10,7 +10,7 @@ LL | fn foo() where T: ExtraCopy help: consider further restricting type parameter `U` | LL | fn foo() where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known at compilation time --> $DIR/wf-fn-where-clause.rs:12:16 diff --git a/src/test/ui/wf/wf-impl-associated-type-trait.stderr b/src/test/ui/wf/wf-impl-associated-type-trait.stderr index 0d4480fbf26e0..50b4e5d8e7e98 100644 --- a/src/test/ui/wf/wf-impl-associated-type-trait.stderr +++ b/src/test/ui/wf/wf-impl-associated-type-trait.stderr @@ -10,7 +10,7 @@ LL | type Bar = MySet; help: consider restricting type parameter `T` | LL | impl Foo for T { - | ^^^^^^^^ + | ++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-arg.stderr b/src/test/ui/wf/wf-in-fn-arg.stderr index ca90e9222dea9..94899e21876af 100644 --- a/src/test/ui/wf/wf-in-fn-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-arg.stderr @@ -10,7 +10,7 @@ LL | fn bar(_: &MustBeCopy) help: consider restricting type parameter `T` | LL | fn bar(_: &MustBeCopy) - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-ret.stderr b/src/test/ui/wf/wf-in-fn-ret.stderr index f9a962578e650..731331c894aaf 100644 --- a/src/test/ui/wf/wf-in-fn-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-ret.stderr @@ -10,7 +10,7 @@ LL | fn bar() -> MustBeCopy help: consider restricting type parameter `T` | LL | fn bar() -> MustBeCopy - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-type-arg.stderr b/src/test/ui/wf/wf-in-fn-type-arg.stderr index 20aa97707105e..e41fe321142be 100644 --- a/src/test/ui/wf/wf-in-fn-type-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-type-arg.stderr @@ -10,7 +10,7 @@ LL | x: fn(MustBeCopy) help: consider restricting type parameter `T` | LL | struct Bar { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-type-ret.stderr b/src/test/ui/wf/wf-in-fn-type-ret.stderr index 48af696c3a752..36ee740de311b 100644 --- a/src/test/ui/wf/wf-in-fn-type-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-type-ret.stderr @@ -10,7 +10,7 @@ LL | x: fn() -> MustBeCopy help: consider restricting type parameter `T` | LL | struct Foo { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-where-clause.stderr b/src/test/ui/wf/wf-in-fn-where-clause.stderr index 7cb9af11d799b..5d9501bac8536 100644 --- a/src/test/ui/wf/wf-in-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-in-fn-where-clause.stderr @@ -10,7 +10,7 @@ LL | where T: MustBeCopy help: consider further restricting type parameter `U` | LL | where T: MustBeCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-obj-type-trait.stderr b/src/test/ui/wf/wf-in-obj-type-trait.stderr index b3b919a569ed4..abf53010a60b5 100644 --- a/src/test/ui/wf/wf-in-obj-type-trait.stderr +++ b/src/test/ui/wf/wf-in-obj-type-trait.stderr @@ -10,7 +10,7 @@ LL | x: dyn Object> help: consider restricting type parameter `T` | LL | struct Bar { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr index 8e0ce557e6b43..097d23ddc5fe9 100644 --- a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr @@ -10,7 +10,7 @@ LL | fn foo(self) where T: ExtraCopy help: consider restricting type parameter `U` | LL | impl Foo { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr index bf8077ba88f6b..5767cae5bc946 100644 --- a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr @@ -10,7 +10,7 @@ LL | impl Foo where T: ExtraCopy help: consider further restricting type parameter `U` | LL | impl Foo where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-struct-bound.stderr b/src/test/ui/wf/wf-struct-bound.stderr index e85f3591438a9..6d72ef7035557 100644 --- a/src/test/ui/wf/wf-struct-bound.stderr +++ b/src/test/ui/wf/wf-struct-bound.stderr @@ -10,7 +10,7 @@ LL | where T: ExtraCopy help: consider further restricting type parameter `U` | LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-struct-field.stderr b/src/test/ui/wf/wf-struct-field.stderr index 62ef6bb60c7a2..e4c322163d7de 100644 --- a/src/test/ui/wf/wf-struct-field.stderr +++ b/src/test/ui/wf/wf-struct-field.stderr @@ -10,7 +10,7 @@ LL | data: IsCopy help: consider restricting type parameter `A` | LL | struct SomeStruct { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-associated-type-bound.stderr b/src/test/ui/wf/wf-trait-associated-type-bound.stderr index 51adfdb6bd2a9..404f3400a48bc 100644 --- a/src/test/ui/wf/wf-trait-associated-type-bound.stderr +++ b/src/test/ui/wf/wf-trait-associated-type-bound.stderr @@ -10,7 +10,7 @@ LL | type Type1: ExtraCopy; help: consider restricting type parameter `T` | LL | trait SomeTrait { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-associated-type-trait.stderr b/src/test/ui/wf/wf-trait-associated-type-trait.stderr index d1c2c65043d21..dc1cd3d17c307 100644 --- a/src/test/ui/wf/wf-trait-associated-type-trait.stderr +++ b/src/test/ui/wf/wf-trait-associated-type-trait.stderr @@ -10,7 +10,7 @@ LL | type Type2 = (IsCopy, bool); help: consider further restricting the associated type | LL | trait SomeTrait where ::Type1: Copy { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-bound.stderr b/src/test/ui/wf/wf-trait-bound.stderr index c9e818f8e7dc8..4b77d48e87c77 100644 --- a/src/test/ui/wf/wf-trait-bound.stderr +++ b/src/test/ui/wf/wf-trait-bound.stderr @@ -10,7 +10,7 @@ LL | where T: ExtraCopy help: consider further restricting type parameter `U` | LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ + | ++++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-arg.stderr b/src/test/ui/wf/wf-trait-default-fn-arg.stderr index 2a129538f7633..81b0dd04d29fa 100644 --- a/src/test/ui/wf/wf-trait-default-fn-arg.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-arg.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self, x: &Bar) { help: consider further restricting `Self` | LL | fn bar(&self, x: &Bar) where Self: Eq { - | ^^^^^^^^^^^^^^ + | ++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-ret.stderr b/src/test/ui/wf/wf-trait-default-fn-ret.stderr index 4382a8fe819eb..d0da0ee5860e3 100644 --- a/src/test/ui/wf/wf-trait-default-fn-ret.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-ret.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self) -> Bar { help: consider further restricting `Self` | LL | fn bar(&self) -> Bar where Self: Eq { - | ^^^^^^^^^^^^^^ + | ++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr index 16c0424915a5d..1572d06932596 100644 --- a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self) where A: Bar { help: consider further restricting `Self` | LL | fn bar(&self) where A: Bar, Self: Eq { - | ^^^^^^^^^^ + | ++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-arg.stderr b/src/test/ui/wf/wf-trait-fn-arg.stderr index 7693aa6d2d583..3b366605b75ff 100644 --- a/src/test/ui/wf/wf-trait-fn-arg.stderr +++ b/src/test/ui/wf/wf-trait-fn-arg.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self, x: &Bar); help: consider further restricting `Self` | LL | fn bar(&self, x: &Bar) where Self: Eq; - | ^^^^^^^^^^^^^^ + | ++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-ret.stderr b/src/test/ui/wf/wf-trait-fn-ret.stderr index bd0bbc09a8b63..d289501d1630d 100644 --- a/src/test/ui/wf/wf-trait-fn-ret.stderr +++ b/src/test/ui/wf/wf-trait-fn-ret.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self) -> &Bar; help: consider further restricting `Self` | LL | fn bar(&self) -> &Bar where Self: Eq; - | ^^^^^^^^^^^^^^ + | ++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-where-clause.stderr b/src/test/ui/wf/wf-trait-fn-where-clause.stderr index 62e5318802274..ad517511a63ef 100644 --- a/src/test/ui/wf/wf-trait-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-trait-fn-where-clause.stderr @@ -10,7 +10,7 @@ LL | fn bar(&self) where Self: Sized, Bar: Copy; help: consider further restricting `Self` | LL | fn bar(&self) where Self: Sized, Bar: Copy, Self: Eq; - | ^^^^^^^^^^ + | ++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-superbound.stderr b/src/test/ui/wf/wf-trait-superbound.stderr index 6926983527178..c3016cff0f537 100644 --- a/src/test/ui/wf/wf-trait-superbound.stderr +++ b/src/test/ui/wf/wf-trait-superbound.stderr @@ -10,7 +10,7 @@ LL | trait SomeTrait: ExtraCopy { help: consider restricting type parameter `T` | LL | trait SomeTrait: ExtraCopy { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr index 356ba347cc36a..08945c5fdc1e9 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr @@ -10,7 +10,7 @@ LL | require_copy(self.x); help: consider restricting type parameter `T` | LL | impl Foo { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr index d84242cfe12b8..1a54ec2529122 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr @@ -10,7 +10,7 @@ LL | require_copy(self.x); help: consider restricting type parameter `T` | LL | impl Foo for Bar { - | ^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/wrong-ret-type.stderr b/src/test/ui/wrong-ret-type.stderr index 5498dae718f1e..8e240a0e40d47 100644 --- a/src/test/ui/wrong-ret-type.stderr +++ b/src/test/ui/wrong-ret-type.stderr @@ -9,7 +9,7 @@ LL | fn mk_int() -> usize { let i: isize = 3; return i; } help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | fn mk_int() -> usize { let i: isize = 3; return i.try_into().unwrap(); } - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/tools/clippy/tests/ui/assign_ops2.stderr b/src/tools/clippy/tests/ui/assign_ops2.stderr index e40668ed339f2..04b1dc93d4a42 100644 --- a/src/tools/clippy/tests/ui/assign_ops2.stderr +++ b/src/tools/clippy/tests/ui/assign_ops2.stderr @@ -8,11 +8,11 @@ LL | a += a + 1; help: did you mean `a = a + 1` or `a = a + a + 1`? Consider replacing it with | LL | a += 1; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a + a + 1; - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:6:5 @@ -23,11 +23,11 @@ LL | a += 1 + a; help: did you mean `a = a + 1` or `a = a + 1 + a`? Consider replacing it with | LL | a += 1; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a + 1 + a; - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:7:5 @@ -38,11 +38,11 @@ LL | a -= a - 1; help: did you mean `a = a - 1` or `a = a - (a - 1)`? Consider replacing it with | LL | a -= 1; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a - (a - 1); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:8:5 @@ -53,11 +53,11 @@ LL | a *= a * 99; help: did you mean `a = a * 99` or `a = a * a * 99`? Consider replacing it with | LL | a *= 99; - | ^^^^^^^ + | ~~~~~~~ help: or | LL | a = a * a * 99; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:9:5 @@ -68,11 +68,11 @@ LL | a *= 42 * a; help: did you mean `a = a * 42` or `a = a * 42 * a`? Consider replacing it with | LL | a *= 42; - | ^^^^^^^ + | ~~~~~~~ help: or | LL | a = a * 42 * a; - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:10:5 @@ -83,11 +83,11 @@ LL | a /= a / 2; help: did you mean `a = a / 2` or `a = a / (a / 2)`? Consider replacing it with | LL | a /= 2; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a / (a / 2); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:11:5 @@ -98,11 +98,11 @@ LL | a %= a % 5; help: did you mean `a = a % 5` or `a = a % (a % 5)`? Consider replacing it with | LL | a %= 5; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a % (a % 5); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:12:5 @@ -113,11 +113,11 @@ LL | a &= a & 1; help: did you mean `a = a & 1` or `a = a & a & 1`? Consider replacing it with | LL | a &= 1; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a & a & 1; - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: variable appears on both sides of an assignment operation --> $DIR/assign_ops2.rs:13:5 @@ -128,11 +128,11 @@ LL | a *= a * a; help: did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with | LL | a *= a; - | ^^^^^^ + | ~~~~~~ help: or | LL | a = a * a * a; - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: manual implementation of an assign operation --> $DIR/assign_ops2.rs:50:5 diff --git a/src/tools/clippy/tests/ui/async_yields_async.stderr b/src/tools/clippy/tests/ui/async_yields_async.stderr index 17d0c3751064f..3f2051458f677 100644 --- a/src/tools/clippy/tests/ui/async_yields_async.stderr +++ b/src/tools/clippy/tests/ui/async_yields_async.stderr @@ -14,9 +14,9 @@ LL | | }; = note: `-D clippy::async-yields-async` implied by `-D warnings` 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 @@ -47,9 +47,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 diff --git a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr index 50ce2f4051e00..e4f605a4de305 100644 --- a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr +++ b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr @@ -12,7 +12,7 @@ LL | #![deny(clippy::bind_instead_of_map)] help: try this | LL | let _ = Some("42").map(|s| if s.len() < 42 { 0 } else { s.len() }); - | ^^^ ^ ^^^^^^^ + | ~~~ ~ ~~~~~~~ error: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` --> $DIR/bind_instead_of_map_multipart.rs:8:13 @@ -23,7 +23,7 @@ LL | let _ = Ok::<_, ()>("42").and_then(|s| if s.len() < 42 { Ok(0) } else { help: try this | LL | let _ = Ok::<_, ()>("42").map(|s| if s.len() < 42 { 0 } else { s.len() }); - | ^^^ ^ ^^^^^^^ + | ~~~ ~ ~~~~~~~ error: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` --> $DIR/bind_instead_of_map_multipart.rs:11:13 @@ -34,7 +34,7 @@ LL | let _ = Err::<(), _>("42").or_else(|s| if s.len() < 42 { Err(s.len() + help: try this | LL | let _ = Err::<(), _>("42").map_err(|s| if s.len() < 42 { s.len() + 20 } else { s.len() }); - | ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^ + | ~~~~~~~ ~~~~~~~~~~~~ ~~~~~~~ error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` --> $DIR/bind_instead_of_map_multipart.rs:19:5 @@ -50,10 +50,10 @@ LL | | }); | help: try this | -LL | Some("42").map(|s| { +LL ~ Some("42").map(|s| { LL | if { LL | if s == "43" { -LL | return 43; +LL ~ return 43; LL | } LL | s == "42" ... @@ -67,7 +67,7 @@ LL | let _ = Some("").and_then(|s| if s.len() == 20 { Some(m!()) } else { So help: try this | LL | let _ = Some("").map(|s| if s.len() == 20 { m!() } else { Some(20) }); - | ^^^ ^^^^ ^^^^^^^^ + | ~~~ ~~~~ ~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/tools/clippy/tests/ui/blocks_in_if_conditions.stderr b/src/tools/clippy/tests/ui/blocks_in_if_conditions.stderr index 9328492733fd8..079f2feb5c486 100644 --- a/src/tools/clippy/tests/ui/blocks_in_if_conditions.stderr +++ b/src/tools/clippy/tests/ui/blocks_in_if_conditions.stderr @@ -10,10 +10,10 @@ LL | | } { = note: `-D clippy::blocks-in-if-conditions` implied by `-D warnings` help: try | -LL | let res = { -LL | let x = 3; -LL | x == 3 -LL | }; if res { +LL ~ let res = { +LL + let x = 3; +LL + x == 3 +LL ~ }; if res { | error: omit braces around single expression condition diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.stderr b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.stderr index 271fcd8b6c129..e3c1bbee99423 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.stderr +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.stderr @@ -15,10 +15,10 @@ LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] = note: The end suggestion probably needs some adjustments to use the expression result correctly help: consider moving the end statements out like this | -LL | } -LL | let result = false; -LL | println!("Block end!"); -LL | result; +LL ~ } +LL + let result = false; +LL + println!("Block end!"); +LL ~ result; | error: all if blocks contain the same code at the end @@ -30,8 +30,8 @@ LL | | } | help: consider moving the end statements out like this | -LL | } -LL | println!("Same end of block"); +LL ~ } +LL + println!("Same end of block"); | error: all if blocks contain the same code at the end @@ -46,11 +46,11 @@ LL | | } | help: consider moving the end statements out like this | -LL | } -LL | println!( -LL | "I'm moveable because I know: `outer_scope_value`: '{}'", -LL | outer_scope_value -LL | ); +LL ~ } +LL + println!( +LL + "I'm moveable because I know: `outer_scope_value`: '{}'", +LL + outer_scope_value +LL + ); | error: all if blocks contain the same code at the end @@ -62,8 +62,8 @@ LL | | } | help: consider moving the end statements out like this | -LL | } -LL | println!("Hello World"); +LL ~ } +LL + println!("Hello World"); | error: all if blocks contain the same code at the end @@ -78,9 +78,9 @@ LL | | } = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the end statements out like this | -LL | } -LL | let later_used_value = "A string value"; -LL | println!("{}", later_used_value); +LL ~ } +LL + let later_used_value = "A string value"; +LL + println!("{}", later_used_value); | error: all if blocks contain the same code at the end @@ -94,9 +94,9 @@ LL | | } = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the end statements out like this | -LL | } -LL | let simple_examples = "I now identify as a &str :)"; -LL | println!("This is the new simple_example: {}", simple_examples); +LL ~ } +LL + let simple_examples = "I now identify as a &str :)"; +LL + println!("This is the new simple_example: {}", simple_examples); | error: all if blocks contain the same code at the end @@ -109,8 +109,8 @@ LL | | }; = note: The end suggestion probably needs some adjustments to use the expression result correctly help: consider moving the end statements out like this | -LL | } -LL | x << 2; +LL ~ } +LL ~ x << 2; | error: all if blocks contain the same code at the end @@ -123,8 +123,8 @@ LL | | } = note: The end suggestion probably needs some adjustments to use the expression result correctly help: consider moving the end statements out like this | -LL | } -LL | x * 4 +LL ~ } +LL + x * 4 | error: all if blocks contain the same code at the end @@ -135,8 +135,8 @@ LL | if x == 17 { b = 1; a = 0x99; } else { a = 0x99; } | help: consider moving the end statements out like this | -LL | if x == 17 { b = 1; a = 0x99; } else { } -LL | a = 0x99; +LL ~ if x == 17 { b = 1; a = 0x99; } else { } +LL + a = 0x99; | error: aborting due to 9 previous errors diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.stderr b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.stderr index 15867e9ea020a..8d78fa5de7e49 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.stderr +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.stderr @@ -12,8 +12,8 @@ LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider moving the start statements out like this | -LL | println!("Hello World!"); -LL | if true { +LL ~ println!("Hello World!"); +LL + if true { | error: all if blocks contain the same code at the start @@ -28,10 +28,10 @@ LL | | let _z = y; = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the start statements out like this | -LL | let y = 9; -LL | println!("The value y was set to: `{}`", y); -LL | let _z = y; -LL | if x == 0 { +LL ~ let y = 9; +LL + println!("The value y was set to: `{}`", y); +LL + let _z = y; +LL + if x == 0 { | error: all if blocks contain the same code at the start @@ -43,8 +43,8 @@ LL | | let y = 16; | help: consider moving the start statements out like this | -LL | let y = 16; -LL | let _ = if x == 7 { +LL ~ let y = 16; +LL + let _ = if x == 7 { | error: all if blocks contain the same code at the start @@ -58,9 +58,9 @@ LL | | println!("Str: {}", used_value_name); = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the start statements out like this | -LL | let used_value_name = "Different type"; -LL | println!("Str: {}", used_value_name); -LL | if x == 10 { +LL ~ let used_value_name = "Different type"; +LL + println!("Str: {}", used_value_name); +LL + if x == 10 { | error: all if blocks contain the same code at the start @@ -74,9 +74,9 @@ LL | | println!("I'm also moveable"); = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the start statements out like this | -LL | let can_be_overridden = "Move me"; -LL | println!("I'm also moveable"); -LL | if x == 11 { +LL ~ let can_be_overridden = "Move me"; +LL + println!("I'm also moveable"); +LL + if x == 11 { | error: all if blocks contain the same code at the start @@ -89,9 +89,9 @@ LL | | println!("Because `IF_SAME_THEN_ELSE` is allowed here"); | help: consider moving the start statements out like this | -LL | println!("This should trigger the `SHARED_CODE_IN_IF_BLOCKS` lint."); -LL | println!("Because `IF_SAME_THEN_ELSE` is allowed here"); -LL | if x == 2020 { +LL ~ println!("This should trigger the `SHARED_CODE_IN_IF_BLOCKS` lint."); +LL + println!("Because `IF_SAME_THEN_ELSE` is allowed here"); +LL + if x == 2020 { | error: this `if` has identical blocks diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr index 212cfb2f1d180..1db2343d3fe97 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr @@ -20,15 +20,15 @@ LL | | } | |_____^ help: consider moving the start statements out like this | -LL | let t = 7; -LL | let _overlap_start = t * 2; -LL | let _overlap_end = 2 * t; -LL | if x == 7 { +LL ~ let t = 7; +LL + let _overlap_start = t * 2; +LL + let _overlap_end = 2 * t; +LL + if x == 7 { | help: and consider moving the end statements out like this | -LL | } -LL | let _u = 9; +LL ~ } +LL + let _u = 9; | error: all if blocks contain the same code at the start and the end. Here at the start @@ -50,16 +50,16 @@ LL | | } = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the start statements out like this | -LL | let r = 7; -LL | let _overlap_start = r; -LL | let _overlap_middle = r * r; -LL | if x == 99 { +LL ~ let r = 7; +LL + let _overlap_start = r; +LL + let _overlap_middle = r * r; +LL + if x == 99 { | help: and consider moving the end statements out like this | -LL | } -LL | let _overlap_end = r * r * r; -LL | let z = "end"; +LL ~ } +LL + let _overlap_end = r * r * r; +LL + let z = "end"; | error: all if blocks contain the same code at the start and the end. Here at the start @@ -85,19 +85,19 @@ LL | | } = warning: Some moved values might need to be renamed to avoid wrong references help: consider moving the start statements out like this | -LL | let a = 0xcafe; -LL | let b = 0xffff00ff; -LL | let e_id = gen_id(a, b); -LL | if (x > 7 && y < 13) || (x + y) % 2 == 1 { +LL ~ let a = 0xcafe; +LL + let b = 0xffff00ff; +LL + let e_id = gen_id(a, b); +LL + if (x > 7 && y < 13) || (x + y) % 2 == 1 { | help: and consider moving the end statements out like this | -LL | } -LL | let pack = DataPack { -LL | id: e_id, -LL | name: "Player 1".to_string(), -LL | some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90], -LL | }; +LL ~ } +LL + let pack = DataPack { +LL + id: e_id, +LL + name: "Player 1".to_string(), +LL + some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90], +LL + }; ... error: all if blocks contain the same code at the start and the end. Here at the start @@ -116,13 +116,13 @@ LL | | }; = note: The end suggestion probably needs some adjustments to use the expression result correctly help: consider moving the start statements out like this | -LL | let _ = 19; -LL | let _ = if x == 7 { +LL ~ let _ = 19; +LL + let _ = if x == 7 { | help: and consider moving the end statements out like this | -LL | } -LL | x << 2; +LL ~ } +LL ~ x << 2; | error: all if blocks contain the same code at the start and the end. Here at the start @@ -141,13 +141,13 @@ LL | | } = note: The end suggestion probably needs some adjustments to use the expression result correctly help: consider moving the start statements out like this | -LL | let _ = 17; -LL | if x == 9 { +LL ~ let _ = 17; +LL + if x == 9 { | help: and consider moving the end statements out like this | -LL | } -LL | x * 4 +LL ~ } +LL + x * 4 | error: aborting due to 5 previous errors diff --git a/src/tools/clippy/tests/ui/collapsible_else_if.stderr b/src/tools/clippy/tests/ui/collapsible_else_if.stderr index ee3e11ae565d4..6970f66097908 100644 --- a/src/tools/clippy/tests/ui/collapsible_else_if.stderr +++ b/src/tools/clippy/tests/ui/collapsible_else_if.stderr @@ -12,9 +12,9 @@ LL | | } = note: `-D clippy::collapsible-else-if` implied by `-D warnings` help: collapse nested if block | -LL | } else if y == "world" { -LL | println!("world!") -LL | } +LL ~ } else if y == "world" { +LL + println!("world!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -30,9 +30,9 @@ LL | | } | help: collapse nested if block | -LL | } else if let Some(42) = Some(42) { -LL | println!("world!") -LL | } +LL ~ } else if let Some(42) = Some(42) { +LL + println!("world!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -50,12 +50,12 @@ LL | | } | help: collapse nested if block | -LL | } else if y == "world" { -LL | println!("world") -LL | } -LL | else { -LL | println!("!") -LL | } +LL ~ } else if y == "world" { +LL + println!("world") +LL + } +LL + else { +LL + println!("!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -73,12 +73,12 @@ LL | | } | help: collapse nested if block | -LL | } else if let Some(42) = Some(42) { -LL | println!("world") -LL | } -LL | else { -LL | println!("!") -LL | } +LL ~ } else if let Some(42) = Some(42) { +LL + println!("world") +LL + } +LL + else { +LL + println!("!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -96,12 +96,12 @@ LL | | } | help: collapse nested if block | -LL | } else if let Some(42) = Some(42) { -LL | println!("world") -LL | } -LL | else { -LL | println!("!") -LL | } +LL ~ } else if let Some(42) = Some(42) { +LL + println!("world") +LL + } +LL + else { +LL + println!("!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -119,12 +119,12 @@ LL | | } | help: collapse nested if block | -LL | } else if x == "hello" { -LL | println!("world") -LL | } -LL | else { -LL | println!("!") -LL | } +LL ~ } else if x == "hello" { +LL + println!("world") +LL + } +LL + else { +LL + println!("!") +LL + } | error: this `else { if .. }` block can be collapsed @@ -142,12 +142,12 @@ LL | | } | help: collapse nested if block | -LL | } else if let Some(42) = Some(42) { -LL | println!("world") -LL | } -LL | else { -LL | println!("!") -LL | } +LL ~ } else if let Some(42) = Some(42) { +LL + println!("world") +LL + } +LL + else { +LL + println!("!") +LL + } | error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/collapsible_if.stderr b/src/tools/clippy/tests/ui/collapsible_if.stderr index acd1ec3f2caea..6749612388fe3 100644 --- a/src/tools/clippy/tests/ui/collapsible_if.stderr +++ b/src/tools/clippy/tests/ui/collapsible_if.stderr @@ -11,9 +11,9 @@ LL | | } = note: `-D clippy::collapsible-if` implied by `-D warnings` help: collapse nested if block | -LL | if x == "hello" && y == "world" { -LL | println!("Hello world!"); -LL | } +LL ~ if x == "hello" && y == "world" { +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed @@ -28,9 +28,9 @@ LL | | } | help: collapse nested if block | -LL | if (x == "hello" || x == "world") && (y == "world" || y == "hello") { -LL | println!("Hello world!"); -LL | } +LL ~ if (x == "hello" || x == "world") && (y == "world" || y == "hello") { +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed @@ -45,9 +45,9 @@ LL | | } | help: collapse nested if block | -LL | if x == "hello" && x == "world" && (y == "world" || y == "hello") { -LL | println!("Hello world!"); -LL | } +LL ~ if x == "hello" && x == "world" && (y == "world" || y == "hello") { +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed @@ -62,9 +62,9 @@ LL | | } | help: collapse nested if block | -LL | if (x == "hello" || x == "world") && y == "world" && y == "hello" { -LL | println!("Hello world!"); -LL | } +LL ~ if (x == "hello" || x == "world") && y == "world" && y == "hello" { +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed @@ -79,9 +79,9 @@ LL | | } | help: collapse nested if block | -LL | if x == "hello" && x == "world" && y == "world" && y == "hello" { -LL | println!("Hello world!"); -LL | } +LL ~ if x == "hello" && x == "world" && y == "world" && y == "hello" { +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed @@ -96,9 +96,9 @@ LL | | } | help: collapse nested if block | -LL | if 42 == 1337 && 'a' != 'A' { -LL | println!("world!") -LL | } +LL ~ if 42 == 1337 && 'a' != 'A' { +LL + println!("world!") +LL + } | error: this `if` statement can be collapsed @@ -113,9 +113,9 @@ LL | | } | help: collapse nested if block | -LL | if x == "hello" && y == "world" { // Collapsible -LL | println!("Hello world!"); -LL | } +LL ~ if x == "hello" && y == "world" { // Collapsible +LL + println!("Hello world!"); +LL + } | error: this `if` statement can be collapsed diff --git a/src/tools/clippy/tests/ui/crashes/ice-3717.stderr b/src/tools/clippy/tests/ui/crashes/ice-3717.stderr index 296c95abb96d3..4d3d617b69375 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-3717.stderr +++ b/src/tools/clippy/tests/ui/crashes/ice-3717.stderr @@ -12,11 +12,11 @@ LL | #![deny(clippy::implicit_hasher)] help: consider adding a type parameter | LL | pub fn ice_3717(_: &HashSet) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | let _: HashSet = HashSet::default(); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/tools/clippy/tests/ui/crashes/ice-6250.stderr b/src/tools/clippy/tests/ui/crashes/ice-6250.stderr index 320b3bb42f897..439884b7d274a 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-6250.stderr +++ b/src/tools/clippy/tests/ui/crashes/ice-6250.stderr @@ -30,7 +30,7 @@ LL | Some(reference) = cache.data.get(key) { help: consider dereferencing the borrow | LL | Some(*reference) = cache.data.get(key) { - | ^ + | + error[E0308]: mismatched types --> $DIR/ice-6250.rs:12:9 diff --git a/src/tools/clippy/tests/ui/crashes/ice-6251.stderr b/src/tools/clippy/tests/ui/crashes/ice-6251.stderr index 8498c0407808d..14c71e884b6ea 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-6251.stderr +++ b/src/tools/clippy/tests/ui/crashes/ice-6251.stderr @@ -17,7 +17,7 @@ LL | fn bug() -> impl Iterator { help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn bug() -> impl Iterator { - | ^ + | + error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/ice-6251.rs:4:54 diff --git a/src/tools/clippy/tests/ui/dbg_macro.stderr b/src/tools/clippy/tests/ui/dbg_macro.stderr index bdf372af29075..0abe953af2613 100644 --- a/src/tools/clippy/tests/ui/dbg_macro.stderr +++ b/src/tools/clippy/tests/ui/dbg_macro.stderr @@ -8,7 +8,7 @@ LL | if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n } help: ensure to avoid having uses of it in version control | LL | if let Some(n) = n.checked_sub(4) { n } else { n } - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: `dbg!` macro is intended as a debugging tool --> $DIR/dbg_macro.rs:8:8 @@ -19,7 +19,7 @@ LL | if dbg!(n <= 1) { help: ensure to avoid having uses of it in version control | LL | if n <= 1 { - | ^^^^^^ + | ~~~~~~ error: `dbg!` macro is intended as a debugging tool --> $DIR/dbg_macro.rs:9:9 @@ -52,7 +52,7 @@ LL | dbg!(42); help: ensure to avoid having uses of it in version control | LL | 42; - | ^^ + | ~~ error: `dbg!` macro is intended as a debugging tool --> $DIR/dbg_macro.rs:17:5 @@ -63,7 +63,7 @@ LL | dbg!(dbg!(dbg!(42))); help: ensure to avoid having uses of it in version control | LL | dbg!(dbg!(42)); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: `dbg!` macro is intended as a debugging tool --> $DIR/dbg_macro.rs:18:14 @@ -74,7 +74,7 @@ LL | foo(3) + dbg!(factorial(4)); help: ensure to avoid having uses of it in version control | LL | foo(3) + factorial(4); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/entry.stderr b/src/tools/clippy/tests/ui/entry.stderr index 2f075a97010a6..8f2e383d675da 100644 --- a/src/tools/clippy/tests/ui/entry.stderr +++ b/src/tools/clippy/tests/ui/entry.stderr @@ -22,12 +22,12 @@ LL | | } | help: try this | -LL | m.entry(k).or_insert_with(|| { -LL | if true { -LL | v -LL | } else { -LL | v2 -LL | } +LL ~ m.entry(k).or_insert_with(|| { +LL + if true { +LL + v +LL + } else { +LL + v2 +LL + } ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -44,12 +44,12 @@ LL | | } | help: try this | -LL | m.entry(k).or_insert_with(|| { -LL | if true { -LL | v -LL | } else { -LL | v2 -LL | } +LL ~ m.entry(k).or_insert_with(|| { +LL + if true { +LL + v +LL + } else { +LL + v2 +LL + } ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -66,12 +66,12 @@ LL | | } | help: try this | -LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { -LL | if true { -LL | e.insert(v); -LL | } else { -LL | e.insert(v2); -LL | return; +LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { +LL + if true { +LL + e.insert(v); +LL + } else { +LL + e.insert(v2); +LL + return; ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -85,10 +85,10 @@ LL | | } | help: try this | -LL | m.entry(k).or_insert_with(|| { -LL | foo(); -LL | v -LL | }); +LL ~ m.entry(k).or_insert_with(|| { +LL + foo(); +LL + v +LL + }); | error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -105,12 +105,12 @@ LL | | } | help: try this | -LL | m.entry(k).or_insert_with(|| { -LL | match 0 { -LL | 1 if true => { -LL | v -LL | }, -LL | _ => { +LL ~ m.entry(k).or_insert_with(|| { +LL + match 0 { +LL + 1 if true => { +LL + v +LL + }, +LL + _ => { ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -127,12 +127,12 @@ LL | | } | help: try this | -LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { -LL | match 0 { -LL | 0 => foo(), -LL | _ => { -LL | e.insert(v2); -LL | }, +LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { +LL + match 0 { +LL + 0 => foo(), +LL + _ => { +LL + e.insert(v2); +LL + }, ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -149,12 +149,12 @@ LL | | } | help: try this | -LL | m.entry(k).or_insert_with(|| { -LL | foo(); -LL | match 0 { -LL | 0 if false => { -LL | v -LL | }, +LL ~ m.entry(k).or_insert_with(|| { +LL + foo(); +LL + match 0 { +LL + 0 if false => { +LL + v +LL + }, ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -176,10 +176,10 @@ LL | | } | help: try this | -LL | if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) { -LL | e.insert(v); -LL | foo(); -LL | } +LL ~ if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) { +LL + e.insert(v); +LL + foo(); +LL + } | error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/entry_with_else.stderr b/src/tools/clippy/tests/ui/entry_with_else.stderr index 6f62ff8d37457..7279efc595959 100644 --- a/src/tools/clippy/tests/ui/entry_with_else.stderr +++ b/src/tools/clippy/tests/ui/entry_with_else.stderr @@ -11,12 +11,12 @@ LL | | } = note: `-D clippy::map-entry` implied by `-D warnings` help: try this | -LL | match m.entry(k) { -LL | std::collections::hash_map::Entry::Vacant(e) => { -LL | e.insert(v); -LL | } -LL | std::collections::hash_map::Entry::Occupied(mut e) => { -LL | e.insert(v2); +LL ~ match m.entry(k) { +LL + std::collections::hash_map::Entry::Vacant(e) => { +LL + e.insert(v); +LL + } +LL + std::collections::hash_map::Entry::Occupied(mut e) => { +LL + e.insert(v2); ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -31,12 +31,12 @@ LL | | } | help: try this | -LL | match m.entry(k) { -LL | std::collections::hash_map::Entry::Occupied(mut e) => { -LL | e.insert(v); -LL | } -LL | std::collections::hash_map::Entry::Vacant(e) => { -LL | e.insert(v2); +LL ~ match m.entry(k) { +LL + std::collections::hash_map::Entry::Occupied(mut e) => { +LL + e.insert(v); +LL + } +LL + std::collections::hash_map::Entry::Vacant(e) => { +LL + e.insert(v2); ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -51,11 +51,11 @@ LL | | } | help: try this | -LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { -LL | e.insert(v); -LL | } else { -LL | foo(); -LL | } +LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) { +LL + e.insert(v); +LL + } else { +LL + foo(); +LL + } | error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -70,11 +70,11 @@ LL | | } | help: try this | -LL | if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) { -LL | e.insert(v); -LL | } else { -LL | foo(); -LL | } +LL ~ if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) { +LL + e.insert(v); +LL + } else { +LL + foo(); +LL + } | error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -89,12 +89,12 @@ LL | | } | help: try this | -LL | match m.entry(k) { -LL | std::collections::hash_map::Entry::Vacant(e) => { -LL | e.insert(v); -LL | } -LL | std::collections::hash_map::Entry::Occupied(mut e) => { -LL | e.insert(v2); +LL ~ match m.entry(k) { +LL + std::collections::hash_map::Entry::Vacant(e) => { +LL + e.insert(v); +LL + } +LL + std::collections::hash_map::Entry::Occupied(mut e) => { +LL + e.insert(v2); ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -109,12 +109,12 @@ LL | | }; | help: try this | -LL | match m.entry(k) { -LL | std::collections::hash_map::Entry::Occupied(mut e) => { -LL | if true { Some(e.insert(v)) } else { Some(e.insert(v2)) } -LL | } -LL | std::collections::hash_map::Entry::Vacant(e) => { -LL | e.insert(v); +LL ~ match m.entry(k) { +LL + std::collections::hash_map::Entry::Occupied(mut e) => { +LL + if true { Some(e.insert(v)) } else { Some(e.insert(v2)) } +LL + } +LL + std::collections::hash_map::Entry::Vacant(e) => { +LL + e.insert(v); ... error: usage of `contains_key` followed by `insert` on a `HashMap` @@ -130,12 +130,12 @@ LL | | }; | help: try this | -LL | if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) { -LL | foo(); -LL | Some(e.insert(v)) -LL | } else { -LL | None -LL | }; +LL ~ if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) { +LL + foo(); +LL + Some(e.insert(v)) +LL + } else { +LL + None +LL ~ }; | error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/eprint_with_newline.stderr b/src/tools/clippy/tests/ui/eprint_with_newline.stderr index 31811d1d92a04..090dae3733d91 100644 --- a/src/tools/clippy/tests/ui/eprint_with_newline.stderr +++ b/src/tools/clippy/tests/ui/eprint_with_newline.stderr @@ -7,8 +7,9 @@ LL | eprint!("Hello/n"); = note: `-D clippy::print-with-newline` implied by `-D warnings` help: use `eprintln!` instead | -LL | eprintln!("Hello"); - | ^^^^^^^^ -- +LL - eprint!("Hello/n"); +LL + eprintln!("Hello"); + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:6:5 @@ -18,8 +19,9 @@ LL | eprint!("Hello {}/n", "world"); | help: use `eprintln!` instead | -LL | eprintln!("Hello {}", "world"); - | ^^^^^^^^ -- +LL - eprint!("Hello {}/n", "world"); +LL + eprintln!("Hello {}", "world"); + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:7:5 @@ -29,8 +31,9 @@ LL | eprint!("Hello {} {}/n", "world", "#2"); | help: use `eprintln!` instead | -LL | eprintln!("Hello {} {}", "world", "#2"); - | ^^^^^^^^ -- +LL - eprint!("Hello {} {}/n", "world", "#2"); +LL + eprintln!("Hello {} {}", "world", "#2"); + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:8:5 @@ -40,8 +43,9 @@ LL | eprint!("{}/n", 1265); | help: use `eprintln!` instead | -LL | eprintln!("{}", 1265); - | ^^^^^^^^ -- +LL - eprint!("{}/n", 1265); +LL + eprintln!("{}", 1265); + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:9:5 @@ -51,8 +55,9 @@ LL | eprint!("/n"); | help: use `eprintln!` instead | -LL | eprintln!(); - | ^^^^^^^^ -- +LL - eprint!("/n"); +LL + eprintln!(); + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:28:5 @@ -62,8 +67,9 @@ LL | eprint!("//n"); // should fail | help: use `eprintln!` instead | -LL | eprintln!("/"); // should fail - | ^^^^^^^^ -- +LL - eprint!("//n"); // should fail +LL + eprintln!("/"); // should fail + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:35:5 @@ -76,8 +82,8 @@ LL | | ); | help: use `eprintln!` instead | -LL | eprintln!( -LL | "" +LL ~ eprintln!( +LL ~ "" | error: using `eprint!()` with a format string that ends in a single newline @@ -91,8 +97,8 @@ LL | | ); | help: use `eprintln!` instead | -LL | eprintln!( -LL | r"" +LL ~ eprintln!( +LL ~ r"" | error: using `eprint!()` with a format string that ends in a single newline @@ -103,8 +109,9 @@ LL | eprint!("/r/n"); //~ ERROR | help: use `eprintln!` instead | -LL | eprintln!("/r"); //~ ERROR - | ^^^^^^^^ -- +LL - eprint!("/r/n"); //~ ERROR +LL + eprintln!("/r"); //~ ERROR + | error: using `eprint!()` with a format string that ends in a single newline --> $DIR/eprint_with_newline.rs:48:5 @@ -114,8 +121,9 @@ LL | eprint!("foo/rbar/n") // ~ ERROR | help: use `eprintln!` instead | -LL | eprintln!("foo/rbar") // ~ ERROR - | ^^^^^^^^ -- +LL - eprint!("foo/rbar/n") // ~ ERROR +LL + eprintln!("foo/rbar") // ~ ERROR + | error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/exhaustive_items.stderr b/src/tools/clippy/tests/ui/exhaustive_items.stderr index 8fbab535a9b25..f46ebd477b8f2 100644 --- a/src/tools/clippy/tests/ui/exhaustive_items.stderr +++ b/src/tools/clippy/tests/ui/exhaustive_items.stderr @@ -16,8 +16,8 @@ LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding #[non_exhaustive] | -LL | #[non_exhaustive] -LL | pub enum Exhaustive { +LL ~ #[non_exhaustive] +LL ~ pub enum Exhaustive { | error: exported enums should not be exhaustive @@ -33,8 +33,8 @@ LL | | } | help: try adding #[non_exhaustive] | -LL | #[non_exhaustive] -LL | pub enum ExhaustiveWithAttrs { +LL ~ #[non_exhaustive] +LL ~ pub enum ExhaustiveWithAttrs { | error: exported structs should not be exhaustive @@ -53,8 +53,8 @@ LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding #[non_exhaustive] | -LL | #[non_exhaustive] -LL | pub struct Exhaustive { +LL ~ #[non_exhaustive] +LL ~ pub struct Exhaustive { | error: aborting due to 3 previous errors diff --git a/src/tools/clippy/tests/ui/for_kv_map.stderr b/src/tools/clippy/tests/ui/for_kv_map.stderr index 241758c542cfb..e5cc7c1466ab4 100644 --- a/src/tools/clippy/tests/ui/for_kv_map.stderr +++ b/src/tools/clippy/tests/ui/for_kv_map.stderr @@ -8,7 +8,7 @@ LL | for (_, v) in &m { help: use the corresponding method | LL | for v in m.values() { - | ^ ^^^^^^^^^^ + | ~ ~~~~~~~~~~ error: you seem to want to iterate on a map's values --> $DIR/for_kv_map.rs:14:19 @@ -19,7 +19,7 @@ LL | for (_, v) in &*m { help: use the corresponding method | LL | for v in (*m).values() { - | ^ ^^^^^^^^^^^^^ + | ~ ~~~~~~~~~~~~~ error: you seem to want to iterate on a map's values --> $DIR/for_kv_map.rs:22:19 @@ -30,7 +30,7 @@ LL | for (_, v) in &mut m { help: use the corresponding method | LL | for v in m.values_mut() { - | ^ ^^^^^^^^^^^^^^ + | ~ ~~~~~~~~~~~~~~ error: you seem to want to iterate on a map's values --> $DIR/for_kv_map.rs:27:19 @@ -41,7 +41,7 @@ LL | for (_, v) in &mut *m { help: use the corresponding method | LL | for v in (*m).values_mut() { - | ^ ^^^^^^^^^^^^^^^^^ + | ~ ~~~~~~~~~~~~~~~~~ error: you seem to want to iterate on a map's keys --> $DIR/for_kv_map.rs:33:24 @@ -52,7 +52,7 @@ LL | for (k, _value) in rm { help: use the corresponding method | LL | for k in rm.keys() { - | ^ ^^^^^^^^^ + | ~ ~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/tools/clippy/tests/ui/format.stderr b/src/tools/clippy/tests/ui/format.stderr index 2017eb2b3838f..496a083497dfa 100644 --- a/src/tools/clippy/tests/ui/format.stderr +++ b/src/tools/clippy/tests/ui/format.stderr @@ -29,8 +29,8 @@ LL | | ); | help: consider using `.to_string()` | -LL | r##"foo {} -LL | " bar"##.to_string(); +LL ~ r##"foo {} +LL + " bar"##.to_string(); | error: useless use of `format!` diff --git a/src/tools/clippy/tests/ui/if_let_some_result.stderr b/src/tools/clippy/tests/ui/if_let_some_result.stderr index 0646dd27f35e8..134ce9d24116b 100644 --- a/src/tools/clippy/tests/ui/if_let_some_result.stderr +++ b/src/tools/clippy/tests/ui/if_let_some_result.stderr @@ -8,7 +8,7 @@ LL | if let Some(y) = x.parse().ok() { y } else { 0 } help: consider matching on `Ok(y)` and removing the call to `ok` instead | LL | if let Ok(y) = x.parse() { y } else { 0 } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: matching on `Some` with `ok()` is redundant --> $DIR/if_let_some_result.rs:16:9 @@ -19,7 +19,7 @@ LL | if let Some(y) = x . parse() . ok () { help: consider matching on `Ok(y)` and removing the call to `ok` instead | LL | if let Ok(y) = x . parse() { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/tools/clippy/tests/ui/implicit_hasher.stderr b/src/tools/clippy/tests/ui/implicit_hasher.stderr index 41ca6485c4c97..2e62dd30f9fc5 100644 --- a/src/tools/clippy/tests/ui/implicit_hasher.stderr +++ b/src/tools/clippy/tests/ui/implicit_hasher.stderr @@ -12,11 +12,11 @@ LL | #![deny(clippy::implicit_hasher)] help: consider adding a type parameter | LL | impl Foo for HashMap { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:25:36 @@ -27,11 +27,11 @@ LL | impl Foo for (HashMap,) { help: consider adding a type parameter | LL | impl Foo for (HashMap,) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),)) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:30:19 @@ -42,11 +42,11 @@ LL | impl Foo for HashMap { help: consider adding a type parameter | LL | impl Foo for HashMap { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: impl for `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:47:32 @@ -57,11 +57,11 @@ LL | impl Foo for HashSet { help: consider adding a type parameter | LL | impl Foo for HashSet { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ help: ...and use generic constructor | LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default())) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: impl for `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:52:19 @@ -72,11 +72,11 @@ LL | impl Foo for HashSet { help: consider adding a type parameter | LL | impl Foo for HashSet { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default())) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: parameter of type `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:69:23 @@ -87,7 +87,7 @@ LL | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) {} help: consider adding a type parameter | LL | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~ error: parameter of type `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:69:53 @@ -98,7 +98,7 @@ LL | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) {} help: consider adding a type parameter | LL | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~ error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:73:43 @@ -113,11 +113,11 @@ LL | gen!(impl); help: consider adding a type parameter | LL | impl Foo for HashMap { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ help: ...and use generic constructor | LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) - | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: parameter of type `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:81:33 @@ -132,7 +132,7 @@ LL | gen!(fn bar); help: consider adding a type parameter | LL | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~ error: parameter of type `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:81:63 @@ -147,7 +147,7 @@ LL | gen!(fn bar); help: consider adding a type parameter | LL | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ + | +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~ error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/implicit_return.stderr b/src/tools/clippy/tests/ui/implicit_return.stderr index 16fe9ed444ff6..5e078b15ce393 100644 --- a/src/tools/clippy/tests/ui/implicit_return.stderr +++ b/src/tools/clippy/tests/ui/implicit_return.stderr @@ -94,9 +94,9 @@ LL | | } | help: add `return` as shown | -LL | return loop { -LL | m!(true); -LL | } +LL ~ return loop { +LL + m!(true); +LL + } | error: missing `return` statement diff --git a/src/tools/clippy/tests/ui/large_enum_variant.stderr b/src/tools/clippy/tests/ui/large_enum_variant.stderr index d39a4d462aabd..0eac28fbd3500 100644 --- a/src/tools/clippy/tests/ui/large_enum_variant.stderr +++ b/src/tools/clippy/tests/ui/large_enum_variant.stderr @@ -13,7 +13,7 @@ LL | A(i32), help: consider boxing the large fields to reduce the total size of the enum | LL | B(Box<[i32; 8000]>), - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: large size difference between variants --> $DIR/large_enum_variant.rs:36:5 @@ -29,7 +29,7 @@ LL | VariantOk(i32, u32), help: consider boxing the large fields to reduce the total size of the enum | LL | ContainingLargeEnum(Box), - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: large size difference between variants --> $DIR/large_enum_variant.rs:46:5 @@ -62,7 +62,7 @@ LL | VariantOk(i32, u32), help: consider boxing the large fields to reduce the total size of the enum | LL | StructLikeLarge2 { x: Box<[i32; 8000]> }, - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/tools/clippy/tests/ui/let_and_return.stderr b/src/tools/clippy/tests/ui/let_and_return.stderr index a6941dabeb88d..17fd694bf7ac9 100644 --- a/src/tools/clippy/tests/ui/let_and_return.stderr +++ b/src/tools/clippy/tests/ui/let_and_return.stderr @@ -9,8 +9,8 @@ LL | x = note: `-D clippy::let-and-return` implied by `-D warnings` help: return the expression directly | -LL | -LL | 5 +LL ~ +LL ~ 5 | error: returning the result of a `let` binding from a block @@ -23,8 +23,8 @@ LL | x | help: return the expression directly | -LL | -LL | 5 +LL ~ +LL ~ 5 | error: returning the result of a `let` binding from a block @@ -37,8 +37,8 @@ LL | clone | help: return the expression directly | -LL | -LL | Arc::clone(&self.foo) as _ +LL ~ +LL ~ Arc::clone(&self.foo) as _ | error: aborting due to 3 previous errors diff --git a/src/tools/clippy/tests/ui/let_unit.stderr b/src/tools/clippy/tests/ui/let_unit.stderr index eb8482087bcc8..f2600c6c22883 100644 --- a/src/tools/clippy/tests/ui/let_unit.stderr +++ b/src/tools/clippy/tests/ui/let_unit.stderr @@ -26,12 +26,12 @@ LL | | .unwrap(); | help: omit the `let` binding | -LL | v -LL | .into_iter() -LL | .map(|i| i * 2) -LL | .filter(|i| i % 2 == 0) -LL | .map(|_| ()) -LL | .next() +LL ~ v +LL + .into_iter() +LL + .map(|i| i * 2) +LL + .filter(|i| i % 2 == 0) +LL + .map(|_| ()) +LL + .next() ... error: aborting due to 3 previous errors diff --git a/src/tools/clippy/tests/ui/literals.stderr b/src/tools/clippy/tests/ui/literals.stderr index 64ceeb316d8e5..99542e20f785f 100644 --- a/src/tools/clippy/tests/ui/literals.stderr +++ b/src/tools/clippy/tests/ui/literals.stderr @@ -28,11 +28,11 @@ LL | let fail_multi_zero = 000_123usize; help: if you mean to use a decimal constant, remove the `0` to avoid confusion | LL | let fail_multi_zero = 123usize; - | ^^^^^^^^ + | ~~~~~~~~ help: if you mean to use an octal constant, use `0o` | LL | let fail_multi_zero = 0o123usize; - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: this is a decimal constant --> $DIR/literals.rs:21:17 @@ -43,11 +43,11 @@ LL | let fail8 = 0123; help: if you mean to use a decimal constant, remove the `0` to avoid confusion | LL | let fail8 = 123; - | ^^^ + | ~~~ help: if you mean to use an octal constant, use `0o` | LL | let fail8 = 0o123; - | ^^^^^ + | ~~~~~ error: digits grouped inconsistently by underscores --> $DIR/literals.rs:33:18 diff --git a/src/tools/clippy/tests/ui/manual_async_fn.stderr b/src/tools/clippy/tests/ui/manual_async_fn.stderr index fdd43db3255ee..51f1a52b6dd65 100644 --- a/src/tools/clippy/tests/ui/manual_async_fn.stderr +++ b/src/tools/clippy/tests/ui/manual_async_fn.stderr @@ -8,11 +8,11 @@ LL | fn fut() -> impl Future { help: make the function `async` and return the output of the future directly | LL | async fn fut() -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn fut() -> impl Future { 42 } - | ^^^^^^ + | ~~~~~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:13:1 @@ -23,11 +23,11 @@ LL | fn fut2() ->impl Future { help: make the function `async` and return the output of the future directly | LL | async fn fut2() -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn fut2() ->impl Future { 42 } - | ^^^^^^ + | ~~~~~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:18:1 @@ -38,11 +38,11 @@ LL | fn fut3()-> impl Future { help: make the function `async` and return the output of the future directly | LL | async fn fut3() -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn fut3()-> impl Future { 42 } - | ^^^^^^ + | ~~~~~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:22:1 @@ -53,11 +53,11 @@ LL | fn empty_fut() -> impl Future { help: make the function `async` and remove the return type | LL | async fn empty_fut() { - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn empty_fut() -> impl Future {} - | ^^ + | ~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:27:1 @@ -68,11 +68,11 @@ LL | fn empty_fut2() ->impl Future { help: make the function `async` and remove the return type | LL | async fn empty_fut2() { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn empty_fut2() ->impl Future {} - | ^^ + | ~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:32:1 @@ -83,11 +83,11 @@ LL | fn empty_fut3()-> impl Future { help: make the function `async` and remove the return type | LL | async fn empty_fut3() { - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn empty_fut3()-> impl Future {} - | ^^ + | ~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:36:1 @@ -98,11 +98,11 @@ LL | fn core_fut() -> impl core::future::Future { help: make the function `async` and return the output of the future directly | LL | async fn core_fut() -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn core_fut() -> impl core::future::Future { 42 } - | ^^^^^^ + | ~~~~~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:58:5 @@ -113,15 +113,15 @@ LL | fn inh_fut() -> impl Future { help: make the function `async` and return the output of the future directly | LL | async fn inh_fut() -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | -LL | fn inh_fut() -> impl Future { -LL | // NOTE: this code is here just to check that the indentation is correct in the suggested fix -LL | let a = 42; -LL | let b = 21; -LL | if a < b { -LL | let c = 21; +LL ~ fn inh_fut() -> impl Future { +LL + // NOTE: this code is here just to check that the indentation is correct in the suggested fix +LL + let a = 42; +LL + let b = 21; +LL + if a < b { +LL + let c = 21; ... error: this function can be simplified using the `async fn` syntax @@ -133,11 +133,11 @@ LL | fn elided(_: &i32) -> impl Future + '_ { help: make the function `async` and return the output of the future directly | LL | async fn elided(_: &i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn elided(_: &i32) -> impl Future + '_ { 42 } - | ^^^^^^ + | ~~~~~~ error: this function can be simplified using the `async fn` syntax --> $DIR/manual_async_fn.rs:102:1 @@ -148,11 +148,11 @@ LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future + help: make the function `async` and return the output of the future directly | LL | async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: move the body of the async block to the enclosing function | LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future + 'a + 'b { 42 } - | ^^^^^^ + | ~~~~~~ error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.stderr b/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.stderr index a2f2dfce168d5..0243158dec507 100644 --- a/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.stderr +++ b/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.stderr @@ -85,8 +85,8 @@ LL | | } | help: try replacing the loop by | -LL | dst[3..(src.len() + 3)].clone_from_slice(&src[..]); -LL | dst2[30..(src.len() + 30)].clone_from_slice(&src[..]); +LL ~ dst[3..(src.len() + 3)].clone_from_slice(&src[..]); +LL + dst2[30..(src.len() + 30)].clone_from_slice(&src[..]); | error: it looks like you're manually copying between slices diff --git a/src/tools/clippy/tests/ui/manual_memcpy/without_loop_counters.stderr b/src/tools/clippy/tests/ui/manual_memcpy/without_loop_counters.stderr index 54b966f6e5419..8ff0137a8120e 100644 --- a/src/tools/clippy/tests/ui/manual_memcpy/without_loop_counters.stderr +++ b/src/tools/clippy/tests/ui/manual_memcpy/without_loop_counters.stderr @@ -51,8 +51,8 @@ LL | | } | help: try replacing the loop by | -LL | dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]); -LL | dst2[(10 + 500)..(256 + 500)].clone_from_slice(&src[10..256]); +LL ~ dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]); +LL + dst2[(10 + 500)..(256 + 500)].clone_from_slice(&src[10..256]); | error: it looks like you're manually copying between slices diff --git a/src/tools/clippy/tests/ui/manual_ok_or.stderr b/src/tools/clippy/tests/ui/manual_ok_or.stderr index 8ea10ac543636..65459a097384b 100644 --- a/src/tools/clippy/tests/ui/manual_ok_or.stderr +++ b/src/tools/clippy/tests/ui/manual_ok_or.stderr @@ -32,9 +32,9 @@ LL | | ); | help: replace with | -LL | foo.ok_or(&format!( -LL | "{}{}{}{}{}{}{}", -LL | "Alice", "Bob", "Sarah", "Marc", "Sandra", "Eric", "Jenifer")); +LL ~ foo.ok_or(&format!( +LL + "{}{}{}{}{}{}{}", +LL ~ "Alice", "Bob", "Sarah", "Marc", "Sandra", "Eric", "Jenifer")); | error: aborting due to 4 previous errors diff --git a/src/tools/clippy/tests/ui/manual_strip.stderr b/src/tools/clippy/tests/ui/manual_strip.stderr index 1352a8713d4f8..896edf2ae516d 100644 --- a/src/tools/clippy/tests/ui/manual_strip.stderr +++ b/src/tools/clippy/tests/ui/manual_strip.stderr @@ -12,12 +12,12 @@ LL | if s.starts_with("ab") { | ^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix("ab") { -LL | str::to_string(); -LL | .to_string(); +LL ~ if let Some() = s.strip_prefix("ab") { +LL ~ str::to_string(); +LL ~ .to_string(); LL | -LL | str::to_string(); -LL | .to_string(); +LL ~ str::to_string(); +LL ~ .to_string(); | error: stripping a suffix manually @@ -33,12 +33,12 @@ LL | if s.ends_with("bc") { | ^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_suffix` method | -LL | if let Some() = s.strip_suffix("bc") { -LL | str::to_string(); -LL | .to_string(); +LL ~ if let Some() = s.strip_suffix("bc") { +LL ~ str::to_string(); +LL ~ .to_string(); LL | -LL | str::to_string(); -LL | .to_string(); +LL ~ str::to_string(); +LL ~ .to_string(); | error: stripping a prefix manually @@ -54,9 +54,9 @@ LL | if s.starts_with('a') { | ^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix('a') { -LL | str::to_string(); -LL | .to_string(); +LL ~ if let Some() = s.strip_prefix('a') { +LL ~ str::to_string(); +LL ~ .to_string(); | error: stripping a prefix manually @@ -72,8 +72,8 @@ LL | if s.starts_with(prefix) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix(prefix) { -LL | str::to_string(); +LL ~ if let Some() = s.strip_prefix(prefix) { +LL ~ str::to_string(); | error: stripping a prefix manually @@ -89,9 +89,9 @@ LL | if s.starts_with(PREFIX) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix(PREFIX) { -LL | str::to_string(); -LL | str::to_string(); +LL ~ if let Some() = s.strip_prefix(PREFIX) { +LL ~ str::to_string(); +LL ~ str::to_string(); | error: stripping a prefix manually @@ -107,8 +107,8 @@ LL | if TARGET.starts_with(prefix) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = TARGET.strip_prefix(prefix) { -LL | str::to_string(); +LL ~ if let Some() = TARGET.strip_prefix(prefix) { +LL ~ str::to_string(); | error: stripping a prefix manually @@ -124,8 +124,8 @@ LL | if s1.starts_with("ab") { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s1.strip_prefix("ab") { -LL | .to_uppercase(); +LL ~ if let Some() = s1.strip_prefix("ab") { +LL ~ .to_uppercase(); | error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/manual_unwrap_or.stderr b/src/tools/clippy/tests/ui/manual_unwrap_or.stderr index 99625b789b6a4..0e4cb798d455e 100644 --- a/src/tools/clippy/tests/ui/manual_unwrap_or.stderr +++ b/src/tools/clippy/tests/ui/manual_unwrap_or.stderr @@ -41,11 +41,11 @@ LL | | }; | help: replace with | -LL | Some(1).unwrap_or({ -LL | 42 + 42 -LL | + 42 + 42 + 42 -LL | + 42 + 42 + 42 -LL | }); +LL ~ Some(1).unwrap_or({ +LL + 42 + 42 +LL + + 42 + 42 + 42 +LL + + 42 + 42 + 42 +LL ~ }); | error: this pattern reimplements `Option::unwrap_or` @@ -125,11 +125,11 @@ LL | | }; | help: replace with | -LL | Ok::(1).unwrap_or({ -LL | 42 + 42 -LL | + 42 + 42 + 42 -LL | + 42 + 42 + 42 -LL | }); +LL ~ Ok::(1).unwrap_or({ +LL + 42 + 42 +LL + + 42 + 42 + 42 +LL + + 42 + 42 + 42 +LL ~ }); | error: this pattern reimplements `Result::unwrap_or` diff --git a/src/tools/clippy/tests/ui/map_unwrap_or.stderr b/src/tools/clippy/tests/ui/map_unwrap_or.stderr index 96b9d6cc3c145..954000b8b76d2 100644 --- a/src/tools/clippy/tests/ui/map_unwrap_or.stderr +++ b/src/tools/clippy/tests/ui/map_unwrap_or.stderr @@ -10,8 +10,9 @@ LL | | .unwrap_or(0); = note: `-D clippy::map-unwrap-or` implied by `-D warnings` help: use `map_or(, )` instead | -LL | let _ = opt.map_or(0, |x| x + 1); - | ^^^^^^ ^^ -- +LL - let _ = opt.map(|x| x + 1) +LL + let _ = opt.map_or(0, |x| x + 1); + | error: called `map().unwrap_or()` on an `Option` value. This can be done more directly by calling `map_or(, )` instead --> $DIR/map_unwrap_or.rs:20:13 @@ -25,10 +26,10 @@ LL | | ).unwrap_or(0); | help: use `map_or(, )` instead | -LL | let _ = opt.map_or(0, |x| { +LL ~ let _ = opt.map_or(0, |x| { LL | x + 1 LL | } -LL | ); +LL ~ ); | error: called `map().unwrap_or()` on an `Option` value. This can be done more directly by calling `map_or(, )` instead @@ -43,9 +44,9 @@ LL | | }); | help: use `map_or(, )` instead | -LL | let _ = opt.map_or({ -LL | 0 -LL | }, |x| x + 1); +LL ~ let _ = opt.map_or({ +LL + 0 +LL ~ }, |x| x + 1); | error: called `map().unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then()` instead @@ -56,8 +57,9 @@ LL | let _ = opt.map(|x| Some(x + 1)).unwrap_or(None); | help: use `and_then()` instead | -LL | let _ = opt.and_then(|x| Some(x + 1)); - | ^^^^^^^^ -- +LL - let _ = opt.map(|x| Some(x + 1)).unwrap_or(None); +LL + let _ = opt.and_then(|x| Some(x + 1)); + | error: called `map().unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then()` instead --> $DIR/map_unwrap_or.rs:31:13 @@ -71,10 +73,10 @@ LL | | ).unwrap_or(None); | help: use `and_then()` instead | -LL | let _ = opt.and_then(|x| { +LL ~ let _ = opt.and_then(|x| { LL | Some(x + 1) LL | } -LL | ); +LL ~ ); | error: called `map().unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then()` instead @@ -88,8 +90,9 @@ LL | | .unwrap_or(None); | help: use `and_then()` instead | -LL | .and_then(|x| Some(x + 1)); - | ^^^^^^^^ -- +LL - .map(|x| Some(x + 1)) +LL + .and_then(|x| Some(x + 1)); + | error: called `map().unwrap_or()` on an `Option` value. This can be done more directly by calling `map_or(, )` instead --> $DIR/map_unwrap_or.rs:46:13 @@ -99,8 +102,9 @@ LL | let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id); | help: use `map_or(, )` instead | -LL | let _ = Some("prefix").map_or(id, |p| format!("{}.", p)); - | ^^^^^^ ^^^ -- +LL - let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id); +LL + let _ = Some("prefix").map_or(id, |p| format!("{}.", p)); + | error: called `map().unwrap_or_else()` on an `Option` value. This can be done more directly by calling `map_or_else(, )` instead --> $DIR/map_unwrap_or.rs:50:13 diff --git a/src/tools/clippy/tests/ui/match_bool.stderr b/src/tools/clippy/tests/ui/match_bool.stderr index 1ad78c740c68b..3fd0468e51de8 100644 --- a/src/tools/clippy/tests/ui/match_bool.stderr +++ b/src/tools/clippy/tests/ui/match_bool.stderr @@ -43,9 +43,9 @@ LL | | }; | help: consider using an `if`/`else` expression | -LL | if !test { -LL | println!("Noooo!"); -LL | }; +LL ~ if !test { +LL + println!("Noooo!"); +LL ~ }; | error: you seem to be trying to match on a boolean expression @@ -61,9 +61,9 @@ LL | | }; | help: consider using an `if`/`else` expression | -LL | if !test { -LL | println!("Noooo!"); -LL | }; +LL ~ if !test { +LL + println!("Noooo!"); +LL ~ }; | error: you seem to be trying to match on a boolean expression @@ -79,9 +79,9 @@ LL | | }; | help: consider using an `if`/`else` expression | -LL | if !(test && test) { -LL | println!("Noooo!"); -LL | }; +LL ~ if !(test && test) { +LL + println!("Noooo!"); +LL ~ }; | error: equal expressions as operands to `&&` @@ -106,11 +106,11 @@ LL | | }; | help: consider using an `if`/`else` expression | -LL | if test { -LL | println!("Yes!"); -LL | } else { -LL | println!("Noooo!"); -LL | }; +LL ~ if test { +LL + println!("Yes!"); +LL + } else { +LL + println!("Noooo!"); +LL ~ }; | error: aborting due to 8 previous errors diff --git a/src/tools/clippy/tests/ui/match_expr_like_matches_macro.stderr b/src/tools/clippy/tests/ui/match_expr_like_matches_macro.stderr index f27b4e9cb20b1..366ef36c367bf 100644 --- a/src/tools/clippy/tests/ui/match_expr_like_matches_macro.stderr +++ b/src/tools/clippy/tests/ui/match_expr_like_matches_macro.stderr @@ -123,8 +123,8 @@ LL | | }; = note: `-D clippy::match-ref-pats` implied by `-D warnings` help: try | -LL | let _res = match val { -LL | Some(ref _a) => true, +LL ~ let _res = match val { +LL ~ Some(ref _a) => true, | error: match expression looks like `matches!` macro @@ -149,8 +149,8 @@ LL | | }; | help: try | -LL | let _res = match val { -LL | Some(ref _a) => true, +LL ~ let _res = match val { +LL ~ Some(ref _a) => true, | error: aborting due to 14 previous errors diff --git a/src/tools/clippy/tests/ui/match_ref_pats.stderr b/src/tools/clippy/tests/ui/match_ref_pats.stderr index 67474e65cde4f..a57a338b27634 100644 --- a/src/tools/clippy/tests/ui/match_ref_pats.stderr +++ b/src/tools/clippy/tests/ui/match_ref_pats.stderr @@ -10,9 +10,9 @@ LL | | } = note: `-D clippy::match-ref-pats` implied by `-D warnings` help: instead of prefixing all patterns with `&`, you can dereference the expression | -LL | match *v { -LL | Some(v) => println!("{:?}", v), -LL | None => println!("none"), +LL ~ match *v { +LL ~ Some(v) => println!("{:?}", v), +LL ~ None => println!("none"), | error: you don't need to add `&` to all patterns @@ -26,8 +26,8 @@ LL | | } | help: instead of prefixing all patterns with `&`, you can dereference the expression | -LL | match *tup { -LL | (v, 1) => println!("{}", v), +LL ~ match *tup { +LL ~ (v, 1) => println!("{}", v), | error: you don't need to add `&` to both the expression and the patterns @@ -41,9 +41,9 @@ LL | | } | help: try | -LL | match w { -LL | Some(v) => println!("{:?}", v), -LL | None => println!("none"), +LL ~ match w { +LL ~ Some(v) => println!("{:?}", v), +LL ~ None => println!("none"), | error: redundant pattern matching, consider using `is_none()` @@ -65,7 +65,7 @@ LL | | } help: instead of prefixing all patterns with `&`, you can dereference the expression | LL | if let None = *a { - | ^^^^ ^^ + | ~~~~ ~~ error: redundant pattern matching, consider using `is_none()` --> $DIR/match_ref_pats.rs:40:12 @@ -84,7 +84,7 @@ LL | | } help: try | LL | if let None = b { - | ^^^^ ^ + | ~~~~ ~ error: you don't need to add `&` to all patterns --> $DIR/match_ref_pats.rs:67:9 @@ -97,8 +97,8 @@ LL | | } | help: instead of prefixing all patterns with `&`, you can dereference the expression | -LL | match *foo_variant!(0) { -LL | Foo::A => println!("A"), +LL ~ match *foo_variant!(0) { +LL ~ Foo::A => println!("A"), | error: aborting due to 8 previous errors diff --git a/src/tools/clippy/tests/ui/match_single_binding.stderr b/src/tools/clippy/tests/ui/match_single_binding.stderr index 795c8c3e24d7e..291fa77dc2ee1 100644 --- a/src/tools/clippy/tests/ui/match_single_binding.stderr +++ b/src/tools/clippy/tests/ui/match_single_binding.stderr @@ -11,10 +11,10 @@ LL | | } = note: `-D clippy::match-single-binding` implied by `-D warnings` help: consider using `let` statement | -LL | let (x, y, z) = (a, b, c); -LL | { -LL | println!("{} {} {}", x, y, z); -LL | } +LL ~ let (x, y, z) = (a, b, c); +LL + { +LL + println!("{} {} {}", x, y, z); +LL + } | error: this match could be written as a `let` statement @@ -27,8 +27,8 @@ LL | | } | help: consider using `let` statement | -LL | let (x, y, z) = (a, b, c); -LL | println!("{} {} {}", x, y, z); +LL ~ let (x, y, z) = (a, b, c); +LL + println!("{} {} {}", x, y, z); | error: this match could be replaced by its body itself @@ -52,10 +52,10 @@ LL | | } | help: consider using the match body instead | -LL | { -LL | let x = 29; -LL | println!("x has a value of {}", x); -LL | } +LL ~ { +LL + let x = 29; +LL + println!("x has a value of {}", x); +LL + } | error: this match could be replaced by its body itself @@ -72,12 +72,12 @@ LL | | } | help: consider using the match body instead | -LL | { -LL | let e = 5 * a; -LL | if e >= 5 { -LL | println!("e is superior to 5"); -LL | } -LL | } +LL ~ { +LL + let e = 5 * a; +LL + if e >= 5 { +LL + println!("e is superior to 5"); +LL + } +LL + } | error: this match could be written as a `let` statement @@ -90,8 +90,8 @@ LL | | } | help: consider using `let` statement | -LL | let Point { x, y } = p; -LL | println!("Coords: ({}, {})", x, y); +LL ~ let Point { x, y } = p; +LL + println!("Coords: ({}, {})", x, y); | error: this match could be written as a `let` statement @@ -104,8 +104,8 @@ LL | | } | help: consider using `let` statement | -LL | let Point { x: x1, y: y1 } = p; -LL | println!("Coords: ({}, {})", x1, y1); +LL ~ let Point { x: x1, y: y1 } = p; +LL + println!("Coords: ({}, {})", x1, y1); | error: this match could be written as a `let` statement @@ -118,8 +118,8 @@ LL | | } | help: consider using `let` statement | -LL | let ref r = x; -LL | println!("Got a reference to {}", r); +LL ~ let ref r = x; +LL + println!("Got a reference to {}", r); | error: this match could be written as a `let` statement @@ -132,8 +132,8 @@ LL | | } | help: consider using `let` statement | -LL | let ref mut mr = x; -LL | println!("Got a mutable reference to {}", mr); +LL ~ let ref mut mr = x; +LL + println!("Got a mutable reference to {}", mr); | error: this match could be written as a `let` statement @@ -146,8 +146,8 @@ LL | | }; | help: consider using `let` statement | -LL | let Point { x, y } = coords(); -LL | let product = x * y; +LL ~ let Point { x, y } = coords(); +LL + let product = x * y; | error: this match could be written as a `let` statement @@ -161,10 +161,10 @@ LL | | }) | help: consider using `let` statement | -LL | .map(|i| { -LL | let unwrapped = i.unwrap(); -LL | unwrapped -LL | }) +LL ~ .map(|i| { +LL + let unwrapped = i.unwrap(); +LL + unwrapped +LL ~ }) | error: aborting due to 11 previous errors diff --git a/src/tools/clippy/tests/ui/match_single_binding2.stderr b/src/tools/clippy/tests/ui/match_single_binding2.stderr index 4372f55af8767..d349331946601 100644 --- a/src/tools/clippy/tests/ui/match_single_binding2.stderr +++ b/src/tools/clippy/tests/ui/match_single_binding2.stderr @@ -10,10 +10,10 @@ LL | | }, = note: `-D clippy::match-single-binding` implied by `-D warnings` help: consider using `let` statement | -LL | Some((iter, _item)) => { -LL | let (min, max) = iter.size_hint(); -LL | (min.saturating_add(1), max.and_then(|max| max.checked_add(1))) -LL | }, +LL ~ Some((iter, _item)) => { +LL + let (min, max) = iter.size_hint(); +LL + (min.saturating_add(1), max.and_then(|max| max.checked_add(1))) +LL ~ }, | error: this match could be written as a `let` statement @@ -26,8 +26,8 @@ LL | | } | help: consider using `let` statement | -LL | let (a, b) = get_tup(); -LL | println!("a {:?} and b {:?}", a, b); +LL ~ let (a, b) = get_tup(); +LL + println!("a {:?} and b {:?}", a, b); | error: this match could be replaced by its scrutinee and body @@ -40,8 +40,8 @@ LL | | } | help: consider using the scrutinee and body instead | -LL | side_effects(); -LL | println!("Side effects"); +LL ~ side_effects(); +LL + println!("Side effects"); | error: this match could be replaced by its scrutinee and body @@ -57,11 +57,11 @@ LL | | } | help: consider using the scrutinee and body instead | -LL | match x { -LL | 0 => 1, -LL | _ => 2, -LL | }; -LL | println!("Single branch"); +LL ~ match x { +LL + 0 => 1, +LL + _ => 2, +LL + }; +LL + println!("Single branch"); | error: aborting due to 4 previous errors diff --git a/src/tools/clippy/tests/ui/min_rust_version_attr.stderr b/src/tools/clippy/tests/ui/min_rust_version_attr.stderr index ddb1e1f372409..a2e4e86ed6b8c 100644 --- a/src/tools/clippy/tests/ui/min_rust_version_attr.stderr +++ b/src/tools/clippy/tests/ui/min_rust_version_attr.stderr @@ -12,8 +12,8 @@ LL | if s.starts_with("hello, ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix("hello, ") { -LL | assert_eq!(.to_uppercase(), "WORLD!"); +LL ~ if let Some() = s.strip_prefix("hello, ") { +LL ~ assert_eq!(.to_uppercase(), "WORLD!"); | error: stripping a prefix manually @@ -29,8 +29,8 @@ LL | if s.starts_with("hello, ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using the `strip_prefix` method | -LL | if let Some() = s.strip_prefix("hello, ") { -LL | assert_eq!(.to_uppercase(), "WORLD!"); +LL ~ if let Some() = s.strip_prefix("hello, ") { +LL ~ assert_eq!(.to_uppercase(), "WORLD!"); | error: aborting due to 2 previous errors diff --git a/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr b/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr index ea39f5b5577be..3534b53282f9b 100644 --- a/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr +++ b/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr @@ -169,15 +169,15 @@ LL | #[cfg(all(not(any(solaris, linux)), freebsd))] help: try | LL | #[cfg(all(not(any(target_os = "solaris", linux)), freebsd))] - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ help: try | LL | #[cfg(all(not(any(solaris, target_os = "linux")), freebsd))] - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ help: try | LL | #[cfg(all(not(any(solaris, linux)), target_os = "freebsd"))] - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 17 previous errors diff --git a/src/tools/clippy/tests/ui/needless_borrow_pat.stderr b/src/tools/clippy/tests/ui/needless_borrow_pat.stderr index 32913d59f7ae8..365ecd68d8ff2 100644 --- a/src/tools/clippy/tests/ui/needless_borrow_pat.stderr +++ b/src/tools/clippy/tests/ui/needless_borrow_pat.stderr @@ -15,7 +15,7 @@ LL | Some(ref x) => *x, help: try this | LL | Some(x) => x, - | ^ ^ + | ~ ~ error: this pattern creates a reference to a reference --> $DIR/needless_borrow_pat.rs:72:14 @@ -25,9 +25,9 @@ LL | Some(ref x) => { | help: try this | -LL | Some(x) => { -LL | f1(x); +LL ~ Some(x) => { LL | f1(x); +LL ~ f1(x); | error: this pattern creates a reference to a reference @@ -50,8 +50,8 @@ LL | let (ref y,) = (&x,); | help: try this | -LL | let (y,) = (&x,); -LL | let _: &String = y; +LL ~ let (y,) = (&x,); +LL ~ let _: &String = y; | error: this pattern creates a reference to a reference @@ -69,7 +69,7 @@ LL | E::A(ref x) | E::B(ref x) => *x, help: try this | LL | E::A(x) | E::B(x) => x, - | ^ ^ ^ + | ~ ~ ~ error: this pattern creates a reference to a reference --> $DIR/needless_borrow_pat.rs:118:21 @@ -85,9 +85,9 @@ LL | fn f2<'a>(&ref x: &&'a String) -> &'a String { | help: try this | -LL | fn f2<'a>(&x: &&'a String) -> &'a String { +LL ~ fn f2<'a>(&x: &&'a String) -> &'a String { LL | let _: &String = x; -LL | x +LL ~ x | error: this pattern creates a reference to a reference @@ -104,8 +104,8 @@ LL | fn f(&ref x: &&String) { | help: try this | -LL | fn f(&x: &&String) { -LL | let _: &String = x; +LL ~ fn f(&x: &&String) { +LL ~ let _: &String = x; | error: aborting due to 12 previous errors diff --git a/src/tools/clippy/tests/ui/needless_collect_indirect.stderr b/src/tools/clippy/tests/ui/needless_collect_indirect.stderr index f094e182a48f3..0f5e78f91198c 100644 --- a/src/tools/clippy/tests/ui/needless_collect_indirect.stderr +++ b/src/tools/clippy/tests/ui/needless_collect_indirect.stderr @@ -9,8 +9,8 @@ LL | indirect_iter.into_iter().map(|x| (x, x + 1)).collect::>( = note: `-D clippy::needless-collect` implied by `-D warnings` help: use the original Iterator instead of collecting it and then producing a new one | -LL | -LL | sample.iter().map(|x| (x, x + 1)).collect::>(); +LL ~ +LL ~ sample.iter().map(|x| (x, x + 1)).collect::>(); | error: avoid using `collect()` when not needed @@ -23,8 +23,8 @@ LL | indirect_len.len(); | help: take the original Iterator's count instead of collecting it and finding the length | -LL | -LL | sample.iter().count(); +LL ~ +LL ~ sample.iter().count(); | error: avoid using `collect()` when not needed @@ -37,8 +37,8 @@ LL | indirect_empty.is_empty(); | help: check if the original Iterator has anything instead of collecting it and seeing if it's empty | -LL | -LL | sample.iter().next().is_none(); +LL ~ +LL ~ sample.iter().next().is_none(); | error: avoid using `collect()` when not needed @@ -51,8 +51,8 @@ LL | indirect_contains.contains(&&5); | help: check if the original Iterator contains an element instead of collecting then checking | -LL | -LL | sample.iter().any(|x| x == &5); +LL ~ +LL ~ sample.iter().any(|x| x == &5); | error: avoid using `collect()` when not needed @@ -65,8 +65,8 @@ LL | non_copy_contains.contains(&a); | help: check if the original Iterator contains an element instead of collecting then checking | -LL | -LL | sample.into_iter().any(|x| x == a); +LL ~ +LL ~ sample.into_iter().any(|x| x == a); | error: avoid using `collect()` when not needed @@ -79,8 +79,8 @@ LL | buffer.len() | help: take the original Iterator's count instead of collecting it and finding the length | -LL | -LL | string.split('/').count() +LL ~ +LL ~ string.split('/').count() | error: avoid using `collect()` when not needed @@ -93,8 +93,8 @@ LL | indirect_len.len() | help: take the original Iterator's count instead of collecting it and finding the length | -LL | -LL | sample.iter().count() +LL ~ +LL ~ sample.iter().count() | error: avoid using `collect()` when not needed @@ -107,8 +107,8 @@ LL | indirect_len.len() | help: take the original Iterator's count instead of collecting it and finding the length | -LL | -LL | sample.iter().count() +LL ~ +LL ~ sample.iter().count() | error: avoid using `collect()` when not needed @@ -121,8 +121,8 @@ LL | indirect_len.len() | help: take the original Iterator's count instead of collecting it and finding the length | -LL | -LL | sample.iter().count() +LL ~ +LL ~ sample.iter().count() | error: aborting due to 9 previous errors diff --git a/src/tools/clippy/tests/ui/needless_for_each_fixable.stderr b/src/tools/clippy/tests/ui/needless_for_each_fixable.stderr index 483a5e6d61d72..6487e57266c71 100644 --- a/src/tools/clippy/tests/ui/needless_for_each_fixable.stderr +++ b/src/tools/clippy/tests/ui/needless_for_each_fixable.stderr @@ -9,9 +9,9 @@ LL | | }); = note: `-D clippy::needless-for-each` implied by `-D warnings` help: try | -LL | for elem in v.iter() { -LL | acc += elem; -LL | } +LL ~ for elem in v.iter() { +LL + acc += elem; +LL + } | error: needless use of `for_each` @@ -24,9 +24,9 @@ LL | | }); | help: try | -LL | for elem in v.into_iter() { -LL | acc += elem; -LL | } +LL ~ for elem in v.into_iter() { +LL + acc += elem; +LL + } | error: needless use of `for_each` @@ -39,9 +39,9 @@ LL | | }); | help: try | -LL | for elem in [1, 2, 3].iter() { -LL | acc += elem; -LL | } +LL ~ for elem in [1, 2, 3].iter() { +LL + acc += elem; +LL + } | error: needless use of `for_each` @@ -54,9 +54,9 @@ LL | | }); | help: try | -LL | for (k, v) in hash_map.iter() { -LL | acc += k + v; -LL | } +LL ~ for (k, v) in hash_map.iter() { +LL + acc += k + v; +LL + } | error: needless use of `for_each` @@ -69,9 +69,9 @@ LL | | }); | help: try | -LL | for (k, v) in hash_map.iter_mut() { -LL | acc += *k + *v; -LL | } +LL ~ for (k, v) in hash_map.iter_mut() { +LL + acc += *k + *v; +LL + } | error: needless use of `for_each` @@ -84,9 +84,9 @@ LL | | }); | help: try | -LL | for k in hash_map.keys() { -LL | acc += k; -LL | } +LL ~ for k in hash_map.keys() { +LL + acc += k; +LL + } | error: needless use of `for_each` @@ -99,9 +99,9 @@ LL | | }); | help: try | -LL | for v in hash_map.values() { -LL | acc += v; -LL | } +LL ~ for v in hash_map.values() { +LL + acc += v; +LL + } | error: needless use of `for_each` @@ -114,9 +114,9 @@ LL | | }); | help: try | -LL | for elem in my_vec().iter() { -LL | acc += elem; -LL | } +LL ~ for elem in my_vec().iter() { +LL + acc += elem; +LL + } | error: aborting due to 8 previous errors diff --git a/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr b/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr index 8c4507d23283c..f607e0a430e24 100644 --- a/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr +++ b/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr @@ -13,17 +13,17 @@ LL | | }); = note: `-D clippy::needless-for-each` implied by `-D warnings` help: try | -LL | for v in v.iter() { -LL | if *v == 10 { -LL | return; -LL | } else { -LL | println!("{}", v); -LL | } +LL ~ for v in v.iter() { +LL + if *v == 10 { +LL + return; +LL + } else { +LL + println!("{}", v); +LL + } ... help: ...and replace `return` with `continue` | LL | continue; - | ^^^^^^^^ + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/tools/clippy/tests/ui/needless_pass_by_value.stderr b/src/tools/clippy/tests/ui/needless_pass_by_value.stderr index 9aa783bf904e1..2f61ba241c45d 100644 --- a/src/tools/clippy/tests/ui/needless_pass_by_value.stderr +++ b/src/tools/clippy/tests/ui/needless_pass_by_value.stderr @@ -63,11 +63,11 @@ LL | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { help: consider changing the type to | LL | fn issue_2114(s: String, t: &str, u: Vec, v: Vec) { - | ^^^^ + | ~~~~ help: change `t.clone()` to | LL | let _ = t.to_string(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:81:40 @@ -84,11 +84,11 @@ LL | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { help: consider changing the type to | LL | fn issue_2114(s: String, t: String, u: Vec, v: &[i32]) { - | ^^^^^^ + | ~~~~~~ help: change `v.clone()` to | LL | let _ = v.to_owned(); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: this argument is passed by value, but not consumed in the function body --> $DIR/needless_pass_by_value.rs:94:12 diff --git a/src/tools/clippy/tests/ui/needless_range_loop.stderr b/src/tools/clippy/tests/ui/needless_range_loop.stderr index c898cd64a9392..a86cc69dfc5db 100644 --- a/src/tools/clippy/tests/ui/needless_range_loop.stderr +++ b/src/tools/clippy/tests/ui/needless_range_loop.stderr @@ -8,7 +8,7 @@ LL | for i in 0..vec.len() { help: consider using an iterator | LL | for in &vec { - | ^^^^^^ ^^^^ + | ~~~~~~ ~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:19:14 @@ -19,7 +19,7 @@ LL | for i in 0..vec.len() { help: consider using an iterator | LL | for in &vec { - | ^^^^^^ ^^^^ + | ~~~~~~ ~~~~ error: the loop variable `j` is only used to index `STATIC` --> $DIR/needless_range_loop.rs:24:14 @@ -30,7 +30,7 @@ LL | for j in 0..4 { help: consider using an iterator | LL | for in &STATIC { - | ^^^^^^ ^^^^^^^ + | ~~~~~~ ~~~~~~~ error: the loop variable `j` is only used to index `CONST` --> $DIR/needless_range_loop.rs:28:14 @@ -41,7 +41,7 @@ LL | for j in 0..4 { help: consider using an iterator | LL | for in &CONST { - | ^^^^^^ ^^^^^^ + | ~~~~~~ ~~~~~~ error: the loop variable `i` is used to index `vec` --> $DIR/needless_range_loop.rs:32:14 @@ -52,7 +52,7 @@ LL | for i in 0..vec.len() { help: consider using an iterator | LL | for (i, ) in vec.iter().enumerate() { - | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec2` --> $DIR/needless_range_loop.rs:40:14 @@ -63,7 +63,7 @@ LL | for i in 0..vec.len() { help: consider using an iterator | LL | for in vec2.iter().take(vec.len()) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:44:14 @@ -74,7 +74,7 @@ LL | for i in 5..vec.len() { help: consider using an iterator | LL | for in vec.iter().skip(5) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:48:14 @@ -85,7 +85,7 @@ LL | for i in 0..MAX_LEN { help: consider using an iterator | LL | for in vec.iter().take(MAX_LEN) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:52:14 @@ -96,7 +96,7 @@ LL | for i in 0..=MAX_LEN { help: consider using an iterator | LL | for in vec.iter().take(MAX_LEN + 1) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:56:14 @@ -107,7 +107,7 @@ LL | for i in 5..10 { help: consider using an iterator | LL | for in vec.iter().take(10).skip(5) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop.rs:60:14 @@ -118,7 +118,7 @@ LL | for i in 5..=10 { help: consider using an iterator | LL | for in vec.iter().take(10 + 1).skip(5) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is used to index `vec` --> $DIR/needless_range_loop.rs:64:14 @@ -129,7 +129,7 @@ LL | for i in 5..vec.len() { help: consider using an iterator | LL | for (i, ) in vec.iter().enumerate().skip(5) { - | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is used to index `vec` --> $DIR/needless_range_loop.rs:68:14 @@ -140,7 +140,7 @@ LL | for i in 5..10 { help: consider using an iterator | LL | for (i, ) in vec.iter().enumerate().take(10).skip(5) { - | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is used to index `vec` --> $DIR/needless_range_loop.rs:73:14 @@ -151,7 +151,7 @@ LL | for i in 0..vec.len() { help: consider using an iterator | LL | for (i, ) in vec.iter_mut().enumerate() { - | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 14 previous errors diff --git a/src/tools/clippy/tests/ui/needless_range_loop2.stderr b/src/tools/clippy/tests/ui/needless_range_loop2.stderr index 2e1f0fd0299b4..1e6ec5e667aa0 100644 --- a/src/tools/clippy/tests/ui/needless_range_loop2.stderr +++ b/src/tools/clippy/tests/ui/needless_range_loop2.stderr @@ -8,7 +8,7 @@ LL | for i in 3..10 { help: consider using an iterator | LL | for in ns.iter().take(10).skip(3) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `ms` --> $DIR/needless_range_loop2.rs:31:14 @@ -19,7 +19,7 @@ LL | for i in 0..ms.len() { help: consider using an iterator | LL | for in &mut ms { - | ^^^^^^ ^^^^^^^ + | ~~~~~~ ~~~~~~~ error: the loop variable `i` is only used to index `ms` --> $DIR/needless_range_loop2.rs:37:14 @@ -30,7 +30,7 @@ LL | for i in 0..ms.len() { help: consider using an iterator | LL | for in &mut ms { - | ^^^^^^ ^^^^^^^ + | ~~~~~~ ~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop2.rs:61:14 @@ -41,7 +41,7 @@ LL | for i in x..x + 4 { help: consider using an iterator | LL | for in vec.iter_mut().skip(x).take(4) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `vec` --> $DIR/needless_range_loop2.rs:68:14 @@ -52,7 +52,7 @@ LL | for i in x..=x + 4 { help: consider using an iterator | LL | for in vec.iter_mut().skip(x).take(4 + 1) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `arr` --> $DIR/needless_range_loop2.rs:74:14 @@ -63,7 +63,7 @@ LL | for i in 0..3 { help: consider using an iterator | LL | for in &arr { - | ^^^^^^ ^^^^ + | ~~~~~~ ~~~~ error: the loop variable `i` is only used to index `arr` --> $DIR/needless_range_loop2.rs:78:14 @@ -74,7 +74,7 @@ LL | for i in 0..2 { help: consider using an iterator | LL | for in arr.iter().take(2) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~ error: the loop variable `i` is only used to index `arr` --> $DIR/needless_range_loop2.rs:82:14 @@ -85,7 +85,7 @@ LL | for i in 1..3 { help: consider using an iterator | LL | for in arr.iter().skip(1) { - | ^^^^^^ ^^^^^^^^^^^^^^^^^^ + | ~~~~~~ ~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/tools/clippy/tests/ui/new_without_default.stderr b/src/tools/clippy/tests/ui/new_without_default.stderr index 7c964000807ea..14ddb66f2324c 100644 --- a/src/tools/clippy/tests/ui/new_without_default.stderr +++ b/src/tools/clippy/tests/ui/new_without_default.stderr @@ -9,11 +9,11 @@ LL | | } = note: `-D clippy::new-without-default` implied by `-D warnings` help: try adding this | -LL | impl Default for Foo { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl Default for Foo { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `Bar` @@ -26,11 +26,11 @@ LL | | } | help: try adding this | -LL | impl Default for Bar { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl Default for Bar { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `LtKo<'c>` @@ -43,11 +43,11 @@ LL | | } | help: try adding this | -LL | impl<'c> Default for LtKo<'c> { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl<'c> Default for LtKo<'c> { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `NewNotEqualToDerive` @@ -60,11 +60,11 @@ LL | | } | help: try adding this | -LL | impl Default for NewNotEqualToDerive { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl Default for NewNotEqualToDerive { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `FooGenerics` @@ -77,11 +77,11 @@ LL | | } | help: try adding this | -LL | impl Default for FooGenerics { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl Default for FooGenerics { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `BarGenerics` @@ -94,11 +94,11 @@ LL | | } | help: try adding this | -LL | impl Default for BarGenerics { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } +LL + impl Default for BarGenerics { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } | error: you should consider adding a `Default` implementation for `Foo` @@ -111,12 +111,12 @@ LL | | } | help: try adding this | -LL | impl Default for Foo { -LL | fn default() -> Self { -LL | Self::new() -LL | } -LL | } -LL | +LL ~ impl Default for Foo { +LL + fn default() -> Self { +LL + Self::new() +LL + } +LL + } +LL + ... error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/nonminimal_bool.stderr b/src/tools/clippy/tests/ui/nonminimal_bool.stderr index d34d106cb2fbb..1d39bce935db8 100644 --- a/src/tools/clippy/tests/ui/nonminimal_bool.stderr +++ b/src/tools/clippy/tests/ui/nonminimal_bool.stderr @@ -51,9 +51,9 @@ LL | let _ = a == b && c == 5 && a == b; help: try | LL | let _ = a == b && c == 5; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ LL | let _ = !(a != b || c != 5); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: this boolean expression can be simplified --> $DIR/nonminimal_bool.rs:28:13 @@ -64,9 +64,9 @@ LL | let _ = a == b || c == 5 || a == b; help: try | LL | let _ = a == b || c == 5; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ LL | let _ = !(a != b && c != 5); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: this boolean expression can be simplified --> $DIR/nonminimal_bool.rs:29:13 @@ -77,9 +77,9 @@ LL | let _ = a == b && c == 5 && b == a; help: try | LL | let _ = a == b && c == 5; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ LL | let _ = !(a != b || c != 5); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: this boolean expression can be simplified --> $DIR/nonminimal_bool.rs:30:13 @@ -90,9 +90,9 @@ LL | let _ = a != b || !(a != b || c == d); help: try | LL | let _ = a != b || c != d; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ LL | let _ = !(a == b && c == d); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: this boolean expression can be simplified --> $DIR/nonminimal_bool.rs:31:13 @@ -103,9 +103,9 @@ LL | let _ = a != b && !(a != b && c == d); help: try | LL | let _ = a != b && c != d; - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ LL | let _ = !(a == b || c == d); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to 12 previous errors diff --git a/src/tools/clippy/tests/ui/op_ref.stderr b/src/tools/clippy/tests/ui/op_ref.stderr index a3a9adcc48355..821099d8779dc 100644 --- a/src/tools/clippy/tests/ui/op_ref.stderr +++ b/src/tools/clippy/tests/ui/op_ref.stderr @@ -8,7 +8,7 @@ LL | let foo = &5 - &6; help: use the values directly | LL | let foo = 5 - 6; - | ^ ^ + | ~ ~ error: taken reference of right operand --> $DIR/op_ref.rs:57:13 diff --git a/src/tools/clippy/tests/ui/option_if_let_else.stderr b/src/tools/clippy/tests/ui/option_if_let_else.stderr index 4ebb068d22ed5..099e49ef8e3dc 100644 --- a/src/tools/clippy/tests/ui/option_if_let_else.stderr +++ b/src/tools/clippy/tests/ui/option_if_let_else.stderr @@ -36,10 +36,10 @@ LL | | }; | help: try | -LL | let _ = num.as_mut().map_or(&mut 0, |s| { -LL | *s += 1; -LL | s -LL | }); +LL ~ let _ = num.as_mut().map_or(&mut 0, |s| { +LL + *s += 1; +LL + s +LL ~ }); | error: use Option::map_or instead of an if let/else @@ -62,10 +62,10 @@ LL | | }; | help: try | -LL | let _ = num.map_or(0, |mut s| { -LL | s += 1; -LL | s -LL | }); +LL ~ let _ = num.map_or(0, |mut s| { +LL + s += 1; +LL + s +LL ~ }); | error: use Option::map_or instead of an if let/else @@ -82,10 +82,10 @@ LL | | }; | help: try | -LL | let _ = num.as_mut().map_or(&mut 0, |s| { -LL | *s += 1; -LL | s -LL | }); +LL ~ let _ = num.as_mut().map_or(&mut 0, |s| { +LL + *s += 1; +LL + s +LL ~ }); | error: use Option::map_or instead of an if let/else @@ -101,10 +101,10 @@ LL | | } | help: try | -LL | arg.map_or(13, |x| { -LL | let y = x * x; -LL | y * y -LL | }) +LL ~ arg.map_or(13, |x| { +LL + let y = x * x; +LL + y * y +LL + }) | error: use Option::map_or_else instead of an if let/else @@ -134,12 +134,12 @@ LL | | }; | help: try | -LL | let _ = arg.map_or_else(|| { -LL | let mut y = 1; -LL | y = (y + 2 / y) / 2; -LL | y = (y + 2 / y) / 2; -LL | y -LL | }, |x| x * x * x * x); +LL ~ let _ = arg.map_or_else(|| { +LL + let mut y = 1; +LL + y = (y + 2 / y) / 2; +LL + y = (y + 2 / y) / 2; +LL + y +LL ~ }, |x| x * x * x * x); | error: use Option::map_or instead of an if let/else diff --git a/src/tools/clippy/tests/ui/option_map_or_none.stderr b/src/tools/clippy/tests/ui/option_map_or_none.stderr index 1cba29412b872..27d68b85e6f81 100644 --- a/src/tools/clippy/tests/ui/option_map_or_none.stderr +++ b/src/tools/clippy/tests/ui/option_map_or_none.stderr @@ -17,9 +17,9 @@ LL | | }); | help: try using `and_then` instead | -LL | let _ = opt.and_then(|x| { -LL | Some(x + 1) -LL | }); +LL ~ let _ = opt.and_then(|x| { +LL + Some(x + 1) +LL ~ }); | error: aborting due to 2 previous errors diff --git a/src/tools/clippy/tests/ui/print_literal.stderr b/src/tools/clippy/tests/ui/print_literal.stderr index 54a4084c89e11..a10cac04411cc 100644 --- a/src/tools/clippy/tests/ui/print_literal.stderr +++ b/src/tools/clippy/tests/ui/print_literal.stderr @@ -7,8 +7,9 @@ LL | print!("Hello {}", "world"); = note: `-D clippy::print-literal` implied by `-D warnings` help: try this | -LL | print!("Hello world"); - | ^^^^^-- +LL - print!("Hello {}", "world"); +LL + print!("Hello world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:26:36 @@ -18,8 +19,9 @@ LL | println!("Hello {} {}", world, "world"); | help: try this | -LL | println!("Hello {} world", world); - | ^^^^^ -- +LL - println!("Hello {} {}", world, "world"); +LL + println!("Hello {} world", world); + | error: literal with an empty format string --> $DIR/print_literal.rs:27:26 @@ -29,8 +31,9 @@ LL | println!("Hello {}", "world"); | help: try this | -LL | println!("Hello world"); - | ^^^^^-- +LL - println!("Hello {}", "world"); +LL + println!("Hello world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:32:25 @@ -40,8 +43,9 @@ LL | println!("{0} {1}", "hello", "world"); | help: try this | -LL | println!("hello {1}", "world"); - | ^^^^^ -- +LL - println!("{0} {1}", "hello", "world"); +LL + println!("hello {1}", "world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:32:34 @@ -51,8 +55,9 @@ LL | println!("{0} {1}", "hello", "world"); | help: try this | -LL | println!("{0} world", "hello"); - | ^^^^^ -- +LL - println!("{0} {1}", "hello", "world"); +LL + println!("{0} world", "hello"); + | error: literal with an empty format string --> $DIR/print_literal.rs:33:25 @@ -62,8 +67,9 @@ LL | println!("{1} {0}", "hello", "world"); | help: try this | -LL | println!("{1} hello", "world"); - | ^^^^^-- +LL - println!("{1} {0}", "hello", "world"); +LL + println!("{1} hello", "world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:33:34 @@ -73,8 +79,9 @@ LL | println!("{1} {0}", "hello", "world"); | help: try this | -LL | println!("world {0}", "hello"); - | ^^^^^ -- +LL - println!("{1} {0}", "hello", "world"); +LL + println!("world {0}", "hello"); + | error: literal with an empty format string --> $DIR/print_literal.rs:36:29 @@ -84,8 +91,9 @@ LL | println!("{foo} {bar}", foo = "hello", bar = "world"); | help: try this | -LL | println!("hello {bar}", bar = "world"); - | ^^^^^ -- +LL - println!("{foo} {bar}", foo = "hello", bar = "world"); +LL + println!("hello {bar}", bar = "world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:36:44 @@ -95,8 +103,9 @@ LL | println!("{foo} {bar}", foo = "hello", bar = "world"); | help: try this | -LL | println!("{foo} world", foo = "hello"); - | ^^^^^ -- +LL - println!("{foo} {bar}", foo = "hello", bar = "world"); +LL + println!("{foo} world", foo = "hello"); + | error: literal with an empty format string --> $DIR/print_literal.rs:37:29 @@ -106,8 +115,9 @@ LL | println!("{bar} {foo}", foo = "hello", bar = "world"); | help: try this | -LL | println!("{bar} hello", bar = "world"); - | ^^^^^-- +LL - println!("{bar} {foo}", foo = "hello", bar = "world"); +LL + println!("{bar} hello", bar = "world"); + | error: literal with an empty format string --> $DIR/print_literal.rs:37:44 @@ -117,8 +127,9 @@ LL | println!("{bar} {foo}", foo = "hello", bar = "world"); | help: try this | -LL | println!("world {foo}", foo = "hello"); - | ^^^^^ -- +LL - println!("{bar} {foo}", foo = "hello", bar = "world"); +LL + println!("world {foo}", foo = "hello"); + | error: aborting due to 11 previous errors diff --git a/src/tools/clippy/tests/ui/print_with_newline.stderr b/src/tools/clippy/tests/ui/print_with_newline.stderr index 54b3ad75b31e8..d409bee30ece3 100644 --- a/src/tools/clippy/tests/ui/print_with_newline.stderr +++ b/src/tools/clippy/tests/ui/print_with_newline.stderr @@ -7,8 +7,9 @@ LL | print!("Hello/n"); = note: `-D clippy::print-with-newline` implied by `-D warnings` help: use `println!` instead | -LL | println!("Hello"); - | ^^^^^^^ -- +LL - print!("Hello/n"); +LL + println!("Hello"); + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:9:5 @@ -18,8 +19,9 @@ LL | print!("Hello {}/n", "world"); | help: use `println!` instead | -LL | println!("Hello {}", "world"); - | ^^^^^^^ -- +LL - print!("Hello {}/n", "world"); +LL + println!("Hello {}", "world"); + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:10:5 @@ -29,8 +31,9 @@ LL | print!("Hello {} {}/n", "world", "#2"); | help: use `println!` instead | -LL | println!("Hello {} {}", "world", "#2"); - | ^^^^^^^ -- +LL - print!("Hello {} {}/n", "world", "#2"); +LL + println!("Hello {} {}", "world", "#2"); + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:11:5 @@ -40,8 +43,9 @@ LL | print!("{}/n", 1265); | help: use `println!` instead | -LL | println!("{}", 1265); - | ^^^^^^^ -- +LL - print!("{}/n", 1265); +LL + println!("{}", 1265); + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:12:5 @@ -51,8 +55,9 @@ LL | print!("/n"); | help: use `println!` instead | -LL | println!(); - | ^^^^^^^ -- +LL - print!("/n"); +LL + println!(); + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:31:5 @@ -62,8 +67,9 @@ LL | print!("//n"); // should fail | help: use `println!` instead | -LL | println!("/"); // should fail - | ^^^^^^^ -- +LL - print!("//n"); // should fail +LL + println!("/"); // should fail + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:38:5 @@ -76,8 +82,8 @@ LL | | ); | help: use `println!` instead | -LL | println!( -LL | "" +LL ~ println!( +LL ~ "" | error: using `print!()` with a format string that ends in a single newline @@ -91,8 +97,8 @@ LL | | ); | help: use `println!` instead | -LL | println!( -LL | r"" +LL ~ println!( +LL ~ r"" | error: using `print!()` with a format string that ends in a single newline @@ -103,8 +109,9 @@ LL | print!("/r/n"); //~ ERROR | help: use `println!` instead | -LL | println!("/r"); //~ ERROR - | ^^^^^^^ -- +LL - print!("/r/n"); //~ ERROR +LL + println!("/r"); //~ ERROR + | error: using `print!()` with a format string that ends in a single newline --> $DIR/print_with_newline.rs:51:5 @@ -114,8 +121,9 @@ LL | print!("foo/rbar/n") // ~ ERROR | help: use `println!` instead | -LL | println!("foo/rbar") // ~ ERROR - | ^^^^^^^ -- +LL - print!("foo/rbar/n") // ~ ERROR +LL + println!("foo/rbar") // ~ ERROR + | error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/ptr_arg.stderr b/src/tools/clippy/tests/ui/ptr_arg.stderr index d302b16d4b72a..64594eb870c2c 100644 --- a/src/tools/clippy/tests/ui/ptr_arg.stderr +++ b/src/tools/clippy/tests/ui/ptr_arg.stderr @@ -33,11 +33,11 @@ LL | fn cloned(x: &Vec) -> Vec { help: change this to | LL | fn cloned(x: &[u8]) -> Vec { - | ^^^^^ + | ~~~~~ help: change `x.clone()` to | LL | let e = x.to_owned(); - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ help: change `x.clone()` to | LL | x.to_owned() @@ -52,15 +52,15 @@ LL | fn str_cloned(x: &String) -> String { help: change this to | LL | fn str_cloned(x: &str) -> String { - | ^^^^ + | ~~~~ help: change `x.clone()` to | LL | let a = x.to_string(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: change `x.clone()` to | LL | let b = x.to_string(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: change `x.clone()` to | LL | x.to_string() @@ -75,15 +75,15 @@ LL | fn path_cloned(x: &PathBuf) -> PathBuf { help: change this to | LL | fn path_cloned(x: &Path) -> PathBuf { - | ^^^^^ + | ~~~~~ help: change `x.clone()` to | LL | let a = x.to_path_buf(); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: change `x.clone()` to | LL | let b = x.to_path_buf(); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: change `x.clone()` to | LL | x.to_path_buf() @@ -98,15 +98,15 @@ LL | fn false_positive_capacity(x: &Vec, y: &String) { help: change this to | LL | fn false_positive_capacity(x: &Vec, y: &str) { - | ^^^^ + | ~~~~ help: change `y.clone()` to | LL | let b = y.to_string(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: change `y.as_str()` to | LL | let c = y; - | ^ + | ~ error: using a reference to `Cow` is not recommended --> $DIR/ptr_arg.rs:90:25 @@ -123,15 +123,15 @@ LL | fn foo_vec(vec: &Vec) { help: change this to | LL | fn foo_vec(vec: &[u8]) { - | ^^^^^ + | ~~~~~ help: change `vec.clone()` to | LL | let _ = vec.to_owned().pop(); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ help: change `vec.clone()` to | LL | let _ = vec.to_owned().clone(); - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> $DIR/ptr_arg.rs:148:23 @@ -142,15 +142,15 @@ LL | fn foo_path(path: &PathBuf) { help: change this to | LL | fn foo_path(path: &Path) { - | ^^^^^ + | ~~~~~ help: change `path.clone()` to | LL | let _ = path.to_path_buf().pop(); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ help: change `path.clone()` to | LL | let _ = path.to_path_buf().clone(); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> $DIR/ptr_arg.rs:153:21 @@ -161,15 +161,15 @@ LL | fn foo_str(str: &PathBuf) { help: change this to | LL | fn foo_str(str: &Path) { - | ^^^^^ + | ~~~~~ help: change `str.clone()` to | LL | let _ = str.to_path_buf().pop(); - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ help: change `str.clone()` to | LL | let _ = str.to_path_buf().clone(); - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: aborting due to 12 previous errors diff --git a/src/tools/clippy/tests/ui/ref_binding_to_reference.stderr b/src/tools/clippy/tests/ui/ref_binding_to_reference.stderr index 00aeff4fefa32..eb36cd516a246 100644 --- a/src/tools/clippy/tests/ui/ref_binding_to_reference.stderr +++ b/src/tools/clippy/tests/ui/ref_binding_to_reference.stderr @@ -8,7 +8,7 @@ LL | Some(ref x) => x, help: try this | LL | Some(x) => &x, - | ^ ^^ + | ~ ~~ error: this pattern creates a reference to a reference --> $DIR/ref_binding_to_reference.rs:37:14 @@ -18,10 +18,10 @@ LL | Some(ref x) => { | help: try this | -LL | Some(x) => { +LL ~ Some(x) => { LL | f1(x); -LL | f1(x); -LL | &x +LL ~ f1(x); +LL ~ &x | error: this pattern creates a reference to a reference @@ -33,7 +33,7 @@ LL | Some(ref x) => m2!(x), help: try this | LL | Some(x) => m2!(&x), - | ^ ^^ + | ~ ~~ error: this pattern creates a reference to a reference --> $DIR/ref_binding_to_reference.rs:52:15 @@ -43,8 +43,8 @@ LL | let _ = |&ref x: &&String| { | help: try this | -LL | let _ = |&x: &&String| { -LL | let _: &&String = &x; +LL ~ let _ = |&x: &&String| { +LL ~ let _: &&String = &x; | error: this pattern creates a reference to a reference @@ -55,9 +55,9 @@ LL | fn f2<'a>(&ref x: &&'a String) -> &'a String { | help: try this | -LL | fn f2<'a>(&x: &&'a String) -> &'a String { -LL | let _: &&String = &x; -LL | x +LL ~ fn f2<'a>(&x: &&'a String) -> &'a String { +LL ~ let _: &&String = &x; +LL ~ x | error: this pattern creates a reference to a reference @@ -68,8 +68,8 @@ LL | fn f(&ref x: &&String) { | help: try this | -LL | fn f(&x: &&String) { -LL | let _: &&String = &x; +LL ~ fn f(&x: &&String) { +LL ~ let _: &&String = &x; | error: this pattern creates a reference to a reference @@ -80,8 +80,8 @@ LL | fn f(&ref x: &&String) { | help: try this | -LL | fn f(&x: &&String) { -LL | let _: &&String = &x; +LL ~ fn f(&x: &&String) { +LL ~ let _: &&String = &x; | error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr b/src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr index de83c4f3d633c..2d1bfe62c9236 100644 --- a/src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr +++ b/src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr @@ -8,7 +8,7 @@ LL | (42..=21).for_each(|x| println!("{}", x)); help: consider using the following if you are attempting to iterate over this range in reverse | LL | (21..=42).rev().for_each(|x| println!("{}", x)); - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_fixable.rs:10:13 @@ -19,7 +19,7 @@ LL | let _ = (ANSWER..21).filter(|x| x % 2 == 0).take(10).collect::>( help: consider using the following if you are attempting to iterate over this range in reverse | LL | let _ = (21..ANSWER).rev().filter(|x| x % 2 == 0).take(10).collect::>(); - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_fixable.rs:12:14 @@ -30,7 +30,7 @@ LL | for _ in -21..=-42 {} help: consider using the following if you are attempting to iterate over this range in reverse | LL | for _ in (-42..=-21).rev() {} - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_fixable.rs:13:14 @@ -41,7 +41,7 @@ LL | for _ in 42u32..21u32 {} help: consider using the following if you are attempting to iterate over this range in reverse | LL | for _ in (21u32..42u32).rev() {} - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error: aborting due to 4 previous errors diff --git a/src/tools/clippy/tests/ui/reversed_empty_ranges_loops_fixable.stderr b/src/tools/clippy/tests/ui/reversed_empty_ranges_loops_fixable.stderr index e89e040a0ff9e..a135da488ffd3 100644 --- a/src/tools/clippy/tests/ui/reversed_empty_ranges_loops_fixable.stderr +++ b/src/tools/clippy/tests/ui/reversed_empty_ranges_loops_fixable.stderr @@ -8,7 +8,7 @@ LL | for i in 10..0 { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in (0..10).rev() { - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_loops_fixable.rs:11:14 @@ -19,7 +19,7 @@ LL | for i in 10..=0 { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in (0..=10).rev() { - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_loops_fixable.rs:15:14 @@ -30,7 +30,7 @@ LL | for i in MAX_LEN..0 { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in (0..MAX_LEN).rev() { - | ^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_loops_fixable.rs:34:14 @@ -41,7 +41,7 @@ LL | for i in (10..0).map(|x| x * 2) { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in (0..10).rev().map(|x| x * 2) { - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_loops_fixable.rs:39:14 @@ -52,7 +52,7 @@ LL | for i in 10..5 + 4 { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in (5 + 4..10).rev() { - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: this range is empty so it will yield no values --> $DIR/reversed_empty_ranges_loops_fixable.rs:43:14 @@ -63,7 +63,7 @@ LL | for i in (5 + 2)..(3 - 1) { help: consider using the following if you are attempting to iterate over this range in reverse | LL | for i in ((3 - 1)..(5 + 2)).rev() { - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/tools/clippy/tests/ui/single_element_loop.stderr b/src/tools/clippy/tests/ui/single_element_loop.stderr index 0e35a33ded5ba..f52ca8c5a9b0c 100644 --- a/src/tools/clippy/tests/ui/single_element_loop.stderr +++ b/src/tools/clippy/tests/ui/single_element_loop.stderr @@ -9,10 +9,10 @@ LL | | } = note: `-D clippy::single-element-loop` implied by `-D warnings` help: try | -LL | { -LL | let item = &item1; -LL | println!("{}", item); -LL | } +LL ~ { +LL + let item = &item1; +LL + println!("{}", item); +LL + } | error: for loop over a single element @@ -25,10 +25,10 @@ LL | | } | help: try | -LL | { -LL | let item = &item1; -LL | println!("{:?}", item); -LL | } +LL ~ { +LL + let item = &item1; +LL + println!("{:?}", item); +LL + } | error: aborting due to 2 previous errors diff --git a/src/tools/clippy/tests/ui/single_match.stderr b/src/tools/clippy/tests/ui/single_match.stderr index 9ef2a8668a6fa..c261b5111c8bf 100644 --- a/src/tools/clippy/tests/ui/single_match.stderr +++ b/src/tools/clippy/tests/ui/single_match.stderr @@ -12,9 +12,9 @@ LL | | }; = note: `-D clippy::single-match` implied by `-D warnings` help: try this | -LL | if let Some(y) = x { -LL | println!("{:?}", y); -LL | }; +LL ~ if let Some(y) = x { +LL + println!("{:?}", y); +LL ~ }; | error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` diff --git a/src/tools/clippy/tests/ui/single_match_else.stderr b/src/tools/clippy/tests/ui/single_match_else.stderr index 20be4fa226cf1..c61d80a905c9f 100644 --- a/src/tools/clippy/tests/ui/single_match_else.stderr +++ b/src/tools/clippy/tests/ui/single_match_else.stderr @@ -13,10 +13,10 @@ LL | | } = note: `-D clippy::single-match-else` implied by `-D warnings` help: try this | -LL | if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { -LL | let x = 5; -LL | None -LL | } +LL ~ if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { +LL + let x = 5; +LL + None +LL + } | error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` @@ -33,10 +33,10 @@ LL | | } | help: try this | -LL | if let Some(a) = Some(1) { println!("${:?}", a) } else { -LL | println!("else block"); -LL | return -LL | } +LL ~ if let Some(a) = Some(1) { println!("${:?}", a) } else { +LL + println!("else block"); +LL + return +LL + } | error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` @@ -53,10 +53,10 @@ LL | | } | help: try this | -LL | if let Some(a) = Some(1) { println!("${:?}", a) } else { -LL | println!("else block"); -LL | return; -LL | } +LL ~ if let Some(a) = Some(1) { println!("${:?}", a) } else { +LL + println!("else block"); +LL + return; +LL + } | error: aborting due to 3 previous errors diff --git a/src/tools/clippy/tests/ui/strlen_on_c_strings.stderr b/src/tools/clippy/tests/ui/strlen_on_c_strings.stderr index a212bd327c35d..e0ca511557c5b 100644 --- a/src/tools/clippy/tests/ui/strlen_on_c_strings.stderr +++ b/src/tools/clippy/tests/ui/strlen_on_c_strings.stderr @@ -8,7 +8,7 @@ LL | let len = unsafe { libc::strlen(cstring.as_ptr()) }; help: try this (you might also need to get rid of `unsafe` block in some cases): | LL | let len = unsafe { cstring.as_bytes().len() }; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: using `libc::strlen` on a `CString` or `CStr` value --> $DIR/strlen_on_c_strings.rs:15:24 @@ -19,7 +19,7 @@ LL | let len = unsafe { libc::strlen(cstr.as_ptr()) }; help: try this (you might also need to get rid of `unsafe` block in some cases): | LL | let len = unsafe { cstr.to_bytes().len() }; - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/tools/clippy/tests/ui/unit_arg.stderr b/src/tools/clippy/tests/ui/unit_arg.stderr index 8155c4ae1107b..5cfb367a7be80 100644 --- a/src/tools/clippy/tests/ui/unit_arg.stderr +++ b/src/tools/clippy/tests/ui/unit_arg.stderr @@ -13,10 +13,10 @@ LL | 1 | help: or move the expression in front of the call and replace it with the unit literal `()` | -LL | { -LL | 1; -LL | }; -LL | foo(()); +LL ~ { +LL + 1; +LL + }; +LL ~ foo(()); | error: passing a unit value to a function @@ -27,8 +27,8 @@ LL | foo(foo(1)); | help: move the expression in front of the call and replace it with the unit literal `()` | -LL | foo(1); -LL | foo(()); +LL ~ foo(1); +LL ~ foo(()); | error: passing a unit value to a function @@ -46,11 +46,11 @@ LL | foo(2) | help: or move the expression in front of the call and replace it with the unit literal `()` | -LL | { -LL | foo(1); -LL | foo(2); -LL | }; -LL | foo(()); +LL ~ { +LL + foo(1); +LL + foo(2); +LL + }; +LL ~ foo(()); | error: passing a unit value to a function @@ -67,10 +67,10 @@ LL | 1 | help: or move the expression in front of the call and replace it with the unit literal `()` | -LL | { -LL | 1; -LL | }; -LL | b.bar(()); +LL ~ { +LL + 1; +LL + }; +LL ~ b.bar(()); | error: passing unit values to a function @@ -81,9 +81,9 @@ LL | taking_multiple_units(foo(0), foo(1)); | help: move the expressions in front of the call and replace them with the unit literal `()` | -LL | foo(0); -LL | foo(1); -LL | taking_multiple_units((), ()); +LL ~ foo(0); +LL + foo(1); +LL ~ taking_multiple_units((), ()); | error: passing unit values to a function @@ -101,12 +101,12 @@ LL | foo(2) | help: or move the expressions in front of the call and replace them with the unit literal `()` | -LL | foo(0); -LL | { -LL | foo(1); -LL | foo(2); -LL | }; -LL | taking_multiple_units((), ()); +LL ~ foo(0); +LL + { +LL + foo(1); +LL + foo(2); +LL + }; +LL ~ taking_multiple_units((), ()); | error: passing unit values to a function @@ -131,12 +131,12 @@ LL | foo(3) | help: or move the expressions in front of the call and replace them with the unit literal `()` | -LL | { -LL | foo(0); -LL | foo(1); -LL | }; -LL | { -LL | foo(2); +LL ~ { +LL + foo(0); +LL + foo(1); +LL + }; +LL + { +LL + foo(2); ... error: passing a unit value to a function @@ -147,10 +147,10 @@ LL | None.or(Some(foo(2))); | help: move the expression in front of the call and replace it with the unit literal `()` | -LL | None.or({ -LL | foo(2); -LL | Some(()) -LL | }); +LL ~ None.or({ +LL + foo(2); +LL + Some(()) +LL ~ }); | error: passing a unit value to a function @@ -161,8 +161,8 @@ LL | foo(foo(())); | help: move the expression in front of the call and replace it with the unit literal `()` | -LL | foo(()); -LL | foo(()); +LL ~ foo(()); +LL ~ foo(()); | error: passing a unit value to a function @@ -173,8 +173,8 @@ LL | Some(foo(1)) | help: move the expression in front of the call and replace it with the unit literal `()` | -LL | foo(1); -LL | Some(()) +LL ~ foo(1); +LL + Some(()) | error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr b/src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr index 456b12a2c6b16..39072c9a8cc0f 100644 --- a/src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr +++ b/src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr @@ -24,8 +24,8 @@ LL | taking_two_units({}, foo(0)); | help: move the expression in front of the call and replace it with the unit literal `()` | -LL | foo(0); -LL | taking_two_units((), ()); +LL ~ foo(0); +LL ~ taking_two_units((), ()); | error: passing unit values to a function @@ -36,9 +36,9 @@ LL | taking_three_units({}, foo(0), foo(1)); | help: move the expressions in front of the call and replace them with the unit literal `()` | -LL | foo(0); -LL | foo(1); -LL | taking_three_units((), (), ()); +LL ~ foo(0); +LL + foo(1); +LL ~ taking_three_units((), (), ()); | error: aborting due to 4 previous errors diff --git a/src/tools/clippy/tests/ui/unnecessary_clone.stderr b/src/tools/clippy/tests/ui/unnecessary_clone.stderr index 9df1ae5686730..94cc7777acacd 100644 --- a/src/tools/clippy/tests/ui/unnecessary_clone.stderr +++ b/src/tools/clippy/tests/ui/unnecessary_clone.stderr @@ -54,11 +54,11 @@ LL | let z: &Vec<_> = y.clone(); help: try dereferencing it | LL | let z: &Vec<_> = &(*y).clone(); - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ help: or try being explicit if you are sure, that you want to clone a reference | LL | let z: &Vec<_> = <&std::vec::Vec>::clone(y); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: using `clone` on type `many_derefs::E` which implements the `Copy` trait --> $DIR/unnecessary_clone.rs:84:20 @@ -75,11 +75,11 @@ LL | let _ = &mut encoded.clone(); help: try dereferencing it | LL | let _ = &mut &(*encoded).clone(); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ help: or try being explicit if you are sure, that you want to clone a reference | LL | let _ = &mut <&[u8]>::clone(encoded); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: using `clone` on a double-reference; this will copy the reference of type `&[u8]` instead of cloning the inner type --> $DIR/unnecessary_clone.rs:90:18 @@ -90,11 +90,11 @@ LL | let _ = &encoded.clone(); help: try dereferencing it | LL | let _ = &&(*encoded).clone(); - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ help: or try being explicit if you are sure, that you want to clone a reference | LL | let _ = &<&[u8]>::clone(encoded); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: using `.clone()` on a ref-counted pointer --> $DIR/unnecessary_clone.rs:108:14 diff --git a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr index 0e570397e2a29..8e31db3950247 100644 --- a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr +++ b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr @@ -14,14 +14,14 @@ LL | | } help: remove `Option` from the return type... | LL | fn func1(a: bool, b: bool) -> i32 { - | ^^^ + | ~~~ help: ...and then change returning expressions | -LL | return 42; +LL ~ return 42; LL | } LL | if a { LL | Some(-1); -LL | 2 +LL ~ 2 LL | } else { ... @@ -39,12 +39,12 @@ LL | | } help: remove `Option` from the return type... | LL | fn func2(a: bool, b: bool) -> i32 { - | ^^^ + | ~~~ help: ...and then change returning expressions | -LL | return 10; +LL ~ return 10; LL | } -LL | if a { 20 } else { 30 } +LL ~ if a { 20 } else { 30 } | error: this function's return value is unnecessarily wrapped by `Option` @@ -58,7 +58,7 @@ LL | | } help: remove `Option` from the return type... | LL | fn func5() -> i32 { - | ^^^ + | ~~~ help: ...and then change returning expressions | LL | 1 @@ -75,7 +75,7 @@ LL | | } help: remove `Result` from the return type... | LL | fn func7() -> i32 { - | ^^^ + | ~~~ help: ...and then change returning expressions | LL | 1 @@ -92,7 +92,7 @@ LL | | } help: remove `Option` from the return type... | LL | fn func12() -> i32 { - | ^^^ + | ~~~ help: ...and then change returning expressions | LL | 1 @@ -113,14 +113,14 @@ LL | | } help: remove the return type... | LL | fn issue_6640_1(a: bool, b: bool) -> Option<()> { - | ^^^^^^^^^^ + | ~~~~~~~~~~ help: ...and then remove returned values | -LL | return ; +LL ~ return ; LL | } LL | if a { LL | Some(()); -LL | +LL ~ LL | } else { ... @@ -139,15 +139,15 @@ LL | | } help: remove the return type... | LL | fn issue_6640_2(a: bool, b: bool) -> Result<(), i32> { - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ help: ...and then remove returned values | -LL | return ; +LL ~ return ; LL | } LL | if a { -LL | +LL ~ LL | } else { -LL | return ; +LL ~ return ; | error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/unnested_or_patterns.stderr b/src/tools/clippy/tests/ui/unnested_or_patterns.stderr index f7cb513c15c90..de424c3fdb8f2 100644 --- a/src/tools/clippy/tests/ui/unnested_or_patterns.stderr +++ b/src/tools/clippy/tests/ui/unnested_or_patterns.stderr @@ -8,7 +8,7 @@ LL | if let box 0 | box 2 = Box::new(0) {} help: nest the patterns | LL | if let box (0 | 2) = Box::new(0) {} - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:10:12 @@ -19,7 +19,7 @@ LL | if let box ((0 | 1)) | box (2 | 3) | box 4 = Box::new(0) {} help: nest the patterns | LL | if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {} - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:12:12 @@ -30,7 +30,7 @@ LL | if let &0 | C0 | &2 = &0 {} help: nest the patterns | LL | if let &(0 | 2) | C0 = &0 {} - | ^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:13:12 @@ -41,7 +41,7 @@ LL | if let &mut 0 | &mut 2 = &mut 0 {} help: nest the patterns | LL | if let &mut (0 | 2) = &mut 0 {} - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:14:12 @@ -52,7 +52,7 @@ LL | if let x @ 0 | x @ 2 = 0 {} help: nest the patterns | LL | if let x @ (0 | 2) = 0 {} - | ^^^^^^^^^^^ + | ~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:15:12 @@ -63,7 +63,7 @@ LL | if let (0, 1) | (0, 2) | (0, 3) = (0, 0) {} help: nest the patterns | LL | if let (0, 1 | 2 | 3) = (0, 0) {} - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:16:12 @@ -74,7 +74,7 @@ LL | if let (1, 0) | (2, 0) | (3, 0) = (0, 0) {} help: nest the patterns | LL | if let (1 | 2 | 3, 0) = (0, 0) {} - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:17:12 @@ -85,7 +85,7 @@ LL | if let (x, ..) | (x, 1) | (x, 2) = (0, 1) {} help: nest the patterns | LL | if let (x, ..) | (x, 1 | 2) = (0, 1) {} - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:18:12 @@ -96,7 +96,7 @@ LL | if let [0] | [1] = [0] {} help: nest the patterns | LL | if let [0 | 1] = [0] {} - | ^^^^^^^ + | ~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:19:12 @@ -107,7 +107,7 @@ LL | if let [x, 0] | [x, 1] = [0, 1] {} help: nest the patterns | LL | if let [x, 0 | 1] = [0, 1] {} - | ^^^^^^^^^^ + | ~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:20:12 @@ -118,7 +118,7 @@ LL | if let [x, 0] | [x, 1] | [x, 2] = [0, 1] {} help: nest the patterns | LL | if let [x, 0 | 1 | 2] = [0, 1] {} - | ^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:21:12 @@ -129,7 +129,7 @@ LL | if let [x, ..] | [x, 1] | [x, 2] = [0, 1] {} help: nest the patterns | LL | if let [x, ..] | [x, 1 | 2] = [0, 1] {} - | ^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:23:12 @@ -140,7 +140,7 @@ LL | if let TS(0, x) | TS(1, x) = TS(0, 0) {} help: nest the patterns | LL | if let TS(0 | 1, x) = TS(0, 0) {} - | ^^^^^^^^^^^^ + | ~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:24:12 @@ -151,7 +151,7 @@ LL | if let TS(1, 0) | TS(2, 0) | TS(3, 0) = TS(0, 0) {} help: nest the patterns | LL | if let TS(1 | 2 | 3, 0) = TS(0, 0) {} - | ^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:25:12 @@ -162,7 +162,7 @@ LL | if let TS(x, ..) | TS(x, 1) | TS(x, 2) = TS(0, 0) {} help: nest the patterns | LL | if let TS(x, ..) | TS(x, 1 | 2) = TS(0, 0) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns.rs:30:12 @@ -173,7 +173,7 @@ LL | if let S { x: 0, y } | S { y, x: 1 } = (S { x: 0, y: 1 }) {} help: nest the patterns | LL | if let S { x: 0 | 1, y } = (S { x: 0, y: 1 }) {} - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: aborting due to 16 previous errors diff --git a/src/tools/clippy/tests/ui/unnested_or_patterns2.stderr b/src/tools/clippy/tests/ui/unnested_or_patterns2.stderr index 9042c9c00b1ac..41e8d3fc70924 100644 --- a/src/tools/clippy/tests/ui/unnested_or_patterns2.stderr +++ b/src/tools/clippy/tests/ui/unnested_or_patterns2.stderr @@ -8,7 +8,7 @@ LL | if let Some(Some(0)) | Some(Some(1)) = None {} help: nest the patterns | LL | if let Some(Some(0 | 1)) = None {} - | ^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:10:12 @@ -19,7 +19,7 @@ LL | if let Some(Some(0)) | Some(Some(1) | Some(2)) = None {} help: nest the patterns | LL | if let Some(Some(0 | 1 | 2)) = None {} - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:11:12 @@ -30,7 +30,7 @@ LL | if let Some(Some(0 | 1) | Some(2)) | Some(Some(3) | Some(4)) = None {} help: nest the patterns | LL | if let Some(Some(0 | 1 | 2 | 3 | 4)) = None {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:12:12 @@ -41,7 +41,7 @@ LL | if let Some(Some(0) | Some(1 | 2)) = None {} help: nest the patterns | LL | if let Some(Some(0 | 1 | 2)) = None {} - | ^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:13:12 @@ -52,7 +52,7 @@ LL | if let ((0,),) | ((1,) | (2,),) = ((0,),) {} help: nest the patterns | LL | if let ((0 | 1 | 2,),) = ((0,),) {} - | ^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:14:12 @@ -63,7 +63,7 @@ LL | if let 0 | (1 | 2) = 0 {} help: nest the patterns | LL | if let 0 | 1 | 2 = 0 {} - | ^^^^^^^^^ + | ~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:15:12 @@ -74,7 +74,7 @@ LL | if let box (0 | 1) | (box 2 | box (3 | 4)) = Box::new(0) {} help: nest the patterns | LL | if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {} - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~~~~~ error: unnested or-patterns --> $DIR/unnested_or_patterns2.rs:16:12 @@ -85,7 +85,7 @@ LL | if let box box 0 | box (box 2 | box 4) = Box::new(Box::new(0)) {} help: nest the patterns | LL | if let box box (0 | 2 | 4) = Box::new(Box::new(0)) {} - | ^^^^^^^^^^^^^^^^^^^ + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors diff --git a/src/tools/clippy/tests/ui/write_literal.stderr b/src/tools/clippy/tests/ui/write_literal.stderr index 507a78e828050..e0297c0023156 100644 --- a/src/tools/clippy/tests/ui/write_literal.stderr +++ b/src/tools/clippy/tests/ui/write_literal.stderr @@ -7,8 +7,9 @@ LL | write!(&mut v, "Hello {}", "world"); = note: `-D clippy::write-literal` implied by `-D warnings` help: try this | -LL | write!(&mut v, "Hello world"); - | ^^^^^-- +LL - write!(&mut v, "Hello {}", "world"); +LL + write!(&mut v, "Hello world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:31:44 @@ -18,8 +19,9 @@ LL | writeln!(&mut v, "Hello {} {}", world, "world"); | help: try this | -LL | writeln!(&mut v, "Hello {} world", world); - | ^^^^^ -- +LL - writeln!(&mut v, "Hello {} {}", world, "world"); +LL + writeln!(&mut v, "Hello {} world", world); + | error: literal with an empty format string --> $DIR/write_literal.rs:32:34 @@ -29,8 +31,9 @@ LL | writeln!(&mut v, "Hello {}", "world"); | help: try this | -LL | writeln!(&mut v, "Hello world"); - | ^^^^^-- +LL - writeln!(&mut v, "Hello {}", "world"); +LL + writeln!(&mut v, "Hello world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:37:33 @@ -40,8 +43,9 @@ LL | writeln!(&mut v, "{0} {1}", "hello", "world"); | help: try this | -LL | writeln!(&mut v, "hello {1}", "world"); - | ^^^^^ -- +LL - writeln!(&mut v, "{0} {1}", "hello", "world"); +LL + writeln!(&mut v, "hello {1}", "world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:37:42 @@ -51,8 +55,9 @@ LL | writeln!(&mut v, "{0} {1}", "hello", "world"); | help: try this | -LL | writeln!(&mut v, "{0} world", "hello"); - | ^^^^^ -- +LL - writeln!(&mut v, "{0} {1}", "hello", "world"); +LL + writeln!(&mut v, "{0} world", "hello"); + | error: literal with an empty format string --> $DIR/write_literal.rs:38:33 @@ -62,8 +67,9 @@ LL | writeln!(&mut v, "{1} {0}", "hello", "world"); | help: try this | -LL | writeln!(&mut v, "{1} hello", "world"); - | ^^^^^-- +LL - writeln!(&mut v, "{1} {0}", "hello", "world"); +LL + writeln!(&mut v, "{1} hello", "world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:38:42 @@ -73,8 +79,9 @@ LL | writeln!(&mut v, "{1} {0}", "hello", "world"); | help: try this | -LL | writeln!(&mut v, "world {0}", "hello"); - | ^^^^^ -- +LL - writeln!(&mut v, "{1} {0}", "hello", "world"); +LL + writeln!(&mut v, "world {0}", "hello"); + | error: literal with an empty format string --> $DIR/write_literal.rs:41:37 @@ -84,8 +91,9 @@ LL | writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world"); | help: try this | -LL | writeln!(&mut v, "hello {bar}", bar = "world"); - | ^^^^^ -- +LL - writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world"); +LL + writeln!(&mut v, "hello {bar}", bar = "world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:41:52 @@ -95,8 +103,9 @@ LL | writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world"); | help: try this | -LL | writeln!(&mut v, "{foo} world", foo = "hello"); - | ^^^^^ -- +LL - writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world"); +LL + writeln!(&mut v, "{foo} world", foo = "hello"); + | error: literal with an empty format string --> $DIR/write_literal.rs:42:37 @@ -106,8 +115,9 @@ LL | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world"); | help: try this | -LL | writeln!(&mut v, "{bar} hello", bar = "world"); - | ^^^^^-- +LL - writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world"); +LL + writeln!(&mut v, "{bar} hello", bar = "world"); + | error: literal with an empty format string --> $DIR/write_literal.rs:42:52 @@ -117,8 +127,9 @@ LL | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world"); | help: try this | -LL | writeln!(&mut v, "world {foo}", foo = "hello"); - | ^^^^^ -- +LL - writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world"); +LL + writeln!(&mut v, "world {foo}", foo = "hello"); + | error: aborting due to 11 previous errors diff --git a/src/tools/clippy/tests/ui/write_literal_2.stderr b/src/tools/clippy/tests/ui/write_literal_2.stderr index 0aa1b55e58c56..73c6b88581329 100644 --- a/src/tools/clippy/tests/ui/write_literal_2.stderr +++ b/src/tools/clippy/tests/ui/write_literal_2.stderr @@ -7,8 +7,9 @@ LL | writeln!(&mut v, "{}", "{hello}"); = note: `-D clippy::write-literal` implied by `-D warnings` help: try this | -LL | writeln!(&mut v, "{{hello}}"); - | ^^^^^^^^^-- +LL - writeln!(&mut v, "{}", "{hello}"); +LL + writeln!(&mut v, "{{hello}}"); + | error: literal with an empty format string --> $DIR/write_literal_2.rs:10:29 @@ -18,8 +19,9 @@ LL | writeln!(&mut v, r"{}", r"{hello}"); | help: try this | -LL | writeln!(&mut v, r"{{hello}}"); - | ^^^^^^^^^-- +LL - writeln!(&mut v, r"{}", r"{hello}"); +LL + writeln!(&mut v, r"{{hello}}"); + | error: literal with an empty format string --> $DIR/write_literal_2.rs:11:28 @@ -29,8 +31,9 @@ LL | writeln!(&mut v, "{}", '/''); | help: try this | -LL | writeln!(&mut v, "'"); - | ^-- +LL - writeln!(&mut v, "{}", '/''); +LL + writeln!(&mut v, "'"); + | error: literal with an empty format string --> $DIR/write_literal_2.rs:12:28 @@ -40,8 +43,9 @@ LL | writeln!(&mut v, "{}", '"'); | help: try this | -LL | writeln!(&mut v, "/""); - | ^^-- +LL - writeln!(&mut v, "{}", '"'); +LL + writeln!(&mut v, "/""); + | error: literal with an empty format string --> $DIR/write_literal_2.rs:14:29 @@ -51,8 +55,9 @@ LL | writeln!(&mut v, r"{}", '/''); | help: try this | -LL | writeln!(&mut v, r"'"); - | ^-- +LL - writeln!(&mut v, r"{}", '/''); +LL + writeln!(&mut v, r"'"); + | error: literal with an empty format string --> $DIR/write_literal_2.rs:18:9 @@ -63,8 +68,8 @@ LL | | world!" | help: try this | -LL | "some hello / -LL | world!" +LL ~ "some hello / +LL ~ world!" | error: literal with an empty format string @@ -75,8 +80,8 @@ LL | "1", "2", "3", | help: try this | -LL | "some 1/ -LL | {} / {}", "2", "3", +LL ~ "some 1/ +LL ~ {} / {}", "2", "3", | error: literal with an empty format string @@ -87,8 +92,8 @@ LL | "1", "2", "3", | help: try this | -LL | 2 / {}", -LL | "1", "3", +LL ~ 2 / {}", +LL ~ "1", "3", | error: literal with an empty format string @@ -99,8 +104,8 @@ LL | "1", "2", "3", | help: try this | -LL | {} / 3", -LL | "1", "2", +LL ~ {} / 3", +LL ~ "1", "2", | error: aborting due to 9 previous errors diff --git a/src/tools/clippy/tests/ui/write_with_newline.stderr b/src/tools/clippy/tests/ui/write_with_newline.stderr index cecc2ea9406aa..186459e50b64c 100644 --- a/src/tools/clippy/tests/ui/write_with_newline.stderr +++ b/src/tools/clippy/tests/ui/write_with_newline.stderr @@ -7,8 +7,9 @@ LL | write!(&mut v, "Hello/n"); = note: `-D clippy::write-with-newline` implied by `-D warnings` help: use `writeln!()` instead | -LL | writeln!(&mut v, "Hello"); - | ^^^^^^^ -- +LL - write!(&mut v, "Hello/n"); +LL + writeln!(&mut v, "Hello"); + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:14:5 @@ -18,8 +19,9 @@ LL | write!(&mut v, "Hello {}/n", "world"); | help: use `writeln!()` instead | -LL | writeln!(&mut v, "Hello {}", "world"); - | ^^^^^^^ -- +LL - write!(&mut v, "Hello {}/n", "world"); +LL + writeln!(&mut v, "Hello {}", "world"); + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:15:5 @@ -29,8 +31,9 @@ LL | write!(&mut v, "Hello {} {}/n", "world", "#2"); | help: use `writeln!()` instead | -LL | writeln!(&mut v, "Hello {} {}", "world", "#2"); - | ^^^^^^^ -- +LL - write!(&mut v, "Hello {} {}/n", "world", "#2"); +LL + writeln!(&mut v, "Hello {} {}", "world", "#2"); + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:16:5 @@ -40,8 +43,9 @@ LL | write!(&mut v, "{}/n", 1265); | help: use `writeln!()` instead | -LL | writeln!(&mut v, "{}", 1265); - | ^^^^^^^ -- +LL - write!(&mut v, "{}/n", 1265); +LL + writeln!(&mut v, "{}", 1265); + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:17:5 @@ -51,8 +55,9 @@ LL | write!(&mut v, "/n"); | help: use `writeln!()` instead | -LL | writeln!(&mut v); - | ^^^^^^^ -- +LL - write!(&mut v, "/n"); +LL + writeln!(&mut v); + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:36:5 @@ -62,8 +67,9 @@ LL | write!(&mut v, "//n"); // should fail | help: use `writeln!()` instead | -LL | writeln!(&mut v, "/"); // should fail - | ^^^^^^^ -- +LL - write!(&mut v, "//n"); // should fail +LL + writeln!(&mut v, "/"); // should fail + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:43:5 @@ -77,9 +83,9 @@ LL | | ); | help: use `writeln!()` instead | -LL | writeln!( +LL ~ writeln!( LL | &mut v, -LL | "" +LL ~ "" | error: using `write!()` with a format string that ends in a single newline @@ -94,9 +100,9 @@ LL | | ); | help: use `writeln!()` instead | -LL | writeln!( +LL ~ writeln!( LL | &mut v, -LL | r"" +LL ~ r"" | error: using `write!()` with a format string that ends in a single newline @@ -107,8 +113,9 @@ LL | write!(&mut v, "/r/n"); //~ ERROR | help: use `writeln!()` instead | -LL | writeln!(&mut v, "/r"); //~ ERROR - | ^^^^^^^ -- +LL - write!(&mut v, "/r/n"); //~ ERROR +LL + writeln!(&mut v, "/r"); //~ ERROR + | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:58:5 @@ -118,8 +125,9 @@ LL | write!(&mut v, "foo/rbar/n"); | help: use `writeln!()` instead | -LL | writeln!(&mut v, "foo/rbar"); - | ^^^^^^^ -- +LL - write!(&mut v, "foo/rbar/n"); +LL + writeln!(&mut v, "foo/rbar"); + | error: aborting due to 10 previous errors