diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 050f3ae5833..07c864c93a1 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 fc0924ac5f9..ec29d8016dd 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 3fe02bd0cee..64353461e90 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 991dc6eec1d..aa39d26feed 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 ec1bb786fe5..009bedec5ed 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 897445f200c..b33aba44622 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 e87c26e9cc5..7974796e47b 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 8d1519516ee..12122f5fa86 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 87d107b9c57..e1ff3740bf6 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 3ab35d2df07..f45a3ca615b 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 c2de5607ed6..c43cda3eb7e 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 4dc1ce20900..6ef3b7eab3b 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 82eac9bd68b..5b1846a49d1 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 16a5ac47cd2..b65b622c1ed 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 b53640cd65b..55905e5ca6a 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 fc94ef2ff88..d4c12b8e061 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 bf18eee4e07..703d790e92c 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 46d472cdf80..f3bd48f8c37 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 74e858ca861..0cacd787247 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 42be09de03f..6bde9d1a50d 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 6de8459954c..474b3c5c717 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 cd7c0dc4a44..e6e95336bb5 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 41e2d8ec314..edcd2bf85ad 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 53a45cf4e4f..e9ace7d2574 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 dffa4780a09..5992b0d6bf1 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 25e80159b0b..f2195ca694b 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 1df12787353..8fecfdf7b93 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 b8f20d00ff8..cfc75652a61 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 19500f58aa6..75f0354b81a 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 0e978f20a66..a432805ced8 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 1ec3c05983a..10b2ab5e974 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 60db7749082..8f94b24e7b6 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 0881258aca1..77b638b703b 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 cadc3e9eab1..62a61972351 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 b6ee1ed733c..7bbf060fdb6 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 c2af5483003..bec9b1500c9 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 6c68cc7bc61..e8e07997c72 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 93d2f8e7911..c75e732b7ca 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 af4e6f0a5c1..7023516e37f 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 bcdb50aa312..3449272238c 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 fa5cf9196ed..3b86c534d58 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 6e02b42e514..22bc0281d34 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 49fad4e1b1c..149279e417c 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 89e05b61fc9..283ecea735d 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 bc414044f78..1f14b5bb787 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 9dda99109fa..d2193cc4a48 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 b6122bd54d1..2bb8398c93e 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 0e653a7d3b2..c5e0cbc8a4a 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 927a2de9965..84012e651df 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 16ae07687e2..59637367604 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 0725acfe537..780ef118d1c 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 63164480a03..340d4e2418e 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 0afc3802933..529b0f76c50 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 d0c91c4ab44..44d60c1d80d 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 1bcaaf0d6b3..10691aad04e 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 05d543a7e48..56020d1b2f5 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 d44d51b8fd1..e90cd644457 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 4dc5cafb986..76bbad26c80 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 9fb2d5bc6cb..60b5bfa53d7 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 5f39cf6dde1..20109d4d116 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 50dfeffde7c..778423578e1 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 51e8f61085b..ad0a3592241 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 1139175f8a0..e71bcf58228 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 ca42263dfed..24fd3845b4e 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 51fc34c4818..ff46bcb8983 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 22ebd86d85c..29aa8372f87 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 0714e666d38..c47ec5dddb6 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 890f66c58d0..08868a04657 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 01a07ad3b0e..422107867f7 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 02b0488488c..1651f70d5cd 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 ac0a51d6ae9..c734f8c1e17 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 fa47de9a2cf..7721f8827db 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 d897bf56e10..68b3f4c1ae2 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 f17d7843cd7..12b583ea3e9 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 ef3e2da81b2..7081b5106ff 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 4fcd0ee2c48..4acb955a8e7 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 161e4610d61..acf6b37b773 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 b07db6e12ad..814042539a2 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 a345c1238f0..a865812cb4a 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 bc1721944fb..d46ef126da4 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 b4b3bc1ba2b..36f8f5c9ad7 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 dd3090b30f0..b20cc6d8cf5 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 0d506a0956d..4bd06673043 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 9373e4d95fc..c6931ba7257 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 17bc5492756..2bf34b32176 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 21ba92f1fc4..6b84c0032cd 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 fa1b741394a..8b05b238822 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 14e28174a29..ebad4b02356 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 7ff986ec381..d0df241f747 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 64946c316cd..8233e781d69 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 ad80b3fa8d1..78121ad18ed 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 b399f729f65..793068138a9 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 4626a4bc2dc..bb15cc000a4 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 90cfa263c52..025970e54c8 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 311a1b84e0c..bb00465758a 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 9c954b1465d..e60d01f0c2c 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 e9e4794cff5..f4677297611 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 1e97ca34d16..2de6ffb0673 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 f8f72d1580c..e8e1eb03e93 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 6ee0d0d252a..acd9fb654e5 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 8a42683c1df..b347516c95c 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 5bf73ccc554..494d7e8e842 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 b2b9ae8fd12..32afc07af79 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 273eae99553..b7f0571316f 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 7823e357009..e7d9664ec50 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 7df29d5a098..16b168db681 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 ffe0bce6f0f..06477efac26 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 5a6dfb2fdf9..7877c7334d7 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 f7cfbd251b7..9c75d5a9023 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 7fd929221d0..d9479002b6c 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 680f6ff6792..880e38df2d7 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 76f91fbf241..737a5ae2656 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 3a590d3282d..8084a622045 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 fe6b12968c1..2f67c11ad1f 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 0480958e99c..a37e132d364 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 a8d97bdfe2f..50c6fe1e833 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 c109896e825..7c2e6b01533 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 7737705440e..f4bb1e42207 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 7737705440e..f4bb1e42207 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 cc2c9c8681b..4eec2b21be6 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 173a1471663..cdbbbf2a99b 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 93c5173554f..4ce0ecdf3aa 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 93c5173554f..4ce0ecdf3aa 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 17ccd2f3527..625338bd9b4 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 2e3132c2eb7..dd37d4e7a85 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 9deda56cd0d..7a12f3bdec2 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 9deda56cd0d..7a12f3bdec2 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 e85bf8829ae..01fb137dd6a 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 e85bf8829ae..01fb137dd6a 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 5857a421198..a625ed2bdc3 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 f6d9c4a2645..979d50b85f1 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 f6d9c4a2645..979d50b85f1 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 cc6c9a47510..31b7fc7ccf5 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 cc6c9a47510..31b7fc7ccf5 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 254a28f70e2..bee4b693825 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 254a28f70e2..bee4b693825 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 cfbc61f0254..0d3643f6f89 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 ef0cafcb9bb..8f07d208091 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 e5fe50513aa..9b62ffc9349 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 fcfd39387c2..4883463c2e6 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 91580313e1e..dc891842e13 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 1be907b98ac..00000000000 --- 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 01a0f6bcba9..3b69a4066a9 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 ef6e857838a..b29e853510b 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 60583d43c01..c2e8c2c9c05 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 beea0acac60..11c3481f15a 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 b93bd6c6fa0..1707640f6ed 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 b942c397a8d..a0a14558490 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 b942c397a8d..a0a14558490 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 f33aa4953e4..b97b6faa3be 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 eb6b0774e15..4141cc4ab1a 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 756426d84a4..af86ba0cc82 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 84600bb1b8a..f71490eba61 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 a5088a3ee33..f15be95db10 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 8c004148a5d..c5c8b884297 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 8a83e145ea2..635bd5e7edf 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 c270593cac7..0e92cc5c9f2 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 8db9652b1ea..0e2fdf9f6c2 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 76e87a3749c..d5e16e1ff27 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 2c2978d2bff..f4bc5aef82d 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 16b80a6f412..b339ce5ce8c 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 d05d6d120b0..c2e3ead7ec7 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 0ccccb53aac..83fc37e7e53 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 9429a0b5765..abc040c0546 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 9a695a8987a..3d8049cba9c 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 017b73a0d86..32967b376ca 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 6c57dd9316f..b7824c027ec 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 481c01a75e5..8b781a7b1f9 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 02f0206c443..ba723b38bfa 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 798f48060e7..730bc691bf8 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 22f28a67798..65d9199fa33 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 04d45758578..837d35bfccb 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 2a1e7bb4afa..77b95ec87a0 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 af11a505ccf..7c183699ac2 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 5ee8cbd912b..48e5ea8ec86 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 5c02b62969f..0215a9e5935 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 4bac2dfe76f..28191615afd 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 cc2feb86d8e..60266bb3580 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 9b5c8422de5..e696b85c6cc 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 50b0e19133e..1023950639a 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 839d3a84103..b1b253385fd 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 a945a4be708..b95dcbd8935 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 832eba69722..ec3aae29714 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 a3dd6910be4..9ae97e4a994 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 513fda3097c..3b68abbb4a0 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 fc1248440d0..f0645107831 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 55119857d8f..83718a1e273 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 b961fc8aeeb..ee9a4733fd9 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 3c7aa6de541..c90f85df967 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 085f80f44f3..86966d520e7 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 8486806c672..2722dfe5e05 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 10456fd5a5d..b098f8e1a7f 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 36e4eeeaeea..b5c09499276 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 dea0bb259f5..2c2dcbdd0dc 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 a9aecb520b2..5f251527e77 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 20b7a4cb6ec..d02da3e4ecb 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 c598803fa6c..0b786ab1e2f 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 6314e7a3a8a..e5647ee6d09 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 1bc047dd356..c12e1a3a643 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 c029060c3fb..ea91ad08292 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 714c8d1e4d7..19a1a8e20cc 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 83fcac042b1..dd9e28ad492 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 3757ed6d092..2153b59ad18 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 554cc3a2bcf..31937172071 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 787c11f2a81..5f147795521 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 72e4be51822..44c0ae49ea6 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 912252fd34a..8f5ba07bdaa 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 74629d3e7e6..c5ffa55ebec 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 4afbde5021f..318fb63d382 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 497b8a429e0..20e61303e36 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 c13c05f146a..a3bd65e518e 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 3631a03938a..fbb18c8c490 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 0919c2f3a1e..c4507843e36 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 7f6d608038f..c0d2df3753d 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 62ca8dc7729..263b5e594e1 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 d117f325440..854abb90638 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 326418ecbf9..585f556abc8 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 feecb6d80e7..b174766cd3d 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 ad02202dfc9..957ae5d2932 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 310f722e120..1594747e54c 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 9b63e8f3072..aeb9238de81 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 d6fba8b8e4c..d557802bbd9 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 d6526543822..99a601003c1 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 e87176e0fb2..adbd47ac16f 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 585ba16a491..8cf923ca3ac 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 7ac1ccf0f37..c341338390c 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 4e609ca5484..2861aee3aaf 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 44600bfcf96..2eaeffba089 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 2c21795e161..7c56ded01bf 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 b2a2636d3eb..6662a2b35da 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 9d90d6f608f..422805a0d0b 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 fd9e1acc557..c53dbf63a3c 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 f0babdaa60b..08c8d41624e 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 431182e79c4..c910261ca52 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 54cb3fba2b5..aef44a164a9 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 45af30e3965..246454f0612 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 fedc6a341ca..8ff6cb569b0 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 802621bd18c..b9273083956 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 cf0a80bb2c5..8d8ef6bf836 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 e6f9a0c7546..1ecb862827f 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 9a240c65458..ae61b7b104e 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 26c879193b6..d8c210dcf7e 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 850b434e9bf..86c99c32fc1 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 1ba21ccd796..024f8ad89f7 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 4d4f7e55873..4d33fe84829 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 95b048d36c2..7cf3f4b737e 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 02d3cd2e8d5..5d50637bd01 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 db469597f9a..53d76fd2201 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 c2908150429..3ace774a041 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 59b53c70388..46ddcb63518 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 3c9ed7a9dec..909848604ec 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 2c7ffde7ddb..cdbb57902e4 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 7c0836375e3..e45a0d9ca77 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 ce853d4d36d..270d6b8e18e 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 4e921db8c25..98e5cd6bab8 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 87a13889298..55eca034513 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 0123faa36db..d7758ad9609 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 216f7a24a1e..64d27e06487 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 94256b2eb79..ef650b75b56 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 211a3286cc3..b752cde228d 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 611543a1926..bf04a8c9873 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 73fd5e8ded3..f4bd0fde3b6 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 3318866c52c..46053c6e7c1 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 233b47445db..b6701b68fd6 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 6af91480e3a..d1a04af0706 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 00000000000..50eab7dcc97 --- /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 56f5bff939f..e772445a56c 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 e9d62087734..3b75939ff02 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 b040889217e..81ba89b0e05 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 2f3726bdb33..365ecd9fcfa 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 66043267f91..357166d1123 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 eb4dc45c8a9..970abad5c72 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 6c5264671a9..05a9ed1d4e1 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 7c289b38822..ebd0b6a1281 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 c6af47805ea..e0a96852720 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 7a4e8e5d3b9..82f5eb83e6f 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 7629cede7a4..2c7a8ad5c1a 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 cc1d649d610..9d26022098f 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 647048c7c20..e5ed6b10a54 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 38dc9ef1035..518d2be7841 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 96684309a00..4c5875ba776 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 158e81cdd96..3301b7d4ef8 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 a7ebc7171bc..e9a9d47ce7c 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 6b917d55747..dfb5810c494 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 3baad6cd72f..5a63af58855 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 ba83eeaa813..2d26b08384e 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 8f12d92d6fb..ed185ae2a44 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 6e6e42ddc2d..7bb1301edf2 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 f266e908ecc..c2cfc0939d6 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 4ce63945464..ab44f067fe7 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 f2a4150632d..20369a543b3 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 a43b49041ec..5f0de61e69d 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 3152dec30a0..1bcb89de2ba 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 e055d1a94ff..f8026fafeb2 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 c394f6efbda..3542eb6848c 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 0dd4baf80db..4ddede29c85 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 957ab2a7548..cbefbf83be0 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 d180670e38f..7ffb51061b7 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 45322ea9672..1f147e070b4 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 bfb47515823..c9cfbc506be 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 9d181eab7fb..ee5b81391e9 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 115b471e96b..0796ede52a9 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 a231f73d067..6521a67428e 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 6fc2b99a11a..a925fc29c8c 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 667ddbca97c..92068df6c05 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 1aa278b450f..7928b3fba27 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 9cf2f09e177..6bf76c4904d 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 6decc751321..8b09b7d5907 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 58d087ca199..4d739a3823b 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 eba4bf6d1d5..e53134c5238 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 f6b15d0528a..0dde6f382c3 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 aa709e1ad51..f5aeeec7337 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 1558cffb036..a379598c265 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 f2aa2a79c82..fcac420b238 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 684c3089e85..aeaadaa6917 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 42953bd8d2c..16678c8c8a9 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 7df86d7326b..baab675834f 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 33cf76d777b..939cf029253 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 4400b6179c6..b2aeb5edf29 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 337f2f971ed..c3e5fcdd63b 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 27e5c606a64..4b5768d1291 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 f90e89efb4a..b594e8b7a1e 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 47ee544c02a..da15c092fc3 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 99ff9ac0a0d..6bec98121b7 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 fd3db954699..cd96646d751 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 5d7ffeb0deb..7a4d90b4412 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 8e95b2ff688..d7134bff176 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 3df58d66d1f..5784ca9d77f 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 021a08696de..98cec1bfe9d 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 5c6c99a1ff2..4aec27f9684 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 b66dcb88d00..53addf2fe4d 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 b08fe8c7352..455d32e233a 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 87ee36df216..e49d8e6aa0d 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 369a19d37e6..b3ce6e42096 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 0b162eff94a..c1c043e217b 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 ab43d4a3c60..390aa31487a 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 bf125a8942e..2d2ed5a6301 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 b3362ae44b6..10b0c0967c1 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 bcf71638127..5c3dade8e20 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 369f56b9869..8212c607e11 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 0f3d3690b73..cea76585056 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 b14faff8f7b..045819061c1 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 85acbfb8de4..08bdaa72858 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 b6045c993a9..4e89f59afbe 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 81a2bb88c89..04faea9008a 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 8637e574c5e..4a06196d548 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 2e03acc112d..55988844c17 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 6d8d17292f2..1fd64ca90aa 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 7b17e914216..6a21472848a 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 f76063fc558..ab15bb1afa8 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 8b37e5e9774..31fdf3b72e7 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 f7107d61ac3..1618f0f5a11 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 f69c2a9925d..6fe15162243 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 4f41c95323a..d00fd4aad73 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 45a2350ddfd..7fd1fd90ccc 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 5f785679c55..a7b8b1ca861 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 216e32ddae4..f6222c77e2e 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 b9d96dc7907..a14a66659b3 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 ed013627585..f69963bb7af 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 a9404c1c46a..e6a0edac4b1 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 b39c4a9f272..e9b2a9c4d48 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 554ac7e7c75..2c821aa2308 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 c7c4843a0fa..b39159a6539 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 078a7ef2173..b743f0df4b1 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 eccb71095ac..ccf357d4aa0 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 b7c799e163c..8250096656a 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 de598a70ee0..8a20a60853a 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 46d1f992411..7789ee342ab 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 9bddc2c41a3..7241128d17a 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 de0e78ac20c..68ccf5cab5b 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 a428ff7e91f..f97d899c2d3 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 a4700a5ed1d..e67cc295d43 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 14913c93bf7..2104634eb93 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 0544deda4ae..80fb4aed1cd 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 9de94c393a7..a6e44be636a 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 92ebb45e88d..653869a237d 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 a1e8ec1677d..928fa58b175 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 4b5f65b3461..54df7fccaa5 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 4557595529f..8e77662b4ba 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 bdcd2fe1adc..fb8ed43674f 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 f945f7f38f9..ce70c0111be 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 95b2f447102..3dd13877298 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 682bc323cb0..767571cddbe 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 1ef21986726..9ff4e3167a1 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 e3a8e82a09f..87b284abf20 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 836520a28ef..4c67dbf6796 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 3bd3ca6e875..72a1c3cdd35 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 01789e0e257..0959d351ece 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 5f5297be42a..b3535232f02 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 edbb36452b6..a5787d65758 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 035501009bd..7129bad8a97 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 241fe367fd3..3558f0c9e62 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 b09695787a4..4b5b9e92ca0 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 5809b5bd661..d0dc3601202 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 c1fcab2409f..cf365af9904 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 16333a7ca38..8c87f6da8dc 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 1fef8fc69e2..4399045098d 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 6a5fdac4d91..61b7993d2ae 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 c179f4a25bd..2841815ecf2 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 b01073b42b8..0ebcfb40dc3 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 33e5a03266e..00ed5c89d4b 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 e91e02df476..d8dd2b5fddf 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 8aefe243a94..8fc2d1bc88f 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 4835cfae46f..8234ed3b167 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 4dd739088b9..b248dd0fe15 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 14db5f64b0c..403367017c6 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 1c0d39a6e5a..605a1841cf3 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 adb099f9b17..ccb27c35070 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 5087662e7bf..8a1afdea249 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 6ef4cdcb020..fc9bb82b784 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 dfbbb07de58..e0a4f3878d8 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 1db759a2181..97a2edd3966 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 e2f2f14dce3..ff5236dc949 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 b479a2778e0..ef914cc1c6d 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 19d977f69a2..fd2378dbcb3 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 b7079158fb0..00139662d61 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 b4d20699221..5c864600825 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 8f966096393..d0312c48508 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 e0ed8522bf6..932732da4b0 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 407193d4ade..27636c3d546 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 37839482b31..e34164ec0db 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 df4dbdbc8e6..75c1f695d7e 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 583b2c4cfe0..aa7dd32f4d3 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 82660a7c416..e725e74efc2 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 42802ba1d0f..ed03b37fde2 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 5cbed652b0a..1feaa2c73e0 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 8585929934e..f69b5689239 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 7bfb8baa0c6..e0a58aed8f4 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 4ce7236ed96..e84dff8bab7 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 ea50815ec1a..835edb4b0ae 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 0a516c89a8b..59075397ea5 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 241c50d7ced..045f9ab7004 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 c6dde67cfeb..09978b35f7e 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 1ebd2b00aee..d3983f9aae8 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 7697a375fd8..db4e8589291 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 6a97d1ee3b8..a47eb87cff0 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 a8da87d60bf..d7db90e50e5 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 405343783de..2bea9572b70 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 d0859726a49..e480bb250b2 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 1e035ff99d0..c7e1f87f2d4 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 22a6df89025..7ab52249798 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 f2b8404a328..f275321abe5 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 a95b5bb94d2..1fe9f5299aa 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 985a9bb2a3f..f955659f23d 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 f7e17815b67..a315bbaab33 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 a30bfa66c5a..2adaf576adf 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 71e35b445ef..6c792c3314c 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 3453f031623..216b56f7059 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 6767f7cd616..574a114340f 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 2dca92e2be1..6dacfd1f264 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 1bfebd755b4..70f063ca0e8 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 bfb0eb74a56..a5a0fc415bb 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 047fdbc9148..68d3cef8aa1 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 85920a8e739..25226e29673 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 f6a86aa43b5..d05fc793967 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 a82931e0fbd..8e226804890 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 6aa2eb174e9..2c058f1f5a4 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 5a275d5d089..6732391e1a1 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 79b38b06986..9a3248c5720 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 858990fe59b..83d8ce5eea9 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 cb051aa1230..b0ff50748fe 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 4852e7047b4..4510ce10b3d 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 ffd6368bac1..8bc617be573 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 a62956ee8da..d3f02214e3b 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 70b99ef7869..e0a8534cd28 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 e00d6bb2f4a..bd8cf4e30f7 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 91a071f5678..ea1c575ff8c 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 0de783f60ea..00000000000 --- 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 b9aad01b292..363dfb77628 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 b2c8775e78c..c0040433078 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 a657106ad91..452163e2fa5 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 8761b5261d5..dde75724ed7 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 61175b84ee1..8e6964e3062 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 64e061a89b4..8cd2ce6f36c 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 59b1e4f7a98..373c1c2c0b1 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 24be32ae9eb..cafddbe2624 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 e015010da13..c98a620f123 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 b59ea97e3b1..b23322f2c8c 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 12132b0856b..3eaa6004796 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 df10b0ec2d2..c77992b2c34 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 b9fb42088d9..c3d00061630 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 4f22a16224f..3b8b3692e05 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 067920d12f4..694b0b6eb02 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 5d94d6fe69b..febfb600cc7 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 ec1335cfdb0..e7203f24d3f 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 affcb6ed224..2b6314c38ce 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 2bb320e7321..ba5cd01abfc 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 fdc7a9409d7..f1255d8642a 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 b3f60b13b0f..0adfa5b47a3 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 2add9fb33c7..5367b986d2b 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 ae180af93e3..d1a249389fe 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 bc61b3b74e2..d0a9b529983 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 9ccf17a6cb1..19b68556d79 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 701c32d6236..372387131e5 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 197c4cc967d..5a56d80a7d7 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 d5e07622b11..55eed0402a4 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 935d3842cdf..5dc9a9675bc 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 ed4d2340fc5..2e7e500f478 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 95ee52d810d..3065d642fe1 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 ac042580962..80462549377 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 ad72dd30542..0a88dd2c4d3 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 19c9ef30f90..b2c7dddc801 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 8602abacabd..6585a19d954 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 dfde8624814..0bb99a01e55 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 b8ada11d922..a62c9b0a1aa 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 b355b3a708d..730c5b64b5b 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 dea4afd5c0a..b9ebdf4b909 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 db05f3956a2..05615b41756 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 45c129960ec..f7efa53a45e 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 2ec4b28c94e..aed6be20899 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 b622806e916..3fc8af3d154 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 0f3fa3fb624..4632814019d 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 c74e3101729..f2edc3fa6b9 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 3219eaf24f9..100295caf63 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 30974af7424..312a635cddc 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 a72030befb3..086a77742a7 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 e51c60ed494..a7493d2e60b 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 d580b451809..456e06dbfaa 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 15c008da353..c3b33afb4a3 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 5ba63965c87..1ca80dbbd09 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 7fb1bda3fb0..ea161b004c1 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 9721c88cb16..8036cecd791 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 8bbc6fc6547..7ae669b2719 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 10ff53e2916..df9429a98f0 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 5b5f2b7ed54..831f557c27a 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 81aeb9e37ab..d133e939d3a 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 1b287b60197..228ba7c2bc7 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 c3d4d61dbb7..ea90ed3f05e 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 fcd717d6e67..37ba0f27bc2 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 dfe1958e78f..1c49811ae5c 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 7cef6de0cee..9fb8ac12db4 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 d714a99dac4..ddd1bd53083 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 30a6c5b16a3..880afb0075f 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 38d734ab812..7b6210b712d 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 22b5454add8..8f744c3b1ad 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 c179f4ec560..f7692f8c57f 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 3a545ee2826..c2b19a7ad5f 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 ec661ee2a60..62a5e424cb4 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 334165a962a..184817a6579 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 48b8fc6a729..4332bdefcb2 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 4ffee657cab..bf73595e5b0 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 6f3320e283c..82e2743256b 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 9fe95c3fd3d..22f3ccd0de6 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 f9019b78c8d..6d2431c4aec 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 03ae351bf79..4831d79ef2b 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 3bc451e84e6..cb361a3db53 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 ec04b937b9a..ccaf77d3995 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 88a77adcd31..bfa443a7f01 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 1ffdc0401e5..d133e46b4b0 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 04fc8c85e4f..4ac0e265501 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 bc3329dcbc2..329fa8776f5 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 6db9a4a0f15..762733cc97b 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 f129e1e372f..2dc2c87eb7b 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 6e41e139220..f3ed77cbde2 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 9b9d2bc4972..61ea3695eee 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 c807931beee..f11ca9fd584 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 afb964c17e2..74429cb438c 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 5c229431ad3..feabd8f5813 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 7a64a42e3c8..b5a9864bbc4 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 98077761e01..692b4d73503 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 a14df3a220e..17e9277e074 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 d12ea0b2fcb..b948ab2abb5 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 3ea5ca565c5..4cffbe433b8 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 18b1b24122e..1ae0205615c 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 4e14eda8f2b..0cfe9240e85 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 04ea0c6e95f..092abeb53cd 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 e14e17c1622..528306b22dd 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 6ff0dadf0d1..4249a74b3ed 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 e6a1e5ef07c..c019aae3dfc 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 9bdbf0bf9f4..7f5da8f3c2d 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 f7644c19ea0..7d998af7fb3 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 aca5c9aed96..f2e2c8f021b 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 70c21dbafe9..2fbcb6d67ba 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 44d6a854b3d..3f28ffed291 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 29aa0c1c926..02eff28015d 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 de13176ddc2..acd33e0a416 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 1a76f7c222f..3fdaf4cd0f5 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 40155de9c77..c42d9e6bbf0 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 d09a8aae748..91bc84e70ac 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 fdf0549cf50..904e9013f94 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 8240cc3649d..f51cfc836a8 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 27f7639d213..b544be6e96a 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 9e91ed4068b..713560772ee 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 b830b0e9009..b5b667b41b6 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 0df6c00a316..6a9aeaf4a56 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 5b378df04b0..c1ca0136b18 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 928f62133a9..cb94c48add4 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 79597c54e68..562b68e3542 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 8af24904ef2..d3a378786e4 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 db5042b40d8..86c533d7a59 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 ab4709d8e70..f5d25c5641d 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 332dbb79cfa..a973c583a9d 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 4bd16c71137..561dd64b49d 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 f70e4ea9fbc..e446f2a0027 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 3607d6a722c..1c8840f540e 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 da995a96310..78d2371cf53 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 7dc880849a6..8c94b44f200 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 b3649c5b485..ed547aa9c41 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 60a6fb9a0fa..992d25c9fd1 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 5f6ff280e65..250752c9b9e 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 e76073f4f6b..50b3748bf40 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 69c11b5c56f..dff4ca68d31 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 e90754e9118..cd07e5b8935 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 47e5b803970..7878efeebe9 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 8083233c01b..d1872673885 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 72d66b0f6a2..5045ec6c30e 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 e94877fded7..939392733f0 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 a8aa50b7c3a..32b972b21ff 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 807dadf417b..192349e0faf 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 a0a85820901..abf068a1f68 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 83beb20fe90..922753a00db 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 104ed9bdc29..b63495458a0 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 efcfc7198ab..78d77678083 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 2d35159ec9a..54b242123eb 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 a8045e043ad..eb2322d51fd 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 6ef921bef3d..5af136e6011 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 f8527961374..87ef18878d6 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 141363fc32c..b0c319f2c7f 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 fbdbb0c9930..64cae3748c9 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 23eabfa3b3e..996d0ea476d 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 7364f62c922..db464ad03f5 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 5516d4a4c1c..4514fd96c2e 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 f815389ff01..79d170cdd1b 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 732bb61e6ee..8ed606cf905 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 01c4737de5e..495b06fd2cc 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 45bc5dbc446..b8eba3e075d 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 7a63e6f6e68..e60f9c039be 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 95105f932dc..a2ce9d42b67 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 32e18563329..2755688c17f 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 e25c6363515..5d0b2c2ebdf 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 9cd0fd328ff..04cd2b78da1 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 962593e411e..4301d8f767a 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 cb9d5b56dbc..54e75aeec3e 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 b804ddfb024..a0ef7e3f2cb 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 e1ed0e42f98..44067648283 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 8d70c6287e5..d3bf63efa40 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 63b70f7fcd9..7c16581686a 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 f78970ac0a4..d22508998a6 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 10fb40b9d14..b8b78cd87b0 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 55d11add7b6..05944e04bd8 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 45062c2ea6c..0726b16a919 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 06493f05142..98e92751360 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 2595cd91dc1..2487684c1dd 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 f63d97780c1..8f75c388f65 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 e04ca0f5265..8d4709d660f 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 5cda17fd6a1..da0a3c8b476 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 fc6c556c16d..f7732847a28 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 a7131ab8af5..c5a0448e798 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 f789441378f..288c1042a26 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 d37f13a6683..86c64573b14 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 7a24ffbd81c..99c57322d86 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 55128347f74..cb71a55b09e 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 fb1d98b58df..08e97e750c3 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 3e6d350b36c..fbfbefd0782 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 0e8a774bce3..8d110d50e28 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 e646c1640b1..ff56c77c8f8 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 e416f30cb41..a8f6cf68399 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 bff4618d0be..0d4976c665d 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 73c03f09f2e..c23400a1d14 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 27d6336974c..c3cb488e3d1 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 ac87d6ecca5..dee28897f4d 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 e8e2c4e24f5..90590b70dfe 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 405542820a3..567f5d8e1e7 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 d61ab1952f9..6199178467f 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 0a898e5c46d..2e99435e033 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 efc4ba93f0a..c6d2434e424 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 740ea3829dc..5ec47c093a9 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 c1a95636d34..a91e47657ab 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 29e72146521..5494c29a6fd 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 5bbf4225812..10abdfc333a 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 20d76553374..136e269b210 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 ac3902dc6de..c64205411bb 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 f2eddf2fb09..86a175098c6 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 dc5d7efd752..8d93ac50796 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 cb4acc4c392..81c9b0378e7 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 df9c230eefd..784f1bdb6cf 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 f1c50e59a84..a26f86917bc 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 612fae208cc..40ad671f966 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 f7528b5ccd2..ca09c3d5ff1 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 c4eeb3aaa57..ff08178cb74 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 b113b3746d8..b9f0f788b8c 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 8589a2757e9..1916fe54cc5 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 fe9c3445fc4..20468cef20b 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 9b2febb1393..1ed784e8f5b 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 011fdf34c28..49cee6abc4e 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 15cb845a06d..8a2941cb6a4 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 ce1ee0cd06d..1e23ede7adc 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 bd060c92cd4..a12b6bd2128 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 acf0c0ece40..043a771129a 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 00971b41c7c..29991b6572f 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 2fb6c25fd17..6d9f0811b27 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 e31f25ab603..a3a339b13c4 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 0de3b9aec19..7d8a34ed018 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 db54d044d9e..6255df06efb 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 14c7b18ea51..eda29f876d8 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 62c04584d3c..7b465844501 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 ac9b6d975f4..40e4c7b7849 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 e96db3f1e86..009707a3a64 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 fcc49ef59d1..43ba35d0205 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 9404c3bb583..be91eb876d0 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 91b380e4e0d..c09ad17f82a 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 5a9099a894c..a05c59c786b 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 ea391ee078c..8f30a301bb8 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 02f9241a6d2..fe301e41277 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 60594baa29c..fccd2ef8df7 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 575379690b4..9c8356a5284 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 77f7f874a4e..c1319165a70 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 05ba7808600..b2798030032 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 9f30787f07c..1ca22ebeef4 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 3739c9940f0..b5f01d7038c 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 9e64b539f0f..a8f7f3cb177 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 04c67ec6a06..1bfff56a6a9 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 b20778ce208..1ecaade93c8 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 8ddd2f7d522..bf546384124 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 a7a44b511db..b1caaea9aed 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 0e0d397d6fc..cde07550125 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 0a64a0d7d5e..2f0fd692a44 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 bb4f8e8c304..6e26bc1f01c 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 13b6182c0f5..fd5677898e6 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 ddb7476ec6e..cc991b915d3 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 67491b0446f..55047b42698 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 4a53706f977..74237e6e6c6 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 d74076cbc9b..85107373451 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 94766530091..a9e540084e5 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 5919a6f7492..bbeaa26a93a 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 1498f5ac935..4f5106849d5 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 7447cf87ce1..bfefc144698 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 981f95749d3..618ccba0d3d 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 33af13d943f..95a0cb192f3 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 888cd5e58ab..cdc3f5e85d1 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 2a237d61f50..449a61d4809 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 8107fd86212..d5c49a477b0 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 8384f952b68..1f14ebae841 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 7ef95905380..7161ca3903e 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 2a8d7dd5b85..a7f5b58c4da 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 67dc4d8fd69..eeec23e0da0 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 df064f22f35..1a6032db001 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 28fef511e04..0c91e2feed3 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 7f4c80f50e2..4255281d9a7 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 f785f7b84a7..19fc772544d 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 e629f8f970d..943cbcbc81a 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 4f7e18742e2..939285498fb 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 8cbd8bf3f34..55d8d1ab1bc 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 f1248643105..5a158e5876a 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 7523a931dd5..107af76413d 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 cff09910721..422aa904e1d 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 69daa93412a..480f442fedd 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 30163ab7978..c2f176c4b46 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 110ca799080..c9dad2ef896 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 649ce72604e..0fe1a79678d 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 b07145f4d38..44b194cea40 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 bfdd121012a..38b2e5ae9b9 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 fd3999ae6fb..1e9d151629f 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 e65b8989e0b..1b8cd6ad078 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 951e974ad26..407a4f0ef14 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 0c69e7b6fee..cc09b80898c 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 508a12d859a..bf2acd350ae 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 bc7b863ca4f..fa8799bf7d8 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 4807a0930e7..cb1128fe5c6 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 c91d1db4d76..c7beb834b57 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 e63740c4ea9..0150ff41303 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 8d4813c453e..ccdace1957d 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 6784689072e..cf534d984c2 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 40f5fcbceaf..22446522852 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 6a641ed214d..049fffe165a 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 c34e3261fe1..a6b0837e7d4 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 6aaa8a4a904..da647f16c3d 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 a38f8a14604..582eddc7aa0 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 edb48b6625e..6508e6a6e76 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 38245010c78..94c51c5788a 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 0f3c14b1386..a00064c44d2 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 9d833ef5ed9..c7dde7eeac3 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 f9974acfb70..ac1027ff34a 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 f80abade0fd..2e12b768f70 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 00000000000..3ba04af9046 --- /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 c1f58aa6de6..5ee7c72bf73 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 00000000000..918121cce9d --- /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 cb43b897cf9..6cc6b35668c 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 00000000000..394b4280ab9 --- /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 509da2320e8..e7520988e34 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 00000000000..8c6ea3b3421 --- /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 a09f2506258..44bdbdc95cc 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 00000000000..d0176b1e36d --- /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 68a30820951..a8eb53a50e3 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 00000000000..74d5c0c9688 --- /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 cefc5d99b37..c2671f7ae60 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 00000000000..348563b94de --- /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 8bba62a913e..3213b26456d 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 00000000000..16b1830e985 --- /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 8718a57d9d4..2463ed9c71a 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 734f15a9283..4df2f52a9e4 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 047728dc1ea..12a98e4d783 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 0b6630ec894..78b7386c03e 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 00449af6a45..96ee422b7b9 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 c1c76659c67..db215d2810a 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 d4188b5f01a..dc44dede13b 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 97817a1f9fd..3052ff5490a 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 adf3fa2c807..6a2f4beb98a 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 d1c13a33f7f..862ac65bc24 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 f5306a12264..710be9d6a04 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 c3d41ae68cd..4a9bf610647 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 30df1261cef..45f2e845735 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 a6b41520d67..368adb456d6 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 d6d32cc5d6f..5a94a0fd683 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 15848c66c15..091502bdda3 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 a722c4b5e3e..5e42c817e03 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 7a184652976..041ff10752c 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 e3cce10a00f..461ccb142f9 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 51b8e39b101..dc30975103c 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 17ad0172941..11c2fbbcda2 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 7398b48a238..b73ed49ce65 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 00000000000..6ba28c3463a --- /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 4827439bfbf..e1f66afdacc 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 12fd7c9963c..5c58e29fa00 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 37aa4d949da..a832964d220 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 e30e4f5e7d3..8dc024697d7 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 29273a5babe..8f9d918fdba 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 1719a99d421..64d14d0fc5f 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 90bef7ba118..29ea5735cad 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 931675afd83..427ba3414f8 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 482b3ace65b..67bf4be54e6 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 2c595833cd1..b865278e25f 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 dd804864dab..de3a6bbae17 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 8d2c82e59ed..89d36bfc926 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 4275cc26f73..84183f61e3f 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 594cdd245b3..4c207bd3e68 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 e1ff38f3057..3cb99556748 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 c54d04de12c..7da7c870e70 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 ef86c624e9b..0f66f6c541b 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 26fc25b96bd..58b1f5cb078 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 26fc25b96bd..58b1f5cb078 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 86a13c1e7ca..36e782ac042 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 86a13c1e7ca..36e782ac042 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 c20d3ddefcd..95a0f4f5fab 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 35bba1c103a..9af9cd24481 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 f66ce2af304..88678307de2 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 b9a03d904af..3985f73f118 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 acb8a598d2c..d81dd7f342c 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 99f75d8c5b3..7cd8383c52c 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 71693b8130d..fc2df2977ce 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 201dbf85d20..55cdffec8c3 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 f8f8aa8e3e9..7dfd0e43974 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 10ddfe34eac..e2331774ebe 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 6e5b3556429..43463ff8266 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 5eff89d971f..38ed50daa1d 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 e0d95e21296..f176b8863f8 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 a29bd07ac44..5bb04b2633b 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 ebb71c51293..627cf73c314 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 36fdf9c75c7..7be6e7525cb 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 3954da4ec29..9e91ff7178d 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 096dd16c634..64424abbcec 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 7819110dd98..d62a6828ca3 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 4bfb2413fe9..295037efb54 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 c8a75afbab7..496216a7fa8 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 e463e3db887..1302d0e1761 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 0d4480fbf26..50b4e5d8e7e 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 ca90e9222de..94899e21876 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 f9a962578e6..731331c894a 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 20aa9770710..e41fe321142 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 48af696c3a7..36ee740de31 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 7cb9af11d79..5d9501bac85 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 b3b919a569e..abf53010a60 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 8e0ce557e6b..097d23ddc5f 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 bf8077ba88f..5767cae5bc9 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 e85f3591438..6d72ef70355 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 62ef6bb60c7..e4c322163d7 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 51adfdb6bd2..404f3400a48 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 d1c2c65043d..dc1cd3d17c3 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 c9e818f8e7d..4b77d48e87c 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 2a129538f76..81b0dd04d29 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 4382a8fe819..d0da0ee5860 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 16c0424915a..1572d069325 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 7693aa6d2d5..3b366605b75 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 bd0bbc09a8b..d289501d163 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 62e53188022..ad517511a63 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 69269835271..c3016cff0f5 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 356ba347cc3..08945c5fdc1 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 d84242cfe12..1a54ec25291 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 5498dae718f..8e240a0e40d 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