mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Auto merge of #48684 - GuillaumeGomez:put-back-ui-json-check, r=petrochenkov
Put back ui json check r? @petrochenkov
This commit is contained in:
commit
fab632f975
@ -92,7 +92,8 @@ impl<'a> DiagnosticBuilder<'a> {
|
||||
Level::Bug |
|
||||
Level::Fatal |
|
||||
Level::PhaseFatal |
|
||||
Level::Error => {
|
||||
Level::Error |
|
||||
Level::FailureNote => {
|
||||
true
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ use atty;
|
||||
use std::borrow::Cow;
|
||||
use std::io::prelude::*;
|
||||
use std::io;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::HashMap;
|
||||
use std::cmp::min;
|
||||
use termcolor::{StandardStream, ColorChoice, ColorSpec, BufferWriter};
|
||||
use termcolor::{WriteColor, Color, Buffer};
|
||||
@ -33,6 +33,11 @@ const ANONYMIZED_LINE_NUM: &str = "LL";
|
||||
pub trait Emitter {
|
||||
/// Emit a structured diagnostic.
|
||||
fn emit(&mut self, db: &DiagnosticBuilder);
|
||||
|
||||
/// Check if should show explanations about "rustc --explain"
|
||||
fn should_show_explain(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
impl Emitter for EmitterWriter {
|
||||
@ -80,6 +85,10 @@ impl Emitter for EmitterWriter {
|
||||
&children,
|
||||
&suggestions);
|
||||
}
|
||||
|
||||
fn should_show_explain(&self) -> bool {
|
||||
!self.short_message
|
||||
}
|
||||
}
|
||||
|
||||
/// maximum number of lines we will print for each error; arbitrary.
|
||||
@ -114,7 +123,6 @@ pub struct EmitterWriter {
|
||||
cm: Option<Lrc<CodeMapper>>,
|
||||
short_message: bool,
|
||||
teach: bool,
|
||||
error_codes: HashSet<String>,
|
||||
ui_testing: bool,
|
||||
}
|
||||
|
||||
@ -124,34 +132,6 @@ struct FileWithAnnotatedLines {
|
||||
multiline_depth: usize,
|
||||
}
|
||||
|
||||
impl Drop for EmitterWriter {
|
||||
fn drop(&mut self) {
|
||||
if !self.short_message && !self.error_codes.is_empty() {
|
||||
let mut error_codes = self.error_codes.clone().into_iter().collect::<Vec<_>>();
|
||||
let mut dst = self.dst.writable();
|
||||
error_codes.sort();
|
||||
if error_codes.len() > 1 {
|
||||
let limit = if error_codes.len() > 9 { 9 } else { error_codes.len() };
|
||||
writeln!(dst,
|
||||
"You've got a few errors: {}{}",
|
||||
error_codes[..limit].join(", "),
|
||||
if error_codes.len() > 9 { "..." } else { "" }
|
||||
).expect("failed to give tips...");
|
||||
writeln!(dst,
|
||||
"If you want more information on an error, try using \
|
||||
\"rustc --explain {}\"",
|
||||
&error_codes[0]).expect("failed to give tips...");
|
||||
} else {
|
||||
writeln!(dst,
|
||||
"If you want more information on this error, try using \
|
||||
\"rustc --explain {}\"",
|
||||
&error_codes[0]).expect("failed to give tips...");
|
||||
}
|
||||
dst.flush().expect("failed to emit errors");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl EmitterWriter {
|
||||
pub fn stderr(color_config: ColorConfig,
|
||||
code_map: Option<Lrc<CodeMapper>>,
|
||||
@ -164,7 +144,6 @@ impl EmitterWriter {
|
||||
cm: code_map,
|
||||
short_message,
|
||||
teach,
|
||||
error_codes: HashSet::new(),
|
||||
ui_testing: false,
|
||||
}
|
||||
}
|
||||
@ -179,7 +158,6 @@ impl EmitterWriter {
|
||||
cm: code_map,
|
||||
short_message,
|
||||
teach,
|
||||
error_codes: HashSet::new(),
|
||||
ui_testing: false,
|
||||
}
|
||||
}
|
||||
@ -993,18 +971,26 @@ impl EmitterWriter {
|
||||
buffer.prepend(0, " ", Style::NoStyle);
|
||||
}
|
||||
draw_note_separator(&mut buffer, 0, max_line_num_len + 1);
|
||||
buffer.append(0, &level.to_string(), Style::HeaderMsg);
|
||||
buffer.append(0, ": ", Style::NoStyle);
|
||||
let level_str = level.to_string();
|
||||
if !level_str.is_empty() {
|
||||
buffer.append(0, &level_str, Style::HeaderMsg);
|
||||
buffer.append(0, ": ", Style::NoStyle);
|
||||
}
|
||||
self.msg_to_buffer(&mut buffer, msg, max_line_num_len, "note", None);
|
||||
} else {
|
||||
buffer.append(0, &level.to_string(), Style::Level(level.clone()));
|
||||
let level_str = level.to_string();
|
||||
if !level_str.is_empty() {
|
||||
buffer.append(0, &level_str, Style::Level(level.clone()));
|
||||
}
|
||||
// only render error codes, not lint codes
|
||||
if let Some(DiagnosticId::Error(ref code)) = *code {
|
||||
buffer.append(0, "[", Style::Level(level.clone()));
|
||||
buffer.append(0, &code, Style::Level(level.clone()));
|
||||
buffer.append(0, "]", Style::Level(level.clone()));
|
||||
}
|
||||
buffer.append(0, ": ", Style::HeaderMsg);
|
||||
if !level_str.is_empty() {
|
||||
buffer.append(0, ": ", Style::HeaderMsg);
|
||||
}
|
||||
for &(ref text, _) in msg.iter() {
|
||||
buffer.append(0, text, Style::HeaderMsg);
|
||||
}
|
||||
@ -1020,14 +1006,12 @@ impl EmitterWriter {
|
||||
if primary_span != &&DUMMY_SP {
|
||||
(cm.lookup_char_pos(primary_span.lo()), cm)
|
||||
} else {
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message,
|
||||
&mut self.error_codes)?;
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
|
||||
return Ok(());
|
||||
}
|
||||
} else {
|
||||
// If we don't have span information, emit and exit
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message,
|
||||
&mut self.error_codes)?;
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
|
||||
return Ok(());
|
||||
};
|
||||
if let Ok(pos) =
|
||||
@ -1200,8 +1184,7 @@ impl EmitterWriter {
|
||||
}
|
||||
|
||||
// final step: take our styled buffer, render it, then output it
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message,
|
||||
&mut self.error_codes)?;
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
@ -1218,8 +1201,11 @@ impl EmitterWriter {
|
||||
let mut buffer = StyledBuffer::new();
|
||||
|
||||
// Render the suggestion message
|
||||
buffer.append(0, &level.to_string(), Style::Level(level.clone()));
|
||||
buffer.append(0, ": ", Style::HeaderMsg);
|
||||
let level_str = level.to_string();
|
||||
if !level_str.is_empty() {
|
||||
buffer.append(0, &level_str, Style::Level(level.clone()));
|
||||
buffer.append(0, ": ", Style::HeaderMsg);
|
||||
}
|
||||
self.msg_to_buffer(&mut buffer,
|
||||
&[(suggestion.msg.to_owned(), Style::NoStyle)],
|
||||
max_line_num_len,
|
||||
@ -1289,8 +1275,7 @@ impl EmitterWriter {
|
||||
let msg = format!("and {} other candidates", suggestions.len() - MAX_SUGGESTIONS);
|
||||
buffer.puts(row_num, 0, &msg, Style::NoStyle);
|
||||
}
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message,
|
||||
&mut self.error_codes)?;
|
||||
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@ -1321,7 +1306,7 @@ impl EmitterWriter {
|
||||
draw_col_separator_no_space(&mut buffer, 0, max_line_num_len + 1);
|
||||
}
|
||||
match emit_to_destination(&buffer.render(), level, &mut self.dst,
|
||||
self.short_message, &mut self.error_codes) {
|
||||
self.short_message) {
|
||||
Ok(()) => (),
|
||||
Err(e) => panic!("failed to emit error: {}", e)
|
||||
}
|
||||
@ -1416,8 +1401,7 @@ fn overlaps(a1: &Annotation, a2: &Annotation, padding: usize) -> bool {
|
||||
fn emit_to_destination(rendered_buffer: &Vec<Vec<StyledString>>,
|
||||
lvl: &Level,
|
||||
dst: &mut Destination,
|
||||
short_message: bool,
|
||||
error_codes: &mut HashSet<String>)
|
||||
short_message: bool)
|
||||
-> io::Result<()> {
|
||||
use lock;
|
||||
|
||||
@ -1436,16 +1420,13 @@ fn emit_to_destination(rendered_buffer: &Vec<Vec<StyledString>>,
|
||||
// same buffering approach. Instead, we use a global Windows mutex, which we acquire long
|
||||
// enough to output the full error message, then we release.
|
||||
let _buffer_lock = lock::acquire_global_lock("rustc_errors");
|
||||
for line in rendered_buffer {
|
||||
for (pos, line) in rendered_buffer.iter().enumerate() {
|
||||
for part in line {
|
||||
dst.apply_style(lvl.clone(), part.style)?;
|
||||
write!(dst, "{}", part.text)?;
|
||||
if !short_message && part.text.len() == 12 && part.text.starts_with("error[E") {
|
||||
error_codes.insert(part.text[6..11].to_owned());
|
||||
}
|
||||
dst.reset()?;
|
||||
}
|
||||
if !short_message {
|
||||
if !short_message && (!lvl.is_failure_note() || pos != rendered_buffer.len() - 1) {
|
||||
write!(dst, "\n")?;
|
||||
}
|
||||
}
|
||||
|
@ -509,12 +509,14 @@ impl Handler {
|
||||
pub fn span_unimpl<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
|
||||
self.span_bug(sp, &format!("unimplemented {}", msg));
|
||||
}
|
||||
pub fn failure(&self, msg: &str) {
|
||||
DiagnosticBuilder::new(self, FailureNote, msg).emit()
|
||||
}
|
||||
pub fn fatal(&self, msg: &str) -> FatalError {
|
||||
if self.flags.treat_err_as_bug {
|
||||
self.bug(msg);
|
||||
}
|
||||
let mut db = DiagnosticBuilder::new(self, Fatal, msg);
|
||||
db.emit();
|
||||
DiagnosticBuilder::new(self, Fatal, msg).emit();
|
||||
FatalError
|
||||
}
|
||||
pub fn err(&self, msg: &str) {
|
||||
@ -567,8 +569,39 @@ impl Handler {
|
||||
s = format!("aborting due to {} previous errors", self.err_count());
|
||||
}
|
||||
}
|
||||
let err = self.fatal(&s);
|
||||
|
||||
self.fatal(&s).raise();
|
||||
let can_show_explain = self.emitter.borrow().should_show_explain();
|
||||
let are_there_diagnostics = !self.tracked_diagnostic_codes.borrow().is_empty();
|
||||
if can_show_explain && are_there_diagnostics {
|
||||
let mut error_codes =
|
||||
self.tracked_diagnostic_codes.borrow()
|
||||
.clone()
|
||||
.into_iter()
|
||||
.filter_map(|x| match x {
|
||||
DiagnosticId::Error(ref s) => Some(s.clone()),
|
||||
_ => None,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
if !error_codes.is_empty() {
|
||||
error_codes.sort();
|
||||
if error_codes.len() > 1 {
|
||||
let limit = if error_codes.len() > 9 { 9 } else { error_codes.len() };
|
||||
self.failure(&format!("Some errors occurred: {}{}",
|
||||
error_codes[..limit].join(", "),
|
||||
if error_codes.len() > 9 { "..." } else { "." }));
|
||||
self.failure(&format!("For more information about an error, try \
|
||||
`rustc --explain {}`.",
|
||||
&error_codes[0]));
|
||||
} else {
|
||||
self.failure(&format!("For more information about this error, try \
|
||||
`rustc --explain {}`.",
|
||||
&error_codes[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
err.raise();
|
||||
}
|
||||
pub fn emit(&self, msp: &MultiSpan, msg: &str, lvl: Level) {
|
||||
if lvl == Warning && !self.flags.can_emit_warnings {
|
||||
@ -654,6 +687,7 @@ pub enum Level {
|
||||
Note,
|
||||
Help,
|
||||
Cancelled,
|
||||
FailureNote,
|
||||
}
|
||||
|
||||
impl fmt::Display for Level {
|
||||
@ -682,9 +716,10 @@ impl Level {
|
||||
spec.set_fg(Some(Color::Cyan))
|
||||
.set_intense(true);
|
||||
}
|
||||
FailureNote => {}
|
||||
Cancelled => unreachable!(),
|
||||
}
|
||||
return spec
|
||||
spec
|
||||
}
|
||||
|
||||
pub fn to_str(self) -> &'static str {
|
||||
@ -694,7 +729,15 @@ impl Level {
|
||||
Warning => "warning",
|
||||
Note => "note",
|
||||
Help => "help",
|
||||
FailureNote => "",
|
||||
Cancelled => panic!("Shouldn't call on cancelled error"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_failure_note(&self) -> bool {
|
||||
match *self {
|
||||
FailureNote => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,4 @@ LL | #[allow(test_lint)]
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0453"
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
@ -12,4 +12,4 @@ LL | | }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -154,4 +154,4 @@ LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &()
|
||||
|
||||
error: aborting due to 11 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0631"
|
||||
For more information about this error, try `rustc --explain E0631`.
|
||||
|
@ -17,4 +17,4 @@ LL | let x = Box::new(5usize) as Box<Foo>;
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0038"
|
||||
For more information about this error, try `rustc --explain E0038`.
|
||||
|
@ -9,4 +9,4 @@ LL | asm!("mov $1, $0" : "=r"(x) : "r"(5));
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0384"
|
||||
For more information about this error, try `rustc --explain E0384`.
|
||||
|
@ -15,4 +15,4 @@ LL | impl<'a> Foo for &'a () {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -9,4 +9,4 @@ LL | const BAR: i32 = -1;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0326"
|
||||
For more information about this error, try `rustc --explain E0326`.
|
||||
|
@ -42,5 +42,5 @@ LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
You've got a few errors: E0191, E0221
|
||||
If you want more information on an error, try using "rustc --explain E0191"
|
||||
Some errors occurred: E0191, E0221.
|
||||
For more information about an error, try `rustc --explain E0191`.
|
||||
|
@ -6,4 +6,4 @@ LL | r = r + a;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0277"
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -24,4 +24,4 @@ LL | fn grab(&self) -> Grab::Value;
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0223"
|
||||
For more information about this error, try `rustc --explain E0223`.
|
||||
|
@ -40,4 +40,4 @@ LL | enum ESimd { A, B }
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0517"
|
||||
For more information about this error, try `rustc --explain E0517`.
|
||||
|
@ -20,5 +20,5 @@ LL | x; //~ value moved here
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
You've got a few errors: E0382, E0596
|
||||
If you want more information on an error, try using "rustc --explain E0382"
|
||||
Some errors occurred: E0382, E0596.
|
||||
For more information about an error, try `rustc --explain E0382`.
|
||||
|
@ -9,4 +9,4 @@ LL | x % 2 == 0
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0369"
|
||||
For more information about this error, try `rustc --explain E0369`.
|
||||
|
@ -15,4 +15,4 @@ LL | use foo::foo as other_foo;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0255"
|
||||
For more information about this error, try `rustc --explain E0255`.
|
||||
|
@ -9,4 +9,4 @@ LL | true //~ ERROR mismatched types
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -11,4 +11,4 @@ LL | true //~ ERROR mismatched types
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -9,4 +9,4 @@ LL | true //~ ERROR mismatched types
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -28,4 +28,4 @@ LL | | }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -15,4 +15,4 @@ LL | | }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -31,4 +31,4 @@ LL | | }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -20,4 +20,4 @@ LL | a::Enum::EnumStructVariant { x, y, z } => {
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -17,5 +17,5 @@ LL | let x = foo(5)(2);
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
You've got a few errors: E0308, E0618
|
||||
If you want more information on an error, try using "rustc --explain E0308"
|
||||
Some errors occurred: E0308, E0618.
|
||||
For more information about an error, try `rustc --explain E0308`.
|
||||
|
@ -22,5 +22,5 @@ LL | b + 3 //~ ERROR E0277
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
You've got a few errors: E0277, E0308
|
||||
If you want more information on an error, try using "rustc --explain E0277"
|
||||
Some errors occurred: E0277, E0308.
|
||||
For more information about an error, try `rustc --explain E0277`.
|
||||
|
@ -8,4 +8,4 @@ LL | || self.b()
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0599"
|
||||
For more information about this error, try `rustc --explain E0599`.
|
||||
|
@ -11,4 +11,4 @@ LL | &panic!()
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -17,4 +17,4 @@ LL | fn bar() -> usize {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -9,4 +9,4 @@ LL | color::hsl(h, s, l) => { println!("hsl"); }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0599"
|
||||
For more information about this error, try `rustc --explain E0599`.
|
||||
|
@ -161,5 +161,5 @@ LL | }
|
||||
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
You've got a few errors: E0382, E0502, E0503, E0505
|
||||
If you want more information on an error, try using "rustc --explain E0382"
|
||||
Some errors occurred: E0382, E0502, E0503, E0505.
|
||||
For more information about an error, try `rustc --explain E0382`.
|
||||
|
@ -150,4 +150,4 @@ LL | }
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0499"
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -12,4 +12,4 @@ LL | spawn(move || books.push(4));
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0373"
|
||||
For more information about this error, try `rustc --explain E0373`.
|
||||
|
@ -12,4 +12,4 @@ LL | Box::new(move || books.push(4))
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0373"
|
||||
For more information about this error, try `rustc --explain E0373`.
|
||||
|
@ -8,4 +8,4 @@ LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0507"
|
||||
For more information about this error, try `rustc --explain E0507`.
|
||||
|
@ -34,5 +34,5 @@ LL | n => {
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
You've got a few errors: E0507, E0509
|
||||
If you want more information on an error, try using "rustc --explain E0507"
|
||||
Some errors occurred: E0507, E0509.
|
||||
For more information about an error, try `rustc --explain E0507`.
|
||||
|
@ -15,4 +15,4 @@ LL | | Foo { string: b }] => {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0508"
|
||||
For more information about this error, try `rustc --explain E0508`.
|
||||
|
@ -20,4 +20,4 @@ LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast)
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0382"
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -36,5 +36,5 @@ LL | };
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
You've got a few errors: E0499, E0502
|
||||
If you want more information on an error, try using "rustc --explain E0499"
|
||||
Some errors occurred: E0499, E0502.
|
||||
For more information about an error, try `rustc --explain E0499`.
|
||||
|
@ -80,5 +80,5 @@ LL | let a = vec[0]; //~ ERROR cannot move out
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
You've got a few errors: E0506, E0508
|
||||
If you want more information on an error, try using "rustc --explain E0506"
|
||||
Some errors occurred: E0506, E0508.
|
||||
For more information about an error, try `rustc --explain E0506`.
|
||||
|
@ -16,4 +16,4 @@ LL | _x = 4;
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0384"
|
||||
For more information about this error, try `rustc --explain E0384`.
|
||||
|
@ -54,4 +54,4 @@ LL | if let Some(thing) = maybe {
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0382"
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -27,4 +27,4 @@ LL | }
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0499"
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -21,4 +21,4 @@ LL | }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0499"
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -46,5 +46,5 @@ LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
You've got a few errors: E0195, E0276, E0308
|
||||
If you want more information on an error, try using "rustc --explain E0195"
|
||||
Some errors occurred: E0195, E0276, E0308.
|
||||
For more information about an error, try `rustc --explain E0195`.
|
||||
|
@ -9,4 +9,4 @@ LL | y.into_iter();
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0507"
|
||||
For more information about this error, try `rustc --explain E0507`.
|
||||
|
@ -8,4 +8,4 @@ LL | let u = 5 as bool;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0054"
|
||||
For more information about this error, try `rustc --explain E0054`.
|
||||
|
@ -6,4 +6,4 @@ LL | let error = error; //~ ERROR cannot find value `error`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0425"
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
|
@ -8,4 +8,4 @@ LL | let _ = 3 as bool;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0054"
|
||||
For more information about this error, try `rustc --explain E0054`.
|
||||
|
@ -16,4 +16,4 @@ LL | Box::new(1) as Send; //~ ERROR cast to unsized
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0620"
|
||||
For more information about this error, try `rustc --explain E0620`.
|
||||
|
@ -8,4 +8,4 @@ LL | b_raw = f_raw as *mut _; //~ ERROR is invalid
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0606"
|
||||
For more information about this error, try `rustc --explain E0606`.
|
||||
|
@ -6,4 +6,4 @@ LL | ipsum: Ipsum //~ ERROR cannot find type `Ipsum`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0412"
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
|
@ -11,4 +11,4 @@ LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0460"
|
||||
For more information about this error, try `rustc --explain E0460`.
|
||||
|
@ -48,4 +48,4 @@ LL | match Some(A) { //~ ERROR non-exhaustive
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0004"
|
||||
For more information about this error, try `rustc --explain E0004`.
|
||||
|
@ -84,4 +84,4 @@ LL | f = Some(x);
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -11,4 +11,4 @@ LL | Box::new(closure)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0525"
|
||||
For more information about this error, try `rustc --explain E0525`.
|
||||
|
@ -11,4 +11,4 @@ LL | Box::new(closure)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0525"
|
||||
For more information about this error, try `rustc --explain E0525`.
|
||||
|
@ -14,4 +14,4 @@ LL | for (key, value) in dict {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0382"
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -8,4 +8,4 @@ LL | impl C { fn f() {} }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0592"
|
||||
For more information about this error, try `rustc --explain E0592`.
|
||||
|
@ -6,4 +6,4 @@ LL | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0321"
|
||||
For more information about this error, try `rustc --explain E0321`.
|
||||
|
@ -9,4 +9,4 @@ LL | let y = &mut x; //~ ERROR cannot borrow
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0596"
|
||||
For more information about this error, try `rustc --explain E0596`.
|
||||
|
@ -10,4 +10,4 @@ LL | }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0499"
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -8,4 +8,4 @@ LL | assert!("foo");
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0600"
|
||||
For more information about this error, try `rustc --explain E0600`.
|
||||
|
@ -9,4 +9,4 @@ LL | v.push(v.pop().unwrap()); //~ ERROR cannot borrow
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0499"
|
||||
For more information about this error, try `rustc --explain E0499`.
|
||||
|
@ -29,4 +29,4 @@ LL | fn baz(&self) {}
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0592"
|
||||
For more information about this error, try `rustc --explain E0592`.
|
||||
|
@ -9,4 +9,4 @@ LL | S {f:_s} => {} //~ ERROR cannot move out
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0509"
|
||||
For more information about this error, try `rustc --explain E0509`.
|
||||
|
@ -17,5 +17,5 @@ LL | "bar boo" //~ ERROR mismatched types
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
You've got a few errors: E0308, E0425
|
||||
If you want more information on an error, try using "rustc --explain E0308"
|
||||
Some errors occurred: E0308, E0425.
|
||||
For more information about an error, try `rustc --explain E0308`.
|
||||
|
@ -11,4 +11,4 @@ LL | println!("{:?}", some_vec); //~ ERROR use of moved
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0382"
|
||||
For more information about this error, try `rustc --explain E0382`.
|
||||
|
@ -6,4 +6,3 @@ LL | impl Bar for Baz { } //~ ERROR expected trait, found type alias
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0404"
|
||||
|
@ -22,4 +22,4 @@ LL | let _ = a̐é; //~ ERROR cannot find
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0425"
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
|
@ -26,4 +26,4 @@ LL | | }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -6,4 +6,4 @@ LL | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in t
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0412"
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
|
@ -57,5 +57,5 @@ LL | impl Copy for &'static [NotSync] {}
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
You've got a few errors: E0117, E0206
|
||||
If you want more information on an error, try using "rustc --explain E0117"
|
||||
Some errors occurred: E0117, E0206.
|
||||
For more information about an error, try `rustc --explain E0117`.
|
||||
|
@ -20,4 +20,4 @@ LL | impl<X> A<i32, X> { fn f(&self) {} }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0592"
|
||||
For more information about this error, try `rustc --explain E0592`.
|
||||
|
@ -18,4 +18,4 @@ LL | impl<X> Foo<X> for i32 {}
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0119"
|
||||
For more information about this error, try `rustc --explain E0119`.
|
||||
|
@ -11,4 +11,4 @@ LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0592"
|
||||
For more information about this error, try `rustc --explain E0592`.
|
||||
|
@ -10,4 +10,4 @@ LL | impl<U:Sugar> Sweet for Box<U> { }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0119"
|
||||
For more information about this error, try `rustc --explain E0119`.
|
||||
|
@ -11,4 +11,4 @@ LL | impl A<i16> { fn dummy(&self) { } }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0592"
|
||||
For more information about this error, try `rustc --explain E0592`.
|
||||
|
@ -10,4 +10,4 @@ LL | impl Foo for i16 {}
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0119"
|
||||
For more information about this error, try `rustc --explain E0119`.
|
||||
|
@ -8,4 +8,4 @@ LL | x = 43;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0384"
|
||||
For more information about this error, try `rustc --explain E0384`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn foo() where U: 'a { } //~ ERROR E0276
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn foo() where 'a: 'b { } //~ ERROR impl has stricter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn foo() where V: 'a { }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -12,4 +12,4 @@ LL | fn b<F:Clone,G>(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0053"
|
||||
For more information about this error, try `rustc --explain E0053`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn b<F: Sync, G>(&self, _x: F) -> F { panic!() } //~ ERROR E0276
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -63,4 +63,4 @@ LL | fn method<G: Getter<usize>>(&self) {}
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -9,4 +9,4 @@ LL | fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> {
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0276"
|
||||
For more information about this error, try `rustc --explain E0276`.
|
||||
|
@ -6,4 +6,4 @@ LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0396"
|
||||
For more information about this error, try `rustc --explain E0396`.
|
||||
|
@ -12,4 +12,4 @@ LL | NEG_NEG_128 => println!("A"),
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -14,4 +14,4 @@ LL | : [u32; (i8::MAX as i8 + 1i8) as usize]
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -9,4 +9,4 @@ LL | V = CONSTANT,
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0308"
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -14,4 +14,4 @@ LL | println!("{}", FOO); //~ E0080
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -6,4 +6,4 @@ LL | static FOO: i32 = [][0];
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -26,4 +26,4 @@ LL | println!("{} {}", X, Y);
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -33,5 +33,5 @@ LL | let a : [i32; f(X)];
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
You've got a few errors: E0015, E0016, E0019, E0080
|
||||
If you want more information on an error, try using "rustc --explain E0015"
|
||||
Some errors occurred: E0015, E0016, E0019, E0080.
|
||||
For more information about an error, try `rustc --explain E0015`.
|
||||
|
@ -6,4 +6,4 @@ LL | const fn f() -> u32 { 22 }
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0379"
|
||||
For more information about this error, try `rustc --explain E0379`.
|
||||
|
@ -12,4 +12,4 @@ LL | const fn g() -> u32 { 0 }
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0379"
|
||||
For more information about this error, try `rustc --explain E0379`.
|
||||
|
@ -20,4 +20,4 @@ LL | let a: [i8; LEN] = unimplemented!();
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0080"
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
@ -18,4 +18,4 @@ LL | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covere
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
If you want more information on this error, try using "rustc --explain E0005"
|
||||
For more information about this error, try `rustc --explain E0005`.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user