diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index cfbf233297c..919badfa4aa 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1322,6 +1322,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, epoch). Crates compiled with different epochs can be linked together."), run_dsymutil: Option = (None, parse_opt_bool, [TRACKED], "run `dsymutil` and delete intermediate object files"), + ui_testing: bool = (false, parse_bool, [UNTRACKED], + "format compiler diagnostics in a way that's better suitable for UI testing"), } pub fn default_lib_output() -> CrateType { diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 9d7a9acc3d5..939154fac7a 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -909,21 +909,24 @@ pub fn build_session_with_codemap(sopts: config::Options, let emitter: Box = match (sopts.error_format, emitter_dest) { (config::ErrorOutputType::HumanReadable(color_config), None) => { - Box::new(EmitterWriter::stderr(color_config, - Some(codemap.clone()), - false, - sopts.debugging_opts.teach)) + Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), + false, sopts.debugging_opts.teach) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::HumanReadable(_), Some(dst)) => { - Box::new(EmitterWriter::new(dst, Some(codemap.clone()), false, false)) + Box::new(EmitterWriter::new(dst, Some(codemap.clone()), + false, false) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Json(pretty), None) => { Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(), - pretty, sopts.debugging_opts.approximate_suggestions)) + pretty, sopts.debugging_opts.approximate_suggestions) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Json(pretty), Some(dst)) => { Box::new(JsonEmitter::new(dst, Some(registry), codemap.clone(), - pretty, sopts.debugging_opts.approximate_suggestions)) + pretty, sopts.debugging_opts.approximate_suggestions) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Short(color_config), None) => { Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), true, false)) diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 86e77d404ff..0bd9b7268cb 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -25,6 +25,8 @@ use std::collections::{HashMap, HashSet}; use std::cmp::min; use unicode_width; +const ANONYMIZED_LINE_NUM: &str = "LL"; + /// Emitter trait for emitting errors. pub trait Emitter { /// Emit a structured diagnostic. @@ -108,6 +110,7 @@ pub struct EmitterWriter { short_message: bool, teach: bool, error_codes: HashSet, + ui_testing: bool, } struct FileWithAnnotatedLines { @@ -157,6 +160,7 @@ impl EmitterWriter { short_message, teach, error_codes: HashSet::new(), + ui_testing: false, } } else { EmitterWriter { @@ -165,6 +169,7 @@ impl EmitterWriter { short_message, teach, error_codes: HashSet::new(), + ui_testing: false, } } } @@ -180,6 +185,20 @@ impl EmitterWriter { short_message, teach, error_codes: HashSet::new(), + ui_testing: false, + } + } + + pub fn ui_testing(mut self, ui_testing: bool) -> Self { + self.ui_testing = ui_testing; + self + } + + fn maybe_anonymized(&self, line_num: usize) -> String { + if self.ui_testing { + ANONYMIZED_LINE_NUM.to_string() + } else { + line_num.to_string() } } @@ -336,7 +355,7 @@ impl EmitterWriter { buffer.puts(line_offset, code_offset, &source_string, Style::Quotation); buffer.puts(line_offset, 0, - &(line.line_index.to_string()), + &self.maybe_anonymized(line.line_index), Style::LineNumber); draw_col_separator(buffer, line_offset, width_offset - 2); @@ -1159,8 +1178,8 @@ impl EmitterWriter { buffer.puts(last_buffer_line_num, 0, - &(annotated_file.lines[line_idx + 1].line_index - 1) - .to_string(), + &self.maybe_anonymized(annotated_file.lines[line_idx + 1] + .line_index - 1), Style::LineNumber); draw_col_separator(&mut buffer, last_buffer_line_num, @@ -1235,7 +1254,7 @@ impl EmitterWriter { // Print the span column to avoid confusion buffer.puts(row_num, 0, - &((line_start + line_pos).to_string()), + &self.maybe_anonymized(line_start + line_pos), Style::LineNumber); // print the suggestion draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); @@ -1288,8 +1307,11 @@ impl EmitterWriter { span: &MultiSpan, children: &Vec, suggestions: &[CodeSuggestion]) { - let max_line_num = self.get_max_line_num(span, children); - let max_line_num_len = max_line_num.to_string().len(); + let max_line_num_len = if self.ui_testing { + ANONYMIZED_LINE_NUM.len() + } else { + self.get_max_line_num(span, children).to_string().len() + }; match self.emit_message_default(span, message, diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 98d5fa8f797..57f07ff33f5 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -40,6 +40,7 @@ pub struct JsonEmitter { pretty: bool, /// Whether "approximate suggestions" are enabled in the config approximate_suggestions: bool, + ui_testing: bool, } impl JsonEmitter { @@ -53,6 +54,7 @@ impl JsonEmitter { cm: code_map, pretty, approximate_suggestions, + ui_testing: false, } } @@ -73,8 +75,13 @@ impl JsonEmitter { cm: code_map, pretty, approximate_suggestions, + ui_testing: false, } } + + pub fn ui_testing(self, ui_testing: bool) -> Self { + Self { ui_testing, ..self } + } } impl Emitter for JsonEmitter { @@ -199,7 +206,8 @@ impl Diagnostic { } let buf = BufWriter::default(); let output = buf.clone(); - EmitterWriter::new(Box::new(buf), Some(je.cm.clone()), false, false).emit(db); + EmitterWriter::new(Box::new(buf), Some(je.cm.clone()), false, false) + .ui_testing(je.ui_testing).emit(db); let output = Arc::try_unwrap(output.0).unwrap().into_inner().unwrap(); let output = String::from_utf8(output).unwrap(); diff --git a/src/test/ui-fulldeps/custom-derive/issue-36935.stderr b/src/test/ui-fulldeps/custom-derive/issue-36935.stderr index 55848c6553c..b082999a897 100644 --- a/src/test/ui-fulldeps/custom-derive/issue-36935.stderr +++ b/src/test/ui-fulldeps/custom-derive/issue-36935.stderr @@ -1,7 +1,7 @@ error: proc-macro derive panicked --> $DIR/issue-36935.rs:18:15 | -18 | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked +LL | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked | ^^^ | = help: message: lolnope diff --git a/src/test/ui-fulldeps/deprecated-derive.stderr b/src/test/ui-fulldeps/deprecated-derive.stderr index 3ab7567f8df..df4bd7f752c 100644 --- a/src/test/ui-fulldeps/deprecated-derive.stderr +++ b/src/test/ui-fulldeps/deprecated-derive.stderr @@ -1,6 +1,6 @@ warning: derive(Encodable) is deprecated in favor of derive(RustcEncodable) --> $DIR/deprecated-derive.rs:18:10 | -18 | #[derive(Encodable)] +LL | #[derive(Encodable)] | ^^^^^^^^^ diff --git a/src/test/ui-fulldeps/lint-group-plugin.stderr b/src/test/ui-fulldeps/lint-group-plugin.stderr index 1d68e78de5e..80a309f27e1 100644 --- a/src/test/ui-fulldeps/lint-group-plugin.stderr +++ b/src/test/ui-fulldeps/lint-group-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-group-plugin.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default @@ -9,7 +9,7 @@ warning: item is named 'lintme' warning: item is named 'pleaselintme' --> $DIR/lint-group-plugin.rs:19:1 | -19 | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' +LL | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' | ^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(please_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr index 0cc3a5b6bf3..cda6ea8bb90 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr @@ -1,13 +1,13 @@ warning: function is never used: `lintme` --> $DIR/lint-plugin-cmdline-allow.rs:20:1 | -20 | fn lintme() { } +LL | fn lintme() { } | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-plugin-cmdline-allow.rs:17:9 | -17 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr index 42ececc93bd..33c690a2d9f 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin-cmdline-load.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr index b9d166589b0..ac26b5212ec 100644 --- a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr +++ b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr @@ -1,22 +1,22 @@ error: item is named 'lintme' --> $DIR/lint-plugin-forbid-attrs.rs:18:1 | -18 | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } //~ ERROR item is named 'lintme' | ^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-plugin-forbid-attrs.rs:16:11 | -16 | #![forbid(test_lint)] +LL | #![forbid(test_lint)] | ^^^^^^^^^ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint) --> $DIR/lint-plugin-forbid-attrs.rs:20:9 | -16 | #![forbid(test_lint)] +LL | #![forbid(test_lint)] | --------- `forbid` level set here ... -20 | #[allow(test_lint)] +LL | #[allow(test_lint)] | ^^^^^^^^^ overruled by previous forbid error: aborting due to 2 previous errors diff --git a/src/test/ui-fulldeps/lint-plugin.stderr b/src/test/ui-fulldeps/lint-plugin.stderr index 1fe821d3115..4a3140925c8 100644 --- a/src/test/ui-fulldeps/lint-plugin.stderr +++ b/src/test/ui-fulldeps/lint-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin.rs:18:1 | -18 | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } //~ WARNING item is named 'lintme' | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/proc-macro/load-panic.stderr b/src/test/ui-fulldeps/proc-macro/load-panic.stderr index ab2ab84315a..edfd134469c 100644 --- a/src/test/ui-fulldeps/proc-macro/load-panic.stderr +++ b/src/test/ui-fulldeps/proc-macro/load-panic.stderr @@ -1,7 +1,7 @@ error: proc-macro derive panicked --> $DIR/load-panic.rs:17:10 | -17 | #[derive(A)] +LL | #[derive(A)] | ^ | = help: message: nope! diff --git a/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr b/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr index 7194b05b18e..0442c4f6ce7 100644 --- a/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr +++ b/src/test/ui-fulldeps/proc-macro/parent-source-spans.stderr @@ -1,127 +1,127 @@ error: first final: "hello" --> $DIR/parent-source-spans.rs:27:12 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: second final: "world" --> $DIR/parent-source-spans.rs:27:16 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: first parent: "hello" --> $DIR/parent-source-spans.rs:21:5 | -21 | two!($a, $b); +LL | two!($a, $b); | ^^^^^^^^^^^^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: second parent: "world" --> $DIR/parent-source-spans.rs:21:5 | -21 | two!($a, $b); +LL | two!($a, $b); | ^^^^^^^^^^^^^ ... -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ----------------------- in this macro invocation error: first grandparent: "hello" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: second grandparent: "world" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: first source: "hello" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: second source: "world" --> $DIR/parent-source-spans.rs:44:5 | -44 | one!("hello", "world"); +LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^^ error: first final: "yay" --> $DIR/parent-source-spans.rs:27:12 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | -------------------- in this macro invocation error: second final: "rust" --> $DIR/parent-source-spans.rs:27:16 | -27 | three!($a, $b); +LL | three!($a, $b); | ^^ ... -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | -------------------- in this macro invocation error: first parent: "yay" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: second parent: "rust" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: first source: "yay" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: second source: "rust" --> $DIR/parent-source-spans.rs:50:5 | -50 | two!("yay", "rust"); +LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^^ error: first final: "hip" --> $DIR/parent-source-spans.rs:56:12 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: second final: "hop" --> $DIR/parent-source-spans.rs:56:19 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: first source: "hip" --> $DIR/parent-source-spans.rs:56:12 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: second source: "hop" --> $DIR/parent-source-spans.rs:56:19 | -56 | three!("hip", "hop"); +LL | three!("hip", "hop"); | ^^^^^ error: aborting due to 18 previous errors diff --git a/src/test/ui-fulldeps/proc-macro/signature.stderr b/src/test/ui-fulldeps/proc-macro/signature.stderr index b89f67d9069..dad403ccf3a 100644 --- a/src/test/ui-fulldeps/proc-macro/signature.stderr +++ b/src/test/ui-fulldeps/proc-macro/signature.stderr @@ -1,10 +1,10 @@ error[E0308]: mismatched types --> $DIR/signature.rs:17:1 | -17 | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 { -18 | | //~^ ERROR: mismatched types -19 | | loop {} -20 | | } +LL | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 { +LL | | //~^ ERROR: mismatched types +LL | | loop {} +LL | | } | |_^ expected normal fn, found unsafe fn | = note: expected type `fn(proc_macro::TokenStream) -> proc_macro::TokenStream` diff --git a/src/test/ui-fulldeps/proc-macro/three-equals.stderr b/src/test/ui-fulldeps/proc-macro/three-equals.stderr index 0ffaf161078..1a0337f93f9 100644 --- a/src/test/ui-fulldeps/proc-macro/three-equals.stderr +++ b/src/test/ui-fulldeps/proc-macro/three-equals.stderr @@ -1,7 +1,7 @@ error: found 2 equal signs, need exactly 3 --> $DIR/three-equals.rs:25:5 | -25 | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 +LL | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 | ^^^^^^^^^^^^^^^^^^ | = help: input must be: `===` @@ -9,38 +9,38 @@ error: found 2 equal signs, need exactly 3 error: expected EOF, found `=`. --> $DIR/three-equals.rs:28:21 | -28 | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); //~ ERROR expected EOF | ^^ | note: last good input was here --> $DIR/three-equals.rs:28:21 | -28 | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); //~ ERROR expected EOF | ^^ = help: input must be: `===` error: expected `=`, found `abc`. --> $DIR/three-equals.rs:31:19 | -31 | three_equals!(abc); //~ ERROR expected `=` +LL | three_equals!(abc); //~ ERROR expected `=` | ^^^ error: expected `=`, found `!`. --> $DIR/three-equals.rs:34:19 | -34 | three_equals!(!!); //~ ERROR expected `=` +LL | three_equals!(!!); //~ ERROR expected `=` | ^ error: expected EOF, found `a`. --> $DIR/three-equals.rs:37:22 | -37 | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); //~ ERROR expected EOF | ^ | note: last good input was here --> $DIR/three-equals.rs:37:21 | -37 | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); //~ ERROR expected EOF | ^ = help: input must be: `===` diff --git a/src/test/ui-fulldeps/resolve-error.stderr b/src/test/ui-fulldeps/resolve-error.stderr index 9121ce1720c..e19ec9e6f80 100644 --- a/src/test/ui-fulldeps/resolve-error.stderr +++ b/src/test/ui-fulldeps/resolve-error.stderr @@ -1,61 +1,61 @@ error: cannot find derive macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:37:10 | -37 | #[derive(FooWithLongNan)] +LL | #[derive(FooWithLongNan)] | ^^^^^^^^^^^^^^ help: try: `FooWithLongName` error: cannot find attribute macro `attr_proc_macra` in this scope --> $DIR/resolve-error.rs:41:3 | -41 | #[attr_proc_macra] +LL | #[attr_proc_macra] | ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro` error: cannot find attribute macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:45:3 | -45 | #[FooWithLongNan] +LL | #[FooWithLongNan] | ^^^^^^^^^^^^^^ error: cannot find derive macro `Dlone` in this scope --> $DIR/resolve-error.rs:49:10 | -49 | #[derive(Dlone)] +LL | #[derive(Dlone)] | ^^^^^ help: try: `Clone` error: cannot find derive macro `Dlona` in this scope --> $DIR/resolve-error.rs:53:10 | -53 | #[derive(Dlona)] +LL | #[derive(Dlona)] | ^^^^^ help: try: `Clona` error: cannot find derive macro `attr_proc_macra` in this scope --> $DIR/resolve-error.rs:57:10 | -57 | #[derive(attr_proc_macra)] +LL | #[derive(attr_proc_macra)] | ^^^^^^^^^^^^^^^ error: cannot find macro `FooWithLongNama!` in this scope --> $DIR/resolve-error.rs:62:5 | -62 | FooWithLongNama!(); +LL | FooWithLongNama!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam` error: cannot find macro `attr_proc_macra!` in this scope --> $DIR/resolve-error.rs:65:5 | -65 | attr_proc_macra!(); +LL | attr_proc_macra!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac` error: cannot find macro `Dlona!` in this scope --> $DIR/resolve-error.rs:68:5 | -68 | Dlona!(); +LL | Dlona!(); | ^^^^^ error: cannot find macro `bang_proc_macrp!` in this scope --> $DIR/resolve-error.rs:71:5 | -71 | bang_proc_macrp!(); +LL | bang_proc_macrp!(); | ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro` error: aborting due to 10 previous errors diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index 96ae2afe220..ff31595ee9b 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 | -12 | f1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _` @@ -9,13 +9,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f1` --> $DIR/anonymous-higher-ranked-lifetime.rs:26:1 | -26 | fn f1(_: F) where F: Fn(&(), &()) {} +LL | fn f1(_: F) where F: Fn(&(), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:13:5 | -13 | f2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _` @@ -23,13 +23,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f2` --> $DIR/anonymous-higher-ranked-lifetime.rs:27:1 | -27 | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} +LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 | -14 | f3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&(), &'r ()) -> _` @@ -37,13 +37,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f3` --> $DIR/anonymous-higher-ranked-lifetime.rs:28:1 | -28 | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} +LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:15:5 | -15 | f4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _` @@ -51,13 +51,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f4` --> $DIR/anonymous-higher-ranked-lifetime.rs:29:1 | -29 | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} +LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 | -16 | f5(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), &'r ()) -> _` @@ -65,13 +65,13 @@ error[E0631]: type mismatch in closure arguments note: required by `f5` --> $DIR/anonymous-higher-ranked-lifetime.rs:30:1 | -30 | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} +LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:17:5 | -17 | g1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), std::boxed::Box std::ops::Fn(&'s ()) + 'static>) -> _` @@ -79,13 +79,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g1` --> $DIR/anonymous-higher-ranked-lifetime.rs:33:1 | -33 | fn g1(_: F) where F: Fn(&(), Box) {} +LL | fn g1(_: F) where F: Fn(&(), Box) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 | -18 | g2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _` @@ -93,13 +93,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g2` --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1 | -34 | fn g2(_: F) where F: Fn(&(), fn(&())) {} +LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:19:5 | -19 | g3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), std::boxed::Box std::ops::Fn(&'r ()) + 'static>) -> _` @@ -107,13 +107,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g3` --> $DIR/anonymous-higher-ranked-lifetime.rs:35:1 | -35 | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} +LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 | -20 | g4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _` @@ -121,13 +121,13 @@ error[E0631]: type mismatch in closure arguments note: required by `g4` --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1 | -36 | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} +LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:21:5 | -21 | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box std::ops::Fn(&'t0 ()) + 'static>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` @@ -135,13 +135,13 @@ error[E0631]: type mismatch in closure arguments note: required by `h1` --> $DIR/anonymous-higher-ranked-lifetime.rs:39:1 | -39 | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} +LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 | -22 | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box std::ops::Fn(&'s ()) + 'static>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` @@ -149,7 +149,7 @@ error[E0631]: type mismatch in closure arguments note: required by `h2` --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1 | -40 | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} +LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 11 previous errors diff --git a/src/test/ui/arbitrary-self-types-not-object-safe.stderr b/src/test/ui/arbitrary-self-types-not-object-safe.stderr index fa8b82b8a9b..ba240c8d511 100644 --- a/src/test/ui/arbitrary-self-types-not-object-safe.stderr +++ b/src/test/ui/arbitrary-self-types-not-object-safe.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/arbitrary-self-types-not-object-safe.rs:40:33 | -40 | let x = Box::new(5usize) as Box; +LL | let x = Box::new(5usize) as Box; | ^^^^^^^^ the trait `Foo` cannot be made into an object | = note: method `foo` has a non-standard `self` type @@ -9,7 +9,7 @@ error[E0038]: the trait `Foo` cannot be made into an object error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/arbitrary-self-types-not-object-safe.rs:40:13 | -40 | let x = Box::new(5usize) as Box; +LL | let x = Box::new(5usize) as Box; | ^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | = note: method `foo` has a non-standard `self` type diff --git a/src/test/ui/asm-out-assign-imm.stderr b/src/test/ui/asm-out-assign-imm.stderr index 90104e64972..16df627578e 100644 --- a/src/test/ui/asm-out-assign-imm.stderr +++ b/src/test/ui/asm-out-assign-imm.stderr @@ -1,10 +1,10 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/asm-out-assign-imm.rs:29:9 | -26 | x = 1; +LL | x = 1; | ----- first assignment to `x` ... -29 | asm!("mov $1, $0" : "=r"(x) : "r"(5)); +LL | asm!("mov $1, $0" : "=r"(x) : "r"(5)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable error: aborting due to previous error diff --git a/src/test/ui/associated-const-impl-wrong-lifetime.stderr b/src/test/ui/associated-const-impl-wrong-lifetime.stderr index 6ec274ac4f9..e0a9653423f 100644 --- a/src/test/ui/associated-const-impl-wrong-lifetime.stderr +++ b/src/test/ui/associated-const-impl-wrong-lifetime.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/associated-const-impl-wrong-lifetime.rs:18:5 | -18 | const NAME: &'a str = "unit"; +LL | const NAME: &'a str = "unit"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `&'static str` @@ -9,7 +9,7 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the impl at 17:1... --> $DIR/associated-const-impl-wrong-lifetime.rs:17:1 | -17 | impl<'a> Foo for &'a () { +LL | impl<'a> Foo for &'a () { | ^^^^^^^^^^^^^^^^^^^^^^^ = note: ...does not necessarily outlive the static lifetime diff --git a/src/test/ui/associated-const-impl-wrong-type.stderr b/src/test/ui/associated-const-impl-wrong-type.stderr index e741aa742c1..6c2f2600acc 100644 --- a/src/test/ui/associated-const-impl-wrong-type.stderr +++ b/src/test/ui/associated-const-impl-wrong-type.stderr @@ -1,10 +1,10 @@ error[E0326]: implemented const `BAR` has an incompatible type for trait --> $DIR/associated-const-impl-wrong-type.rs:19:16 | -13 | const BAR: u32; +LL | const BAR: u32; | --- type in trait ... -19 | const BAR: i32 = -1; +LL | const BAR: i32 = -1; | ^^^ expected u32, found i32 error: aborting due to previous error diff --git a/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr index b924fbaeb39..3b732ed3933 100644 --- a/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr +++ b/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr @@ -1,43 +1,43 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:29:32 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -29 | fn dent(c: C, color: C::Color) { +LL | fn dent(c: C, color: C::Color) { | ^^^^^^^^ ambiguous associated type `Color` error[E0221]: ambiguous associated type `Color` in bounds of `BoxCar` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:33 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -33 | fn dent_object(c: BoxCar) { +LL | fn dent_object(c: BoxCar) { | ^^^^^^^^^^^ ambiguous associated type `Color` error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`) must be specified --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:26 | -33 | fn dent_object(c: BoxCar) { +LL | fn dent_object(c: BoxCar) { | ^^^^^^^^^^^^^^^^^^^ missing associated type `Color` value error[E0221]: ambiguous associated type `Color` in bounds of `C` --> $DIR/associated-type-projection-from-multiple-supertraits.rs:38:29 | -15 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Vehicle` ... -21 | type Color; +LL | type Color; | ----------- ambiguous `Color` from `Box` ... -38 | fn paint(c: C, d: C::Color) { +LL | fn paint(c: C, d: C::Color) { | ^^^^^^^^ ambiguous associated type `Color` error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr b/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr index b1819961127..f69b0af71f6 100644 --- a/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr +++ b/src/test/ui/associated-types-ICE-when-projecting-out-of-err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): Add` is not satisfied --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:33:11 | -33 | r = r + a; +LL | r = r + a; | ^ the trait `Add` is not implemented for `()` error: aborting due to previous error diff --git a/src/test/ui/associated-types-in-ambiguous-context.stderr b/src/test/ui/associated-types-in-ambiguous-context.stderr index 33b83b787ad..ff5c45e797e 100644 --- a/src/test/ui/associated-types-in-ambiguous-context.stderr +++ b/src/test/ui/associated-types-in-ambiguous-context.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:16:36 | -16 | fn get(x: T, y: U) -> Get::Value {} +LL | fn get(x: T, y: U) -> Get::Value {} | ^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Value` @@ -9,7 +9,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:25:10 | -25 | type X = std::ops::Deref::Target; +LL | type X = std::ops::Deref::Target; | ^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Target` @@ -17,7 +17,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:21:23 | -21 | fn grab(&self) -> Grab::Value; +LL | fn grab(&self) -> Grab::Value; | ^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Value` diff --git a/src/test/ui/attr-usage-repr.stderr b/src/test/ui/attr-usage-repr.stderr index 6ab0e0029c9..03c6f599b6c 100644 --- a/src/test/ui/attr-usage-repr.stderr +++ b/src/test/ui/attr-usage-repr.stderr @@ -1,41 +1,41 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/attr-usage-repr.rs:14:8 | -14 | #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union +LL | #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union | ^ -15 | fn f() {} +LL | fn f() {} | --------- not a struct, enum or union error[E0517]: attribute should be applied to enum --> $DIR/attr-usage-repr.rs:26:8 | -26 | #[repr(i8)] //~ ERROR: attribute should be applied to enum +LL | #[repr(i8)] //~ ERROR: attribute should be applied to enum | ^^ -27 | struct SInt(f64, f64); +LL | struct SInt(f64, f64); | ---------------------- not an enum error[E0517]: attribute should be applied to struct or union --> $DIR/attr-usage-repr.rs:32:8 | -32 | #[repr(align(8))] //~ ERROR: attribute should be applied to struct +LL | #[repr(align(8))] //~ ERROR: attribute should be applied to struct | ^^^^^^^^ -33 | enum EAlign { A, B } +LL | enum EAlign { A, B } | -------------------- not a struct or union error[E0517]: attribute should be applied to struct or union --> $DIR/attr-usage-repr.rs:35:8 | -35 | #[repr(packed)] //~ ERROR: attribute should be applied to struct +LL | #[repr(packed)] //~ ERROR: attribute should be applied to struct | ^^^^^^ -36 | enum EPacked { A, B } +LL | enum EPacked { A, B } | --------------------- not a struct or union error[E0517]: attribute should be applied to struct --> $DIR/attr-usage-repr.rs:38:8 | -38 | #[repr(simd)] //~ ERROR: attribute should be applied to struct +LL | #[repr(simd)] //~ ERROR: attribute should be applied to struct | ^^^^ -39 | enum ESimd { A, B } +LL | enum ESimd { A, B } | ------------------- not a struct error: aborting due to 5 previous errors diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index d3d3e0b6dd3..e04dc2f72a3 100644 --- a/src/test/ui/augmented-assignments.stderr +++ b/src/test/ui/augmented-assignments.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable --> $DIR/augmented-assignments.rs:30:5 | -28 | let y = Int(2); +LL | let y = Int(2); | - consider changing this to `mut y` -29 | //~^ consider changing this to `mut y` -30 | y //~ error: cannot borrow immutable local variable `y` as mutable +LL | //~^ consider changing this to `mut y` +LL | y //~ error: cannot borrow immutable local variable `y` as mutable | ^ cannot borrow mutably error[E0382]: use of moved value: `x` --> $DIR/augmented-assignments.rs:23:5 | -23 | x //~ error: use of moved value: `x` +LL | x //~ error: use of moved value: `x` | ^ value used here after move ... -26 | x; //~ value moved here +LL | x; //~ value moved here | - value moved here | = note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait diff --git a/src/test/ui/binary-op-on-double-ref.stderr b/src/test/ui/binary-op-on-double-ref.stderr index 64897fadaa6..b6c502b90b5 100644 --- a/src/test/ui/binary-op-on-double-ref.stderr +++ b/src/test/ui/binary-op-on-double-ref.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `%` cannot be applied to type `&&{integer}` --> $DIR/binary-op-on-double-ref.rs:14:9 | -14 | x % 2 == 0 +LL | x % 2 == 0 | ^^^^^ | = note: this is a reference to a type that `%` can be applied to; you need to dereference this variable once for this operation to work diff --git a/src/test/ui/blind-item-item-shadow.stderr b/src/test/ui/blind-item-item-shadow.stderr index 227e157cf9f..f02dd6b3e98 100644 --- a/src/test/ui/blind-item-item-shadow.stderr +++ b/src/test/ui/blind-item-item-shadow.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `foo` is defined multiple times --> $DIR/blind-item-item-shadow.rs:13:5 | -11 | mod foo { pub mod foo { } } +LL | mod foo { pub mod foo { } } | ------- previous definition of the module `foo` here -12 | -13 | use foo::foo; +LL | +LL | use foo::foo; | ^^^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -13 | use foo::foo as other_foo; +LL | use foo::foo as other_foo; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/block-result/block-must-not-have-result-do.stderr b/src/test/ui/block-result/block-must-not-have-result-do.stderr index 8c8e30a7262..242906ca5cb 100644 --- a/src/test/ui/block-result/block-must-not-have-result-do.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-do.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-do.rs:13:9 | -13 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-res.stderr b/src/test/ui/block-result/block-must-not-have-result-res.stderr index b64a0c62a1a..ca730927c88 100644 --- a/src/test/ui/block-result/block-must-not-have-result-res.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-res.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-res.rs:15:9 | -14 | fn drop(&mut self) { +LL | fn drop(&mut self) { | - expected `()` because of default return type -15 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-while.stderr b/src/test/ui/block-result/block-must-not-have-result-while.stderr index 4b0c4bb776c..1a4852a4541 100644 --- a/src/test/ui/block-result/block-must-not-have-result-while.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-while.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-while.rs:13:9 | -13 | true //~ ERROR mismatched types +LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr index 3e434a0ca3f..6fa892e10e7 100644 --- a/src/test/ui/block-result/consider-removing-last-semi.stderr +++ b/src/test/ui/block-result/consider-removing-last-semi.stderr @@ -1,12 +1,12 @@ error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:11:18 | -11 | fn f() -> String { //~ ERROR mismatched types +LL | fn f() -> String { //~ ERROR mismatched types | __________________^ -12 | | 0u8; -13 | | "bla".to_string(); +LL | | 0u8; +LL | | "bla".to_string(); | | - help: consider removing this semicolon -14 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` @@ -15,12 +15,12 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:16:18 | -16 | fn g() -> String { //~ ERROR mismatched types +LL | fn g() -> String { //~ ERROR mismatched types | __________________^ -17 | | "this won't work".to_string(); -18 | | "removeme".to_string(); +LL | | "this won't work".to_string(); +LL | | "removeme".to_string(); | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` diff --git a/src/test/ui/block-result/issue-11714.stderr b/src/test/ui/block-result/issue-11714.stderr index 3b6fd336583..8fad1c4de4a 100644 --- a/src/test/ui/block-result/issue-11714.stderr +++ b/src/test/ui/block-result/issue-11714.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/issue-11714.rs:11:18 | -11 | fn blah() -> i32 { //~ ERROR mismatched types +LL | fn blah() -> i32 { //~ ERROR mismatched types | __________________^ -12 | | 1 -13 | | -14 | | ; +LL | | 1 +LL | | +LL | | ; | | - help: consider removing this semicolon -15 | | } +LL | | } | |_^ expected i32, found () | = note: expected type `i32` diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index fbf3c6bd40a..7f39f53d6f9 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -1,15 +1,15 @@ error[E0308]: mismatched types --> $DIR/issue-13428.rs:13:20 | -13 | fn foo() -> String { //~ ERROR mismatched types +LL | fn foo() -> String { //~ ERROR mismatched types | ____________________^ -14 | | format!("Hello {}", -15 | | "world") -16 | | // Put the trailing semicolon on its own line to test that the -17 | | // note message gets the offending semicolon exactly -18 | | ; +LL | | format!("Hello {}", +LL | | "world") +LL | | // Put the trailing semicolon on its own line to test that the +LL | | // note message gets the offending semicolon exactly +LL | | ; | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` @@ -18,12 +18,12 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-13428.rs:21:20 | -21 | fn bar() -> String { //~ ERROR mismatched types +LL | fn bar() -> String { //~ ERROR mismatched types | ____________________^ -22 | | "foobar".to_string() -23 | | ; +LL | | "foobar".to_string() +LL | | ; | | - help: consider removing this semicolon -24 | | } +LL | | } | |_^ expected struct `std::string::String`, found () | = note: expected type `std::string::String` diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr index e6e1cfdc3ab..0df7cf43c35 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-13624.rs:17:5 | -16 | pub fn get_enum_struct_variant() -> () { +LL | pub fn get_enum_struct_variant() -> () { | -- expected `()` because of return type -17 | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } +LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` @@ -12,7 +12,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-13624.rs:32:9 | -32 | a::Enum::EnumStructVariant { x, y, z } => { +LL | a::Enum::EnumStructVariant { x, y, z } => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index f2d98a1bb74..238edb765ac 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-20862.rs:12:5 | -11 | fn foo(x: i32) { +LL | fn foo(x: i32) { | - possibly return type missing here? -12 | |y| x + y +LL | |y| x + y | ^^^^^^^^^ expected (), found closure | = note: expected type `()` @@ -12,7 +12,7 @@ error[E0308]: mismatched types error[E0618]: expected function, found `()` --> $DIR/issue-20862.rs:17:13 | -17 | let x = foo(5)(2); +LL | let x = foo(5)(2); | ^^^^^^^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index 57e500dba82..03d9d03371e 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied --> $DIR/issue-22645.rs:25:5 | -25 | b + 3 //~ ERROR E0277 +LL | b + 3 //~ ERROR E0277 | ^ the trait `Scalar` is not implemented for `{integer}` | = help: the following implementations were found: @@ -11,10 +11,10 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied error[E0308]: mismatched types --> $DIR/issue-22645.rs:25:3 | -23 | fn main() { +LL | fn main() { | - expected `()` because of default return type -24 | let b = Bob + 3.5; -25 | b + 3 //~ ERROR E0277 +LL | let b = Bob + 3.5; +LL | b + 3 //~ ERROR E0277 | ^^^^^ expected (), found struct `Bob` | = note: expected type `()` diff --git a/src/test/ui/block-result/issue-3563.stderr b/src/test/ui/block-result/issue-3563.stderr index 6b9fef6cba6..af0e25ab18a 100644 --- a/src/test/ui/block-result/issue-3563.stderr +++ b/src/test/ui/block-result/issue-3563.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `b` found for type `&Self` in the current scope --> $DIR/issue-3563.rs:13:17 | -13 | || self.b() +LL | || self.b() | ^ | = help: did you mean `a`? diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr index bbe0e883cc7..74379809de0 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-5500.rs:12:5 | -11 | fn main() { +LL | fn main() { | - expected `()` because of default return type -12 | &panic!() +LL | &panic!() | ^^^^^^^^^ expected (), found reference | = note: expected type `()` 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 39d55aced3a..10a8814a7e5 100644 --- a/src/test/ui/block-result/unexpected-return-on-unit.stderr +++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr @@ -1,18 +1,18 @@ error[E0308]: mismatched types --> $DIR/unexpected-return-on-unit.rs:19:5 | -19 | foo() //~ ERROR mismatched types +LL | foo() //~ ERROR mismatched types | ^^^^^ expected (), found usize | = note: expected type `()` found type `usize` help: try adding a semicolon | -19 | foo(); //~ ERROR mismatched types +LL | foo(); //~ ERROR mismatched types | ^ help: try adding a return type | -18 | fn bar() -> usize { +LL | fn bar() -> usize { | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index d57c5cbde5f..76284f3b71b 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `hsl` found for type `color` in the current scope --> $DIR/bogus-tag.rs:18:7 | -12 | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } +LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } | ---------- variant `hsl` not found here ... -18 | color::hsl(h, s, l) => { println!("hsl"); } +LL | color::hsl(h, s, l) => { println!("hsl"); } | ^^^^^^^^^^^^^^^^^^^ variant not found in `color` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr index 1df7be00a78..7bea41b2209 100644 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:37:9 | -35 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -36 | //~^ value moved here -37 | let _y = a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -12,10 +12,10 @@ error[E0382]: use of moved value: `a` error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:46:9 | -44 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -45 | //~^ value moved here -46 | let _y = a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -23,10 +23,10 @@ error[E0382]: use of moved value: `a` error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:55:15 | -53 | let _x = a.x; +LL | let _x = a.x; | -- value moved here -54 | //~^ value moved here -55 | let _y = &a.y; //~ ERROR use of moved +LL | //~^ value moved here +LL | let _y = &a.y; //~ ERROR use of moved | ^^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -34,130 +34,130 @@ error[E0382]: use of moved value: `a` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:63:9 | -62 | let _x = &a.x; +LL | let _x = &a.x; | --- borrow of `a.x` occurs here -63 | let _y = a.y; +LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed --> $DIR/borrowck-box-insensitivity.rs:71:9 | -70 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here -71 | let _y = a.y; //~ ERROR cannot use +LL | let _y = a.y; //~ ERROR cannot use | ^^ use of borrowed `a.x` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:77:9 | -76 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here -77 | let _y = a.y; +LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a` (via `a.y`) as immutable because `a` is also borrowed as mutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:85:15 | -84 | let _x = &mut a.x; +LL | let _x = &mut a.x; | --- mutable borrow occurs here (via `a.x`) -85 | let _y = &a.y; //~ ERROR cannot borrow +LL | let _y = &a.y; //~ ERROR cannot borrow | ^^^ immutable borrow occurs here (via `a.y`) -86 | //~^ immutable borrow occurs here (via `a.y`) -87 | } +LL | //~^ immutable borrow occurs here (via `a.y`) +LL | } | - mutable borrow ends here error[E0502]: cannot borrow `a` (via `a.y`) as mutable because `a` is also borrowed as immutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:92:19 | -91 | let _x = &a.x; +LL | let _x = &a.x; | --- immutable borrow occurs here (via `a.x`) -92 | let _y = &mut a.y; //~ ERROR cannot borrow +LL | let _y = &mut a.y; //~ ERROR cannot borrow | ^^^ mutable borrow occurs here (via `a.y`) -93 | //~^ mutable borrow occurs here (via `a.y`) -94 | } +LL | //~^ mutable borrow occurs here (via `a.y`) +LL | } | - immutable borrow ends here error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:100:9 - | -98 | let _x = a.x.x; - | -- value moved here -99 | //~^ value moved here -100 | let _y = a.y; //~ ERROR use of collaterally moved - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:100:9 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of collaterally moved + | ^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:108:9 - | -106 | let _x = a.x.x; - | -- value moved here -107 | //~^ value moved here -108 | let _y = a.y; //~ ERROR use of collaterally moved - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:108:9 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = a.y; //~ ERROR use of collaterally moved + | ^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:116:15 - | -114 | let _x = a.x.x; - | -- value moved here -115 | //~^ value moved here -116 | let _y = &a.y; //~ ERROR use of collaterally moved - | ^^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-box-insensitivity.rs:116:15 + | +LL | let _x = a.x.x; + | -- value moved here +LL | //~^ value moved here +LL | let _y = &a.y; //~ ERROR use of collaterally moved + | ^^^ value used here after move + | + = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:124:9 - | -122 | let _x = &a.x.x; - | ----- borrow of `a.x.x` occurs here -123 | //~^ borrow of `a.x.x` occurs here -124 | let _y = a.y; - | ^^ move out of `a.y` occurs here + --> $DIR/borrowck-box-insensitivity.rs:124:9 + | +LL | let _x = &a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | //~^ borrow of `a.x.x` occurs here +LL | let _y = a.y; + | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed - --> $DIR/borrowck-box-insensitivity.rs:132:9 - | -131 | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -132 | let _y = a.y; //~ ERROR cannot use - | ^^ use of borrowed `a.x.x` + --> $DIR/borrowck-box-insensitivity.rs:132:9 + | +LL | let _x = &mut a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | let _y = a.y; //~ ERROR cannot use + | ^^ use of borrowed `a.x.x` error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:138:9 - | -137 | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -138 | let _y = a.y; - | ^^ move out of `a.y` occurs here + --> $DIR/borrowck-box-insensitivity.rs:138:9 + | +LL | let _x = &mut a.x.x; + | ----- borrow of `a.x.x` occurs here +LL | let _y = a.y; + | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed as mutable - --> $DIR/borrowck-box-insensitivity.rs:147:15 - | -145 | let _x = &mut a.x.x; - | ----- mutable borrow occurs here -146 | //~^ mutable borrow occurs here -147 | let _y = &a.y; //~ ERROR cannot borrow - | ^^^ immutable borrow occurs here -148 | //~^ immutable borrow occurs here -149 | } - | - mutable borrow ends here + --> $DIR/borrowck-box-insensitivity.rs:147:15 + | +LL | let _x = &mut a.x.x; + | ----- mutable borrow occurs here +LL | //~^ mutable borrow occurs here +LL | let _y = &a.y; //~ ERROR cannot borrow + | ^^^ immutable borrow occurs here +LL | //~^ immutable borrow occurs here +LL | } + | - mutable borrow ends here error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as immutable - --> $DIR/borrowck-box-insensitivity.rs:155:19 - | -153 | let _x = &a.x.x; - | ----- immutable borrow occurs here -154 | //~^ immutable borrow occurs here -155 | let _y = &mut a.y; //~ ERROR cannot borrow - | ^^^ mutable borrow occurs here -156 | //~^ mutable borrow occurs here -157 | } - | - immutable borrow ends here + --> $DIR/borrowck-box-insensitivity.rs:155:19 + | +LL | let _x = &a.x.x; + | ----- immutable borrow occurs here +LL | //~^ immutable borrow occurs here +LL | let _y = &mut a.y; //~ ERROR cannot borrow + | ^^^ mutable borrow occurs here +LL | //~^ mutable borrow occurs here +LL | } + | - immutable borrow ends here error: aborting due to 16 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr index a9d585e332e..7205b48399a 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr @@ -1,151 +1,151 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:24:24 | -23 | let c1 = to_fn_mut(|| x = 4); +LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -24 | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -25 | //~| ERROR cannot borrow `x` as mutable more than once -26 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:35:24 | -34 | let c1 = to_fn_mut(|| set(&mut x)); +LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -35 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -36 | //~| ERROR cannot borrow `x` as mutable more than once -37 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:42:24 | -41 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -42 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -43 | //~| ERROR cannot borrow `x` as mutable more than once -44 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:49:24 | -48 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -49 | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) +LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -52 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) --> $DIR/borrowck-closures-two-mut.rs:61:24 | -60 | let c1 = to_fn_mut(|| set(&mut *x.f)); +LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -61 | let c2 = to_fn_mut(|| set(&mut *x.f)); +LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -64 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:24:24 | -23 | let c1 = to_fn_mut(|| x = 4); +LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -24 | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -25 | //~| ERROR cannot borrow `x` as mutable more than once -26 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:35:24 | -34 | let c1 = to_fn_mut(|| set(&mut x)); +LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -35 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -36 | //~| ERROR cannot borrow `x` as mutable more than once -37 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:42:24 | -41 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -42 | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -43 | //~| ERROR cannot borrow `x` as mutable more than once -44 | } +LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:49:24 | -48 | let c1 = to_fn_mut(|| x = 5); +LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -49 | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) +LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -52 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) --> $DIR/borrowck-closures-two-mut.rs:61:24 | -60 | let c1 = to_fn_mut(|| set(&mut *x.f)); +LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -61 | let c2 = to_fn_mut(|| set(&mut *x.f)); +LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here ... -64 | } +LL | } | - first borrow ends here error: aborting due to 10 previous errors 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 9dca165c022..98176cce508 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr @@ -1,13 +1,13 @@ error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function --> $DIR/borrowck-escaping-closure-error-1.rs:23:11 | -23 | spawn(|| books.push(4)); +LL | spawn(|| books.push(4)); | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | -23 | spawn(move || books.push(4)); +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 6becf90214f..5de31c3ac35 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr @@ -1,13 +1,13 @@ error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function --> $DIR/borrowck-escaping-closure-error-2.rs:21:14 | -21 | Box::new(|| books.push(4)) +LL | Box::new(|| books.push(4)) | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | -21 | Box::new(move || books.push(4)) +LL | Box::new(move || books.push(4)) | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-in-static.stderr b/src/test/ui/borrowck/borrowck-in-static.stderr index cafc608d794..989322662e8 100644 --- a/src/test/ui/borrowck/borrowck-in-static.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.stderr @@ -1,9 +1,9 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure --> $DIR/borrowck-in-static.rs:15:17 | -14 | let x = Box::new(0); +LL | let x = Box::new(0); | - captured outer variable -15 | Box::new(|| x) //~ ERROR cannot move out of captured outer variable +LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr index b4edd80bfe7..acc78f4ab32 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -1,35 +1,35 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:21:11 | -21 | match *f { //~ ERROR cannot move out of +LL | match *f { //~ ERROR cannot move out of | ^^ cannot move out of borrowed content -22 | //~| cannot move out -23 | Foo::Foo1(num1, +LL | //~| cannot move out +LL | Foo::Foo1(num1, | ---- hint: to prevent move, use `ref num1` or `ref mut num1` -24 | num2) => (), +LL | num2) => (), | ---- ...and here (use `ref num2` or `ref mut num2`) -25 | Foo::Foo2(num) => (), +LL | Foo::Foo2(num) => (), | --- ...and here (use `ref num` or `ref mut num`) error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-error-with-note.rs:40:9 | -40 | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait -41 | | //~| cannot move out of here -42 | | f: _s, +LL | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait +LL | | //~| cannot move out of here +LL | | f: _s, | | -- hint: to prevent move, use `ref _s` or `ref mut _s` -43 | | g: _t +LL | | g: _t | | -- ...and here (use `ref _t` or `ref mut _t`) -44 | | } => {} +LL | | } => {} | |_________^ cannot move out of here error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:57:11 | -57 | match a.a { //~ ERROR cannot move out of +LL | match a.a { //~ ERROR cannot move out of | ^ cannot move out of borrowed content -58 | //~| cannot move out -59 | n => { +LL | //~| cannot move out +LL | n => { | - hint: to prevent move, use `ref n` or `ref mut n` error: aborting due to 3 previous errors 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 2199c3ca45c..49d5daa543b 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 @@ -1,14 +1,14 @@ error[E0508]: cannot move out of type `[Foo]`, a non-copy slice --> $DIR/borrowck-move-out-of-vec-tail.rs:30:18 | -30 | &[Foo { string: a }, +LL | &[Foo { string: a }, | ^ - hint: to prevent move, use `ref a` or `ref mut a` | __________________| | | -31 | | //~^ ERROR cannot move out of type `[Foo]` -32 | | //~| cannot move out -33 | | //~| to prevent move -34 | | Foo { string: b }] => { +LL | | //~^ ERROR cannot move out of type `[Foo]` +LL | | //~| cannot move out +LL | | //~| to prevent move +LL | | Foo { string: b }] => { | |_________________________________-__^ cannot move out of here | | | ...and here (use `ref b` or `ref mut b`) diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index 4f212e7d79e..a2fbe5ab9cd 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -1,9 +1,9 @@ error[E0382]: use of moved value: `x` (Ast) --> $DIR/borrowck-reinit.rs:18:16 | -17 | drop(x); +LL | drop(x); | - value moved here -18 | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -11,9 +11,9 @@ error[E0382]: use of moved value: `x` (Ast) error[E0382]: use of moved value: `x` (Mir) --> $DIR/borrowck-reinit.rs:18:16 | -17 | drop(x); +LL | drop(x); | - value moved here -18 | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr index 27e34fde244..01899446f48 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr @@ -1,37 +1,37 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable --> $DIR/borrowck-report-with-custom-diagnostic.rs:17:14 | -15 | let y = &mut x; +LL | let y = &mut x; | - mutable borrow occurs here -16 | //~^ mutable borrow occurs here -17 | let z = &x; //~ ERROR cannot borrow +LL | //~^ mutable borrow occurs here +LL | let z = &x; //~ ERROR cannot borrow | ^ immutable borrow occurs here -18 | //~^ immutable borrow occurs here -19 | } +LL | //~^ immutable borrow occurs here +LL | } | - mutable borrow ends here error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable --> $DIR/borrowck-report-with-custom-diagnostic.rs:28:26 | -26 | let y = &x; +LL | let y = &x; | - immutable borrow occurs here -27 | //~^ immutable borrow occurs here -28 | let z = &mut x; //~ ERROR cannot borrow +LL | //~^ immutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow | ^ mutable borrow occurs here -29 | //~^ mutable borrow occurs here -30 | } +LL | //~^ mutable borrow occurs here +LL | } | - immutable borrow ends here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-report-with-custom-diagnostic.rs:41:22 | -39 | let y = &mut x; +LL | let y = &mut x; | - first mutable borrow occurs here -40 | //~^ first mutable borrow occurs here -41 | let z = &mut x; //~ ERROR cannot borrow +LL | //~^ first mutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow | ^ second mutable borrow occurs here -42 | //~^ second mutable borrow occurs here -43 | }; +LL | //~^ second mutable borrow occurs here +LL | }; | - first borrow ends here 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 2c3509e9902..3d9fbc80038 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -1,38 +1,38 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed --> $DIR/borrowck-vec-pattern-nesting.rs:21:13 | -19 | [box ref _a, _, _] => { +LL | [box ref _a, _, _] => { | ------ borrow of `vec[..]` occurs here -20 | //~^ borrow of `vec[..]` occurs here -21 | vec[0] = box 4; //~ ERROR cannot assign +LL | //~^ borrow of `vec[..]` occurs here +LL | vec[0] = box 4; //~ ERROR cannot assign | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0506]: cannot assign to `vec[..]` because it is borrowed --> $DIR/borrowck-vec-pattern-nesting.rs:33:13 | -31 | &mut [ref _b..] => { +LL | &mut [ref _b..] => { | ------ borrow of `vec[..]` occurs here -32 | //~^ borrow of `vec[..]` occurs here -33 | vec[0] = box 4; //~ ERROR cannot assign +LL | //~^ borrow of `vec[..]` occurs here +LL | vec[0] = box 4; //~ ERROR cannot assign | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:43:14 | -43 | &mut [_a, //~ ERROR cannot move out +LL | &mut [_a, //~ ERROR cannot move out | ^-- hint: to prevent move, use `ref _a` or `ref mut _a` | ______________| | | -44 | | //~| cannot move out -45 | | //~| to prevent move -46 | | .. -47 | | ] => { +LL | | //~| cannot move out +LL | | //~| to prevent move +LL | | .. +LL | | ] => { | |_________^ cannot move out of here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:56:13 | -56 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here @@ -41,10 +41,10 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:64:14 | -64 | &mut [ //~ ERROR cannot move out +LL | &mut [ //~ ERROR cannot move out | ______________^ -65 | | //~^ cannot move out -66 | | _b] => {} +LL | | //~^ cannot move out +LL | | _b] => {} | |__________--^ cannot move out of here | | | hint: to prevent move, use `ref _b` or `ref mut _b` @@ -52,7 +52,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:69:13 | -69 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here @@ -61,7 +61,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:77:14 | -77 | &mut [_a, _b, _c] => {} //~ ERROR cannot move out +LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ^--^^--^^--^ | || | | | || | ...and here (use `ref _c` or `ref mut _c`) @@ -72,7 +72,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:81:13 | -81 | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/borrowck/immutable-arg.stderr b/src/test/ui/borrowck/immutable-arg.stderr index 68aeae30e71..34de3ca19a3 100644 --- a/src/test/ui/borrowck/immutable-arg.stderr +++ b/src/test/ui/borrowck/immutable-arg.stderr @@ -1,17 +1,17 @@ error[E0384]: cannot assign twice to immutable variable `_x` (Ast) --> $DIR/immutable-arg.rs:14:5 | -13 | fn foo(_x: u32) { +LL | fn foo(_x: u32) { | -- first assignment to `_x` -14 | _x = 4; +LL | _x = 4; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign to immutable argument `_x` (Mir) --> $DIR/immutable-arg.rs:14:5 | -13 | fn foo(_x: u32) { +LL | fn foo(_x: u32) { | -- argument not declared as `mut` -14 | _x = 4; +LL | _x = 4; | ^^^^^^ cannot assign to immutable argument error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 377171510c9..f0ee6b31f73 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -1,7 +1,7 @@ error[E0382]: use of partially moved value: `maybe` (Ast) --> $DIR/issue-41962.rs:17:30 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ----- ^^^^^ value used here after move | | | value moved here @@ -11,7 +11,7 @@ error[E0382]: use of partially moved value: `maybe` (Ast) error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) --> $DIR/issue-41962.rs:17:21 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop | = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait @@ -19,16 +19,16 @@ error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) error[E0382]: use of moved value: `maybe` (Mir) --> $DIR/issue-41962.rs:17:9 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^ ----- value moved here | _________| | | -18 | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382] -19 | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382] -20 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] -21 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] -22 | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382] -23 | | } +LL | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382] +LL | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382] +LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] +LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382] +LL | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382] +LL | | } | |_________^ value used here after move | = note: move occurs because `maybe` has type `std::option::Option>`, which does not implement the `Copy` trait @@ -36,7 +36,7 @@ error[E0382]: use of moved value: `maybe` (Mir) error[E0382]: use of moved value: `maybe` (Mir) --> $DIR/issue-41962.rs:17:16 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^-----^ | | | | | value moved here @@ -47,7 +47,7 @@ error[E0382]: use of moved value: `maybe` (Mir) error[E0382]: use of moved value: `maybe.0` (Mir) --> $DIR/issue-41962.rs:17:21 | -17 | if let Some(thing) = maybe { +LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop | = note: move occurs because `maybe.0` has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/issue-45983.stderr b/src/test/ui/borrowck/issue-45983.stderr index 496f15c289c..7625b9e7618 100644 --- a/src/test/ui/borrowck/issue-45983.stderr +++ b/src/test/ui/borrowck/issue-45983.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/issue-45983.rs:17:27 | -16 | let x = None; +LL | let x = None; | - borrowed data cannot be stored into here... -17 | give_any(|y| x = Some(y)); +LL | give_any(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/issue-7573.stderr b/src/test/ui/borrowck/issue-7573.stderr index 99b48d9276c..41a804adfe3 100644 --- a/src/test/ui/borrowck/issue-7573.stderr +++ b/src/test/ui/borrowck/issue-7573.stderr @@ -1,15 +1,15 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/issue-7573.rs:32:27 | -27 | let mut lines_to_use: Vec<&CrateId> = Vec::new(); +LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); | - cannot infer an appropriate lifetime... -28 | //~^ NOTE cannot infer an appropriate lifetime -29 | let push_id = |installed_id: &CrateId| { +LL | //~^ NOTE cannot infer an appropriate lifetime +LL | let push_id = |installed_id: &CrateId| { | ------- ------------------------ borrowed data cannot outlive this closure | | | ...so that variable is valid at time of its declaration ... -32 | lines_to_use.push(installed_id); +LL | lines_to_use.push(installed_id); | ^^^^^^^^^^^^ cannot be stored outside of its closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 755765a0383..9b777246861 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -1,28 +1,28 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:20:25 | -20 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -21 | } -22 | } +LL | } +LL | } | - mutable borrow ends here error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:26:25 | -26 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -27 | } -28 | } +LL | } +LL | } | - mutable borrow ends here error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:33:25 | -33 | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop -34 | } -35 | } +LL | } +LL | } | - mutable borrow ends here error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 2064129ab74..583f97b6cdf 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr @@ -1,22 +1,22 @@ error[E0499]: cannot borrow `void` as mutable more than once at a time --> $DIR/mut-borrow-outside-loop.rs:17:23 | -16 | let first = &mut void; +LL | let first = &mut void; | ---- first mutable borrow occurs here -17 | let second = &mut void; //~ ERROR cannot borrow +LL | let second = &mut void; //~ ERROR cannot borrow | ^^^^ second mutable borrow occurs here ... -25 | } +LL | } | - first borrow ends here error[E0499]: cannot borrow `inner_void` as mutable more than once at a time --> $DIR/mut-borrow-outside-loop.rs:23:33 | -22 | let inner_first = &mut inner_void; +LL | let inner_first = &mut inner_void; | ---------- first mutable borrow occurs here -23 | let inner_second = &mut inner_void; //~ ERROR cannot borrow +LL | let inner_second = &mut inner_void; //~ ERROR cannot borrow | ^^^^^^^^^^ second mutable borrow occurs here -24 | } +LL | } | - first borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr index 435640769dd..2fe3a45b76d 100644 --- a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr +++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr @@ -1,25 +1,25 @@ error[E0195]: lifetime parameters or bounds on method `no_bound` do not match the trait declaration --> $DIR/regions-bound-missing-bound-in-impl.rs:28:5 | -20 | fn no_bound<'b>(self, b: Inv<'b>); +LL | fn no_bound<'b>(self, b: Inv<'b>); | ---------------------------------- lifetimes in impl do not match this method in trait ... -28 | fn no_bound<'b:'a>(self, b: Inv<'b>) { +LL | fn no_bound<'b:'a>(self, b: Inv<'b>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error[E0195]: lifetime parameters or bounds on method `has_bound` do not match the trait declaration --> $DIR/regions-bound-missing-bound-in-impl.rs:32:5 | -21 | fn has_bound<'b:'a>(self, b: Inv<'b>); +LL | fn has_bound<'b:'a>(self, b: Inv<'b>); | -------------------------------------- lifetimes in impl do not match this method in trait ... -32 | fn has_bound<'b>(self, b: Inv<'b>) { +LL | fn has_bound<'b>(self, b: Inv<'b>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error[E0308]: method not compatible with trait --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)` @@ -27,21 +27,21 @@ error[E0308]: method not compatible with trait note: the lifetime 'c as defined on the method body at 36:5... --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'c as defined on the method body at 36:5 --> $DIR/regions-bound-missing-bound-in-impl.rs:36:5 | -36 | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0276]: impl has stricter requirements than trait --> $DIR/regions-bound-missing-bound-in-impl.rs:53:5 | -24 | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>); +LL | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>); | ------------------------------------------------------- definition of `another_bound` from trait ... -53 | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { +LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'x: 't` error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr b/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr index 3d88f4fd52e..05654a93564 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-bound-fn-2.rs:18:27 | -17 | let mut x = None; +LL | let mut x = None; | ----- borrowed data cannot be stored into here... -18 | with_int(|y| x = Some(y)); +LL | with_int(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.stderr b/src/test/ui/borrowck/regions-escape-bound-fn.stderr index a2ad7c3f768..5f05ee90d07 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-bound-fn.rs:18:27 | -17 | let mut x: Option<&isize> = None; +LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... -18 | with_int(|y| x = Some(y)); +LL | with_int(|y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr index 4b01e42fa67..c90dd2417d0 100644 --- a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr +++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr @@ -1,9 +1,9 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/regions-escape-unboxed-closure.rs:16:32 | -15 | let mut x: Option<&isize> = None; +LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... -16 | with_int(&mut |y| x = Some(y)); +LL | with_int(&mut |y| x = Some(y)); | --- ^ cannot be stored outside of its closure | | | ...because it cannot outlive this closure diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr index 69f4742424b..d07bdab087c 100644 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr +++ b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr @@ -1,10 +1,10 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:21:9 | -19 | let y = vec![format!("World")]; +LL | let y = vec![format!("World")]; | - captured outer variable -20 | call(|| { -21 | y.into_iter(); +LL | call(|| { +LL | y.into_iter(); | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/cast-as-bool.stderr b/src/test/ui/cast-as-bool.stderr index cdf4d30ee4c..1c60bc44d90 100644 --- a/src/test/ui/cast-as-bool.stderr +++ b/src/test/ui/cast-as-bool.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/cast-as-bool.rs:12:13 | -12 | let u = 5 as bool; +LL | let u = 5 as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/cast-errors-issue-43825.stderr b/src/test/ui/cast-errors-issue-43825.stderr index 0f0a5054b51..3418472feaf 100644 --- a/src/test/ui/cast-errors-issue-43825.stderr +++ b/src/test/ui/cast-errors-issue-43825.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `error` in this scope --> $DIR/cast-errors-issue-43825.rs:12:17 | -12 | let error = error; //~ ERROR cannot find value `error` +LL | let error = error; //~ ERROR cannot find value `error` | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/cast-rfc0401-2.stderr b/src/test/ui/cast-rfc0401-2.stderr index 2262ae8338b..e0c39d84c19 100644 --- a/src/test/ui/cast-rfc0401-2.stderr +++ b/src/test/ui/cast-rfc0401-2.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401-2.rs:16:13 | -16 | let _ = 3 as bool; +LL | let _ = 3 as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr index b2a73a86bb1..b2497dfeb28 100644 --- a/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr +++ b/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr @@ -1,7 +1,7 @@ error[E0620]: cast to unsized type: `&{integer}` as `std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5 | -12 | &1 as Send; //~ ERROR cast to unsized +LL | &1 as Send; //~ ERROR cast to unsized | ^^^^^^---- | | | help: try casting to a reference instead: `&Send` @@ -9,7 +9,7 @@ error[E0620]: cast to unsized type: `&{integer}` as `std::marker::Send` error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:13:5 | -13 | Box::new(1) as Send; //~ ERROR cast to unsized +LL | Box::new(1) as Send; //~ ERROR cast to unsized | ^^^^^^^^^^^^^^^---- | | | help: try casting to a `Box` instead: `Box` diff --git a/src/test/ui/cast_char.stderr b/src/test/ui/cast_char.stderr index e42a38dace9..481715fd9ce 100644 --- a/src/test/ui/cast_char.stderr +++ b/src/test/ui/cast_char.stderr @@ -1,19 +1,19 @@ error: only u8 can be casted into char --> $DIR/cast_char.rs:14:23 | -14 | const XYZ: char = 0x1F888 as char; +LL | const XYZ: char = 0x1F888 as char; | ^^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` | note: lint level defined here --> $DIR/cast_char.rs:11:9 | -11 | #![deny(overflowing_literals)] +LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ error: only u8 can be casted into char --> $DIR/cast_char.rs:16:22 | -16 | const XY: char = 129160 as char; +LL | const XY: char = 129160 as char; | ^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` error: aborting due to 2 previous errors diff --git a/src/test/ui/casts-differing-anon.stderr b/src/test/ui/casts-differing-anon.stderr index ccaa6e845b8..c5fbbbc0e9e 100644 --- a/src/test/ui/casts-differing-anon.stderr +++ b/src/test/ui/casts-differing-anon.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid --> $DIR/casts-differing-anon.rs:33:13 | -33 | b_raw = f_raw as *mut _; //~ ERROR is invalid +LL | b_raw = f_raw as *mut _; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match diff --git a/src/test/ui/casts-issue-46365.stderr b/src/test/ui/casts-issue-46365.stderr index 1b24d82be2d..138388f2976 100644 --- a/src/test/ui/casts-issue-46365.stderr +++ b/src/test/ui/casts-issue-46365.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Ipsum` in this scope --> $DIR/casts-issue-46365.rs:12:12 | -12 | ipsum: Ipsum //~ ERROR cannot find type `Ipsum` +LL | ipsum: Ipsum //~ ERROR cannot find type `Ipsum` | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/changing-crates.stderr b/src/test/ui/changing-crates.stderr index ba93d78a970..436335aa917 100644 --- a/src/test/ui/changing-crates.stderr +++ b/src/test/ui/changing-crates.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/changing-crates.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/check_match/issue-35609.stderr b/src/test/ui/check_match/issue-35609.stderr index 018d35b7c71..3768d5782e7 100644 --- a/src/test/ui/check_match/issue-35609.stderr +++ b/src/test/ui/check_match/issue-35609.stderr @@ -1,49 +1,49 @@ error[E0004]: non-exhaustive patterns: `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered --> $DIR/issue-35609.rs:20:11 | -20 | match (A, ()) { //~ ERROR non-exhaustive +LL | match (A, ()) { //~ ERROR non-exhaustive | ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered --> $DIR/issue-35609.rs:24:11 | -24 | match (A, A) { //~ ERROR non-exhaustive +LL | match (A, A) { //~ ERROR non-exhaustive | ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:28:11 | -28 | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:32:11 | -32 | match ((A, ()), A) { //~ ERROR non-exhaustive +LL | match ((A, ()), A) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:36:11 | -36 | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered --> $DIR/issue-35609.rs:41:11 | -41 | match S(A, ()) { //~ ERROR non-exhaustive +LL | match S(A, ()) { //~ ERROR non-exhaustive | ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered --> $DIR/issue-35609.rs:45:11 | -45 | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive +LL | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive | ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered --> $DIR/issue-35609.rs:49:11 | -49 | match Some(A) { //~ ERROR non-exhaustive +LL | match Some(A) { //~ ERROR non-exhaustive | ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered error: aborting due to 8 previous errors diff --git a/src/test/ui/check_match/issue-43253.stderr b/src/test/ui/check_match/issue-43253.stderr index 91bd6b39c8c..111f4e44ee9 100644 --- a/src/test/ui/check_match/issue-43253.stderr +++ b/src/test/ui/check_match/issue-43253.stderr @@ -1,24 +1,24 @@ warning: unreachable pattern --> $DIR/issue-43253.rs:39:9 | -39 | 9 => {}, +LL | 9 => {}, | ^ | note: lint level defined here --> $DIR/issue-43253.rs:14:9 | -14 | #![warn(unreachable_patterns)] +LL | #![warn(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ warning: unreachable pattern --> $DIR/issue-43253.rs:45:9 | -45 | 8...9 => {}, +LL | 8...9 => {}, | ^^^^^ warning: unreachable pattern --> $DIR/issue-43253.rs:51:9 | -51 | 9...9 => {}, +LL | 9...9 => {}, | ^^^^^ diff --git a/src/test/ui/closure-expected-type/expect-region-supply-region.stderr b/src/test/ui/closure-expected-type/expect-region-supply-region.stderr index 876e7b488a4..20661cae5ca 100644 --- a/src/test/ui/closure-expected-type/expect-region-supply-region.stderr +++ b/src/test/ui/closure-expected-type/expect-region-supply-region.stderr @@ -1,27 +1,27 @@ error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:28:18 | -26 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... -27 | closure_expecting_bound(|x| { +LL | closure_expecting_bound(|x| { | --- ...because it cannot outlive this closure -28 | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure | ^ cannot be stored outside of its closure error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:38:18 | -36 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... -37 | closure_expecting_bound(|x: &u32| { +LL | closure_expecting_bound(|x: &u32| { | --------- ...because it cannot outlive this closure -38 | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure | ^ cannot be stored outside of its closure error[E0308]: mismatched types --> $DIR/expect-region-supply-region.rs:47:33 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | = note: expected type `&u32` @@ -29,25 +29,25 @@ error[E0308]: mismatched types note: the anonymous lifetime #2 defined on the body at 47:29... --> $DIR/expect-region-supply-region.rs:47:29 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -48 | | //~^ ERROR mismatched types -49 | | //~| ERROR mismatched types -50 | | +LL | | //~^ ERROR mismatched types +LL | | //~| ERROR mismatched types +LL | | ... | -53 | | //~^ ERROR borrowed data cannot be stored outside of its closure -54 | | }); +LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | }); | |_____^ note: ...does not necessarily outlive the lifetime 'x as defined on the function body at 42:1 --> $DIR/expect-region-supply-region.rs:42:1 | -42 | fn expect_bound_supply_named<'x>() { +LL | fn expect_bound_supply_named<'x>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/expect-region-supply-region.rs:47:33 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | = note: expected type `&u32` @@ -55,31 +55,31 @@ error[E0308]: mismatched types note: the lifetime 'x as defined on the function body at 42:1... --> $DIR/expect-region-supply-region.rs:42:1 | -42 | fn expect_bound_supply_named<'x>() { +LL | fn expect_bound_supply_named<'x>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the body at 47:29 --> $DIR/expect-region-supply-region.rs:47:29 | -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -48 | | //~^ ERROR mismatched types -49 | | //~| ERROR mismatched types -50 | | +LL | | //~^ ERROR mismatched types +LL | | //~| ERROR mismatched types +LL | | ... | -53 | | //~^ ERROR borrowed data cannot be stored outside of its closure -54 | | }); +LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | }); | |_____^ error: borrowed data cannot be stored outside of its closure --> $DIR/expect-region-supply-region.rs:52:18 | -43 | let mut f: Option<&u32> = None; +LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... ... -47 | closure_expecting_bound(|x: &'x u32| { +LL | closure_expecting_bound(|x: &'x u32| { | ------------ ...because it cannot outlive this closure ... -52 | f = Some(x); +LL | f = Some(x); | ^ cannot be stored outside of its closure error: aborting due to 5 previous errors diff --git a/src/test/ui/closure_context/issue-26046-fn-mut.stderr b/src/test/ui/closure_context/issue-26046-fn-mut.stderr index 791cdb46231..9cc0f1bf9df 100644 --- a/src/test/ui/closure_context/issue-26046-fn-mut.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-mut.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` --> $DIR/issue-26046-fn-mut.rs:14:19 | -14 | let closure = || { //~ ERROR expected a closure that +LL | let closure = || { //~ ERROR expected a closure that | ^^ this closure implements `FnMut`, not `Fn` -15 | num += 1; +LL | num += 1; | --- closure is `FnMut` because it mutates the variable `num` here ... -18 | Box::new(closure) +LL | Box::new(closure) | ----------------- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/closure_context/issue-26046-fn-once.stderr b/src/test/ui/closure_context/issue-26046-fn-once.stderr index 98579a28217..0facdaf3c70 100644 --- a/src/test/ui/closure_context/issue-26046-fn-once.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-once.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/issue-26046-fn-once.rs:14:19 | -14 | let closure = move || { //~ ERROR expected a closure +LL | let closure = move || { //~ ERROR expected a closure | ^^^^^^^ this closure implements `FnOnce`, not `Fn` -15 | vec +LL | vec | --- closure is `FnOnce` because it moves the variable `vec` out of its environment ... -18 | Box::new(closure) +LL | Box::new(closure) | ----------------- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/closure_context/issue-42065.stderr b/src/test/ui/closure_context/issue-42065.stderr index 05abf485378..fdbec34ca7e 100644 --- a/src/test/ui/closure_context/issue-42065.stderr +++ b/src/test/ui/closure_context/issue-42065.stderr @@ -1,15 +1,15 @@ error[E0382]: use of moved value: `debug_dump_dict` --> $DIR/issue-42065.rs:21:5 | -20 | debug_dump_dict(); +LL | debug_dump_dict(); | --------------- value moved here -21 | debug_dump_dict(); +LL | debug_dump_dict(); | ^^^^^^^^^^^^^^^ value used here after move | note: closure cannot be invoked more than once because it moves the variable `dict` out of its environment --> $DIR/issue-42065.rs:16:29 | -16 | for (key, value) in dict { +LL | for (key, value) in dict { | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index 9d6ef54cb97..5414557ddc2 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -1,7 +1,7 @@ error: requires at least a format string argument --> $DIR/bad-format-args.rs:12:5 | -12 | format!(); +LL | format!(); | ^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,7 +9,7 @@ error: requires at least a format string argument error: expected token: `,` --> $DIR/bad-format-args.rs:13:5 | -13 | format!("" 1); +LL | format!("" 1); | ^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -17,7 +17,7 @@ error: expected token: `,` error: expected token: `,` --> $DIR/bad-format-args.rs:14:5 | -14 | format!("", 1 1); +LL | format!("", 1 1); | ^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr index 168aebf13dd..6531e3b8f8b 100644 --- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr +++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr @@ -1,9 +1,9 @@ error[E0592]: duplicate definitions with name `f` --> $DIR/coherence-overlapping-inherent-impl-trait.rs:14:10 | -14 | impl C { fn f() {} } //~ ERROR duplicate +LL | impl C { fn f() {} } //~ ERROR duplicate | ^^^^^^^^^ duplicate definitions for `f` -15 | impl C { fn f() {} } +LL | impl C { fn f() {} } | --------- other definition for `f` error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr index 0d9654c8697..63b19c9e0c6 100644 --- a/src/test/ui/codemap_tests/empty_span.stderr +++ b/src/test/ui/codemap_tests/empty_span.stderr @@ -1,7 +1,7 @@ error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static main::Foo` --> $DIR/empty_span.rs:17:5 | -17 | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl +LL | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr index f7bcaa64fdd..2fdd6906a56 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr @@ -1,11 +1,11 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/huge_multispan_highlight.rs:100:18 - | -12 | let x = "foo"; - | - consider changing this to `mut x` + --> $DIR/huge_multispan_highlight.rs:100:18 + | +LL | let x = "foo"; + | - consider changing this to `mut x` ... -100 | let y = &mut x; //~ ERROR cannot borrow - | ^ cannot borrow mutably +LL | let y = &mut x; //~ ERROR cannot borrow + | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index c7fc7d4271a..d44dac0d537 100644 --- a/src/test/ui/codemap_tests/issue-11715.stderr +++ b/src/test/ui/codemap_tests/issue-11715.stderr @@ -1,12 +1,12 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/issue-11715.rs:100:18 - | -99 | let y = &mut x; - | - first mutable borrow occurs here -100 | let z = &mut x; //~ ERROR cannot borrow - | ^ second mutable borrow occurs here -101 | } - | - first borrow ends here + --> $DIR/issue-11715.rs:100:18 + | +LL | let y = &mut x; + | - first mutable borrow occurs here +LL | let z = &mut x; //~ ERROR cannot borrow + | ^ second mutable borrow occurs here +LL | } + | - first borrow ends here error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-28308.stderr b/src/test/ui/codemap_tests/issue-28308.stderr index 87b8f04ad1f..947c8142e31 100644 --- a/src/test/ui/codemap_tests/issue-28308.stderr +++ b/src/test/ui/codemap_tests/issue-28308.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` --> $DIR/issue-28308.rs:12:5 | -12 | assert!("foo"); +LL | assert!("foo"); | ^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index 73ef9219e7e..a31a5318b41 100644 --- a/src/test/ui/codemap_tests/one_line.stderr +++ b/src/test/ui/codemap_tests/one_line.stderr @@ -1,7 +1,7 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/one_line.rs:13:12 | -13 | v.push(v.pop().unwrap()); //~ ERROR cannot borrow +LL | v.push(v.pop().unwrap()); //~ ERROR cannot borrow | - ^ - first borrow ends here | | | | | second mutable borrow occurs here diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr index 858e3e53349..d11ac5463f0 100644 --- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr +++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr @@ -1,28 +1,28 @@ error[E0592]: duplicate definitions with name `id` --> $DIR/overlapping_inherent_impls.rs:19:5 | -19 | fn id() {} //~ ERROR duplicate definitions +LL | fn id() {} //~ ERROR duplicate definitions | ^^^^^^^^^^ duplicate definitions for `id` ... -23 | fn id() {} +LL | fn id() {} | ---------- other definition for `id` error[E0592]: duplicate definitions with name `bar` --> $DIR/overlapping_inherent_impls.rs:29:5 | -29 | fn bar(&self) {} //~ ERROR duplicate definitions +LL | fn bar(&self) {} //~ ERROR duplicate definitions | ^^^^^^^^^^^^^^^^ duplicate definitions for `bar` ... -33 | fn bar(&self) {} +LL | fn bar(&self) {} | ---------------- other definition for `bar` error[E0592]: duplicate definitions with name `baz` --> $DIR/overlapping_inherent_impls.rs:39:5 | -39 | fn baz(&self) {} //~ ERROR duplicate definitions +LL | fn baz(&self) {} //~ ERROR duplicate definitions | ^^^^^^^^^^^^^^^^ duplicate definitions for `baz` ... -43 | fn baz(&self) {} +LL | fn baz(&self) {} | ---------------- other definition for `baz` | = note: upstream crates may add new impl of trait `std::marker::Copy` for type `std::vec::Vec<_>` in future versions diff --git a/src/test/ui/codemap_tests/overlapping_spans.stderr b/src/test/ui/codemap_tests/overlapping_spans.stderr index edb970ffdff..c585964a527 100644 --- a/src/test/ui/codemap_tests/overlapping_spans.stderr +++ b/src/test/ui/codemap_tests/overlapping_spans.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/overlapping_spans.rs:21:9 | -21 | S {f:_s} => {} //~ ERROR cannot move out +LL | S {f:_s} => {} //~ ERROR cannot move out | ^^^^^--^ | | | | | hint: to prevent move, use `ref _s` or `ref mut _s` diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index cd52f414f64..0f683bd6841 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -1,15 +1,15 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/tab.rs:14:2 | -14 | bar; //~ ERROR cannot find value `bar` +LL | bar; //~ ERROR cannot find value `bar` | ^^^ not found in this scope error[E0308]: mismatched types --> $DIR/tab.rs:18:2 | -17 | fn foo() { +LL | fn foo() { | - help: try adding a return type: `-> &'static str` -18 | "bar boo" //~ ERROR mismatched types +LL | "bar boo" //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^ expected (), found reference | = note: expected type `()` diff --git a/src/test/ui/codemap_tests/tab_2.stderr b/src/test/ui/codemap_tests/tab_2.stderr index 34c49d97562..d8ad5955cae 100644 --- a/src/test/ui/codemap_tests/tab_2.stderr +++ b/src/test/ui/codemap_tests/tab_2.stderr @@ -1,9 +1,9 @@ error: unterminated double quote string --> $DIR/tab_2.rs:14:7 | -14 | """; //~ ERROR unterminated double quote +LL | """; //~ ERROR unterminated double quote | ___________________^ -15 | | } +LL | | } | |__^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index 0435aed7c8a..c2826359e08 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `some_vec` --> $DIR/tab_3.rs:17:20 | -15 | some_vec.into_iter(); +LL | some_vec.into_iter(); | -------- value moved here -16 | { -17 | println!("{:?}", some_vec); //~ ERROR use of moved +LL | { +LL | println!("{:?}", some_vec); //~ ERROR use of moved | ^^^^^^^^ value used here after move | = note: move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr index 8798081ad6d..a7fa82a0ba1 100644 --- a/src/test/ui/codemap_tests/two_files.stderr +++ b/src/test/ui/codemap_tests/two_files.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found type alias `Bar` --> $DIR/two_files.rs:15:6 | -15 | impl Bar for Baz { } //~ ERROR expected trait, found type alias +LL | impl Bar for Baz { } //~ ERROR expected trait, found type alias | ^^^ type aliases cannot be used for traits error: cannot continue compilation due to previous error diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index 4f3c79410df..b9b03c9b9ec 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -1,7 +1,7 @@ error: invalid ABI: expected one of [cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted], found `路濫狼á́́` --> $DIR/unicode.rs:11:8 | -11 | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI +LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/unicode_2.stderr b/src/test/ui/codemap_tests/unicode_2.stderr index 879553740f3..b75245589b0 100644 --- a/src/test/ui/codemap_tests/unicode_2.stderr +++ b/src/test/ui/codemap_tests/unicode_2.stderr @@ -1,7 +1,7 @@ error: invalid width `7` for integer literal --> $DIR/unicode_2.rs:14:25 | -14 | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width +LL | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width | ^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -9,7 +9,7 @@ error: invalid width `7` for integer literal error: invalid width `42` for integer literal --> $DIR/unicode_2.rs:15:20 | -15 | let _ = ("아あ", 1i42); //~ ERROR invalid width +LL | let _ = ("아あ", 1i42); //~ ERROR invalid width | ^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -17,7 +17,7 @@ error: invalid width `42` for integer literal error[E0425]: cannot find value `a̐é` in this scope --> $DIR/unicode_2.rs:16:13 | -16 | let _ = a̐é; //~ ERROR cannot find +LL | let _ = a̐é; //~ ERROR cannot find | ^^ not found in this scope error: aborting due to 3 previous errors diff --git a/src/test/ui/codemap_tests/unicode_3.stderr b/src/test/ui/codemap_tests/unicode_3.stderr index 3547accd2ed..1a44d39aa27 100644 --- a/src/test/ui/codemap_tests/unicode_3.stderr +++ b/src/test/ui/codemap_tests/unicode_3.stderr @@ -1,7 +1,7 @@ warning: denote infinite loops with `loop { ... }` --> $DIR/unicode_3.rs:14:45 | -14 | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } +LL | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } | ^^^^^^^^^^ help: use `loop` | = note: #[warn(while_true)] on by default diff --git a/src/test/ui/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion-missing-tail-expected-type.stderr index 1e327a614a5..74b6f083f38 100644 --- a/src/test/ui/coercion-missing-tail-expected-type.stderr +++ b/src/test/ui/coercion-missing-tail-expected-type.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:13:28 | -13 | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types +LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | ____________________________^ -14 | | x + 1; +LL | | x + 1; | | - help: consider removing this semicolon -15 | | } +LL | | } | |_^ expected i32, found () | = note: expected type `i32` @@ -14,11 +14,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:17:29 | -17 | fn foo() -> Result { //~ ERROR mismatched types +LL | fn foo() -> Result { //~ ERROR mismatched types | _____________________________^ -18 | | Ok(1); +LL | | Ok(1); | | - help: consider removing this semicolon -19 | | } +LL | | } | |_^ expected enum `std::result::Result`, found () | = note: expected type `std::result::Result` diff --git a/src/test/ui/coherence-error-suppression.stderr b/src/test/ui/coherence-error-suppression.stderr index ba8ad78ed40..e195e9452e5 100644 --- a/src/test/ui/coherence-error-suppression.stderr +++ b/src/test/ui/coherence-error-suppression.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `DoesNotExist` in this scope --> $DIR/coherence-error-suppression.rs:19:14 | -19 | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in this scope +LL | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in this scope | ^^^^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/coherence-impls-copy.stderr b/src/test/ui/coherence-impls-copy.stderr index e77771b43dd..029b0478952 100644 --- a/src/test/ui/coherence-impls-copy.stderr +++ b/src/test/ui/coherence-impls-copy.stderr @@ -1,37 +1,37 @@ error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:29:15 | -29 | impl Copy for &'static mut MyType {} +LL | impl Copy for &'static mut MyType {} | ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:33:15 | -33 | impl Copy for (MyType, MyType) {} +LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:37:15 | -37 | impl Copy for &'static NotSync {} +LL | impl Copy for &'static NotSync {} | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:40:15 | -40 | impl Copy for [MyType] {} +LL | impl Copy for [MyType] {} | ^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/coherence-impls-copy.rs:44:15 | -44 | impl Copy for &'static [NotSync] {} +LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:33:1 | -33 | impl Copy for (MyType, MyType) {} +LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:40:1 | -40 | impl Copy for [MyType] {} +LL | impl Copy for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impls-copy.rs:44:1 | -44 | impl Copy for &'static [NotSync] {} +LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/coherence-overlap-downstream-inherent.stderr b/src/test/ui/coherence-overlap-downstream-inherent.stderr index 45a2bef9dc2..ec315d897ac 100644 --- a/src/test/ui/coherence-overlap-downstream-inherent.stderr +++ b/src/test/ui/coherence-overlap-downstream-inherent.stderr @@ -1,19 +1,19 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-downstream-inherent.rs:17:26 | -17 | impl Sweet { fn dummy(&self) { } } +LL | impl Sweet { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -18 | //~^ ERROR E0592 -19 | impl Sweet { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl Sweet { fn dummy(&self) { } } | ------------------- other definition for `dummy` error[E0592]: duplicate definitions with name `f` --> $DIR/coherence-overlap-downstream-inherent.rs:23:38 | -23 | impl A where T: Bar { fn f(&self) {} } +LL | impl A where T: Bar { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` -24 | //~^ ERROR E0592 -25 | impl A { fn f(&self) {} } +LL | //~^ ERROR E0592 +LL | impl A { fn f(&self) {} } | -------------- other definition for `f` | = note: downstream crates may implement trait `Bar<_>` for type `i32` diff --git a/src/test/ui/coherence-overlap-downstream.stderr b/src/test/ui/coherence-overlap-downstream.stderr index 884afe72d04..1fac596ed30 100644 --- a/src/test/ui/coherence-overlap-downstream.stderr +++ b/src/test/ui/coherence-overlap-downstream.stderr @@ -1,17 +1,17 @@ error[E0119]: conflicting implementations of trait `Sweet`: --> $DIR/coherence-overlap-downstream.rs:18:1 | -17 | impl Sweet for T { } +LL | impl Sweet for T { } | ------------------------- first implementation here -18 | impl Sweet for T { } +LL | impl Sweet for T { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: --> $DIR/coherence-overlap-downstream.rs:24:1 | -23 | impl Foo for T where T: Bar {} +LL | impl Foo for T where T: Bar {} | --------------------------------------- first implementation here -24 | impl Foo for i32 {} +LL | impl Foo for i32 {} | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | = note: downstream crates may implement trait `Bar<_>` for type `i32` diff --git a/src/test/ui/coherence-overlap-issue-23516-inherent.stderr b/src/test/ui/coherence-overlap-issue-23516-inherent.stderr index 95a034ac877..6bb73e6d383 100644 --- a/src/test/ui/coherence-overlap-issue-23516-inherent.stderr +++ b/src/test/ui/coherence-overlap-issue-23516-inherent.stderr @@ -1,10 +1,10 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-issue-23516-inherent.rs:19:25 | -19 | impl Cake { fn dummy(&self) { } } +LL | impl Cake { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -20 | //~^ ERROR E0592 -21 | impl Cake> { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl Cake> { fn dummy(&self) { } } | ------------------- other definition for `dummy` | = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` diff --git a/src/test/ui/coherence-overlap-issue-23516.stderr b/src/test/ui/coherence-overlap-issue-23516.stderr index 33849086280..fe4e7cf3487 100644 --- a/src/test/ui/coherence-overlap-issue-23516.stderr +++ b/src/test/ui/coherence-overlap-issue-23516.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`: --> $DIR/coherence-overlap-issue-23516.rs:18:1 | -17 | impl Sweet for T { } +LL | impl Sweet for T { } | ------------------------- first implementation here -18 | impl Sweet for Box { } +LL | impl Sweet for Box { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::boxed::Box<_>` | = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` diff --git a/src/test/ui/coherence-overlap-upstream-inherent.stderr b/src/test/ui/coherence-overlap-upstream-inherent.stderr index 0e398eed792..a7a6003b06c 100644 --- a/src/test/ui/coherence-overlap-upstream-inherent.stderr +++ b/src/test/ui/coherence-overlap-upstream-inherent.stderr @@ -1,10 +1,10 @@ error[E0592]: duplicate definitions with name `dummy` --> $DIR/coherence-overlap-upstream-inherent.rs:21:32 | -21 | impl A where T: Remote { fn dummy(&self) { } } +LL | impl A where T: Remote { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -22 | //~^ ERROR E0592 -23 | impl A { fn dummy(&self) { } } +LL | //~^ ERROR E0592 +LL | impl A { fn dummy(&self) { } } | ------------------- other definition for `dummy` | = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions diff --git a/src/test/ui/coherence-overlap-upstream.stderr b/src/test/ui/coherence-overlap-upstream.stderr index c784dbecb9c..cc199548f06 100644 --- a/src/test/ui/coherence-overlap-upstream.stderr +++ b/src/test/ui/coherence-overlap-upstream.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i16`: --> $DIR/coherence-overlap-upstream.rs:22:1 | -21 | impl Foo for T where T: Remote {} +LL | impl Foo for T where T: Remote {} | --------------------------------- first implementation here -22 | impl Foo for i16 {} +LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` | = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions diff --git a/src/test/ui/command-line-diagnostics.stderr b/src/test/ui/command-line-diagnostics.stderr index fd7f98ea563..9e9e03373e8 100644 --- a/src/test/ui/command-line-diagnostics.stderr +++ b/src/test/ui/command-line-diagnostics.stderr @@ -1,9 +1,9 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/command-line-diagnostics.rs:16:5 | -15 | let x = 42; +LL | let x = 42; | - first assignment to `x` -16 | x = 43; +LL | x = 43; | ^^^^^^ cannot assign twice to immutable variable error: aborting due to previous error diff --git a/src/test/ui/compare-method/proj-outlives-region.stderr b/src/test/ui/compare-method/proj-outlives-region.stderr index f695aa75906..9abecb2e03c 100644 --- a/src/test/ui/compare-method/proj-outlives-region.stderr +++ b/src/test/ui/compare-method/proj-outlives-region.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/proj-outlives-region.rs:19:5 | -14 | fn foo() where T: 'a; +LL | fn foo() where T: 'a; | --------------------- definition of `foo` from trait ... -19 | fn foo() where U: 'a { } //~ ERROR E0276 +LL | fn foo() where U: 'a { } //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: 'a` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-extra-2.stderr b/src/test/ui/compare-method/region-extra-2.stderr index 59af795be57..32d7024db35 100644 --- a/src/test/ui/compare-method/region-extra-2.stderr +++ b/src/test/ui/compare-method/region-extra-2.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-extra-2.rs:19:5 | -15 | fn renew<'b: 'a>(self) -> &'b mut [T]; +LL | fn renew<'b: 'a>(self) -> &'b mut [T]; | -------------------------------------- definition of `renew` from trait ... -19 | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { +LL | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-extra.stderr b/src/test/ui/compare-method/region-extra.stderr index 8941abb6f16..ce62cc62e22 100644 --- a/src/test/ui/compare-method/region-extra.stderr +++ b/src/test/ui/compare-method/region-extra.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-extra.rs:19:5 | -15 | fn foo(); +LL | fn foo(); | --------- definition of `foo` from trait ... -19 | fn foo() where 'a: 'b { } //~ ERROR impl has stricter +LL | fn foo() where 'a: 'b { } //~ ERROR impl has stricter | ^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-unrelated.stderr b/src/test/ui/compare-method/region-unrelated.stderr index c5e7cad7cfd..2026dd1f1cc 100644 --- a/src/test/ui/compare-method/region-unrelated.stderr +++ b/src/test/ui/compare-method/region-unrelated.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/region-unrelated.rs:19:5 | -14 | fn foo() where T: 'a; +LL | fn foo() where T: 'a; | --------------------- definition of `foo` from trait ... -19 | fn foo() where V: 'a { } +LL | fn foo() where V: 'a { } | ^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `V: 'a` error: aborting due to previous error diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index 9a5cb6267c3..8f0744fa56d 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -1,10 +1,10 @@ error[E0053]: method `b` has an incompatible type for trait --> $DIR/reordered-type-param.rs:26:30 | -17 | fn b(&self, x: C) -> C; +LL | fn b(&self, x: C) -> C; | - type in trait ... -26 | fn b(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type +LL | fn b(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type | ^ expected type parameter, found a different type parameter | = note: expected type `fn(&E, F) -> F` diff --git a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr index 84460922b67..53aced771cc 100644 --- a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr +++ b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/trait-bound-on-type-parameter.rs:25:5 | -17 | fn b(&self, x: C) -> C; +LL | fn b(&self, x: C) -> C; | ---------------------------- definition of `b` from trait ... -25 | fn b(&self, _x: F) -> F { panic!() } //~ ERROR E0276 +LL | fn b(&self, _x: F) -> F { panic!() } //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `F: std::marker::Sync` error: aborting due to previous error diff --git a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr index 74b529aab03..a0c333c3a53 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr @@ -1,64 +1,64 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:36:5 | -23 | fn test_error1_fn(&self); +LL | fn test_error1_fn(&self); | -------------------------------- definition of `test_error1_fn` from trait ... -36 | fn test_error1_fn(&self) {} +LL | fn test_error1_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Ord` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:40:5 | -24 | fn test_error2_fn(&self); +LL | fn test_error2_fn(&self); | -------------------------------------- definition of `test_error2_fn` from trait ... -40 | fn test_error2_fn(&self) {} +LL | fn test_error2_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:44:5 | -25 | fn test_error3_fn(&self); +LL | fn test_error3_fn(&self); | -------------------------------------- definition of `test_error3_fn` from trait ... -44 | fn test_error3_fn(&self) {} +LL | fn test_error3_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:54:5 | -28 | fn test_error5_fn(&self); +LL | fn test_error5_fn(&self); | ------------------------------- definition of `test_error5_fn` from trait ... -54 | fn test_error5_fn(&self) {} +LL | fn test_error5_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: B` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:60:5 | -30 | fn test_error7_fn(&self); +LL | fn test_error7_fn(&self); | ------------------------------- definition of `test_error7_fn` from trait ... -60 | fn test_error7_fn(&self) {} +LL | fn test_error7_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Eq` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:63:5 | -31 | fn test_error8_fn(&self); +LL | fn test_error8_fn(&self); | ------------------------------- definition of `test_error8_fn` from trait ... -63 | fn test_error8_fn(&self) {} +LL | fn test_error8_fn(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: C` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:76:5 | -72 | fn method>(&self); +LL | fn method>(&self); | ---------------------------------- definition of `method` from trait ... -76 | fn method>(&self) {} +LL | fn method>(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `G: Getter` error: aborting due to 7 previous errors diff --git a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr index 97f96c7a6a5..921b0e5d1c4 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-2.rs:23:5 | -19 | fn zip>(self, other: U) -> ZipIterator; +LL | fn zip>(self, other: U) -> ZipIterator; | ------------------------------------------------------------------ definition of `zip` from trait ... -23 | fn zip>(self, other: U) -> ZipIterator { +LL | fn zip>(self, other: U) -> ZipIterator { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: Iterator` error: aborting due to previous error diff --git a/src/test/ui/const-deref-ptr.stderr b/src/test/ui/const-deref-ptr.stderr index d702d942107..8a80802c52c 100644 --- a/src/test/ui/const-deref-ptr.stderr +++ b/src/test/ui/const-deref-ptr.stderr @@ -1,7 +1,7 @@ error[E0396]: raw pointers cannot be dereferenced in statics --> $DIR/const-deref-ptr.rs:14:29 | -14 | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396 +LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer in constant error: aborting due to previous error diff --git a/src/test/ui/const-eval-overflow-2.stderr b/src/test/ui/const-eval-overflow-2.stderr index fa8ddaaf43d..05a286d4e7e 100644 --- a/src/test/ui/const-eval-overflow-2.stderr +++ b/src/test/ui/const-eval-overflow-2.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-eval-overflow-2.rs:21:25 | -21 | const NEG_NEG_128: i8 = -NEG_128; +LL | const NEG_NEG_128: i8 = -NEG_128; | ^^^^^^^^ attempt to negate with overflow | note: for pattern here --> $DIR/const-eval-overflow-2.rs:27:9 | -27 | NEG_NEG_128 => println!("A"), +LL | NEG_NEG_128 => println!("A"), | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-eval-overflow-4.stderr b/src/test/ui/const-eval-overflow-4.stderr index a02a587d0fd..b907a47afb9 100644 --- a/src/test/ui/const-eval-overflow-4.stderr +++ b/src/test/ui/const-eval-overflow-4.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to add with overflow --> $DIR/const-eval-overflow-4.rs:23:13 | -23 | : [u32; (i8::MAX as i8 + 1i8) as usize] +LL | : [u32; (i8::MAX as i8 + 1i8) as usize] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,7 +9,7 @@ warning: constant evaluation error: attempt to add with overflow error[E0080]: constant evaluation error --> $DIR/const-eval-overflow-4.rs:23:13 | -23 | : [u32; (i8::MAX as i8 + 1i8) as usize] +LL | : [u32; (i8::MAX as i8 + 1i8) as usize] | ^^^^^^^^^^^^^^^^^^^^^ attempt to add with overflow error: aborting due to previous error diff --git a/src/test/ui/const-eval-span.stderr b/src/test/ui/const-eval-span.stderr index 0caa87d22a2..e3c28cafc62 100644 --- a/src/test/ui/const-eval-span.stderr +++ b/src/test/ui/const-eval-span.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const-eval-span.rs:19:9 | -19 | V = CONSTANT, +LL | V = CONSTANT, | ^^^^^^^^ expected isize, found struct `S` | = note: expected type `isize` diff --git a/src/test/ui/const-eval/issue-43197.stderr b/src/test/ui/const-eval/issue-43197.stderr index c2fe2ff367e..c523b749d37 100644 --- a/src/test/ui/const-eval/issue-43197.stderr +++ b/src/test/ui/const-eval/issue-43197.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to subtract with overflow --> $DIR/issue-43197.rs:18:20 | -18 | const X: u32 = 0-1; //~ ERROR constant evaluation error +LL | const X: u32 = 0-1; //~ ERROR constant evaluation error | ^^^ | = note: #[warn(const_err)] on by default @@ -9,19 +9,19 @@ warning: constant evaluation error: attempt to subtract with overflow warning: constant evaluation error: attempt to subtract with overflow --> $DIR/issue-43197.rs:20:20 | -20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error +LL | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error | ^^^^^^^^ error[E0080]: constant evaluation error --> $DIR/issue-43197.rs:18:20 | -18 | const X: u32 = 0-1; //~ ERROR constant evaluation error +LL | const X: u32 = 0-1; //~ ERROR constant evaluation error | ^^^ attempt to subtract with overflow error[E0080]: constant evaluation error --> $DIR/issue-43197.rs:20:24 | -20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error +LL | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error | ^^^ attempt to subtract with overflow error: aborting due to 2 previous errors diff --git a/src/test/ui/const-expr-addr-operator.stderr b/src/test/ui/const-expr-addr-operator.stderr index b501a552a2e..bd86f270f31 100644 --- a/src/test/ui/const-expr-addr-operator.stderr +++ b/src/test/ui/const-expr-addr-operator.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-expr-addr-operator.rs:15:29 | -15 | const X: &'static u32 = &22; //~ ERROR constant evaluation error +LL | const X: &'static u32 = &22; //~ ERROR constant evaluation error | ^^^ unimplemented constant expression: address operator | note: for pattern here --> $DIR/const-expr-addr-operator.rs:17:9 | -17 | X => 0, +LL | X => 0, | ^ error: aborting due to previous error diff --git a/src/test/ui/const-fn-error.stderr b/src/test/ui/const-fn-error.stderr index a66453c4e62..e738a5e4ff3 100644 --- a/src/test/ui/const-fn-error.stderr +++ b/src/test/ui/const-fn-error.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: non-constant path in constant expression --> $DIR/const-fn-error.rs:27:19 | -27 | let a : [i32; f(X)]; +LL | let a : [i32; f(X)]; | ^^^^ | = note: #[warn(const_err)] on by default @@ -9,31 +9,31 @@ warning: constant evaluation error: non-constant path in constant expression error[E0016]: blocks in constant functions are limited to items and tail expressions --> $DIR/const-fn-error.rs:16:19 | -16 | let mut sum = 0; //~ ERROR blocks in constant functions are limited +LL | let mut sum = 0; //~ ERROR blocks in constant functions are limited | ^ error[E0015]: calls in constant functions are limited to constant functions, struct and enum constructors --> $DIR/const-fn-error.rs:17:14 | -17 | for i in 0..x { //~ ERROR calls in constant functions +LL | for i in 0..x { //~ ERROR calls in constant functions | ^^^^ error[E0019]: constant function contains unimplemented expression type --> $DIR/const-fn-error.rs:17:14 | -17 | for i in 0..x { //~ ERROR calls in constant functions +LL | for i in 0..x { //~ ERROR calls in constant functions | ^^^^ error[E0080]: constant evaluation error --> $DIR/const-fn-error.rs:21:5 | -21 | sum //~ ERROR E0080 +LL | sum //~ ERROR E0080 | ^^^ non-constant path in constant expression | note: for constant expression here --> $DIR/const-fn-error.rs:27:13 | -27 | let a : [i32; f(X)]; +LL | let a : [i32; f(X)]; | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/const-fn-mismatch.stderr b/src/test/ui/const-fn-mismatch.stderr index 17872f90bb8..efbf701120d 100644 --- a/src/test/ui/const-fn-mismatch.stderr +++ b/src/test/ui/const-fn-mismatch.stderr @@ -1,7 +1,7 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-mismatch.rs:23:5 | -23 | const fn f() -> u32 { 22 } +LL | const fn f() -> u32 { 22 } | ^^^^^ trait fns cannot be const error: aborting due to previous error diff --git a/src/test/ui/const-fn-not-in-trait.stderr b/src/test/ui/const-fn-not-in-trait.stderr index 2246e01711e..4a77862c312 100644 --- a/src/test/ui/const-fn-not-in-trait.stderr +++ b/src/test/ui/const-fn-not-in-trait.stderr @@ -1,13 +1,13 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-not-in-trait.rs:17:5 | -17 | const fn f() -> u32; +LL | const fn f() -> u32; | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-not-in-trait.rs:19:5 | -19 | const fn g() -> u32 { 0 } +LL | const fn g() -> u32 { 0 } | ^^^^^ trait fns cannot be const error: aborting due to 2 previous errors diff --git a/src/test/ui/const-len-underflow-separate-spans.stderr b/src/test/ui/const-len-underflow-separate-spans.stderr index 8678bc48d4b..6391433ebaf 100644 --- a/src/test/ui/const-len-underflow-separate-spans.stderr +++ b/src/test/ui/const-len-underflow-separate-spans.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to subtract with overflow --> $DIR/const-len-underflow-separate-spans.rs:17:20 | -17 | const LEN: usize = ONE - TWO; +LL | const LEN: usize = ONE - TWO; | ^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,13 +9,13 @@ warning: constant evaluation error: attempt to subtract with overflow error[E0080]: constant evaluation error --> $DIR/const-len-underflow-separate-spans.rs:17:20 | -17 | const LEN: usize = ONE - TWO; +LL | const LEN: usize = ONE - TWO; | ^^^^^^^^^ attempt to subtract with overflow | note: for constant expression here --> $DIR/const-len-underflow-separate-spans.rs:22:12 | -22 | let a: [i8; LEN] = unimplemented!(); +LL | let a: [i8; LEN] = unimplemented!(); | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-pattern-irrefutable.stderr b/src/test/ui/const-pattern-irrefutable.stderr index d2bba1ca29f..9a05d4c76c4 100644 --- a/src/test/ui/const-pattern-irrefutable.stderr +++ b/src/test/ui/const-pattern-irrefutable.stderr @@ -1,19 +1,19 @@ error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:22:9 | -22 | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:23:9 | -23 | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `_` not covered --> $DIR/const-pattern-irrefutable.rs:24:9 | -24 | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered +LL | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable error: aborting due to 3 previous errors diff --git a/src/test/ui/const-pattern-not-const-evaluable.stderr b/src/test/ui/const-pattern-not-const-evaluable.stderr index 9dccf4af6f4..74677c7f117 100644 --- a/src/test/ui/const-pattern-not-const-evaluable.stderr +++ b/src/test/ui/const-pattern-not-const-evaluable.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/const-pattern-not-const-evaluable.rs:22:31 | -22 | const BOO: Pair = Pair(Marmor, BlackForest); +LL | const BOO: Pair = Pair(Marmor, BlackForest); | ^^^^ unimplemented constant expression: tuple struct constructors | note: for pattern here --> $DIR/const-pattern-not-const-evaluable.rs:37:9 | -37 | FOO => println!("hi"), +LL | FOO => println!("hi"), | ^^^ error: aborting due to previous error diff --git a/src/test/ui/const-unsized.stderr b/src/test/ui/const-unsized.stderr index 5946f94f700..478539c88ea 100644 --- a/src/test/ui/const-unsized.stderr +++ b/src/test/ui/const-unsized.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:13:29 | -13 | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync)); +LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync)); | ^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Sync + 'static` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: st error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:16:24 | -16 | const CONST_FOO: str = *"foo"; +LL | const CONST_FOO: str = *"foo"; | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -19,7 +19,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:19:31 | -19 | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync)); +LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync)); | ^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Sync + 'static` @@ -28,7 +28,7 @@ error[E0277]: the trait bound `std::fmt::Debug + std::marker::Sync + 'static: st error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/const-unsized.rs:22:26 | -22 | static STATIC_BAR: str = *"bar"; +LL | static STATIC_BAR: str = *"bar"; | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` diff --git a/src/test/ui/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross-crate-macro-backtrace/main.stderr index fc2343bdb1d..ab447d07241 100644 --- a/src/test/ui/cross-crate-macro-backtrace/main.stderr +++ b/src/test/ui/cross-crate-macro-backtrace/main.stderr @@ -1,7 +1,7 @@ error: 1 positional argument in format string, but no arguments were given --> $DIR/main.rs:18:5 | -18 | myprintln!("{}"); +LL | myprintln!("{}"); | ^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/cross-file-errors/main.stderr b/src/test/ui/cross-file-errors/main.stderr index a1cdae10edf..9eeea28be8f 100644 --- a/src/test/ui/cross-file-errors/main.stderr +++ b/src/test/ui/cross-file-errors/main.stderr @@ -1,11 +1,11 @@ error: expected expression, found `_` --> $DIR/underscore.rs:18:9 | -18 | _ +LL | _ | ^ | ::: $DIR/main.rs:15:5 | -15 | underscore!(); +LL | underscore!(); | -------------- in this macro invocation diff --git a/src/test/ui/cycle-trait-supertrait-indirect.stderr b/src/test/ui/cycle-trait-supertrait-indirect.stderr index 7bc6dd51244..388da3f860e 100644 --- a/src/test/ui/cycle-trait-supertrait-indirect.stderr +++ b/src/test/ui/cycle-trait-supertrait-indirect.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/cycle-trait-supertrait-indirect.rs:20:1 | -20 | trait C: B { } +LL | trait C: B { } | ^^^^^^^^^^ cyclic reference | note: the cycle begins when computing the supertraits of `B`... --> $DIR/cycle-trait-supertrait-indirect.rs:14:1 | -14 | trait A: B { +LL | trait A: B { | ^^^^^^^^^^ note: ...which then requires computing the supertraits of `C`... --> $DIR/cycle-trait-supertrait-indirect.rs:17:1 | -17 | trait B: C { +LL | trait B: C { | ^^^^^^^^^^ = note: ...which then again requires computing the supertraits of `B`, completing the cycle. diff --git a/src/test/ui/deprecated-macro_escape-inner.stderr b/src/test/ui/deprecated-macro_escape-inner.stderr index c91db6c3365..56c08383797 100644 --- a/src/test/ui/deprecated-macro_escape-inner.stderr +++ b/src/test/ui/deprecated-macro_escape-inner.stderr @@ -1,7 +1,7 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape-inner.rs:14:5 | -14 | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ^^^^^^^^^^^^^^^^ | = help: consider an outer attribute, #[macro_use] mod ... diff --git a/src/test/ui/deprecated-macro_escape.stderr b/src/test/ui/deprecated-macro_escape.stderr index aa771295281..09ff3285740 100644 --- a/src/test/ui/deprecated-macro_escape.stderr +++ b/src/test/ui/deprecated-macro_escape.stderr @@ -1,6 +1,6 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape.rs:13:1 | -13 | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 3b91929ba3b..620cbd9d336 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:18:9 | -18 | foo(s); //~ ERROR mismatched types +LL | foo(s); //~ ERROR mismatched types | ^ | | | expected struct `std::string::String`, found reference @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:23:10 | -23 | foo3(u); //~ ERROR mismatched types +LL | foo3(u); //~ ERROR mismatched types | ^ | | | expected u32, found &u32 @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:30:9 | -30 | foo(&"aaa".to_owned()); //~ ERROR mismatched types +LL | foo(&"aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found reference @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:31:9 | -31 | foo(&mut "aaa".to_owned()); //~ ERROR mismatched types +LL | foo(&mut "aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found mutable reference @@ -49,10 +49,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:12:20 | -12 | ($x:expr) => { &$x } //~ ERROR mismatched types +LL | ($x:expr) => { &$x } //~ ERROR mismatched types | ^^^ expected u32, found &{integer} ... -32 | foo3(borrow!(0)); +LL | foo3(borrow!(0)); | ---------- in this macro invocation | = note: expected type `u32` diff --git a/src/test/ui/derived-errors/issue-31997-1.stderr b/src/test/ui/derived-errors/issue-31997-1.stderr index 2a0a4c8838d..92c025046a2 100644 --- a/src/test/ui/derived-errors/issue-31997-1.stderr +++ b/src/test/ui/derived-errors/issue-31997-1.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `HashMap` --> $DIR/issue-31997-1.rs:30:19 | -30 | let mut map = HashMap::new(); +LL | let mut map = HashMap::new(); | ^^^^^^^ Use of undeclared type or module `HashMap` error: aborting due to previous error diff --git a/src/test/ui/deriving-meta-empty-trait-list.stderr b/src/test/ui/deriving-meta-empty-trait-list.stderr index 58f871413f1..f5532f7c561 100644 --- a/src/test/ui/deriving-meta-empty-trait-list.stderr +++ b/src/test/ui/deriving-meta-empty-trait-list.stderr @@ -1,12 +1,12 @@ warning: empty trait list in `derive` --> $DIR/deriving-meta-empty-trait-list.rs:15:1 | -15 | #[derive] //~ WARNING empty trait list in `derive` +LL | #[derive] //~ WARNING empty trait list in `derive` | ^^^^^^^^^ warning: empty trait list in `derive` --> $DIR/deriving-meta-empty-trait-list.rs:18:1 | -18 | #[derive()] //~ WARNING empty trait list in `derive` +LL | #[derive()] //~ WARNING empty trait list in `derive` | ^^^^^^^^^^^ diff --git a/src/test/ui/deriving-with-repr-packed.stderr b/src/test/ui/deriving-with-repr-packed.stderr index 48208faa6b5..64aefbcd5df 100644 --- a/src/test/ui/deriving-with-repr-packed.stderr +++ b/src/test/ui/deriving-with-repr-packed.stderr @@ -1,13 +1,13 @@ error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133) --> $DIR/deriving-with-repr-packed.rs:18:16 | -18 | #[derive(Copy, Clone, PartialEq, Eq)] +LL | #[derive(Copy, Clone, PartialEq, Eq)] | ^^^^^ | note: lint level defined here --> $DIR/deriving-with-repr-packed.rs:11:9 | -11 | #![deny(safe_packed_borrows)] +LL | #![deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 @@ -15,7 +15,7 @@ note: lint level defined here error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133) --> $DIR/deriving-with-repr-packed.rs:18:23 | -18 | #[derive(Copy, Clone, PartialEq, Eq)] +LL | #[derive(Copy, Clone, PartialEq, Eq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -24,7 +24,7 @@ error: #[derive] can't be used on a #[repr(packed)] struct with type parameters error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) --> $DIR/deriving-with-repr-packed.rs:26:10 | -26 | #[derive(PartialEq, Eq)] +LL | #[derive(PartialEq, Eq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -33,7 +33,7 @@ error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133 error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) --> $DIR/deriving-with-repr-packed.rs:35:10 | -35 | #[derive(PartialEq)] +LL | #[derive(PartialEq)] | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/did_you_mean/E0178.stderr b/src/test/ui/did_you_mean/E0178.stderr index 29571a8f704..293cf7444f4 100644 --- a/src/test/ui/did_you_mean/E0178.stderr +++ b/src/test/ui/did_you_mean/E0178.stderr @@ -1,25 +1,25 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:14:8 | -14 | w: &'a Foo + Copy, //~ ERROR expected a path +LL | w: &'a Foo + Copy, //~ ERROR expected a path | ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Copy)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:15:8 | -15 | x: &'a Foo + 'a, //~ ERROR expected a path +LL | x: &'a Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a mut Foo` --> $DIR/E0178.rs:16:8 | -16 | y: &'a mut Foo + 'a, //~ ERROR expected a path +LL | y: &'a mut Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'a mut (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> Foo` --> $DIR/E0178.rs:17:8 | -17 | z: fn() -> Foo + 'a, //~ ERROR expected a path +LL | z: fn() -> Foo + 'a, //~ ERROR expected a path | ^^^^^^^^^^^^^^^^ perhaps you forgot parentheses? error: aborting due to 4 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-expr.stderr b/src/test/ui/did_you_mean/bad-assoc-expr.stderr index 1affdc5fda2..c4f7e47c61b 100644 --- a/src/test/ui/did_you_mean/bad-assoc-expr.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-expr.stderr @@ -1,37 +1,37 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:13:5 | -13 | [i32; 4]::clone(&a); +LL | [i32; 4]::clone(&a); | ^^^^^^^^^^^^^^^ help: try: `<[i32; 4]>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:16:5 | -16 | [i32]::as_ref(&a); +LL | [i32]::as_ref(&a); | ^^^^^^^^^^^^^ help: try: `<[i32]>::as_ref` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:19:5 | -19 | (u8)::clone(&0); +LL | (u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:22:5 | -22 | (u8, u8)::clone(&(0, 0)); +LL | (u8, u8)::clone(&(0, 0)); | ^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:25:6 | -25 | &(u8)::clone(&0); +LL | &(u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: missing angle brackets in associated item path --> $DIR/bad-assoc-expr.rs:28:10 | -28 | 10 + (u8)::clone(&0); +LL | 10 + (u8)::clone(&0); | ^^^^^^^^^^^ help: try: `<(u8)>::clone` error: aborting due to 6 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.stderr b/src/test/ui/did_you_mean/bad-assoc-pat.stderr index 8ab3bafa620..80caa86fde5 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -1,49 +1,49 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:13:9 | -13 | [u8]::AssocItem => {} +LL | [u8]::AssocItem => {} | ^^^^^^^^^^^^^^^ help: try: `<[u8]>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:16:9 | -16 | (u8, u8)::AssocItem => {} +LL | (u8, u8)::AssocItem => {} | ^^^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:19:9 | -19 | _::AssocItem => {} +LL | _::AssocItem => {} | ^^^^^^^^^^^^ help: try: `<_>::AssocItem` error: missing angle brackets in associated item path --> $DIR/bad-assoc-pat.rs:24:10 | -24 | &(u8,)::AssocItem => {} +LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem` error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope --> $DIR/bad-assoc-pat.rs:13:9 | -13 | [u8]::AssocItem => {} +LL | [u8]::AssocItem => {} | ^^^^^^^^^^^^^^^ associated item not found in `[u8]` error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope --> $DIR/bad-assoc-pat.rs:16:9 | -16 | (u8, u8)::AssocItem => {} +LL | (u8, u8)::AssocItem => {} | ^^^^^^^^^^^^^^^^^^^ associated item not found in `(u8, u8)` error[E0599]: no associated item named `AssocItem` found for type `_` in the current scope --> $DIR/bad-assoc-pat.rs:19:9 | -19 | _::AssocItem => {} +LL | _::AssocItem => {} | ^^^^^^^^^^^^ associated item not found in `_` error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope --> $DIR/bad-assoc-pat.rs:24:10 | -24 | &(u8,)::AssocItem => {} +LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)` error: aborting due to 8 previous errors 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 9aa6421d47e..b584fa16988 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -1,49 +1,49 @@ error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:11:10 | -11 | type A = [u8; 4]::AssocTy; +LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:15:10 | -15 | type B = [u8]::AssocTy; +LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:19:10 | -19 | type C = (u8)::AssocTy; +LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:23:10 | -23 | type D = (u8, u8)::AssocTy; +LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:27:10 | -27 | type E = _::AssocTy; +LL | type E = _::AssocTy; | ^^^^^^^^^^ help: try: `<_>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:31:19 | -31 | type F = &'static (u8)::AssocTy; +LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:37:10 | -37 | type G = 'static + (Send)::AssocTy; +LL | type G = 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<'static + Send>::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:11:10 | -11 | type A = [u8; 4]::AssocTy; +LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<[u8; ] as Trait>::AssocTy` @@ -51,7 +51,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:15:10 | -15 | type B = [u8]::AssocTy; +LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<[u8] as Trait>::AssocTy` @@ -59,7 +59,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:19:10 | -19 | type C = (u8)::AssocTy; +LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -67,7 +67,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:23:10 | -23 | type D = (u8, u8)::AssocTy; +LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<(u8, u8) as Trait>::AssocTy` @@ -75,13 +75,13 @@ error[E0223]: ambiguous associated type error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/bad-assoc-ty.rs:27:10 | -27 | type E = _::AssocTy; +LL | type E = _::AssocTy; | ^ not allowed in type signatures error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:31:19 | -31 | type F = &'static (u8)::AssocTy; +LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -89,7 +89,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:37:10 | -37 | type G = 'static + (Send)::AssocTy; +LL | type G = 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::AssocTy` @@ -97,7 +97,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:43:10 | -43 | type H = Fn(u8) -> (u8)::Output; +LL | type H = Fn(u8) -> (u8)::Output; | ^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax ` u8 + 'static as Trait>::Output` diff --git a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr index b1dac9b64b7..5290b388e47 100644 --- a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr +++ b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-1.rs:34:8 | -34 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` | = help: the following implementations were found: diff --git a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr index f574ae0fa84..d1b3b2031f6 100644 --- a/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr +++ b/src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8 | -38 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` | = help: the following implementations were found: diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index 725ede6d37b..eb2659e1fca 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:17:15 | -17 | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); //~ ERROR cannot borrow | ^^^^ | | | cannot reborrow mutably @@ -10,9 +10,9 @@ error[E0596]: cannot borrow immutable argument `self` as mutable error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:23:15 | -22 | fn bar(self: &mut Self) { +LL | fn bar(self: &mut Self) { | --------------- consider changing this to `mut self: &mut Self` -23 | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); //~ ERROR cannot borrow | ^^^^ cannot borrow mutably error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 9b290ae99f7..b99b1b54d53 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-34126.rs:16:23 | -16 | self.run(&mut self); //~ ERROR cannot borrow +LL | self.run(&mut self); //~ ERROR cannot borrow | ^^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 135d3ad945c..3b73132423d 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `key` as mutable --> $DIR/issue-34337.rs:16:14 | -16 | get(&mut key); //~ ERROR cannot borrow +LL | get(&mut key); //~ ERROR cannot borrow | ^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index 2a7ffeab737..7894ca20881 100644 --- a/src/test/ui/did_you_mean/issue-35937.stderr +++ b/src/test/ui/did_you_mean/issue-35937.stderr @@ -1,25 +1,25 @@ error[E0596]: cannot borrow field `f.v` of immutable binding as mutable --> $DIR/issue-35937.rs:17:5 | -16 | let f = Foo { v: Vec::new() }; +LL | let f = Foo { v: Vec::new() }; | - consider changing this to `mut f` -17 | f.v.push("cat".to_string()); //~ ERROR cannot borrow +LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding --> $DIR/issue-35937.rs:26:5 | -25 | let s = S { x: 42 }; +LL | let s = S { x: 42 }; | - consider changing this to `mut s` -26 | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; //~ ERROR cannot assign | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding --> $DIR/issue-35937.rs:30:5 | -29 | fn bar(s: S) { +LL | fn bar(s: S) { | - consider changing this to `mut s` -30 | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; //~ ERROR cannot assign | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/issue-36798.stderr b/src/test/ui/did_you_mean/issue-36798.stderr index 03f71fbb183..100f93d2e31 100644 --- a/src/test/ui/did_you_mean/issue-36798.stderr +++ b/src/test/ui/did_you_mean/issue-36798.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `baz` on type `Foo` --> $DIR/issue-36798.rs:17:7 | -17 | f.baz; //~ ERROR no field +LL | f.baz; //~ ERROR no field | ^^^ did you mean `bar`? error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr index f866887433b..4bbadf3a790 100644 --- a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr +++ b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `zz` on type `Foo` --> $DIR/issue-36798_unknown_field.rs:17:7 | -17 | f.zz; //~ ERROR no field +LL | f.zz; //~ ERROR no field | ^^ unknown field | = note: available fields are: `bar` diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index a5269c4e1a8..9d918964ce6 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable --> $DIR/issue-37139.rs:22:23 | -22 | test(&mut x); //~ ERROR cannot borrow immutable +LL | test(&mut x); //~ ERROR cannot borrow immutable | ^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr index 086ed136ce1..5a9fbafb8eb 100644 --- a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr +++ b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `Foo` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:11:5 | -11 | use Foo; //~ ERROR unresolved +LL | use Foo; //~ ERROR unresolved | ^^^ no `Foo` in the root error[E0432]: unresolved import `Foo1` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:13:5 | -13 | use Foo1; //~ ERROR unresolved +LL | use Foo1; //~ ERROR unresolved | ^^^^ no `Foo1` in the root error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-38147-1.stderr b/src/test/ui/did_you_mean/issue-38147-1.stderr index aab6427c144..ca842b39646 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.stderr @@ -1,9 +1,9 @@ error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-1.rs:27:9 | -26 | fn f(&self) { +LL | fn f(&self) { | ----- use `&mut self` here to make mutable -27 | self.s.push('x'); //~ ERROR cannot borrow data mutably +LL | self.s.push('x'); //~ ERROR cannot borrow data mutably | ^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-2.stderr b/src/test/ui/did_you_mean/issue-38147-2.stderr index cc52f2a7830..606f1dd5223 100644 --- a/src/test/ui/did_you_mean/issue-38147-2.stderr +++ b/src/test/ui/did_you_mean/issue-38147-2.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable --> $DIR/issue-38147-2.rs:17:9 | -12 | s: &'a String +LL | s: &'a String | ---------- use `&'a mut String` here to make mutable ... -17 | self.s.push('x'); +LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-3.stderr b/src/test/ui/did_you_mean/issue-38147-3.stderr index 12282b2fdee..cf075204e8b 100644 --- a/src/test/ui/did_you_mean/issue-38147-3.stderr +++ b/src/test/ui/did_you_mean/issue-38147-3.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable --> $DIR/issue-38147-3.rs:17:9 | -12 | s: &'a String +LL | s: &'a String | ---------- use `&'a mut String` here to make mutable ... -17 | self.s.push('x'); +LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-4.stderr b/src/test/ui/did_you_mean/issue-38147-4.stderr index 3bc94dfbd63..a10acf1460d 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.stderr @@ -1,9 +1,9 @@ error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-4.rs:16:5 | -15 | fn f(x: usize, f: &Foo) { +LL | fn f(x: usize, f: &Foo) { | ---- use `&mut Foo` here to make mutable -16 | f.s.push('x'); //~ ERROR cannot borrow data mutably +LL | f.s.push('x'); //~ ERROR cannot borrow data mutably | ^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index 47b11f707d2..a05b70b2eb8 100644 --- a/src/test/ui/did_you_mean/issue-39544.stderr +++ b/src/test/ui/did_you_mean/issue-39544.stderr @@ -1,99 +1,99 @@ error[E0596]: cannot borrow field `z.x` of immutable binding as mutable --> $DIR/issue-39544.rs:21:18 | -20 | let z = Z { x: X::Y }; +LL | let z = Z { x: X::Y }; | - consider changing this to `mut z` -21 | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:26:22 | -25 | fn foo<'z>(&'z self) { +LL | fn foo<'z>(&'z self) { | -------- use `&'z mut self` here to make mutable -26 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:30:22 | -29 | fn foo1(&self, other: &Z) { +LL | fn foo1(&self, other: &Z) { | ----- use `&mut self` here to make mutable -30 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:31:22 | -29 | fn foo1(&self, other: &Z) { +LL | fn foo1(&self, other: &Z) { | -- use `&mut Z` here to make mutable -30 | let _ = &mut self.x; //~ ERROR cannot borrow -31 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:35:22 | -34 | fn foo2<'a>(&'a self, other: &Z) { +LL | fn foo2<'a>(&'a self, other: &Z) { | -------- use `&'a mut self` here to make mutable -35 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:36:22 | -34 | fn foo2<'a>(&'a self, other: &Z) { +LL | fn foo2<'a>(&'a self, other: &Z) { | -- use `&mut Z` here to make mutable -35 | let _ = &mut self.x; //~ ERROR cannot borrow -36 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable --> $DIR/issue-39544.rs:40:22 | -39 | fn foo3<'a>(self: &'a Self, other: &Z) { +LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -------- use `&'a mut Self` here to make mutable -40 | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:41:22 | -39 | fn foo3<'a>(self: &'a Self, other: &Z) { +LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -- use `&mut Z` here to make mutable -40 | let _ = &mut self.x; //~ ERROR cannot borrow -41 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable --> $DIR/issue-39544.rs:45:22 | -44 | fn foo4(other: &Z) { +LL | fn foo4(other: &Z) { | -- use `&mut Z` here to make mutable -45 | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; //~ ERROR cannot borrow | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `z.x` of immutable binding as mutable --> $DIR/issue-39544.rs:51:18 | -50 | pub fn with_arg(z: Z, w: &Z) { +LL | pub fn with_arg(z: Z, w: &Z) { | - consider changing this to `mut z` -51 | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `w.x` of immutable binding as mutable --> $DIR/issue-39544.rs:52:18 | -50 | pub fn with_arg(z: Z, w: &Z) { +LL | pub fn with_arg(z: Z, w: &Z) { | -- use `&mut Z` here to make mutable -51 | let _ = &mut z.x; //~ ERROR cannot borrow -52 | let _ = &mut w.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut w.x; //~ ERROR cannot borrow | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to borrowed content `*x.0` of immutable binding --> $DIR/issue-39544.rs:58:5 | -58 | *x.0 = 1; +LL | *x.0 = 1; | ^^^^^^^^ cannot borrow as mutable error: aborting due to 12 previous errors diff --git a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr index b861064399e..c08ee4247c7 100644 --- a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr +++ b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:34:5 | -34 | Foo::::bar(&1i8); //~ ERROR is not satisfied +LL | Foo::::bar(&1i8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i8` | = help: the following implementations were found: @@ -13,13 +13,13 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `u8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:35:5 | -35 | Foo::::bar(&1u8); //~ ERROR is not satisfied +LL | Foo::::bar(&1u8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u8` | = help: the following implementations were found: @@ -30,13 +30,13 @@ error[E0277]: the trait bound `u8: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `bool: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:36:5 | -36 | Foo::::bar(&true); //~ ERROR is not satisfied +LL | Foo::::bar(&true); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `bool` | = help: the following implementations were found: @@ -48,7 +48,7 @@ error[E0277]: the trait bound `bool: Foo` is not satisfied note: required by `Foo::bar` --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 | -12 | fn bar(&self){} +LL | fn bar(&self){} | ^^^^^^^^^^^^^ error: aborting due to 3 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 cc4886f3b0f..301441c5622 100644 --- a/src/test/ui/did_you_mean/issue-40006.stderr +++ b/src/test/ui/did_you_mean/issue-40006.stderr @@ -1,65 +1,65 @@ error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:11:9 | -11 | impl X { //~ ERROR cannot be made into an object +LL | impl X { //~ ERROR cannot be made into an object | _________^ -12 | | //~^ ERROR missing -13 | | Y +LL | | //~^ ERROR missing +LL | | Y | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:18:10 | -18 | trait X { //~ ERROR missing +LL | trait X { //~ ERROR missing | __________^ -19 | | X() {} +LL | | X() {} | |____^ missing `fn`, `type`, or `const` error: expected `[`, found `#` --> $DIR/issue-40006.rs:20:17 | -20 | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } //~ ERROR missing | ^ error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:20:21 | -20 | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } //~ ERROR missing | _____________________^ -21 | | //~^ ERROR expected -22 | | L = M; //~ ERROR missing +LL | | //~^ ERROR expected +LL | | L = M; //~ ERROR missing | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:22:11 | -22 | L = M; //~ ERROR missing +LL | L = M; //~ ERROR missing | ___________^ -23 | | Z = { 2 + 3 }; //~ ERROR expected one of +LL | | Z = { 2 + 3 }; //~ ERROR expected one of | |____^ missing `fn`, `type`, or `const` error: expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` --> $DIR/issue-40006.rs:23:18 | -23 | Z = { 2 + 3 }; //~ ERROR expected one of +LL | Z = { 2 + 3 }; //~ ERROR expected one of | ^ expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}` here error: expected one of `!` or `::`, found `(` --> $DIR/issue-40006.rs:24:9 | -24 | ::Y (); //~ ERROR expected one of +LL | ::Y (); //~ ERROR expected one of | ^ expected one of `!` or `::` here error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:28:8 | -28 | pub hello_method(&self) { //~ ERROR missing +LL | pub hello_method(&self) { //~ ERROR missing | ^ missing `fn`, `type`, or `const` error[E0038]: the trait `X` cannot be made into an object --> $DIR/issue-40006.rs:11:6 | -11 | impl X { //~ ERROR cannot be made into an object +LL | impl X { //~ ERROR cannot be made into an object | ^ the trait `X` cannot be made into an object | = note: method `xxx` has no receiver diff --git a/src/test/ui/did_you_mean/issue-40396.stderr b/src/test/ui/did_you_mean/issue-40396.stderr index 8f4118b3ff0..219fd45665a 100644 --- a/src/test/ui/did_you_mean/issue-40396.stderr +++ b/src/test/ui/did_you_mean/issue-40396.stderr @@ -1,7 +1,7 @@ error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:12:37 | -12 | println!("{:?}", (0..13).collect>()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect>()); //~ ERROR chained comparison | ^^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -10,7 +10,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:16:25 | -16 | println!("{:?}", Vec::new()); //~ ERROR chained comparison +LL | println!("{:?}", Vec::new()); //~ ERROR chained comparison | ^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -19,7 +19,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:20:37 | -20 | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison | ^^^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments @@ -28,7 +28,7 @@ error: chained comparison operators require parentheses error: chained comparison operators require parentheses --> $DIR/issue-40396.rs:20:41 | -20 | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison +LL | println!("{:?}", (0..13).collect()); //~ ERROR chained comparison | ^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index e11ed5d4c4f..3aece9908a9 100644 --- a/src/test/ui/did_you_mean/issue-40823.stderr +++ b/src/test/ui/did_you_mean/issue-40823.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable borrowed content `*buf` as mutable --> $DIR/issue-40823.rs:13:5 | -13 | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content +LL | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content | ^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-41679.stderr b/src/test/ui/did_you_mean/issue-41679.stderr index f1ccb3e6e14..c17812fc0cb 100644 --- a/src/test/ui/did_you_mean/issue-41679.stderr +++ b/src/test/ui/did_you_mean/issue-41679.stderr @@ -1,7 +1,7 @@ error: `~` can not be used as a unary operator --> $DIR/issue-41679.rs:12:13 | -12 | let x = ~1; //~ ERROR can not be used as a unary operator +LL | let x = ~1; //~ ERROR can not be used as a unary operator | ^ did you mean `!`? | = help: use `!` instead of `~` if you meant to perform bitwise negation diff --git a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr index 2891c771a36..64c20ff8e07 100644 --- a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr +++ b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable` --> $DIR/issue-42599_available_fields_note.rs:26:39 | -26 | Self { secret_integer: 2, inocently_mispellable: () } +LL | Self { secret_integer: 2, inocently_mispellable: () } | ^^^^^^^^^^^^^^^^^^^^^ field does not exist - did you mean `innocently_misspellable`? error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexistent_field` --> $DIR/issue-42599_available_fields_note.rs:31:39 | -31 | Self { secret_integer: 3, egregiously_nonexistent_field: () } +LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field | = note: available fields are: `favorite_integer`, `secret_integer`, `innocently_misspellable`, `another_field`, `yet_another_field` ... and 2 others @@ -15,13 +15,13 @@ error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexiste error[E0609]: no field `inocently_mispellable` on type `submodule::Demo` --> $DIR/issue-42599_available_fields_note.rs:42:41 | -42 | let innocent_field_misaccess = demo.inocently_mispellable; +LL | let innocent_field_misaccess = demo.inocently_mispellable; | ^^^^^^^^^^^^^^^^^^^^^ did you mean `innocently_misspellable`? error[E0609]: no field `egregiously_nonexistent_field` on type `submodule::Demo` --> $DIR/issue-42599_available_fields_note.rs:45:42 | -45 | let egregious_field_misaccess = demo.egregiously_nonexistent_field; +LL | let egregious_field_misaccess = demo.egregiously_nonexistent_field; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `favorite_integer`, `innocently_misspellable` diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index 748b7165e51..390b214e62e 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -1,16 +1,16 @@ error[E0308]: mismatched types --> $DIR/issue-42764.rs:21:43 | -21 | this_function_expects_a_double_option(n); +LL | this_function_expects_a_double_option(n); | ^ expected enum `DoubleOption`, found usize | = note: expected type `DoubleOption<_>` found type `usize` help: try using a variant of the expected type | -21 | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); +LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -21 | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); +LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr index e10abdbb4f9..1f653c90886 100644 --- a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr +++ b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:14:13 | -14 | let x = Option(1); //~ ERROR expected function, found enum +LL | let x = Option(1); //~ ERROR expected function, found enum | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -11,7 +11,7 @@ error[E0423]: expected function, found enum `Option` error[E0532]: expected tuple struct/variant, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:16:12 | -16 | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum +LL | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -21,7 +21,7 @@ error[E0532]: expected tuple struct/variant, found enum `Option` error[E0532]: expected tuple struct/variant, found enum `Example` --> $DIR/issue-43871-enum-instead-of-variant.rs:22:12 | -22 | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum +LL | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum | ^^^^^^^ | = note: did you mean to use one of the following variants? diff --git a/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr b/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr index 69a76b923b8..d73e6287f12 100644 --- a/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr +++ b/src/test/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr @@ -1,7 +1,7 @@ error: expected field pattern, found `...` --> $DIR/issue-46718-struct-pattern-dotdotdot.rs:21:55 | -21 | PersonalityInventory { expressivity: exp, ... } => exp +LL | PersonalityInventory { expressivity: exp, ... } => exp | ^^^ help: to omit remaining fields, use one fewer `.`: `..` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr index a35aa6f3d1c..c3a706d5901 100644 --- a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr +++ b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr @@ -1,7 +1,7 @@ error: unexpected token `||` after pattern --> $DIR/multiple-pattern-typo.rs:14:15 | -14 | 1 | 2 || 3 => (), //~ ERROR unexpected token `||` after pattern +LL | 1 | 2 || 3 => (), //~ ERROR unexpected token `||` after pattern | ^^ help: use a single `|` to specify multiple patterns: `|` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index 529c8c11f32..8b34c533d8b 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `K: std::marker::Send` --> $DIR/recursion_limit.rs:44:5 | -44 | is_send::(); //~ ERROR overflow evaluating the requirement +LL | is_send::(); //~ ERROR overflow evaluating the requirement | ^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate @@ -18,7 +18,7 @@ error[E0275]: overflow evaluating the requirement `K: std::marker::Send` note: required by `is_send` --> $DIR/recursion_limit.rs:41:1 | -41 | fn is_send() { } +LL | fn is_send() { } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr index f78fa4c48b2..a4048fbfb26 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -1,19 +1,19 @@ error[E0055]: reached the recursion limit while auto-dereferencing I --> $DIR/recursion_limit_deref.rs:62:22 | -62 | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ deref recursion limit reached | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate error[E0055]: reached the recursion limit while auto-dereferencing I - | - = help: consider adding a `#![recursion_limit="20"]` attribute to your crate + | + = help: consider adding a `#![recursion_limit="20"]` attribute to your crate error[E0308]: mismatched types --> $DIR/recursion_limit_deref.rs:62:22 | -62 | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ expected struct `Bottom`, found struct `Top` | = note: expected type `&Bottom` diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.stderr b/src/test/ui/did_you_mean/recursion_limit_macro.stderr index 24e223c797b..f6bce55528c 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_macro.stderr @@ -1,10 +1,10 @@ error: recursion limit reached while expanding the macro `recurse` --> $DIR/recursion_limit_macro.rs:20:31 | -20 | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit +LL | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit | ^^^^^^^^^^^^^^^^^^^ ... -24 | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); +LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); | -------------------------------------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index 2923d6f760a..fcfa80e1c9d 100644 --- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -1,19 +1,19 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12 | -12 | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; //~ ERROR expected a path | ^^^^^^^^^^^^^^^ help: try adding parentheses: `&(Copy + 'static)` error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:14:12 | -14 | let _: &'static Copy + 'static; //~ ERROR expected a path +LL | let _: &'static Copy + 'static; //~ ERROR expected a path | ^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'static (Copy + 'static)` error[E0038]: the trait `std::marker::Copy` cannot be made into an object --> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12 | -12 | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; //~ ERROR expected a path | ^^^^^ the trait `std::marker::Copy` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/discrim-overflow-2.stderr b/src/test/ui/discrim-overflow-2.stderr index c8c649fd597..1facda94cd6 100644 --- a/src/test/ui/discrim-overflow-2.stderr +++ b/src/test/ui/discrim-overflow-2.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:27:9 | -27 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127i8 | = note: explicitly set `OhNo = -128i8` if that is desired outcome @@ -9,7 +9,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:36:9 | -36 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255u8 | = note: explicitly set `OhNo = 0u8` if that is desired outcome @@ -17,7 +17,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:45:9 | -45 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767i16 | = note: explicitly set `OhNo = -32768i16` if that is desired outcome @@ -25,7 +25,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:54:9 | -54 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535u16 | = note: explicitly set `OhNo = 0u16` if that is desired outcome @@ -33,7 +33,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:63:9 | -63 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647i32 | = note: explicitly set `OhNo = -2147483648i32` if that is desired outcome @@ -41,7 +41,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:72:9 | -72 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295u32 | = note: explicitly set `OhNo = 0u32` if that is desired outcome @@ -49,7 +49,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:81:9 | -81 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `OhNo = -9223372036854775808i64` if that is desired outcome @@ -57,7 +57,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:90:9 | -90 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 18446744073709551615u64 | = note: explicitly set `OhNo = 0u64` if that is desired outcome diff --git a/src/test/ui/discrim-overflow.stderr b/src/test/ui/discrim-overflow.stderr index be844013ba1..43c032b12a6 100644 --- a/src/test/ui/discrim-overflow.stderr +++ b/src/test/ui/discrim-overflow.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:25:9 | -25 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127i8 | = note: explicitly set `OhNo = -128i8` if that is desired outcome @@ -9,7 +9,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:36:9 | -36 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255u8 | = note: explicitly set `OhNo = 0u8` if that is desired outcome @@ -17,7 +17,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:47:9 | -47 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767i16 | = note: explicitly set `OhNo = -32768i16` if that is desired outcome @@ -25,7 +25,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:58:9 | -58 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535u16 | = note: explicitly set `OhNo = 0u16` if that is desired outcome @@ -33,7 +33,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:70:9 | -70 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647i32 | = note: explicitly set `OhNo = -2147483648i32` if that is desired outcome @@ -41,7 +41,7 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:82:9 | -82 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295u32 | = note: explicitly set `OhNo = 0u32` if that is desired outcome @@ -49,18 +49,18 @@ error[E0370]: enum discriminant overflowed error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:94:9 | -94 | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `OhNo = -9223372036854775808i64` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:106:9 - | -106 | OhNo, //~ ERROR enum discriminant overflowed [E0370] - | ^^^^ overflowed on value after 18446744073709551615u64 - | - = note: explicitly set `OhNo = 0u64` if that is desired outcome + --> $DIR/discrim-overflow.rs:106:9 + | +LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] + | ^^^^ overflowed on value after 18446744073709551615u64 + | + = note: explicitly set `OhNo = 0u64` if that is desired outcome error: aborting due to 8 previous errors diff --git a/src/test/ui/double-import.stderr b/src/test/ui/double-import.stderr index 33fad022116..ceddff4047b 100644 --- a/src/test/ui/double-import.stderr +++ b/src/test/ui/double-import.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `foo` is defined multiple times --> $DIR/double-import.rs:23:5 | -22 | use sub1::foo; +LL | use sub1::foo; | --------- previous import of the value `foo` here -23 | use sub2::foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -23 | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr index bd7580ca751..454ee6afe24 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr @@ -1,10 +1,10 @@ error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:39:20 | -39 | dt = Dt("dt", &c); +LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:41:20 | -41 | dr = Dr("dr", &c); +LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -23,10 +23,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:49:29 | -49 | pt = Pt("pt", &c_long, &c); +LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -34,10 +34,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-extern-crate.rs:51:29 | -51 | pr = Pr("pr", &c_long, &c); +LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough ... -59 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr index cb4f3d21398..d5b4e85ce5e 100644 --- a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr @@ -1,23 +1,23 @@ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:32:1 | -32 | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt { -33 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute -34 | | -35 | | // (unsafe to access self.1 due to #[may_dangle] on A) -36 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } -37 | | } +LL | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt { +LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | +LL | | // (unsafe to access self.1 due to #[may_dangle] on A) +LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } +LL | | } | |_^ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:38:1 | -38 | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { -39 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute -40 | | -41 | | // (unsafe to access self.1 due to #[may_dangle] on 'a) -42 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } -43 | | } +LL | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { +LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | +LL | | // (unsafe to access self.1 due to #[may_dangle] on 'a) +LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } +LL | | } | |_^ error: aborting due to 2 previous errors diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr index 0fdedfb7cf5..6fac358e21a 100644 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr @@ -1,10 +1,10 @@ error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:57:20 | -57 | dt = Dt("dt", &c); +LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:59:20 | -59 | dr = Dr("dr", &c); +LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -23,10 +23,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:67:29 | -67 | pt = Pt("pt", &c_long, &c); +LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -34,10 +34,10 @@ error[E0597]: `c` does not live long enough error[E0597]: `c` does not live long enough --> $DIR/dropck-eyepatch-reorder.rs:69:29 | -69 | pr = Pr("pr", &c_long, &c); +LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough ... -77 | } +LL | } | - `c` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/dropck/dropck-eyepatch.stderr b/src/test/ui/dropck/dropck-eyepatch.stderr index ce3ffc034c5..d8cc5bf2373 100644 --- a/src/test/ui/dropck/dropck-eyepatch.stderr +++ b/src/test/ui/dropck/dropck-eyepatch.stderr @@ -1,46 +1,46 @@ error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:80:20 - | -80 | dt = Dt("dt", &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:80:20 + | +LL | dt = Dt("dt", &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:82:20 - | -82 | dr = Dr("dr", &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:82:20 + | +LL | dr = Dr("dr", &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:90:29 - | -90 | pt = Pt("pt", &c_long, &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:90:29 + | +LL | pt = Pt("pt", &c_long, &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:92:29 - | -92 | pr = Pr("pr", &c_long, &c); - | ^ borrowed value does not live long enough + --> $DIR/dropck-eyepatch.rs:92:29 + | +LL | pr = Pr("pr", &c_long, &c); + | ^ borrowed value does not live long enough ... -100 | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 4 previous errors diff --git a/src/test/ui/duplicate-check-macro-exports.stderr b/src/test/ui/duplicate-check-macro-exports.stderr index 4e7176f3518..6d3bb669df9 100644 --- a/src/test/ui/duplicate-check-macro-exports.stderr +++ b/src/test/ui/duplicate-check-macro-exports.stderr @@ -1,13 +1,13 @@ error: a macro named `panic` has already been exported --> $DIR/duplicate-check-macro-exports.rs:16:1 | -16 | macro_rules! panic { () => {} } //~ ERROR a macro named `panic` has already been exported +LL | macro_rules! panic { () => {} } //~ ERROR a macro named `panic` has already been exported | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `panic` already exported | note: previous macro export here --> $DIR/duplicate-check-macro-exports.rs:13:9 | -13 | pub use std::panic; +LL | pub use std::panic; | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/e0119/complex-impl.stderr b/src/test/ui/e0119/complex-impl.stderr index 00953ef2eee..b268c755404 100644 --- a/src/test/ui/e0119/complex-impl.stderr +++ b/src/test/ui/e0119/complex-impl.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`: --> $DIR/complex-impl.rs:19:1 | -19 | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `complex_impl_support`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `complex_impl_support::Extern error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g. `MyStruct`); only traits defined in the current crate can be implemented for a type parameter --> $DIR/complex-impl.rs:19:1 | -19 | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/e0119/conflict-with-std.stderr b/src/test/ui/e0119/conflict-with-std.stderr index cebd6e20453..ff17643f121 100644 --- a/src/test/ui/e0119/conflict-with-std.stderr +++ b/src/test/ui/e0119/conflict-with-std.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for type `std::boxed::Box`: --> $DIR/conflict-with-std.rs:17:1 | -17 | impl AsRef for Box { //~ ERROR conflicting implementations +LL | impl AsRef for Box { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for error[E0119]: conflicting implementations of trait `std::convert::From` for type `S`: --> $DIR/conflict-with-std.rs:24:1 | -24 | impl From for S { //~ ERROR conflicting implementations +LL | impl From for S { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -20,7 +20,7 @@ error[E0119]: conflicting implementations of trait `std::convert::From` for t error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `X`: --> $DIR/conflict-with-std.rs:31:1 | -31 | impl TryFrom for X { //~ ERROR conflicting implementations +LL | impl TryFrom for X { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-23563.stderr b/src/test/ui/e0119/issue-23563.stderr index 47489fecd6c..9ad86625344 100644 --- a/src/test/ui/e0119/issue-23563.stderr +++ b/src/test/ui/e0119/issue-23563.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`: --> $DIR/issue-23563.rs:23:1 | -23 | impl<'a, T> LolFrom<&'a [T]> for LocalType { //~ ERROR conflicting implementations of trait +LL | impl<'a, T> LolFrom<&'a [T]> for LocalType { //~ ERROR conflicting implementations of trait | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `issue_23563_a`: diff --git a/src/test/ui/e0119/issue-27403.stderr b/src/test/ui/e0119/issue-27403.stderr index a2d340fa211..4f4a9e97d6b 100644 --- a/src/test/ui/e0119/issue-27403.stderr +++ b/src/test/ui/e0119/issue-27403.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:15:1 | -15 | impl Into for GenX { //~ ERROR conflicting implementations +LL | impl Into for GenX { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index df5978100d7..b1ec1111ede 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`: --> $DIR/issue-28981.rs:15:1 | -15 | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `& error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct`); only traits defined in the current crate can be implemented for a type parameter --> $DIR/issue-28981.rs:15:1 | -15 | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/e0119/so-37347311.stderr b/src/test/ui/e0119/so-37347311.stderr index d62c37f5aae..8be27adc4a2 100644 --- a/src/test/ui/e0119/so-37347311.stderr +++ b/src/test/ui/e0119/so-37347311.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::From>` for type `MyError<_>`: --> $DIR/so-37347311.rs:21:1 | -21 | impl From for MyError { //~ ERROR conflicting implementations +LL | impl From for MyError { //~ ERROR conflicting implementations | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/empty-struct-unit-expr.stderr b/src/test/ui/empty-struct-unit-expr.stderr index e8e994094f4..e64f383f91b 100644 --- a/src/test/ui/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty-struct-unit-expr.stderr @@ -1,39 +1,39 @@ error[E0618]: expected function, found `Empty2` --> $DIR/empty-struct-unit-expr.rs:25:14 | -18 | struct Empty2; +LL | struct Empty2; | -------------- `Empty2` defined here ... -25 | let e2 = Empty2(); //~ ERROR expected function, found `Empty2` +LL | let e2 = Empty2(); //~ ERROR expected function, found `Empty2` | ^^^^^^^^ not a function error[E0618]: expected function, found enum variant `E::Empty4` --> $DIR/empty-struct-unit-expr.rs:26:14 | -21 | Empty4 +LL | Empty4 | ------ `E::Empty4` defined here ... -26 | let e4 = E::Empty4(); +LL | let e4 = E::Empty4(); | ^^^^^^^^^^^ not a function help: `E::Empty4` is a unit variant, you need to write it without the parenthesis | -26 | let e4 = E::Empty4; +LL | let e4 = E::Empty4; | ^^^^^^^^^ error[E0618]: expected function, found `empty_struct::XEmpty2` --> $DIR/empty-struct-unit-expr.rs:28:15 | -28 | let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2` +LL | let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2` | ^^^^^^^^^ not a function error[E0618]: expected function, found enum variant `XE::XEmpty4` --> $DIR/empty-struct-unit-expr.rs:29:15 | -29 | let xe4 = XE::XEmpty4(); +LL | let xe4 = XE::XEmpty4(); | ^^^^^^^^^^^^^ not a function help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis | -29 | let xe4 = XE::XEmpty4; +LL | let xe4 = XE::XEmpty4; | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/enum-and-module-in-same-scope.stderr b/src/test/ui/enum-and-module-in-same-scope.stderr index f17e0587e48..86f7ee5bb0e 100644 --- a/src/test/ui/enum-and-module-in-same-scope.stderr +++ b/src/test/ui/enum-and-module-in-same-scope.stderr @@ -1,10 +1,10 @@ error[E0428]: the name `Foo` is defined multiple times --> $DIR/enum-and-module-in-same-scope.rs:15:1 | -11 | enum Foo { +LL | enum Foo { | -------- previous definition of the type `Foo` here ... -15 | mod Foo { //~ ERROR the name `Foo` is defined multiple times +LL | mod Foo { //~ ERROR the name `Foo` is defined multiple times | ^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module diff --git a/src/test/ui/enum-size-variance.stderr b/src/test/ui/enum-size-variance.stderr index a21243a4990..f6df65b1d9d 100644 --- a/src/test/ui/enum-size-variance.stderr +++ b/src/test/ui/enum-size-variance.stderr @@ -1,12 +1,12 @@ warning: enum variant is more than three times larger (32 bytes) than the next largest --> $DIR/enum-size-variance.rs:28:5 | -28 | L(i64, i64, i64, i64), //~ WARNING three times larger +LL | L(i64, i64, i64, i64), //~ WARNING three times larger | ^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/enum-size-variance.rs:13:9 | -13 | #![warn(variant_size_differences)] +LL | #![warn(variant_size_differences)] | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0001.stderr b/src/test/ui/error-codes/E0001.stderr index d7d67af1492..af67a438f52 100644 --- a/src/test/ui/error-codes/E0001.stderr +++ b/src/test/ui/error-codes/E0001.stderr @@ -1,13 +1,13 @@ error: unreachable pattern --> $DIR/E0001.rs:18:9 | -18 | _ => {/* ... */} //~ ERROR unreachable pattern +LL | _ => {/* ... */} //~ ERROR unreachable pattern | ^ | note: lint level defined here --> $DIR/E0001.rs:11:9 | -11 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index a1ad127aac7..c3412e73599 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -1,13 +1,13 @@ error[E0004]: non-exhaustive patterns: type std::option::Option is non-empty --> $DIR/E0004-2.rs:14:11 | -14 | match x { } //~ ERROR E0004 +LL | match x { } //~ ERROR E0004 | ^ | help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms. --> $DIR/E0004-2.rs:14:11 | -14 | match x { } //~ ERROR E0004 +LL | match x { } //~ ERROR E0004 | ^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0004.stderr b/src/test/ui/error-codes/E0004.stderr index 204f240d27c..56351f80f9d 100644 --- a/src/test/ui/error-codes/E0004.stderr +++ b/src/test/ui/error-codes/E0004.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered --> $DIR/E0004.rs:19:11 | -19 | match x { //~ ERROR E0004 +LL | match x { //~ ERROR E0004 | ^ pattern `HastaLaVistaBaby` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index cb1dc9a4a28..d02817a6675 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in local binding: `None` not covered --> $DIR/E0005.rs:13:9 | -13 | let Some(y) = x; //~ ERROR E0005 +LL | let Some(y) = x; //~ ERROR E0005 | ^^^^^^^ pattern `None` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index db62a4ec64a..c5cf140bab5 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -1,13 +1,13 @@ error[E0007]: cannot bind by-move with sub-bindings --> $DIR/E0007.rs:14:9 | -14 | op_string @ Some(s) => {}, +LL | op_string @ Some(s) => {}, | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0303]: pattern bindings are not allowed after an `@` --> $DIR/E0007.rs:14:26 | -14 | op_string @ Some(s) => {}, +LL | op_string @ Some(s) => {}, | ^ not allowed after `@` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr index 3fab4ad484c..cdf6eff0fab 100644 --- a/src/test/ui/error-codes/E0008.stderr +++ b/src/test/ui/error-codes/E0008.stderr @@ -1,7 +1,7 @@ error[E0008]: cannot bind by-move into a pattern guard --> $DIR/E0008.rs:13:14 | -13 | Some(s) if s.len() == 0 => {}, +LL | Some(s) if s.len() == 0 => {}, | ^ moves value into pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0009.stderr b/src/test/ui/error-codes/E0009.stderr index 0a04d5a452d..ac6c2ace1f8 100644 --- a/src/test/ui/error-codes/E0009.stderr +++ b/src/test/ui/error-codes/E0009.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/E0009.rs:15:15 | -15 | Some((y, ref z)) => {}, +LL | Some((y, ref z)) => {}, | ^ ----- both by-ref and by-move used | | | by-move pattern here diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr index f414504ccd4..0d97a56b1b4 100644 --- a/src/test/ui/error-codes/E0010-teach.stderr +++ b/src/test/ui/error-codes/E0010-teach.stderr @@ -1,7 +1,7 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010-teach.rs:16:24 | -16 | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; //~ ERROR E0010 | ^^^^^ allocation not allowed in constants | = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time. diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr index 8d441159ec7..0d8b0800b08 100644 --- a/src/test/ui/error-codes/E0010.stderr +++ b/src/test/ui/error-codes/E0010.stderr @@ -1,7 +1,7 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010.rs:14:24 | -14 | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; //~ ERROR E0010 | ^^^^^ allocation not allowed in constants error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index 5eec33f96b3..540d76a6d45 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -1,25 +1,25 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0017.rs:14:30 | -14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:15:39 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^^^^^^ statics require immutable values error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0017.rs:15:44 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:17:38 | -17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ statics require immutable values error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index 018a59de808..2f69db3e7ef 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -1,19 +1,19 @@ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:20:9 | -20 | Fruit::Apple(a) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^ expected 2 fields, found 1 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:21:9 | -21 | Fruit::Apple(a, b, c) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a, b, c) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field --> $DIR/E0023.rs:22:9 | -22 | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 +LL | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^^^ expected 1 field, found 2 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0025.stderr b/src/test/ui/error-codes/E0025.stderr index 91189def362..2e32ccab0dd 100644 --- a/src/test/ui/error-codes/E0025.stderr +++ b/src/test/ui/error-codes/E0025.stderr @@ -1,7 +1,7 @@ error[E0025]: field `a` bound multiple times in the pattern --> $DIR/E0025.rs:18:21 | -18 | let Foo { a: x, a: y, b: 0 } = x; +LL | let Foo { a: x, a: y, b: 0 } = x; | ---- ^^^^ multiple uses of `a` in pattern | | | first use of `a` diff --git a/src/test/ui/error-codes/E0026-teach.stderr b/src/test/ui/error-codes/E0026-teach.stderr index b3c281ef7c9..e7ab3fbf307 100644 --- a/src/test/ui/error-codes/E0026-teach.stderr +++ b/src/test/ui/error-codes/E0026-teach.stderr @@ -1,7 +1,7 @@ error[E0026]: struct `Thing` does not have a field named `z` --> $DIR/E0026-teach.rs:21:23 | -21 | Thing { x, y, z } => {} +LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have field `z` | = note: This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched. diff --git a/src/test/ui/error-codes/E0026.stderr b/src/test/ui/error-codes/E0026.stderr index 3b667260bc9..9415da2a819 100644 --- a/src/test/ui/error-codes/E0026.stderr +++ b/src/test/ui/error-codes/E0026.stderr @@ -1,7 +1,7 @@ error[E0026]: struct `Thing` does not have a field named `z` --> $DIR/E0026.rs:19:23 | -19 | Thing { x, y, z } => {} +LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have field `z` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0027-teach.stderr b/src/test/ui/error-codes/E0027-teach.stderr index 2dd3c6150dc..d9c6a865dad 100644 --- a/src/test/ui/error-codes/E0027-teach.stderr +++ b/src/test/ui/error-codes/E0027-teach.stderr @@ -1,7 +1,7 @@ error[E0027]: pattern does not mention field `name` --> $DIR/E0027-teach.rs:22:9 | -22 | Dog { age: x } => {} +LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` | = note: This error indicates that a pattern for a struct fails to specify a sub-pattern for every one of the struct's fields. Ensure that each field from the struct's definition is mentioned in the pattern, or use `..` to ignore unwanted fields. diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr index 19012afe1c3..6959324ccde 100644 --- a/src/test/ui/error-codes/E0027.stderr +++ b/src/test/ui/error-codes/E0027.stderr @@ -1,7 +1,7 @@ error[E0027]: pattern does not mention field `name` --> $DIR/E0027.rs:20:9 | -20 | Dog { age: x } => {} +LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0029-teach.stderr b/src/test/ui/error-codes/E0029-teach.stderr index 626839fb807..d4e9a1c3040 100644 --- a/src/test/ui/error-codes/E0029-teach.stderr +++ b/src/test/ui/error-codes/E0029-teach.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/E0029-teach.rs:17:9 | -17 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/E0029-teach.rs:17:9 | -17 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types | = note: start type: &'static str diff --git a/src/test/ui/error-codes/E0029.stderr b/src/test/ui/error-codes/E0029.stderr index 123e5da1cec..ab1fa321dbd 100644 --- a/src/test/ui/error-codes/E0029.stderr +++ b/src/test/ui/error-codes/E0029.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/E0029.rs:15:9 | -15 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&"hello" ... "world"` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/E0029.rs:15:9 | -15 | "hello" ... "world" => {} +LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types | = note: start type: &'static str diff --git a/src/test/ui/error-codes/E0030-teach.stderr b/src/test/ui/error-codes/E0030-teach.stderr index 8e129b4ae2c..e23bf89be29 100644 --- a/src/test/ui/error-codes/E0030-teach.stderr +++ b/src/test/ui/error-codes/E0030-teach.stderr @@ -1,7 +1,7 @@ error[E0030]: lower range bound must be less than or equal to upper --> $DIR/E0030-teach.rs:15:9 | -15 | 1000 ... 5 => {} +LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound | = note: When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range. diff --git a/src/test/ui/error-codes/E0030.stderr b/src/test/ui/error-codes/E0030.stderr index eb5b40d2c47..9d4352888cb 100644 --- a/src/test/ui/error-codes/E0030.stderr +++ b/src/test/ui/error-codes/E0030.stderr @@ -1,7 +1,7 @@ error[E0030]: lower range bound must be less than or equal to upper --> $DIR/E0030.rs:14:9 | -14 | 1000 ... 5 => {} +LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr index 8dd364ae9a3..9f2a9595b39 100644 --- a/src/test/ui/error-codes/E0033-teach.stderr +++ b/src/test/ui/error-codes/E0033-teach.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found trait `SomeTrait` --> $DIR/E0033-teach.rs:18:33 | -18 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^ not a value error[E0038]: the trait `SomeTrait` cannot be made into an object --> $DIR/E0033-teach.rs:18:20 | -18 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object | = note: method `foo` has no receiver @@ -15,7 +15,7 @@ error[E0038]: the trait `SomeTrait` cannot be made into an object error[E0033]: type `&SomeTrait` cannot be dereferenced --> $DIR/E0033-teach.rs:23:9 | -23 | let &invalid = trait_obj; +LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced | = note: This error indicates that a pointer to a trait type cannot be implicitly dereferenced by a pattern. Every trait defines a type, but because the size of trait implementors isn't fixed, this type has no compile-time size. Therefore, all accesses to trait types must be through pointers. If you encounter this error you should try to avoid dereferencing the pointer. diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr index dfde76cc125..a0d73c074f8 100644 --- a/src/test/ui/error-codes/E0033.stderr +++ b/src/test/ui/error-codes/E0033.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found trait `SomeTrait` --> $DIR/E0033.rs:16:33 | -16 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^ not a value error[E0038]: the trait `SomeTrait` cannot be made into an object --> $DIR/E0033.rs:16:20 | -16 | let trait_obj: &SomeTrait = SomeTrait; +LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object | = note: method `foo` has no receiver @@ -15,7 +15,7 @@ error[E0038]: the trait `SomeTrait` cannot be made into an object error[E0033]: type `&SomeTrait` cannot be dereferenced --> $DIR/E0033.rs:21:9 | -21 | let &invalid = trait_obj; +LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr index 850d4a74117..f457dfded7c 100644 --- a/src/test/ui/error-codes/E0034.stderr +++ b/src/test/ui/error-codes/E0034.stderr @@ -1,18 +1,18 @@ error[E0034]: multiple applicable items in scope --> $DIR/E0034.rs:30:5 | -30 | Test::foo() //~ ERROR multiple applicable items in scope +LL | Test::foo() //~ ERROR multiple applicable items in scope | ^^^^^^^^^ multiple `foo` found | note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test` --> $DIR/E0034.rs:22:5 | -22 | fn foo() {} +LL | fn foo() {} | ^^^^^^^^ note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test` --> $DIR/E0034.rs:26:5 | -26 | fn foo() {} +LL | fn foo() {} | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0038.stderr b/src/test/ui/error-codes/E0038.stderr index edfa83a44f7..b3f3ea57a34 100644 --- a/src/test/ui/error-codes/E0038.stderr +++ b/src/test/ui/error-codes/E0038.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/E0038.rs:15:1 | -15 | fn call_foo(x: Box) { +LL | fn call_foo(x: Box) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object | = note: method `foo` references the `Self` type in its arguments or return type diff --git a/src/test/ui/error-codes/E0040.stderr b/src/test/ui/error-codes/E0040.stderr index 53e3768ed20..a2f6174e918 100644 --- a/src/test/ui/error-codes/E0040.stderr +++ b/src/test/ui/error-codes/E0040.stderr @@ -1,7 +1,7 @@ error[E0040]: explicit use of destructor method --> $DIR/E0040.rs:23:7 | -23 | x.drop(); +LL | x.drop(); | ^^^^ explicit destructor calls not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0044.stderr b/src/test/ui/error-codes/E0044.stderr index fa4bf51d103..b823f3717b3 100644 --- a/src/test/ui/error-codes/E0044.stderr +++ b/src/test/ui/error-codes/E0044.stderr @@ -1,13 +1,13 @@ error[E0044]: foreign items may not have type parameters --> $DIR/E0044.rs:11:10 | -11 | extern { fn some_func(x: T); } //~ ERROR E0044 +LL | extern { fn some_func(x: T); } //~ ERROR E0044 | ^^^^^^^^^^^^^^^^^^^^^^ | help: consider using specialization instead of type parameters --> $DIR/E0044.rs:11:10 | -11 | extern { fn some_func(x: T); } //~ ERROR E0044 +LL | extern { fn some_func(x: T); } //~ ERROR E0044 | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0045.stderr b/src/test/ui/error-codes/E0045.stderr index 750833c2b8a..e79965aeff7 100644 --- a/src/test/ui/error-codes/E0045.stderr +++ b/src/test/ui/error-codes/E0045.stderr @@ -1,7 +1,7 @@ error[E0045]: variadic function must have C or cdecl calling convention --> $DIR/E0045.rs:11:17 | -11 | extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045 +LL | extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045 | ^^^^^^^^^^^^^^^^^^^ variadics require C or cdecl calling convention error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0049.stderr b/src/test/ui/error-codes/E0049.stderr index 09fb35c0639..cdc936df270 100644 --- a/src/test/ui/error-codes/E0049.stderr +++ b/src/test/ui/error-codes/E0049.stderr @@ -1,10 +1,10 @@ error[E0049]: method `foo` has 0 type parameters but its trait declaration has 1 type parameter --> $DIR/E0049.rs:18:5 | -12 | fn foo(x: T) -> Self; +LL | fn foo(x: T) -> Self; | --------------------------------- expected 1 type parameter ... -18 | fn foo(x: bool) -> Self { Bar } //~ ERROR E0049 +LL | fn foo(x: bool) -> Self { Bar } //~ ERROR E0049 | ^^^^^^^^^^^^^^^^^^^^^^^ found 0 type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0050.stderr b/src/test/ui/error-codes/E0050.stderr index 2c69a970a56..d5d1677f43f 100644 --- a/src/test/ui/error-codes/E0050.stderr +++ b/src/test/ui/error-codes/E0050.stderr @@ -1,28 +1,28 @@ error[E0050]: method `foo` has 1 parameter but the declaration in trait `Foo::foo` has 2 --> $DIR/E0050.rs:20:12 | -12 | fn foo(&self, x: u8) -> bool; +LL | fn foo(&self, x: u8) -> bool; | -- trait requires 2 parameters ... -20 | fn foo(&self) -> bool { true } //~ ERROR E0050 +LL | fn foo(&self) -> bool { true } //~ ERROR E0050 | ^^^^^ expected 2 parameters, found 1 error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 4 --> $DIR/E0050.rs:21:12 | -13 | fn bar(&self, x: u8, y: u8, z: u8); +LL | fn bar(&self, x: u8, y: u8, z: u8); | -- trait requires 4 parameters ... -21 | fn bar(&self) { } //~ ERROR E0050 +LL | fn bar(&self) { } //~ ERROR E0050 | ^^^^^ expected 4 parameters, found 1 error[E0050]: method `less` has 4 parameters but the declaration in trait `Foo::less` has 1 --> $DIR/E0050.rs:22:37 | -14 | fn less(&self); +LL | fn less(&self); | ----- trait requires 1 parameter ... -22 | fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050 +LL | fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050 | ^^ expected 1 parameter, found 4 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0054.stderr b/src/test/ui/error-codes/E0054.stderr index 87a0d8ba573..ed82704e661 100644 --- a/src/test/ui/error-codes/E0054.stderr +++ b/src/test/ui/error-codes/E0054.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/E0054.rs:13:24 | -13 | let x_is_nonzero = x as bool; //~ ERROR E0054 +LL | let x_is_nonzero = x as bool; //~ ERROR E0054 | ^^^^^^^^^ unsupported cast | = help: compare with zero instead diff --git a/src/test/ui/error-codes/E0055.stderr b/src/test/ui/error-codes/E0055.stderr index 3dbdc5db2b1..3d13b144106 100644 --- a/src/test/ui/error-codes/E0055.stderr +++ b/src/test/ui/error-codes/E0055.stderr @@ -1,7 +1,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing Foo --> $DIR/E0055.rs:21:13 | -21 | ref_foo.foo(); +LL | ref_foo.foo(); | ^^^ deref recursion limit reached | = help: consider adding a `#![recursion_limit="4"]` attribute to your crate diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr index f0c40578ddb..0d6cd77de07 100644 --- a/src/test/ui/error-codes/E0057.stderr +++ b/src/test/ui/error-codes/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:13:13 | -13 | let a = f(); //~ ERROR E0057 +LL | let a = f(); //~ ERROR E0057 | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:15:13 | -15 | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0059.stderr b/src/test/ui/error-codes/E0059.stderr index 92839408902..5e2907eed69 100644 --- a/src/test/ui/error-codes/E0059.stderr +++ b/src/test/ui/error-codes/E0059.stderr @@ -1,7 +1,7 @@ error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit --> $DIR/E0059.rs:13:41 | -13 | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 +LL | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr index 0cfce7d6b22..0493015cc76 100644 --- a/src/test/ui/error-codes/E0060.stderr +++ b/src/test/ui/error-codes/E0060.stderr @@ -1,10 +1,10 @@ error[E0060]: this function takes at least 1 parameter but 0 parameters were supplied --> $DIR/E0060.rs:16:14 | -12 | fn printf(_: *const u8, ...) -> u32; +LL | fn printf(_: *const u8, ...) -> u32; | ------------------------------------ defined here ... -16 | unsafe { printf(); } +LL | unsafe { printf(); } | ^^^^^^^^ expected at least 1 parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr index 735d99b0d98..6ddd4be9d8e 100644 --- a/src/test/ui/error-codes/E0061.stderr +++ b/src/test/ui/error-codes/E0061.stderr @@ -1,19 +1,19 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/E0061.rs:16:5 | -11 | fn f(a: u16, b: &str) {} +LL | fn f(a: u16, b: &str) {} | --------------------- defined here ... -16 | f(0); +LL | f(0); | ^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0061.rs:20:5 | -13 | fn f2(a: u16) {} +LL | fn f2(a: u16) {} | ------------- defined here ... -20 | f2(); +LL | f2(); | ^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0062.stderr b/src/test/ui/error-codes/E0062.stderr index 19ed77c9b8e..a24c5e05914 100644 --- a/src/test/ui/error-codes/E0062.stderr +++ b/src/test/ui/error-codes/E0062.stderr @@ -1,9 +1,9 @@ error[E0062]: field `x` specified more than once --> $DIR/E0062.rs:18:9 | -17 | x: 0, +LL | x: 0, | ---- first use of `x` -18 | x: 0, +LL | x: 0, | ^ used more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0063.stderr b/src/test/ui/error-codes/E0063.stderr index 1b98a00e20d..7f33223a7ea 100644 --- a/src/test/ui/error-codes/E0063.stderr +++ b/src/test/ui/error-codes/E0063.stderr @@ -1,25 +1,25 @@ error[E0063]: missing field `x` in initializer of `SingleFoo` --> $DIR/E0063.rs:42:13 | -42 | let w = SingleFoo { }; +LL | let w = SingleFoo { }; | ^^^^^^^^^ missing `x` error[E0063]: missing fields `y`, `z` in initializer of `PluralFoo` --> $DIR/E0063.rs:44:13 | -44 | let x = PluralFoo {x: 1}; +LL | let x = PluralFoo {x: 1}; | ^^^^^^^^^ missing `y`, `z` error[E0063]: missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo` --> $DIR/E0063.rs:46:13 | -46 | let y = TruncatedFoo{x:1}; +LL | let y = TruncatedFoo{x:1}; | ^^^^^^^^^^^^ missing `a`, `b`, `y` and 1 other field error[E0063]: missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo` --> $DIR/E0063.rs:48:13 | -48 | let z = TruncatedPluralFoo{x:1}; +LL | let z = TruncatedPluralFoo{x:1}; | ^^^^^^^^^^^^^^^^^^ missing `a`, `b`, `c` and 2 other fields error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index 2faea638dba..b964b9dffc1 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>` --> $DIR/E0067.rs:14:5 | -14 | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; //~ ERROR E0368 | -----------------^^^^^ | | | cannot use `+=` on type `std::collections::LinkedList<_>` @@ -9,7 +9,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::c error[E0067]: invalid left-hand side expression --> $DIR/E0067.rs:14:5 | -14 | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; //~ ERROR E0368 | ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0069.stderr b/src/test/ui/error-codes/E0069.stderr index 130fcc69278..8a5b5984c33 100644 --- a/src/test/ui/error-codes/E0069.stderr +++ b/src/test/ui/error-codes/E0069.stderr @@ -1,7 +1,7 @@ error[E0069]: `return;` in a function whose return type is not `()` --> $DIR/E0069.rs:12:5 | -12 | return; +LL | return; | ^^^^^^ return type is not () error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index 71bac9098af..33da9030c41 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -1,19 +1,19 @@ error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:16:5 | -16 | SOME_CONST = 14; //~ ERROR E0070 +LL | SOME_CONST = 14; //~ ERROR E0070 | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:17:5 | -17 | 1 = 3; //~ ERROR E0070 +LL | 1 = 3; //~ ERROR E0070 | ^^^^^ left-hand of expression not valid error[E0308]: mismatched types --> $DIR/E0070.rs:18:25 | -18 | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; //~ ERROR E0070 | ^ expected (), found integral variable | = note: expected type `()` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:18:5 | -18 | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; //~ ERROR E0070 | ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0071.stderr b/src/test/ui/error-codes/E0071.stderr index 7b09d5333c9..b28dcf90c82 100644 --- a/src/test/ui/error-codes/E0071.stderr +++ b/src/test/ui/error-codes/E0071.stderr @@ -1,7 +1,7 @@ error[E0071]: expected struct, variant or union type, found enum `Foo` --> $DIR/E0071.rs:15:13 | -15 | let u = FooAlias { value: 0 }; +LL | let u = FooAlias { value: 0 }; | ^^^^^^^^ not a struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0075.stderr b/src/test/ui/error-codes/E0075.stderr index ad9d64dc970..4fd5b65f4a9 100644 --- a/src/test/ui/error-codes/E0075.stderr +++ b/src/test/ui/error-codes/E0075.stderr @@ -1,7 +1,7 @@ error[E0075]: SIMD vector cannot be empty --> $DIR/E0075.rs:14:1 | -14 | struct Bad; //~ ERROR E0075 +LL | struct Bad; //~ ERROR E0075 | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0076.stderr b/src/test/ui/error-codes/E0076.stderr index 5e9349a282e..3cee6f4527c 100644 --- a/src/test/ui/error-codes/E0076.stderr +++ b/src/test/ui/error-codes/E0076.stderr @@ -1,7 +1,7 @@ error[E0076]: SIMD vector should be homogeneous --> $DIR/E0076.rs:14:1 | -14 | struct Bad(u16, u32, u32); +LL | struct Bad(u16, u32, u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0077.stderr b/src/test/ui/error-codes/E0077.stderr index 8427ff71a09..822efe9628b 100644 --- a/src/test/ui/error-codes/E0077.stderr +++ b/src/test/ui/error-codes/E0077.stderr @@ -1,7 +1,7 @@ error[E0077]: SIMD vector element type should be machine type --> $DIR/E0077.rs:14:1 | -14 | struct Bad(String); //~ ERROR E0077 +LL | struct Bad(String); //~ ERROR E0077 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr index 7b1f2d6a716..01cfa0c375b 100644 --- a/src/test/ui/error-codes/E0080.stderr +++ b/src/test/ui/error-codes/E0080.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: attempt to shift left with overflow --> $DIR/E0080.rs:12:9 | -12 | X = (1 << 500), //~ ERROR E0080 +LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ | = note: #[warn(const_err)] on by default @@ -9,19 +9,19 @@ warning: constant evaluation error: attempt to shift left with overflow error[E0080]: constant evaluation error --> $DIR/E0080.rs:12:9 | -12 | X = (1 << 500), //~ ERROR E0080 +LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ attempt to shift left with overflow warning: constant evaluation error: attempt to divide by zero --> $DIR/E0080.rs:14:9 | -14 | Y = (1 / 0) //~ ERROR E0080 +LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ error[E0080]: constant evaluation error --> $DIR/E0080.rs:14:9 | -14 | Y = (1 / 0) //~ ERROR E0080 +LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempt to divide by zero error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0081.stderr b/src/test/ui/error-codes/E0081.stderr index 6c5cca3b1bf..42d0769bb57 100644 --- a/src/test/ui/error-codes/E0081.stderr +++ b/src/test/ui/error-codes/E0081.stderr @@ -1,9 +1,9 @@ error[E0081]: discriminant value `3isize` already exists --> $DIR/E0081.rs:13:9 | -12 | P = 3, +LL | P = 3, | - first use of `3isize` -13 | X = 3, +LL | X = 3, | ^ enum already has `3isize` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0084.stderr b/src/test/ui/error-codes/E0084.stderr index 02d27ce118e..5ebe03090a0 100644 --- a/src/test/ui/error-codes/E0084.stderr +++ b/src/test/ui/error-codes/E0084.stderr @@ -1,9 +1,9 @@ error[E0084]: unsupported representation for zero-variant enum --> $DIR/E0084.rs:11:1 | -11 | #[repr(i32)] //~ ERROR: E0084 +LL | #[repr(i32)] //~ ERROR: E0084 | ^^^^^^^^^^^^ -12 | enum Foo {} +LL | enum Foo {} | ----------- zero-variant enum error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0087.stderr b/src/test/ui/error-codes/E0087.stderr index c30bc05e768..b1ff92d8c27 100644 --- a/src/test/ui/error-codes/E0087.stderr +++ b/src/test/ui/error-codes/E0087.stderr @@ -1,13 +1,13 @@ error[E0087]: too many type parameters provided: expected at most 0 type parameters, found 1 type parameter --> $DIR/E0087.rs:15:11 | -15 | foo::(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087] +LL | foo::(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087] | ^^^ expected 0 type parameters error[E0087]: too many type parameters provided: expected at most 1 type parameter, found 2 type parameters --> $DIR/E0087.rs:17:16 | -17 | bar::(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] +LL | bar::(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] | ^^^ expected 1 type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0088.stderr b/src/test/ui/error-codes/E0088.stderr index b88d89b8772..5497eb028d8 100644 --- a/src/test/ui/error-codes/E0088.stderr +++ b/src/test/ui/error-codes/E0088.stderr @@ -1,13 +1,13 @@ error[E0088]: too many lifetime parameters provided: expected at most 0 lifetime parameters, found 1 lifetime parameter --> $DIR/E0088.rs:15:9 | -15 | f::<'static>(); //~ ERROR E0088 +LL | f::<'static>(); //~ ERROR E0088 | ^^^^^^^ expected 0 lifetime parameters error[E0088]: too many lifetime parameters provided: expected at most 1 lifetime parameter, found 2 lifetime parameters --> $DIR/E0088.rs:16:18 | -16 | g::<'static, 'static>(); //~ ERROR E0088 +LL | g::<'static, 'static>(); //~ ERROR E0088 | ^^^^^^^ expected 1 lifetime parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0089.stderr b/src/test/ui/error-codes/E0089.stderr index e279765e8e4..3a399087943 100644 --- a/src/test/ui/error-codes/E0089.stderr +++ b/src/test/ui/error-codes/E0089.stderr @@ -1,7 +1,7 @@ error[E0089]: too few type parameters provided: expected 2 type parameters, found 1 type parameter --> $DIR/E0089.rs:14:5 | -14 | foo::(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] +LL | foo::(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] | ^^^^^^^^^^ expected 2 type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0090.stderr b/src/test/ui/error-codes/E0090.stderr index 98f96986c91..82e8eaf69ea 100644 --- a/src/test/ui/error-codes/E0090.stderr +++ b/src/test/ui/error-codes/E0090.stderr @@ -1,7 +1,7 @@ error[E0090]: too few lifetime parameters provided: expected 2 lifetime parameters, found 1 lifetime parameter --> $DIR/E0090.rs:14:5 | -14 | foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] +LL | foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] | ^^^^^^^^^^^^^^ expected 2 lifetime parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0091.stderr b/src/test/ui/error-codes/E0091.stderr index 1a4aaccdc39..003e9e7efcd 100644 --- a/src/test/ui/error-codes/E0091.stderr +++ b/src/test/ui/error-codes/E0091.stderr @@ -1,13 +1,13 @@ error[E0091]: type parameter `T` is unused --> $DIR/E0091.rs:11:10 | -11 | type Foo = u32; //~ ERROR E0091 +LL | type Foo = u32; //~ ERROR E0091 | ^ unused type parameter error[E0091]: type parameter `B` is unused --> $DIR/E0091.rs:12:14 | -12 | type Foo2 = Box; //~ ERROR E0091 +LL | type Foo2 = Box; //~ ERROR E0091 | ^ unused type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0092.stderr b/src/test/ui/error-codes/E0092.stderr index 5c497356b81..8b53a029c35 100644 --- a/src/test/ui/error-codes/E0092.stderr +++ b/src/test/ui/error-codes/E0092.stderr @@ -1,7 +1,7 @@ error[E0092]: unrecognized atomic operation function: `foo` --> $DIR/E0092.rs:13:5 | -13 | fn atomic_foo(); //~ ERROR E0092 +LL | fn atomic_foo(); //~ ERROR E0092 | ^^^^^^^^^^^^^^^^ unrecognized atomic operation error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0093.stderr b/src/test/ui/error-codes/E0093.stderr index 72e88c598c8..4e201650837 100644 --- a/src/test/ui/error-codes/E0093.stderr +++ b/src/test/ui/error-codes/E0093.stderr @@ -1,7 +1,7 @@ error[E0093]: unrecognized intrinsic function: `foo` --> $DIR/E0093.rs:13:5 | -13 | fn foo(); +LL | fn foo(); | ^^^^^^^^^ unrecognized intrinsic error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0094.stderr b/src/test/ui/error-codes/E0094.stderr index b38ac11b6fc..7a2dfaae279 100644 --- a/src/test/ui/error-codes/E0094.stderr +++ b/src/test/ui/error-codes/E0094.stderr @@ -1,7 +1,7 @@ error[E0094]: intrinsic has wrong number of type parameters: found 2, expected 1 --> $DIR/E0094.rs:13:15 | -13 | fn size_of() -> usize; //~ ERROR E0094 +LL | fn size_of() -> usize; //~ ERROR E0094 | ^^^^^^ expected 1 type parameter 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 e7b579d90ca..645414ca1ea 100644 --- a/src/test/ui/error-codes/E0106.stderr +++ b/src/test/ui/error-codes/E0106.stderr @@ -1,31 +1,31 @@ error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:12:8 | -12 | x: &bool, +LL | x: &bool, | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:17:7 | -17 | B(&bool), +LL | B(&bool), | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:20:14 | -20 | type MyStr = &str; +LL | type MyStr = &str; | ^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/E0106.rs:27:10 | -27 | baz: Baz, +LL | baz: Baz, | ^^^ expected lifetime parameter error[E0106]: missing lifetime specifiers --> $DIR/E0106.rs:30:11 | -30 | buzz: Buzz, +LL | buzz: Buzz, | ^^^^ expected 2 lifetime parameters 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 b85197034b8..a695a593429 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -1,19 +1,19 @@ error[E0107]: wrong number of lifetime parameters: expected 2, found 1 --> $DIR/E0107.rs:21:11 | -21 | buzz: Buzz<'a>, +LL | buzz: Buzz<'a>, | ^^^^^^^^ expected 2 lifetime parameters error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/E0107.rs:24:10 | -24 | bar: Bar<'a>, +LL | bar: Bar<'a>, | ^^^^^^^ unexpected lifetime parameter error[E0107]: wrong number of lifetime parameters: expected 1, found 3 --> $DIR/E0107.rs:27:11 | -27 | foo2: Foo<'a, 'b, 'c>, +LL | foo2: Foo<'a, 'b, 'c>, | ^^^^^^^^^^^^^^^ 2 unexpected lifetime parameters error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0109.stderr b/src/test/ui/error-codes/E0109.stderr index 3f5fab45d4f..89f3154fb48 100644 --- a/src/test/ui/error-codes/E0109.stderr +++ b/src/test/ui/error-codes/E0109.stderr @@ -1,7 +1,7 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/E0109.rs:11:14 | -11 | type X = u32; //~ ERROR E0109 +LL | type X = u32; //~ ERROR E0109 | ^^^ type parameter not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0110.stderr b/src/test/ui/error-codes/E0110.stderr index 7ac74d14e30..3f4d525b6e5 100644 --- a/src/test/ui/error-codes/E0110.stderr +++ b/src/test/ui/error-codes/E0110.stderr @@ -1,7 +1,7 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/E0110.rs:11:14 | -11 | type X = u32<'static>; //~ ERROR E0110 +LL | type X = u32<'static>; //~ ERROR E0110 | ^^^^^^^ lifetime parameter not allowed on this type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0116.stderr b/src/test/ui/error-codes/E0116.stderr index 2b0c9903a09..88954b906c4 100644 --- a/src/test/ui/error-codes/E0116.stderr +++ b/src/test/ui/error-codes/E0116.stderr @@ -1,7 +1,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> $DIR/E0116.rs:11:1 | -11 | impl Vec {} +LL | impl Vec {} | ^^^^^^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 1f77fc153b8..240aa4240cc 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -1,13 +1,13 @@ error[E0120]: the Drop trait may only be implemented on structures --> $DIR/E0117.rs:11:15 | -11 | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} //~ ERROR E0117 | ^^^ implementing Drop requires a struct error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0117.rs:11:1 | -11 | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/error-codes/E0118.stderr b/src/test/ui/error-codes/E0118.stderr index 1cfcc0fc62b..bb811ab6345 100644 --- a/src/test/ui/error-codes/E0118.stderr +++ b/src/test/ui/error-codes/E0118.stderr @@ -1,7 +1,7 @@ error[E0118]: no base type found for inherent implementation --> $DIR/E0118.rs:11:6 | -11 | impl (u8, u8) { //~ ERROR E0118 +LL | impl (u8, u8) { //~ ERROR E0118 | ^^^^^^^^ impl requires a base type | = note: either implement a trait on it or create a newtype to wrap it instead diff --git a/src/test/ui/error-codes/E0119.stderr b/src/test/ui/error-codes/E0119.stderr index 82993a2b3ad..55ca8c5a779 100644 --- a/src/test/ui/error-codes/E0119.stderr +++ b/src/test/ui/error-codes/E0119.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`: --> $DIR/E0119.rs:23:1 | -15 | impl MyTrait for T { +LL | impl MyTrait for T { | --------------------- first implementation here ... -23 | impl MyTrait for Foo { //~ ERROR E0119 +LL | impl MyTrait for Foo { //~ ERROR E0119 | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr index b5d9ee2f980..cd69b8d67bf 100644 --- a/src/test/ui/error-codes/E0120.stderr +++ b/src/test/ui/error-codes/E0120.stderr @@ -1,7 +1,7 @@ error[E0120]: the Drop trait may only be implemented on structures --> $DIR/E0120.rs:13:15 | -13 | impl Drop for MyTrait { +LL | impl Drop for MyTrait { | ^^^^^^^ implementing Drop requires a struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index 3f603371b87..ca9557cdcdc 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -1,13 +1,13 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:11:13 | -11 | fn foo() -> _ { 5 } //~ ERROR E0121 +LL | fn foo() -> _ { 5 } //~ ERROR E0121 | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:13:13 | -13 | static BAR: _ = "test"; //~ ERROR E0121 +LL | static BAR: _ = "test"; //~ ERROR E0121 | ^ not allowed in type signatures error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0124.stderr b/src/test/ui/error-codes/E0124.stderr index 114af775b45..1f4b4ce0efa 100644 --- a/src/test/ui/error-codes/E0124.stderr +++ b/src/test/ui/error-codes/E0124.stderr @@ -1,9 +1,9 @@ error[E0124]: field `field1` is already declared --> $DIR/E0124.rs:13:5 | -12 | field1: i32, +LL | field1: i32, | ----------- `field1` first declared here -13 | field1: i32, +LL | field1: i32, | ^^^^^^^^^^^ field already declared error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0128.stderr b/src/test/ui/error-codes/E0128.stderr index 6098dd92766..632b1196723 100644 --- a/src/test/ui/error-codes/E0128.stderr +++ b/src/test/ui/error-codes/E0128.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/E0128.rs:11:14 | -11 | struct Foo { //~ ERROR E0128 +LL | struct Foo { //~ ERROR E0128 | ^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0130.stderr b/src/test/ui/error-codes/E0130.stderr index f3c8d051eb4..3e00909109b 100644 --- a/src/test/ui/error-codes/E0130.stderr +++ b/src/test/ui/error-codes/E0130.stderr @@ -1,7 +1,7 @@ error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/E0130.rs:12:12 | -12 | fn foo((a, b): (u32, u32)); +LL | fn foo((a, b): (u32, u32)); | ^^^^^^ pattern not allowed in foreign function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0131.stderr b/src/test/ui/error-codes/E0131.stderr index a49986880c3..b9caca22aeb 100644 --- a/src/test/ui/error-codes/E0131.stderr +++ b/src/test/ui/error-codes/E0131.stderr @@ -1,7 +1,7 @@ error[E0131]: main function is not allowed to have type parameters --> $DIR/E0131.rs:11:8 | -11 | fn main() { +LL | fn main() { | ^^^ main cannot have type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0132.stderr b/src/test/ui/error-codes/E0132.stderr index 2da8d2b1d4b..ce22a99e66c 100644 --- a/src/test/ui/error-codes/E0132.stderr +++ b/src/test/ui/error-codes/E0132.stderr @@ -1,7 +1,7 @@ error[E0132]: start function is not allowed to have type parameters --> $DIR/E0132.rs:14:5 | -14 | fn f< T >() {} //~ ERROR E0132 +LL | fn f< T >() {} //~ ERROR E0132 | ^^^^^ start function cannot have type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0133.stderr b/src/test/ui/error-codes/E0133.stderr index 4ca0d6dd6b3..d703ce6203e 100644 --- a/src/test/ui/error-codes/E0133.stderr +++ b/src/test/ui/error-codes/E0133.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/E0133.rs:14:5 | -14 | f(); +LL | f(); | ^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0137.stderr b/src/test/ui/error-codes/E0137.stderr index 2b68a4249f1..4a5b4f6da86 100644 --- a/src/test/ui/error-codes/E0137.stderr +++ b/src/test/ui/error-codes/E0137.stderr @@ -1,10 +1,10 @@ error[E0137]: multiple functions with a #[main] attribute --> $DIR/E0137.rs:17:1 | -14 | fn foo() {} +LL | fn foo() {} | ----------- first #[main] function ... -17 | fn f() {} +LL | fn f() {} | ^^^^^^^^^ additional #[main] function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0138.stderr b/src/test/ui/error-codes/E0138.stderr index 9a3597a9f67..40b476afb9a 100644 --- a/src/test/ui/error-codes/E0138.stderr +++ b/src/test/ui/error-codes/E0138.stderr @@ -1,10 +1,10 @@ error[E0138]: multiple 'start' functions --> $DIR/E0138.rs:17:1 | -14 | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 } +LL | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 } | ---------------------------------------------------------- previous `start` function here ... -17 | fn f(argc: isize, argv: *const *const u8) -> isize { 0 } +LL | fn f(argc: isize, argv: *const *const u8) -> isize { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple `start` functions error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr index c164c0e6eda..99a9b85f41e 100644 --- a/src/test/ui/error-codes/E0152.stderr +++ b/src/test/ui/error-codes/E0152.stderr @@ -1,7 +1,7 @@ error[E0152]: duplicate lang item found: `panic_fmt`. --> $DIR/E0152.rs:14:1 | -14 | struct Foo; //~ ERROR E0152 +LL | struct Foo; //~ ERROR E0152 | ^^^^^^^^^^^ | = note: first defined in crate `std`. diff --git a/src/test/ui/error-codes/E0161.stderr b/src/test/ui/error-codes/E0161.stderr index 525ab033c74..fb8f3e0e168 100644 --- a/src/test/ui/error-codes/E0161.stderr +++ b/src/test/ui/error-codes/E0161.stderr @@ -1,13 +1,13 @@ error[E0161]: cannot move a value of type str: the size of str cannot be statically determined --> $DIR/E0161.rs:14:28 | -14 | let _x: Box = box *"hello"; //~ ERROR E0161 +LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ error[E0507]: cannot move out of borrowed content --> $DIR/E0161.rs:14:28 | -14 | let _x: Box = box *"hello"; //~ ERROR E0161 +LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ cannot move out of borrowed content error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0162.stderr b/src/test/ui/error-codes/E0162.stderr index 15001ffc7b1..e9a7b18fcdd 100644 --- a/src/test/ui/error-codes/E0162.stderr +++ b/src/test/ui/error-codes/E0162.stderr @@ -1,7 +1,7 @@ error[E0162]: irrefutable if-let pattern --> $DIR/E0162.rs:15:12 | -15 | if let Irrefutable(x) = irr { //~ ERROR E0162 +LL | if let Irrefutable(x) = irr { //~ ERROR E0162 | ^^^^^^^^^^^^^^ irrefutable pattern error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index 344b0ef4e0b..ec91d9b52a9 100644 --- a/src/test/ui/error-codes/E0164.stderr +++ b/src/test/ui/error-codes/E0164.stderr @@ -1,7 +1,7 @@ error[E0164]: expected tuple struct/variant, found associated constant `::B` --> $DIR/E0164.rs:20:9 | -20 | Foo::B(i) => i, //~ ERROR E0164 +LL | Foo::B(i) => i, //~ ERROR E0164 | ^^^^^^^^^ not a tuple variant or struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0165.stderr b/src/test/ui/error-codes/E0165.stderr index 14c70ee6987..ac6a88483ec 100644 --- a/src/test/ui/error-codes/E0165.stderr +++ b/src/test/ui/error-codes/E0165.stderr @@ -1,7 +1,7 @@ error[E0165]: irrefutable while-let pattern --> $DIR/E0165.rs:15:15 | -15 | while let Irrefutable(x) = irr { //~ ERROR E0165 +LL | while let Irrefutable(x) = irr { //~ ERROR E0165 | ^^^^^^^^^^^^^^ irrefutable pattern error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0184.stderr b/src/test/ui/error-codes/E0184.stderr index a42ac11bc53..bd67ed11064 100644 --- a/src/test/ui/error-codes/E0184.stderr +++ b/src/test/ui/error-codes/E0184.stderr @@ -1,7 +1,7 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/E0184.rs:11:10 | -11 | #[derive(Copy)] //~ ERROR E0184 +LL | #[derive(Copy)] //~ ERROR E0184 | ^^^^ Copy not allowed on types with destructors error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0185.stderr b/src/test/ui/error-codes/E0185.stderr index 58fbc2220d3..12ecf25811e 100644 --- a/src/test/ui/error-codes/E0185.stderr +++ b/src/test/ui/error-codes/E0185.stderr @@ -1,10 +1,10 @@ error[E0185]: method `foo` has a `&self` declaration in the impl, but not in the trait --> $DIR/E0185.rs:19:5 | -12 | fn foo(); +LL | fn foo(); | --------- trait method declared without `&self` ... -19 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ `&self` used in impl error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0186.stderr b/src/test/ui/error-codes/E0186.stderr index e212e229001..015c6e5d0bc 100644 --- a/src/test/ui/error-codes/E0186.stderr +++ b/src/test/ui/error-codes/E0186.stderr @@ -1,10 +1,10 @@ error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl --> $DIR/E0186.rs:18:5 | -12 | fn foo(&self); //~ `&self` used in trait +LL | fn foo(&self); //~ `&self` used in trait | -------------- `&self` used in trait ... -18 | fn foo() {} //~ ERROR E0186 +LL | fn foo() {} //~ ERROR E0186 | ^^^^^^^^ expected `&self` in impl error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr index 2b00f3d346d..14ae4469f12 100644 --- a/src/test/ui/error-codes/E0191.stderr +++ b/src/test/ui/error-codes/E0191.stderr @@ -1,7 +1,7 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified --> $DIR/E0191.rs:15:12 | -15 | type Foo = Trait; //~ ERROR E0191 +LL | type Foo = Trait; //~ ERROR E0191 | ^^^^^ missing associated type `Bar` value error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0192.stderr b/src/test/ui/error-codes/E0192.stderr index 4a5df56c0cc..1b2d6eb0285 100644 --- a/src/test/ui/error-codes/E0192.stderr +++ b/src/test/ui/error-codes/E0192.stderr @@ -1,7 +1,7 @@ error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`) --> $DIR/E0192.rs:19:1 | -19 | impl !Trait for Foo { } //~ ERROR E0192 +LL | impl !Trait for Foo { } //~ ERROR E0192 | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0194.stderr b/src/test/ui/error-codes/E0194.stderr index 3b5d512a1c4..9447b90355e 100644 --- a/src/test/ui/error-codes/E0194.stderr +++ b/src/test/ui/error-codes/E0194.stderr @@ -1,10 +1,10 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/E0194.rs:13:26 | -11 | trait Foo { +LL | trait Foo { | - first `T` declared here -12 | fn do_something(&self) -> T; -13 | fn do_something_else(&self, bar: T); +LL | fn do_something(&self) -> T; +LL | fn do_something_else(&self, bar: T); | ^ shadows another type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0195.stderr b/src/test/ui/error-codes/E0195.stderr index 764f302552d..735aa4283ec 100644 --- a/src/test/ui/error-codes/E0195.stderr +++ b/src/test/ui/error-codes/E0195.stderr @@ -1,10 +1,10 @@ error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration --> $DIR/E0195.rs:19:5 | -12 | fn bar<'a,'b:'a>(x: &'a str, y: &'b str); +LL | fn bar<'a,'b:'a>(x: &'a str, y: &'b str); | ----------------------------------------- lifetimes in impl do not match this method in trait ... -19 | fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 +LL | fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0197.stderr b/src/test/ui/error-codes/E0197.stderr index f1bb3e70ac3..250101929ee 100644 --- a/src/test/ui/error-codes/E0197.stderr +++ b/src/test/ui/error-codes/E0197.stderr @@ -1,7 +1,7 @@ error[E0197]: inherent impls cannot be unsafe --> $DIR/E0197.rs:13:1 | -13 | unsafe impl Foo { } //~ ERROR E0197 +LL | unsafe impl Foo { } //~ ERROR E0197 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0198.stderr b/src/test/ui/error-codes/E0198.stderr index d3b0088905e..12120658d61 100644 --- a/src/test/ui/error-codes/E0198.stderr +++ b/src/test/ui/error-codes/E0198.stderr @@ -1,7 +1,7 @@ error[E0198]: negative impls cannot be unsafe --> $DIR/E0198.rs:15:1 | -15 | unsafe impl !Send for Foo { } //~ ERROR E0198 +LL | unsafe impl !Send for Foo { } //~ ERROR E0198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0199.stderr b/src/test/ui/error-codes/E0199.stderr index a97b2b90ffe..826d13a7a0e 100644 --- a/src/test/ui/error-codes/E0199.stderr +++ b/src/test/ui/error-codes/E0199.stderr @@ -1,7 +1,7 @@ error[E0199]: implementing the trait `Bar` is not unsafe --> $DIR/E0199.rs:16:1 | -16 | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199] +LL | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0200.stderr b/src/test/ui/error-codes/E0200.stderr index ee70e949533..30731712045 100644 --- a/src/test/ui/error-codes/E0200.stderr +++ b/src/test/ui/error-codes/E0200.stderr @@ -1,7 +1,7 @@ error[E0200]: the trait `Bar` requires an `unsafe impl` declaration --> $DIR/E0200.rs:15:1 | -15 | impl Bar for Foo { } //~ ERROR E0200 +LL | impl Bar for Foo { } //~ ERROR E0200 | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr index aa17639c13b..730453c416e 100644 --- a/src/test/ui/error-codes/E0201.stderr +++ b/src/test/ui/error-codes/E0201.stderr @@ -1,26 +1,26 @@ error[E0201]: duplicate definitions with name `bar`: --> $DIR/E0201.rs:15:5 | -14 | fn bar(&self) -> bool { self.0 > 5 } +LL | fn bar(&self) -> bool { self.0 > 5 } | ------------------------------------ previous definition of `bar` here -15 | fn bar() {} //~ ERROR E0201 +LL | fn bar() {} //~ ERROR E0201 | ^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `baz`: --> $DIR/E0201.rs:27:5 | -26 | fn baz(&self) -> bool { true } +LL | fn baz(&self) -> bool { true } | ------------------------------ previous definition of `baz` here -27 | fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201 +LL | fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `Quux`: --> $DIR/E0201.rs:28:5 | -24 | type Quux = u32; +LL | type Quux = u32; | ---------------- previous definition of `Quux` here ... -28 | type Quux = u32; //~ ERROR E0201 +LL | type Quux = u32; //~ ERROR E0201 | ^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr index 7874d14fe61..0cd22a454e1 100644 --- a/src/test/ui/error-codes/E0206.stderr +++ b/src/test/ui/error-codes/E0206.stderr @@ -1,19 +1,19 @@ error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/E0206.rs:13:15 | -13 | impl Copy for Foo { } +LL | impl Copy for Foo { } | ^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type --> $DIR/E0206.rs:20:15 | -20 | impl Copy for &'static Bar { } +LL | impl Copy for &'static Bar { } | ^^^^^^^^^^^^ type is not a structure or enumeration error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0206.rs:13:1 | -13 | impl Copy for Foo { } +LL | impl Copy for Foo { } | ^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate diff --git a/src/test/ui/error-codes/E0207.stderr b/src/test/ui/error-codes/E0207.stderr index 8cb6b976e17..e1f8a68583f 100644 --- a/src/test/ui/error-codes/E0207.stderr +++ b/src/test/ui/error-codes/E0207.stderr @@ -1,7 +1,7 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates --> $DIR/E0207.rs:13:6 | -13 | impl Foo { //~ ERROR E0207 +LL | impl Foo { //~ ERROR E0207 | ^ unconstrained type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr index afe340cdd8d..5fd3278dc88 100644 --- a/src/test/ui/error-codes/E0214.stderr +++ b/src/test/ui/error-codes/E0214.stderr @@ -1,7 +1,7 @@ error[E0214]: parenthesized parameters may only be used with a trait --> $DIR/E0214.rs:12:15 | -12 | let v: Vec(&str) = vec!["foo"]; +LL | let v: Vec(&str) = vec!["foo"]; | ^^^^^^ only traits may use parentheses error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr index b431d137520..7a4f730c725 100644 --- a/src/test/ui/error-codes/E0220.stderr +++ b/src/test/ui/error-codes/E0220.stderr @@ -1,13 +1,13 @@ error[E0220]: associated type `F` not found for `Trait` --> $DIR/E0220.rs:15:18 | -15 | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; //~ ERROR E0220 | ^^^^^ associated type `F` not found error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified --> $DIR/E0220.rs:15:12 | -15 | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; //~ ERROR E0220 | ^^^^^^^^^^^^ missing associated type `Bar` value error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr index 1e9db4c8e7e..07ce53e3b58 100644 --- a/src/test/ui/error-codes/E0221.stderr +++ b/src/test/ui/error-codes/E0221.stderr @@ -1,28 +1,28 @@ error[E0221]: ambiguous associated type `A` in bounds of `Self` --> $DIR/E0221.rs:21:16 | -15 | type A: T1; +LL | type A: T1; | ----------- ambiguous `A` from `Foo` ... -19 | type A: T2; +LL | type A: T2; | ----------- ambiguous `A` from `Bar` -20 | fn do_something() { -21 | let _: Self::A; +LL | fn do_something() { +LL | let _: Self::A; | ^^^^^^^ ambiguous associated type `A` error[E0221]: ambiguous associated type `Err` in bounds of `Self` --> $DIR/E0221.rs:31:16 | -29 | type Err: T3; +LL | type Err: T3; | ------------- ambiguous `Err` from `My` -30 | fn test() { -31 | let _: Self::Err; +LL | fn test() { +LL | let _: Self::Err; | ^^^^^^^^^ ambiguous associated type `Err` | note: associated type `Self` could derive from `std::str::FromStr` --> $DIR/E0221.rs:31:16 | -31 | let _: Self::Err; +LL | let _: Self::Err; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0223.stderr b/src/test/ui/error-codes/E0223.stderr index 65125791b2b..9df8c8975e5 100644 --- a/src/test/ui/error-codes/E0223.stderr +++ b/src/test/ui/error-codes/E0223.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/E0223.rs:14:14 | -14 | let foo: MyTrait::X; +LL | let foo: MyTrait::X; | ^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::X` diff --git a/src/test/ui/error-codes/E0225.stderr b/src/test/ui/error-codes/E0225.stderr index f1e8ca92db7..8894791a2db 100644 --- a/src/test/ui/error-codes/E0225.stderr +++ b/src/test/ui/error-codes/E0225.stderr @@ -1,7 +1,7 @@ error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/E0225.rs:12:32 | -12 | let _: Box; +LL | let _: Box; | ^^^^^^^^^^^^^^ non-auto additional trait error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0229.stderr b/src/test/ui/error-codes/E0229.stderr index 556adc02fc9..202007a6c7c 100644 --- a/src/test/ui/error-codes/E0229.stderr +++ b/src/test/ui/error-codes/E0229.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/E0229.rs:23:25 | -23 | fn baz(x: &>::A) {} +LL | fn baz(x: &>::A) {} | ^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0232.stderr b/src/test/ui/error-codes/E0232.stderr index 6633b0b592b..84f5e45bff7 100644 --- a/src/test/ui/error-codes/E0232.stderr +++ b/src/test/ui/error-codes/E0232.stderr @@ -1,7 +1,7 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value --> $DIR/E0232.rs:13:1 | -13 | #[rustc_on_unimplemented] +LL | #[rustc_on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^ value required here | = note: eg `#[rustc_on_unimplemented = "foo"]` diff --git a/src/test/ui/error-codes/E0243.stderr b/src/test/ui/error-codes/E0243.stderr index c3aa61f106a..26c19707fa8 100644 --- a/src/test/ui/error-codes/E0243.stderr +++ b/src/test/ui/error-codes/E0243.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 --> $DIR/E0243.rs:12:17 | -12 | struct Bar { x: Foo } +LL | struct Bar { x: Foo } | ^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0244.stderr b/src/test/ui/error-codes/E0244.stderr index 06dd74e9a67..078c8e59261 100644 --- a/src/test/ui/error-codes/E0244.stderr +++ b/src/test/ui/error-codes/E0244.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 0, found 2 --> $DIR/E0244.rs:12:23 | -12 | struct Bar { x: Foo } +LL | struct Bar { x: Foo } | ^^^^^^^^^ expected no type arguments error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0252.stderr b/src/test/ui/error-codes/E0252.stderr index db842bb4773..8186c4590f0 100644 --- a/src/test/ui/error-codes/E0252.stderr +++ b/src/test/ui/error-codes/E0252.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `baz` is defined multiple times --> $DIR/E0252.rs:12:5 | -11 | use foo::baz; +LL | use foo::baz; | -------- previous import of the type `baz` here -12 | use bar::baz; //~ ERROR E0252 +LL | use bar::baz; //~ ERROR E0252 | ^^^^^^^^ `baz` reimported here | = note: `baz` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use bar::baz as other_baz; //~ ERROR E0252 +LL | use bar::baz as other_baz; //~ ERROR E0252 | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0253.stderr b/src/test/ui/error-codes/E0253.stderr index 736e3037a84..74e17e2aa95 100644 --- a/src/test/ui/error-codes/E0253.stderr +++ b/src/test/ui/error-codes/E0253.stderr @@ -1,7 +1,7 @@ error[E0253]: `do_something` is not directly importable --> $DIR/E0253.rs:17:5 | -17 | use foo::MyTrait::do_something; +LL | use foo::MyTrait::do_something; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be imported directly 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 bab28d27ec6..f1e1b56a790 100644 --- a/src/test/ui/error-codes/E0254.stderr +++ b/src/test/ui/error-codes/E0254.stderr @@ -1,16 +1,16 @@ error[E0254]: the name `alloc` is defined multiple times --> $DIR/E0254.rs:22:5 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here ... -22 | use foo::alloc; +LL | use foo::alloc; | ^^^^^^^^^^ `alloc` reimported here | = note: `alloc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -22 | use foo::alloc as other_alloc; +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 56440936035..4d4053b1fb6 100644 --- a/src/test/ui/error-codes/E0255.stderr +++ b/src/test/ui/error-codes/E0255.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `foo` is defined multiple times --> $DIR/E0255.rs:13:1 | -11 | use bar::foo; +LL | use bar::foo; | -------- previous import of the value `foo` here -12 | -13 | fn foo() {} //~ ERROR E0255 +LL | +LL | fn foo() {} //~ ERROR E0255 | ^^^^^^^^ `foo` redefined here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -11 | use bar::foo as other_foo; +LL | use bar::foo as other_foo; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0259.stderr b/src/test/ui/error-codes/E0259.stderr index cf1131d38af..2cdd9aa6683 100644 --- a/src/test/ui/error-codes/E0259.stderr +++ b/src/test/ui/error-codes/E0259.stderr @@ -1,10 +1,10 @@ error[E0259]: the name `alloc` is defined multiple times --> $DIR/E0259.rs:16:1 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here -15 | -16 | extern crate libc as alloc; +LL | +LL | extern crate libc as alloc; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | `alloc` reimported here diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr index 3a22329790e..a249c80ea2c 100644 --- a/src/test/ui/error-codes/E0260.stderr +++ b/src/test/ui/error-codes/E0260.stderr @@ -1,16 +1,16 @@ error[E0260]: the name `alloc` is defined multiple times --> $DIR/E0260.rs:16:1 | -14 | extern crate alloc; +LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here -15 | -16 | mod alloc { +LL | +LL | mod alloc { | ^^^^^^^^^ `alloc` redefined here | = note: `alloc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | extern crate alloc as other_alloc; +LL | extern crate alloc as other_alloc; | error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0261.stderr b/src/test/ui/error-codes/E0261.stderr index 34a56ff9e5e..a12878ab896 100644 --- a/src/test/ui/error-codes/E0261.stderr +++ b/src/test/ui/error-codes/E0261.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:11:12 | -11 | fn foo(x: &'a str) { } //~ ERROR E0261 +LL | fn foo(x: &'a str) { } //~ ERROR E0261 | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:15:9 | -15 | x: &'a str, //~ ERROR E0261 +LL | x: &'a str, //~ ERROR E0261 | ^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0262.stderr b/src/test/ui/error-codes/E0262.stderr index f40f378d1be..8e9327b29f7 100644 --- a/src/test/ui/error-codes/E0262.stderr +++ b/src/test/ui/error-codes/E0262.stderr @@ -1,7 +1,7 @@ error[E0262]: invalid lifetime parameter name: `'static` --> $DIR/E0262.rs:11:8 | -11 | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 +LL | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 | ^^^^^^^ 'static is a reserved lifetime name error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0263.stderr b/src/test/ui/error-codes/E0263.stderr index 43febfbf236..9cd41bed984 100644 --- a/src/test/ui/error-codes/E0263.stderr +++ b/src/test/ui/error-codes/E0263.stderr @@ -1,7 +1,7 @@ error[E0263]: lifetime name `'a` declared twice in the same scope --> $DIR/E0263.rs:11:16 | -11 | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { +LL | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { | -- ^^ declared twice | | | previous declaration here diff --git a/src/test/ui/error-codes/E0264.stderr b/src/test/ui/error-codes/E0264.stderr index c415bfdb865..aad8002fc46 100644 --- a/src/test/ui/error-codes/E0264.stderr +++ b/src/test/ui/error-codes/E0264.stderr @@ -1,7 +1,7 @@ error[E0264]: unknown external lang item: `cake` --> $DIR/E0264.rs:15:5 | -15 | fn cake(); //~ ERROR E0264 +LL | fn cake(); //~ ERROR E0264 | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0267.stderr b/src/test/ui/error-codes/E0267.stderr index cd35aeee1e6..fbd7364d966 100644 --- a/src/test/ui/error-codes/E0267.stderr +++ b/src/test/ui/error-codes/E0267.stderr @@ -1,7 +1,7 @@ error[E0267]: `break` inside of a closure --> $DIR/E0267.rs:12:18 | -12 | let w = || { break; }; //~ ERROR E0267 +LL | let w = || { break; }; //~ ERROR E0267 | ^^^^^ cannot break inside of a closure error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr index 52f72e23f3a..377ec21c1dd 100644 --- a/src/test/ui/error-codes/E0268.stderr +++ b/src/test/ui/error-codes/E0268.stderr @@ -1,7 +1,7 @@ error[E0268]: `break` outside of loop --> $DIR/E0268.rs:12:5 | -12 | break; //~ ERROR E0268 +LL | break; //~ ERROR E0268 | ^^^^^ cannot break outside of a loop error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index a8222549b64..1a99afd6a9b 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` --> $DIR/E0271.rs:20:5 | -20 | foo(3_i8); //~ ERROR E0271 +LL | foo(3_i8); //~ ERROR E0271 | ^^^ expected reference, found u32 | = note: expected type `&'static str` @@ -9,7 +9,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` note: required by `foo` --> $DIR/E0271.rs:13:1 | -13 | fn foo(t: T) where T: Trait { +LL | fn foo(t: T) where T: Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0275.stderr b/src/test/ui/error-codes/E0275.stderr index a9d37a7049c..11ec85a5d09 100644 --- a/src/test/ui/error-codes/E0275.stderr +++ b/src/test/ui/error-codes/E0275.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: std::marker::Sized` --> $DIR/E0275.rs:15:1 | -15 | impl Foo for T where Bar: Foo {} //~ ERROR E0275 +LL | impl Foo for T where Bar: Foo {} //~ ERROR E0275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate @@ -72,7 +72,7 @@ error[E0275]: overflow evaluating the requirement `Bar $DIR/E0275.rs:11:1 | -11 | trait Foo {} +LL | trait Foo {} | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0276.stderr b/src/test/ui/error-codes/E0276.stderr index 88f229a3188..849e2aafd5a 100644 --- a/src/test/ui/error-codes/E0276.stderr +++ b/src/test/ui/error-codes/E0276.stderr @@ -1,10 +1,10 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/E0276.rs:16:5 | -12 | fn foo(x: T); +LL | fn foo(x: T); | ---------------- definition of `foo` from trait ... -16 | fn foo(x: T) where T: Copy {} //~ ERROR E0276 +LL | fn foo(x: T) where T: Copy {} //~ ERROR E0276 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::marker::Copy` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr index f44a65befbe..987bb94bb95 100644 --- a/src/test/ui/error-codes/E0277-2.stderr +++ b/src/test/ui/error-codes/E0277-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo` --> $DIR/E0277-2.rs:26:5 | -26 | is_send::(); +LL | is_send::(); | ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely | = help: within `Foo`, the trait `std::marker::Send` is not implemented for `*const u8` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in note: required by `is_send` --> $DIR/E0277-2.rs:23:1 | -23 | fn is_send() { } +LL | fn is_send() { } | ^^^^^^^^^^^^^^^^^^^^^ 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 2e43add36b2..7541e161670 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path` --> $DIR/E0277.rs:23:6 | -23 | fn f(p: Path) { } +LL | fn f(p: Path) { } | ^ `[u8]` does not have a constant size known at compile-time | = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]` @@ -11,13 +11,13 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `st error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/E0277.rs:27:5 | -27 | some_func(5i32); +LL | some_func(5i32); | ^^^^^^^^^ the trait `Foo` is not implemented for `i32` | note: required by `some_func` --> $DIR/E0277.rs:19:1 | -19 | fn some_func(foo: T) { +LL | fn some_func(foo: T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr index 2a5a31822ee..da5a53a7359 100644 --- a/src/test/ui/error-codes/E0282.stderr +++ b/src/test/ui/error-codes/E0282.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/E0282.rs:12:9 | -12 | let x = "hello".chars().rev().collect(); //~ ERROR E0282 +LL | let x = "hello".chars().rev().collect(); //~ ERROR E0282 | ^ | | | cannot infer type for `_` diff --git a/src/test/ui/error-codes/E0283.stderr b/src/test/ui/error-codes/E0283.stderr index 2eb2fb06260..9de488cc7aa 100644 --- a/src/test/ui/error-codes/E0283.stderr +++ b/src/test/ui/error-codes/E0283.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `_: Generator` --> $DIR/E0283.rs:28:21 | -28 | let cont: u32 = Generator::create(); //~ ERROR E0283 +LL | let cont: u32 = Generator::create(); //~ ERROR E0283 | ^^^^^^^^^^^^^^^^^ | note: required by `Generator::create` --> $DIR/E0283.rs:12:5 | -12 | fn create() -> u32; +LL | fn create() -> u32; | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0296.stderr b/src/test/ui/error-codes/E0296.stderr index 9dc54f670f6..a35b634cc04 100644 --- a/src/test/ui/error-codes/E0296.stderr +++ b/src/test/ui/error-codes/E0296.stderr @@ -1,7 +1,7 @@ error[E0296]: malformed recursion limit attribute, expected #![recursion_limit="N"] --> $DIR/E0296.rs:11:1 | -11 | #![recursion_limit] //~ ERROR E0296 +LL | #![recursion_limit] //~ ERROR E0296 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr index 8d2489a10fa..67d5139d386 100644 --- a/src/test/ui/error-codes/E0297.stderr +++ b/src/test/ui/error-codes/E0297.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in `for` loop binding: `None` not covered --> $DIR/E0297.rs:14:9 | -14 | for Some(x) in xs {} +LL | for Some(x) in xs {} | ^^^^^^^ pattern `None` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index 9b294b055af..04ad3c97246 100644 --- a/src/test/ui/error-codes/E0301.stderr +++ b/src/test/ui/error-codes/E0301.stderr @@ -1,7 +1,7 @@ error[E0301]: cannot mutably borrow in a pattern guard --> $DIR/E0301.rs:14:19 | -14 | option if option.take().is_none() => {}, //~ ERROR E0301 +LL | option if option.take().is_none() => {}, //~ ERROR E0301 | ^^^^^^ borrowed mutably in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr index 1a1641c0f87..a11b85850a9 100644 --- a/src/test/ui/error-codes/E0302.stderr +++ b/src/test/ui/error-codes/E0302.stderr @@ -1,7 +1,7 @@ error[E0302]: cannot assign in a pattern guard --> $DIR/E0302.rs:14:21 | -14 | option if { option = None; false } => { }, //~ ERROR E0302 +LL | option if { option = None; false } => { }, //~ ERROR E0302 | ^^^^^^^^^^^^^ assignment in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0303.stderr b/src/test/ui/error-codes/E0303.stderr index 8a51a087b68..c0a92ff55d1 100644 --- a/src/test/ui/error-codes/E0303.stderr +++ b/src/test/ui/error-codes/E0303.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/E0303.rs:13:34 | -13 | ref op_string_ref @ Some(s) => {}, +LL | ref op_string_ref @ Some(s) => {}, | -------------------------^- | | | | | by-move pattern here @@ -10,7 +10,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern error[E0303]: pattern bindings are not allowed after an `@` --> $DIR/E0303.rs:13:34 | -13 | ref op_string_ref @ Some(s) => {}, +LL | ref op_string_ref @ Some(s) => {}, | ^ not allowed after `@` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr index a7b40c54184..057791b467f 100644 --- a/src/test/ui/error-codes/E0308-4.stderr +++ b/src/test/ui/error-codes/E0308-4.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/E0308-4.rs:14:9 | -14 | 0u8...3i8 => (), //~ ERROR E0308 +LL | 0u8...3i8 => (), //~ ERROR E0308 | ^^^^^^^^^ expected u8, found i8 error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr index b137b840924..04e5f9da599 100644 --- a/src/test/ui/error-codes/E0308.stderr +++ b/src/test/ui/error-codes/E0308.stderr @@ -1,7 +1,7 @@ error[E0308]: intrinsic has wrong type --> $DIR/E0308.rs:14:5 | -14 | fn size_of(); //~ ERROR E0308 +LL | fn size_of(); //~ ERROR E0308 | ^^^^^^^^^^^^^^^^ expected (), found usize | = note: expected type `unsafe extern "rust-intrinsic" fn()` diff --git a/src/test/ui/error-codes/E0365.stderr b/src/test/ui/error-codes/E0365.stderr index 52830fc150f..ce646eb96be 100644 --- a/src/test/ui/error-codes/E0365.stderr +++ b/src/test/ui/error-codes/E0365.stderr @@ -1,7 +1,7 @@ error[E0365]: `foo` is private, and cannot be re-exported --> $DIR/E0365.rs:15:9 | -15 | pub use foo as foo2; +LL | pub use foo as foo2; | ^^^^^^^^^^^ re-export of private `foo` | = note: consider declaring type or module `foo` with `pub` diff --git a/src/test/ui/error-codes/E0370.stderr b/src/test/ui/error-codes/E0370.stderr index 5f96293e214..1c7a18bd6d8 100644 --- a/src/test/ui/error-codes/E0370.stderr +++ b/src/test/ui/error-codes/E0370.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/E0370.rs:17:5 | -17 | Y, //~ ERROR E0370 +LL | Y, //~ ERROR E0370 | ^ overflowed on value after 9223372036854775807i64 | = note: explicitly set `Y = -9223372036854775808i64` if that is desired outcome diff --git a/src/test/ui/error-codes/E0374.stderr b/src/test/ui/error-codes/E0374.stderr index 4d7c53adfac..3441f71dcd1 100644 --- a/src/test/ui/error-codes/E0374.stderr +++ b/src/test/ui/error-codes/E0374.stderr @@ -1,8 +1,8 @@ error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, none found --> $DIR/E0374.rs:18:1 | -18 | / impl CoerceUnsized> for Foo //~ ERROR E0374 -19 | | where T: CoerceUnsized {} +LL | / impl CoerceUnsized> for Foo //~ ERROR E0374 +LL | | where T: CoerceUnsized {} | |________________________________^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0375.stderr b/src/test/ui/error-codes/E0375.stderr index 123ad197d93..7e5ddda61d0 100644 --- a/src/test/ui/error-codes/E0375.stderr +++ b/src/test/ui/error-codes/E0375.stderr @@ -1,7 +1,7 @@ error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions --> $DIR/E0375.rs:22:12 | -22 | impl CoerceUnsized> for Foo {} +LL | impl CoerceUnsized> for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions | = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced diff --git a/src/test/ui/error-codes/E0376.stderr b/src/test/ui/error-codes/E0376.stderr index 4b73b4aee51..13c2e443113 100644 --- a/src/test/ui/error-codes/E0376.stderr +++ b/src/test/ui/error-codes/E0376.stderr @@ -1,7 +1,7 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion between structures --> $DIR/E0376.rs:18:1 | -18 | impl CoerceUnsized for Foo {} //~ ERROR E0376 +LL | impl CoerceUnsized for Foo {} //~ ERROR E0376 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index de32010b96a..7c327970b94 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -1,25 +1,25 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0388.rs:14:30 | -14 | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:15:39 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^^^^^^ statics require immutable values error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0388.rs:15:44 | -15 | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:17:38 | -17 | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 | ^^^^^^ statics require immutable values error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index 0a9e63a7223..a24491770c8 100644 --- a/src/test/ui/error-codes/E0389.stderr +++ b/src/test/ui/error-codes/E0389.stderr @@ -1,7 +1,7 @@ error[E0389]: cannot assign to data in a `&` reference --> $DIR/E0389.rs:18:5 | -18 | fancy_ref.num = 6; //~ ERROR E0389 +LL | fancy_ref.num = 6; //~ ERROR E0389 | ^^^^^^^^^^^^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0390.stderr b/src/test/ui/error-codes/E0390.stderr index 2d2b5d64bda..70b62f5771e 100644 --- a/src/test/ui/error-codes/E0390.stderr +++ b/src/test/ui/error-codes/E0390.stderr @@ -1,13 +1,13 @@ error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive --> $DIR/E0390.rs:15:1 | -15 | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} //~ ERROR E0390 | ^^^^^^^^^^^^^^^^ | help: consider using a trait to implement these methods --> $DIR/E0390.rs:15:1 | -15 | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} //~ ERROR E0390 | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index c291bfc5ac7..9ee85aa4de3 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `T` is never used --> $DIR/E0392.rs:11:10 | -11 | enum Foo { Bar } //~ ERROR E0392 +LL | enum Foo { Bar } //~ ERROR E0392 | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr index 33aa79f1d34..f6e77cbb800 100644 --- a/src/test/ui/error-codes/E0393.stderr +++ b/src/test/ui/error-codes/E0393.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `T` must be explicitly specified --> $DIR/E0393.rs:13:43 | -13 | fn together_we_will_rule_the_galaxy(son: &A) {} +LL | fn together_we_will_rule_the_galaxy(son: &A) {} | ^ missing reference to `T` | = note: because of the default `Self` reference, type parameters must be specified on object types diff --git a/src/test/ui/error-codes/E0394.stderr b/src/test/ui/error-codes/E0394.stderr index 3fec25ac3d6..74cb5ed0376 100644 --- a/src/test/ui/error-codes/E0394.stderr +++ b/src/test/ui/error-codes/E0394.stderr @@ -1,7 +1,7 @@ error[E0394]: cannot refer to other statics by value, use the address-of operator or a constant instead --> $DIR/E0394.rs:14:17 | -14 | static B: u32 = A; +LL | static B: u32 = A; | ^ referring to another static by value | = note: use the address-of operator or a constant instead diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr index 41d47397caf..5f3d962877a 100644 --- a/src/test/ui/error-codes/E0395.stderr +++ b/src/test/ui/error-codes/E0395.stderr @@ -1,7 +1,7 @@ error[E0395]: raw pointers cannot be compared in statics --> $DIR/E0395.rs:14:22 | -14 | static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395 +LL | static BAZ: bool = { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR E0395 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0396.stderr b/src/test/ui/error-codes/E0396.stderr index a2b73d5789c..fe20b984216 100644 --- a/src/test/ui/error-codes/E0396.stderr +++ b/src/test/ui/error-codes/E0396.stderr @@ -1,7 +1,7 @@ error[E0396]: raw pointers cannot be dereferenced in constants --> $DIR/E0396.rs:13:28 | -13 | const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396 +LL | const VALUE: u8 = unsafe { *REG_ADDR }; //~ ERROR E0396 | ^^^^^^^^^ dereference of raw pointer in constant error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr index a69da16477f..15e1eda7722 100644 --- a/src/test/ui/error-codes/E0401.stderr +++ b/src/test/ui/error-codes/E0401.stderr @@ -1,7 +1,7 @@ error[E0401]: can't use type parameters from outer function; try using a local type parameter instead --> $DIR/E0401.rs:12:15 | -12 | fn bar(y: T) { //~ ERROR E0401 +LL | fn bar(y: T) { //~ ERROR E0401 | ^ use of type variable from outer function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0403.stderr b/src/test/ui/error-codes/E0403.stderr index 2589be70777..a83d6b67473 100644 --- a/src/test/ui/error-codes/E0403.stderr +++ b/src/test/ui/error-codes/E0403.stderr @@ -1,7 +1,7 @@ error[E0403]: the name `T` is already used for a type parameter in this type parameter list --> $DIR/E0403.rs:11:11 | -11 | fn foo(s: T, u: T) {} //~ ERROR E0403 +LL | fn foo(s: T, u: T) {} //~ ERROR E0403 | - ^ already used | | | first use of `T` diff --git a/src/test/ui/error-codes/E0404.stderr b/src/test/ui/error-codes/E0404.stderr index 75e36157b98..d49c0f3ea5e 100644 --- a/src/test/ui/error-codes/E0404.stderr +++ b/src/test/ui/error-codes/E0404.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found struct `Foo` --> $DIR/E0404.rs:14:6 | -14 | impl Foo for Bar {} //~ ERROR E0404 +LL | impl Foo for Bar {} //~ ERROR E0404 | ^^^ not a trait error: cannot continue compilation due to previous error diff --git a/src/test/ui/error-codes/E0405.stderr b/src/test/ui/error-codes/E0405.stderr index 269b03179e0..0019e16d7f3 100644 --- a/src/test/ui/error-codes/E0405.stderr +++ b/src/test/ui/error-codes/E0405.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `SomeTrait` in this scope --> $DIR/E0405.rs:13:6 | -13 | impl SomeTrait for Foo {} //~ ERROR E0405 +LL | impl SomeTrait for Foo {} //~ ERROR E0405 | ^^^^^^^^^ not found in this scope error: cannot continue compilation due to previous error diff --git a/src/test/ui/error-codes/E0407.stderr b/src/test/ui/error-codes/E0407.stderr index 28486c92bf5..2e2bc3aeb55 100644 --- a/src/test/ui/error-codes/E0407.stderr +++ b/src/test/ui/error-codes/E0407.stderr @@ -1,7 +1,7 @@ error[E0407]: method `b` is not a member of trait `Foo` --> $DIR/E0407.rs:19:5 | -19 | fn b() {} +LL | fn b() {} | ^^^^^^^^^ not a member of trait `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0408.stderr b/src/test/ui/error-codes/E0408.stderr index 4280947c574..1f928275bd5 100644 --- a/src/test/ui/error-codes/E0408.stderr +++ b/src/test/ui/error-codes/E0408.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `y` is not bound in all patterns --> $DIR/E0408.rs:15:19 | -15 | Some(y) | None => {} //~ ERROR variable `y` is not bound in all patterns +LL | Some(y) | None => {} //~ ERROR variable `y` is not bound in all patterns | - ^^^^ pattern doesn't bind `y` | | | variable not in all patterns diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr index b2727806655..b0336d7d668 100644 --- a/src/test/ui/error-codes/E0411.stderr +++ b/src/test/ui/error-codes/E0411.stderr @@ -1,7 +1,7 @@ error[E0411]: cannot find type `Self` in this scope --> $DIR/E0411.rs:12:6 | -12 | ::foo; //~ ERROR E0411 +LL | ::foo; //~ ERROR E0411 | ^^^^ `Self` is only available in traits and impls error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0412.stderr b/src/test/ui/error-codes/E0412.stderr index daeef5bdfce..4444af73a7e 100644 --- a/src/test/ui/error-codes/E0412.stderr +++ b/src/test/ui/error-codes/E0412.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Something` in this scope --> $DIR/E0412.rs:11:6 | -11 | impl Something {} //~ ERROR E0412 +LL | impl Something {} //~ ERROR E0412 | ^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0415.stderr b/src/test/ui/error-codes/E0415.stderr index 9ae1700727a..82c6284e433 100644 --- a/src/test/ui/error-codes/E0415.stderr +++ b/src/test/ui/error-codes/E0415.stderr @@ -1,7 +1,7 @@ error[E0415]: identifier `f` is bound more than once in this parameter list --> $DIR/E0415.rs:11:16 | -11 | fn foo(f: i32, f: i32) {} //~ ERROR E0415 +LL | fn foo(f: i32, f: i32) {} //~ ERROR E0415 | ^ used as parameter more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0416.stderr b/src/test/ui/error-codes/E0416.stderr index b86cc8d6729..35daf20a223 100644 --- a/src/test/ui/error-codes/E0416.stderr +++ b/src/test/ui/error-codes/E0416.stderr @@ -1,7 +1,7 @@ error[E0416]: identifier `x` is bound more than once in the same pattern --> $DIR/E0416.rs:13:13 | -13 | (x, x) => {} //~ ERROR E0416 +LL | (x, x) => {} //~ ERROR E0416 | ^ used in a pattern more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index 7bc9bc2b43b..112754e75b8 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct `Foo` --> $DIR/E0423.rs:14:13 | -14 | let f = Foo(); //~ ERROR E0423 +LL | let f = Foo(); //~ ERROR E0423 | ^^^ did you mean `Foo { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr index f778af9f411..5f2d5673067 100644 --- a/src/test/ui/error-codes/E0424.stderr +++ b/src/test/ui/error-codes/E0424.stderr @@ -1,7 +1,7 @@ error[E0424]: expected value, found module `self` --> $DIR/E0424.rs:17:9 | -17 | self.bar(); //~ ERROR E0424 +LL | self.bar(); //~ ERROR E0424 | ^^^^ `self` value is only available in methods with `self` parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0425.stderr b/src/test/ui/error-codes/E0425.stderr index d836b9ddfda..9d27e4f5944 100644 --- a/src/test/ui/error-codes/E0425.stderr +++ b/src/test/ui/error-codes/E0425.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `elf` in this scope --> $DIR/E0425.rs:13:9 | -13 | elf; //~ ERROR E0425 +LL | elf; //~ ERROR E0425 | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0426.stderr b/src/test/ui/error-codes/E0426.stderr index 088a6db16ac..5e0bc69b1eb 100644 --- a/src/test/ui/error-codes/E0426.stderr +++ b/src/test/ui/error-codes/E0426.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'a` --> $DIR/E0426.rs:13:15 | -13 | break 'a; +LL | break 'a; | ^^ undeclared label `'a` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0428.stderr b/src/test/ui/error-codes/E0428.stderr index 1e9072e65db..20f734af081 100644 --- a/src/test/ui/error-codes/E0428.stderr +++ b/src/test/ui/error-codes/E0428.stderr @@ -1,9 +1,9 @@ error[E0428]: the name `Bar` is defined multiple times --> $DIR/E0428.rs:12:1 | -11 | struct Bar; //~ previous definition of the type `Bar` here +LL | struct Bar; //~ previous definition of the type `Bar` here | ----------- previous definition of the type `Bar` here -12 | struct Bar; //~ ERROR E0428 +LL | struct Bar; //~ ERROR E0428 | ^^^^^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module diff --git a/src/test/ui/error-codes/E0429.stderr b/src/test/ui/error-codes/E0429.stderr index b5a78e6d352..a72c77360b5 100644 --- a/src/test/ui/error-codes/E0429.stderr +++ b/src/test/ui/error-codes/E0429.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/E0429.rs:11:5 | -11 | use std::fmt::self; //~ ERROR E0429 +LL | use std::fmt::self; //~ ERROR E0429 | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr index 0bc6ffb6bf9..b6448ec18c3 100644 --- a/src/test/ui/error-codes/E0430.stderr +++ b/src/test/ui/error-codes/E0430.stderr @@ -1,7 +1,7 @@ error[E0430]: `self` import can only appear once in an import list --> $DIR/E0430.rs:11:16 | -11 | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; //~ ERROR E0430 | ^^^^ ---- another `self` import appears here | | | can only appear once in an import list @@ -9,7 +9,7 @@ error[E0430]: `self` import can only appear once in an import list error[E0252]: the name `fmt` is defined multiple times --> $DIR/E0430.rs:11:22 | -11 | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; //~ ERROR E0430 | ---- ^^^^ `fmt` reimported here | | | previous import of the module `fmt` here @@ -17,7 +17,7 @@ error[E0252]: the name `fmt` is defined multiple times = note: `fmt` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430 +LL | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430 | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0431.stderr b/src/test/ui/error-codes/E0431.stderr index 29fbaf2a677..364ba0aa957 100644 --- a/src/test/ui/error-codes/E0431.stderr +++ b/src/test/ui/error-codes/E0431.stderr @@ -1,7 +1,7 @@ error[E0431]: `self` import can only appear in an import list with a non-empty prefix --> $DIR/E0431.rs:11:6 | -11 | use {self}; //~ ERROR E0431 +LL | use {self}; //~ ERROR E0431 | ^^^^ can only appear in an import list with a non-empty prefix error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0432.stderr b/src/test/ui/error-codes/E0432.stderr index 4b47ceb3aa6..747b337d363 100644 --- a/src/test/ui/error-codes/E0432.stderr +++ b/src/test/ui/error-codes/E0432.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `something` --> $DIR/E0432.rs:11:5 | -11 | use something::Foo; //~ ERROR E0432 +LL | use something::Foo; //~ ERROR E0432 | ^^^^^^^^^ Maybe a missing `extern crate something;`? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0433.stderr b/src/test/ui/error-codes/E0433.stderr index 46cc308992d..7635d9738ad 100644 --- a/src/test/ui/error-codes/E0433.stderr +++ b/src/test/ui/error-codes/E0433.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `HashMap` --> $DIR/E0433.rs:12:15 | -12 | let map = HashMap::new(); //~ ERROR E0433 +LL | let map = HashMap::new(); //~ ERROR E0433 | ^^^^^^^ Use of undeclared type or module `HashMap` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0434.stderr b/src/test/ui/error-codes/E0434.stderr index 3963b4ec695..b13c0cf7971 100644 --- a/src/test/ui/error-codes/E0434.stderr +++ b/src/test/ui/error-codes/E0434.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/E0434.rs:14:9 | -14 | y //~ ERROR E0434 +LL | y //~ ERROR E0434 | ^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/error-codes/E0435.stderr b/src/test/ui/error-codes/E0435.stderr index e3468ca409e..5ca79e72c2b 100644 --- a/src/test/ui/error-codes/E0435.stderr +++ b/src/test/ui/error-codes/E0435.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/E0435.rs:13:17 | -13 | let _: [u8; foo]; //~ ERROR E0435 +LL | let _: [u8; foo]; //~ ERROR E0435 | ^^^ non-constant value error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0437.stderr b/src/test/ui/error-codes/E0437.stderr index 7cb07e98470..408924b0439 100644 --- a/src/test/ui/error-codes/E0437.stderr +++ b/src/test/ui/error-codes/E0437.stderr @@ -1,7 +1,7 @@ error[E0437]: type `Bar` is not a member of trait `Foo` --> $DIR/E0437.rs:14:5 | -14 | type Bar = bool; //~ ERROR E0437 +LL | type Bar = bool; //~ ERROR E0437 | ^^^^^^^^^^^^^^^^ not a member of trait `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0438.stderr b/src/test/ui/error-codes/E0438.stderr index ecea63eb86f..b636236e41a 100644 --- a/src/test/ui/error-codes/E0438.stderr +++ b/src/test/ui/error-codes/E0438.stderr @@ -1,7 +1,7 @@ error[E0438]: const `BAR` is not a member of trait `Bar` --> $DIR/E0438.rs:15:5 | -15 | const BAR: bool = true; //~ ERROR E0438 +LL | const BAR: bool = true; //~ ERROR E0438 | ^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Bar` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0439.stderr b/src/test/ui/error-codes/E0439.stderr index 418a8b67005..27a09043125 100644 --- a/src/test/ui/error-codes/E0439.stderr +++ b/src/test/ui/error-codes/E0439.stderr @@ -1,7 +1,7 @@ error[E0439]: invalid `simd_shuffle`, needs length: `simd_shuffle` --> $DIR/E0439.rs:14:5 | -14 | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439 +LL | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0440.stderr b/src/test/ui/error-codes/E0440.stderr index 32eef81cf59..c9ac1b8261b 100644 --- a/src/test/ui/error-codes/E0440.stderr +++ b/src/test/ui/error-codes/E0440.stderr @@ -1,7 +1,7 @@ error[E0440]: platform-specific intrinsic has wrong number of type parameters: found 1, expected 0 --> $DIR/E0440.rs:18:5 | -18 | fn x86_mm_movemask_pd(x: f64x2) -> i32; //~ ERROR E0440 +LL | fn x86_mm_movemask_pd(x: f64x2) -> i32; //~ ERROR E0440 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0441.stderr b/src/test/ui/error-codes/E0441.stderr index d8bcc3d1396..1cb4193bd34 100644 --- a/src/test/ui/error-codes/E0441.stderr +++ b/src/test/ui/error-codes/E0441.stderr @@ -1,7 +1,7 @@ error[E0441]: unrecognized platform-specific intrinsic function: `x86_mm_adds_ep16` --> $DIR/E0441.rs:18:5 | -18 | fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441 +LL | fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0442.stderr b/src/test/ui/error-codes/E0442.stderr index 86cfb607c2e..2119ea11a66 100644 --- a/src/test/ui/error-codes/E0442.stderr +++ b/src/test/ui/error-codes/E0442.stderr @@ -1,19 +1,19 @@ error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0442]: intrinsic argument 2 has wrong type: found vector with length 4, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0442]: intrinsic return value has wrong type: found vector with length 2, expected length 8 --> $DIR/E0442.rs:23:5 | -23 | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; +LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0443.stderr b/src/test/ui/error-codes/E0443.stderr index b929ff049d0..8a08bd9762e 100644 --- a/src/test/ui/error-codes/E0443.stderr +++ b/src/test/ui/error-codes/E0443.stderr @@ -1,7 +1,7 @@ error[E0443]: intrinsic return value has wrong type: found `i64x8`, expected `i16x8` which was used for this vector type previously in this signature --> $DIR/E0443.rs:20:5 | -20 | fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443 +LL | fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0444.stderr b/src/test/ui/error-codes/E0444.stderr index f1d3064c0de..7e20e47b165 100644 --- a/src/test/ui/error-codes/E0444.stderr +++ b/src/test/ui/error-codes/E0444.stderr @@ -1,7 +1,7 @@ error[E0444]: platform-specific intrinsic has invalid number of arguments: found 3, expected 1 --> $DIR/E0444.rs:18:5 | -18 | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444 +LL | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0445.stderr b/src/test/ui/error-codes/E0445.stderr index c7f59695e0c..6e0616277f4 100644 --- a/src/test/ui/error-codes/E0445.stderr +++ b/src/test/ui/error-codes/E0445.stderr @@ -1,19 +1,19 @@ error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:15:1 | -15 | pub trait Bar : Foo {} +LL | pub trait Bar : Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:18:1 | -18 | pub struct Bar2(pub T); +LL | pub struct Bar2(pub T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `Foo` in public interface --> $DIR/E0445.rs:21:1 | -21 | pub fn foo (t: T) {} +LL | pub fn foo (t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr index ceb949f884c..067fdb47da9 100644 --- a/src/test/ui/error-codes/E0446.stderr +++ b/src/test/ui/error-codes/E0446.stderr @@ -1,9 +1,9 @@ error[E0446]: private type `Foo::Bar` in public interface --> $DIR/E0446.rs:14:5 | -14 | / pub fn bar() -> Bar { //~ ERROR E0446 -15 | | Bar(0) -16 | | } +LL | / pub fn bar() -> Bar { //~ ERROR E0446 +LL | | Bar(0) +LL | | } | |_____^ can't leak private type error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0449.stderr b/src/test/ui/error-codes/E0449.stderr index 4ec7178ba6c..68ec6379d71 100644 --- a/src/test/ui/error-codes/E0449.stderr +++ b/src/test/ui/error-codes/E0449.stderr @@ -1,7 +1,7 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:17:1 | -17 | pub impl Bar {} //~ ERROR E0449 +LL | pub impl Bar {} //~ ERROR E0449 | ^^^ `pub` not needed here | = note: place qualifiers on individual impl items instead @@ -9,13 +9,13 @@ error[E0449]: unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:19:1 | -19 | pub impl Foo for Bar { //~ ERROR E0449 +LL | pub impl Foo for Bar { //~ ERROR E0449 | ^^^ `pub` not needed here error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:20:5 | -20 | pub fn foo() {} //~ ERROR E0449 +LL | pub fn foo() {} //~ ERROR E0449 | ^^^ `pub` not needed here error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index a1c4929fce7..003a93811bd 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -1,13 +1,13 @@ error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:24:23 | -24 | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451 +LL | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451 | ^^^ field `b` is private error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:28:29 | -28 | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 +LL | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 | ^^^^ field `b` is private error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0452.stderr b/src/test/ui/error-codes/E0452.stderr index 36c6052abb1..6e4b47e9631 100644 --- a/src/test/ui/error-codes/E0452.stderr +++ b/src/test/ui/error-codes/E0452.stderr @@ -1,7 +1,7 @@ error[E0452]: malformed lint attribute --> $DIR/E0452.rs:11:10 | -11 | #![allow(foo = "")] //~ ERROR E0452 +LL | #![allow(foo = "")] //~ ERROR E0452 | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0453.stderr b/src/test/ui/error-codes/E0453.stderr index affad8a5861..646b98b8473 100644 --- a/src/test/ui/error-codes/E0453.stderr +++ b/src/test/ui/error-codes/E0453.stderr @@ -1,10 +1,10 @@ error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case) --> $DIR/E0453.rs:13:9 | -11 | #![forbid(non_snake_case)] +LL | #![forbid(non_snake_case)] | -------------- `forbid` level set here -12 | -13 | #[allow(non_snake_case)] +LL | +LL | #[allow(non_snake_case)] | ^^^^^^^^^^^^^^ overruled by previous forbid error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0454.stderr b/src/test/ui/error-codes/E0454.stderr index e127a54dc10..11f1958bf96 100644 --- a/src/test/ui/error-codes/E0454.stderr +++ b/src/test/ui/error-codes/E0454.stderr @@ -1,7 +1,7 @@ error[E0454]: #[link(name = "")] given with empty name --> $DIR/E0454.rs:11:1 | -11 | #[link(name = "")] extern {} +LL | #[link(name = "")] extern {} | ^^^^^^^^^^^^^^^^^^ empty name given error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr index 2ecc7772598..4bcafa47d35 100644 --- a/src/test/ui/error-codes/E0458.stderr +++ b/src/test/ui/error-codes/E0458.stderr @@ -1,13 +1,13 @@ error[E0458]: unknown kind: `wonderful_unicorn` --> $DIR/E0458.rs:11:1 | -11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown kind error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0458.rs:11:1 | -11 | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr index b6d5f8983b3..c443e78ab3a 100644 --- a/src/test/ui/error-codes/E0459.stderr +++ b/src/test/ui/error-codes/E0459.stderr @@ -1,7 +1,7 @@ error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0459.rs:11:1 | -11 | #[link(kind = "dylib")] extern {} //~ ERROR E0459 +LL | #[link(kind = "dylib")] extern {} //~ ERROR E0459 | ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0463.stderr b/src/test/ui/error-codes/E0463.stderr index 830d48e57f7..41575b70d15 100644 --- a/src/test/ui/error-codes/E0463.stderr +++ b/src/test/ui/error-codes/E0463.stderr @@ -1,7 +1,7 @@ error[E0463]: can't find crate for `cookie_monster` --> $DIR/E0463.rs:12:11 | -12 | #![plugin(cookie_monster)] +LL | #![plugin(cookie_monster)] | ^^^^^^^^^^^^^^ can't find crate error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr index 53d3e5c0138..bbc243a3757 100644 --- a/src/test/ui/error-codes/E0478.stderr +++ b/src/test/ui/error-codes/E0478.stderr @@ -1,18 +1,18 @@ error[E0478]: lifetime bound not satisfied --> $DIR/E0478.rs:14:5 | -14 | child: Box + 'SnowWhite>, //~ ERROR E0478 +LL | child: Box + 'SnowWhite>, //~ ERROR E0478 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 13:1 --> $DIR/E0478.rs:13:1 | -13 | struct Prince<'kiss, 'SnowWhite> { +LL | struct Prince<'kiss, 'SnowWhite> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but lifetime parameter must outlive the lifetime 'kiss as defined on the struct at 13:1 --> $DIR/E0478.rs:13:1 | -13 | struct Prince<'kiss, 'SnowWhite> { +LL | struct Prince<'kiss, 'SnowWhite> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0492.stderr b/src/test/ui/error-codes/E0492.stderr index e08878a9e8d..359c63bb8ff 100644 --- a/src/test/ui/error-codes/E0492.stderr +++ b/src/test/ui/error-codes/E0492.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/E0492.rs:14:34 | -14 | static B: &'static AtomicUsize = &A; //~ ERROR E0492 +LL | static B: &'static AtomicUsize = &A; //~ ERROR E0492 | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0494.stderr b/src/test/ui/error-codes/E0494.stderr index e0dda17cea0..82dd74c012b 100644 --- a/src/test/ui/error-codes/E0494.stderr +++ b/src/test/ui/error-codes/E0494.stderr @@ -1,7 +1,7 @@ error[E0494]: cannot refer to the interior of another static, use a constant instead --> $DIR/E0494.rs:16:27 | -16 | static A : &'static u32 = &S.a; //~ ERROR E0494 +LL | static A : &'static u32 = &S.a; //~ ERROR E0494 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0496.stderr b/src/test/ui/error-codes/E0496.stderr index c68e8810f56..945c2391d03 100644 --- a/src/test/ui/error-codes/E0496.stderr +++ b/src/test/ui/error-codes/E0496.stderr @@ -1,9 +1,9 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope --> $DIR/E0496.rs:16:10 | -15 | impl<'a> Foo<'a> { +LL | impl<'a> Foo<'a> { | -- first declared here -16 | fn f<'a>(x: &'a i32) { //~ ERROR E0496 +LL | fn f<'a>(x: &'a i32) { //~ ERROR E0496 | ^^ lifetime 'a already in scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index 7bb752be432..5332df0c235 100644 --- a/src/test/ui/error-codes/E0499.stderr +++ b/src/test/ui/error-codes/E0499.stderr @@ -1,11 +1,11 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time --> $DIR/E0499.rs:14:22 | -13 | let mut x = &mut i; +LL | let mut x = &mut i; | - first mutable borrow occurs here -14 | let mut a = &mut i; //~ ERROR E0499 +LL | let mut a = &mut i; //~ ERROR E0499 | ^ second mutable borrow occurs here -15 | } +LL | } | - first borrow ends here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index ae96fa38f64..07430990f0a 100644 --- a/src/test/ui/error-codes/E0502.stderr +++ b/src/test/ui/error-codes/E0502.stderr @@ -1,11 +1,11 @@ error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immutable --> $DIR/E0502.rs:14:9 | -13 | let ref y = a; +LL | let ref y = a; | ----- immutable borrow occurs here -14 | bar(a); //~ ERROR E0502 +LL | bar(a); //~ ERROR E0502 | ^ mutable borrow occurs here -15 | } +LL | } | - immutable borrow ends here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 23a1e13b4a5..ac6634cb64f 100644 --- a/src/test/ui/error-codes/E0503.stderr +++ b/src/test/ui/error-codes/E0503.stderr @@ -1,9 +1,9 @@ error[E0503]: cannot use `value` because it was mutably borrowed --> $DIR/E0503.rs:14:16 | -13 | let _borrow = &mut value; +LL | let _borrow = &mut value; | ----- borrow of `value` occurs here -14 | let _sum = value + 1; //~ ERROR E0503 +LL | let _sum = value + 1; //~ ERROR E0503 | ^^^^^ use of borrowed `value` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index 4003c8ed4dd..9f3bd79dcfe 100644 --- a/src/test/ui/error-codes/E0504.stderr +++ b/src/test/ui/error-codes/E0504.stderr @@ -1,10 +1,10 @@ error[E0504]: cannot move `fancy_num` into closure because it is borrowed --> $DIR/E0504.rs:20:40 | -17 | let fancy_ref = &fancy_num; +LL | let fancy_ref = &fancy_num; | --------- borrow of `fancy_num` occurs here ... -20 | println!("child function: {}", fancy_num.num); //~ ERROR E0504 +LL | println!("child function: {}", fancy_num.num); //~ ERROR E0504 | ^^^^^^^^^ move into closure occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index d2db97835b8..71392857d0a 100644 --- a/src/test/ui/error-codes/E0505.stderr +++ b/src/test/ui/error-codes/E0505.stderr @@ -1,9 +1,9 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/E0505.rs:19:13 | -18 | let _ref_to_val: &Value = &x; +LL | let _ref_to_val: &Value = &x; | - borrow of `x` occurs here -19 | eat(x); //~ ERROR E0505 +LL | eat(x); //~ ERROR E0505 | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr index 59345a23703..de94648ec0b 100644 --- a/src/test/ui/error-codes/E0507.stderr +++ b/src/test/ui/error-codes/E0507.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/E0507.rs:22:5 | -22 | x.borrow().nothing_is_true(); //~ ERROR E0507 +LL | x.borrow().nothing_is_true(); //~ ERROR E0507 | ^^^^^^^^^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index 8e0638697c6..3bc2a4450a1 100644 --- a/src/test/ui/error-codes/E0509.stderr +++ b/src/test/ui/error-codes/E0509.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait --> $DIR/E0509.rs:26:23 | -26 | let fancy_field = drop_struct.fancy; //~ ERROR E0509 +LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509 | ^^^^^^^^^^^^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index a926535c938..0273735562d 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -1,7 +1,7 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` --> $DIR/E0511.rs:18:14 | -18 | unsafe { simd_add(0, 1); } //~ ERROR E0511 +LL | unsafe { simd_add(0, 1); } //~ ERROR E0511 | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0512.stderr b/src/test/ui/error-codes/E0512.stderr index ca2845d6e55..bcce48c0cd5 100644 --- a/src/test/ui/error-codes/E0512.stderr +++ b/src/test/ui/error-codes/E0512.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/E0512.rs:14:23 | -14 | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 +LL | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 | ^^^^^^^^^^^^^^^^^^^^^ | = note: source type: u16 (16 bits) diff --git a/src/test/ui/error-codes/E0516.stderr b/src/test/ui/error-codes/E0516.stderr index 3417ac19ab0..bae85cabced 100644 --- a/src/test/ui/error-codes/E0516.stderr +++ b/src/test/ui/error-codes/E0516.stderr @@ -1,7 +1,7 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/E0516.rs:12:12 | -12 | let x: typeof(92) = 92; //~ ERROR E0516 +LL | let x: typeof(92) = 92; //~ ERROR E0516 | ^^^^^^^^^^ reserved keyword error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0517.stderr b/src/test/ui/error-codes/E0517.stderr index 8dc45703fe9..fbaeb6fabbb 100644 --- a/src/test/ui/error-codes/E0517.stderr +++ b/src/test/ui/error-codes/E0517.stderr @@ -1,34 +1,34 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:11:8 | -11 | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] //~ ERROR: E0517 | ^ -12 | type Foo = u8; +LL | type Foo = u8; | -------------- not a struct, enum or union error[E0517]: attribute should be applied to struct or union --> $DIR/E0517.rs:14:8 | -14 | #[repr(packed)] //~ ERROR: E0517 +LL | #[repr(packed)] //~ ERROR: E0517 | ^^^^^^ -15 | enum Foo2 {Bar, Baz} +LL | enum Foo2 {Bar, Baz} | -------------------- not a struct or union error[E0517]: attribute should be applied to enum --> $DIR/E0517.rs:17:8 | -17 | #[repr(u8)] //~ ERROR: E0517 +LL | #[repr(u8)] //~ ERROR: E0517 | ^^ -18 | struct Foo3 {bar: bool, baz: bool} +LL | struct Foo3 {bar: bool, baz: bool} | ---------------------------------- not an enum error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:20:8 | -20 | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] //~ ERROR: E0517 | ^ -21 | / impl Foo3 { -22 | | } +LL | / impl Foo3 { +LL | | } | |_- not a struct, enum or union error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0518.stderr b/src/test/ui/error-codes/E0518.stderr index 3120b6a8bfb..3d199c7fa7f 100644 --- a/src/test/ui/error-codes/E0518.stderr +++ b/src/test/ui/error-codes/E0518.stderr @@ -1,18 +1,18 @@ error[E0518]: attribute should be applied to function --> $DIR/E0518.rs:11:1 | -11 | #[inline(always)] //~ ERROR: E0518 +LL | #[inline(always)] //~ ERROR: E0518 | ^^^^^^^^^^^^^^^^^ -12 | struct Foo; +LL | struct Foo; | ----------- not a function error[E0518]: attribute should be applied to function --> $DIR/E0518.rs:14:1 | -14 | #[inline(never)] //~ ERROR: E0518 +LL | #[inline(never)] //~ ERROR: E0518 | ^^^^^^^^^^^^^^^^ -15 | / impl Foo { -16 | | } +LL | / impl Foo { +LL | | } | |_- not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0520.stderr b/src/test/ui/error-codes/E0520.stderr index 9d9e86ac6fc..a79f11f63e7 100644 --- a/src/test/ui/error-codes/E0520.stderr +++ b/src/test/ui/error-codes/E0520.stderr @@ -1,12 +1,12 @@ error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default` --> $DIR/E0520.rs:26:5 | -21 | / impl SpaceLlama for T { -22 | | fn fly(&self) {} -23 | | } +LL | / impl SpaceLlama for T { +LL | | fn fly(&self) {} +LL | | } | |_- parent `impl` is here ... -26 | default fn fly(&self) {} +LL | default fn fly(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly` | = note: to specialize, `fly` in the parent `impl` must be marked `default` diff --git a/src/test/ui/error-codes/E0522.stderr b/src/test/ui/error-codes/E0522.stderr index 3c3527c7ef7..c67e7bea34d 100644 --- a/src/test/ui/error-codes/E0522.stderr +++ b/src/test/ui/error-codes/E0522.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0522]: definition of an unknown language item: `cookie` --> $DIR/E0522.rs:13:1 | -13 | #[lang = "cookie"] +LL | #[lang = "cookie"] | ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0527.stderr b/src/test/ui/error-codes/E0527.stderr index 2041ed2282a..d9f99224057 100644 --- a/src/test/ui/error-codes/E0527.stderr +++ b/src/test/ui/error-codes/E0527.stderr @@ -1,7 +1,7 @@ error[E0527]: pattern requires 2 elements but array has 4 --> $DIR/E0527.rs:16:10 | -16 | &[a, b] => { +LL | &[a, b] => { | ^^^^^^ expected 4 elements error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0528.stderr b/src/test/ui/error-codes/E0528.stderr index 1b353efd3a9..824fae59588 100644 --- a/src/test/ui/error-codes/E0528.stderr +++ b/src/test/ui/error-codes/E0528.stderr @@ -1,7 +1,7 @@ error[E0528]: pattern requires at least 3 elements but array has 2 --> $DIR/E0528.rs:16:10 | -16 | &[a, b, c, rest..] => { +LL | &[a, b, c, rest..] => { | ^^^^^^^^^^^^^^^^^ pattern cannot match array of 2 elements error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0529.stderr b/src/test/ui/error-codes/E0529.stderr index bb49f9d6451..5031f717c82 100644 --- a/src/test/ui/error-codes/E0529.stderr +++ b/src/test/ui/error-codes/E0529.stderr @@ -1,7 +1,7 @@ error[E0529]: expected an array or slice, found `f32` --> $DIR/E0529.rs:16:9 | -16 | [a, b] => { +LL | [a, b] => { | ^^^^^^ pattern cannot match with input type `f32` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0530.stderr b/src/test/ui/error-codes/E0530.stderr index 4e92db34b04..2a76eb14087 100644 --- a/src/test/ui/error-codes/E0530.stderr +++ b/src/test/ui/error-codes/E0530.stderr @@ -1,10 +1,10 @@ error[E0530]: match bindings cannot shadow statics --> $DIR/E0530.rs:16:9 | -12 | static TEST: i32 = 0; +LL | static TEST: i32 = 0; | --------------------- a static `TEST` is defined here ... -16 | TEST => {} //~ ERROR E0530 +LL | TEST => {} //~ ERROR E0530 | ^^^^ cannot be named the same as a static error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0532.stderr b/src/test/ui/error-codes/E0532.stderr index 48d7cd5d545..04102f4dbef 100644 --- a/src/test/ui/error-codes/E0532.stderr +++ b/src/test/ui/error-codes/E0532.stderr @@ -1,7 +1,7 @@ error[E0532]: expected tuple struct/variant, found constant `StructConst1` --> $DIR/E0532.rs:15:9 | -15 | StructConst1(_) => { }, +LL | StructConst1(_) => { }, | ^^^^^^^^^^^^ not a tuple struct/variant error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0534.stderr b/src/test/ui/error-codes/E0534.stderr index 58b183cd98d..7f56f6b11f1 100644 --- a/src/test/ui/error-codes/E0534.stderr +++ b/src/test/ui/error-codes/E0534.stderr @@ -1,7 +1,7 @@ error[E0534]: expected one argument --> $DIR/E0534.rs:11:1 | -11 | #[inline()] //~ ERROR E0534 +LL | #[inline()] //~ ERROR E0534 | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0558.stderr b/src/test/ui/error-codes/E0558.stderr index 5a4219a5b7d..cf2ee9a1160 100644 --- a/src/test/ui/error-codes/E0558.stderr +++ b/src/test/ui/error-codes/E0558.stderr @@ -1,7 +1,7 @@ error[E0558]: export_name attribute has invalid format --> $DIR/E0558.rs:11:1 | -11 | #[export_name] +LL | #[export_name] | ^^^^^^^^^^^^^^ did you mean #[export_name="*"]? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0559.stderr b/src/test/ui/error-codes/E0559.stderr index c5a2aa6a949..5e0382de5c9 100644 --- a/src/test/ui/error-codes/E0559.stderr +++ b/src/test/ui/error-codes/E0559.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Field::Fool` has no field named `joke` --> $DIR/E0559.rs:16:27 | -16 | let s = Field::Fool { joke: 0 }; +LL | let s = Field::Fool { joke: 0 }; | ^^^^ `Field::Fool` does not have this field | = note: available fields are: `x` diff --git a/src/test/ui/error-codes/E0560.stderr b/src/test/ui/error-codes/E0560.stderr index 71b2bfb32ad..1b4e62425f0 100644 --- a/src/test/ui/error-codes/E0560.stderr +++ b/src/test/ui/error-codes/E0560.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `Simba` has no field named `father` --> $DIR/E0560.rs:16:32 | -16 | let s = Simba { mother: 1, father: 0 }; +LL | let s = Simba { mother: 1, father: 0 }; | ^^^^^^ `Simba` does not have this field | = note: available fields are: `mother` diff --git a/src/test/ui/error-codes/E0565-1.stderr b/src/test/ui/error-codes/E0565-1.stderr index 9491f5ac7e3..f393aa56f9c 100644 --- a/src/test/ui/error-codes/E0565-1.stderr +++ b/src/test/ui/error-codes/E0565-1.stderr @@ -1,7 +1,7 @@ error[E0565]: unsupported literal --> $DIR/E0565-1.rs:14:14 | -14 | #[deprecated("since")] //~ ERROR E0565 +LL | #[deprecated("since")] //~ ERROR E0565 | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr index 757c3fcdd7a..c0c1b7b2743 100644 --- a/src/test/ui/error-codes/E0565.stderr +++ b/src/test/ui/error-codes/E0565.stderr @@ -1,7 +1,7 @@ error[E0565]: unsupported literal --> $DIR/E0565.rs:14:8 | -14 | #[repr("C")] //~ ERROR E0565 +LL | #[repr("C")] //~ ERROR E0565 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0572.stderr b/src/test/ui/error-codes/E0572.stderr index 1abc2222f0e..199476248a4 100644 --- a/src/test/ui/error-codes/E0572.stderr +++ b/src/test/ui/error-codes/E0572.stderr @@ -1,7 +1,7 @@ error[E0572]: return statement outside of function body --> $DIR/E0572.rs:11:18 | -11 | const FOO: u32 = return 0; //~ ERROR E0572 +LL | const FOO: u32 = return 0; //~ ERROR E0572 | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0582.stderr b/src/test/ui/error-codes/E0582.stderr index 21dd0d4f80a..1bb3049a3f7 100644 --- a/src/test/ui/error-codes/E0582.stderr +++ b/src/test/ui/error-codes/E0582.stderr @@ -1,13 +1,13 @@ error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types --> $DIR/E0582.rs:38:30 | -38 | where F: for<'a> Fn() -> Option<&'a i32> +LL | where F: for<'a> Fn() -> Option<&'a i32> | ^^^^^^^^^^^^^^^ error[E0582]: binding for associated type `Item` references lifetime `'a`, which does not appear in the trait input types --> $DIR/E0582.rs:46:31 | -46 | where F: for<'a> Iterator +LL | where F: for<'a> Iterator | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0585.stderr b/src/test/ui/error-codes/E0585.stderr index 28528c90626..063acd2e653 100644 --- a/src/test/ui/error-codes/E0585.stderr +++ b/src/test/ui/error-codes/E0585.stderr @@ -1,7 +1,7 @@ error[E0585]: found a documentation comment that doesn't document anything --> $DIR/E0585.rs:12:5 | -12 | /// Hello! I'm useless... +LL | /// Hello! I'm useless... | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: doc comments must come before what they document, maybe a comment was intended with `//`? diff --git a/src/test/ui/error-codes/E0586.stderr b/src/test/ui/error-codes/E0586.stderr index 9b4263507a8..35292724498 100644 --- a/src/test/ui/error-codes/E0586.stderr +++ b/src/test/ui/error-codes/E0586.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/E0586.rs:13:22 | -13 | let x = &tmp[1..=]; //~ ERROR E0586 +LL | let x = &tmp[1..=]; //~ ERROR E0586 | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index 87a961dbcd2..41035493bfc 100644 --- a/src/test/ui/error-codes/E0597.stderr +++ b/src/test/ui/error-codes/E0597.stderr @@ -1,10 +1,10 @@ error[E0597]: `y` does not live long enough --> $DIR/E0597.rs:18:17 | -18 | x.x = Some(&y); +LL | x.x = Some(&y); | ^ borrowed value does not live long enough -19 | //~^ `y` does not live long enough [E0597] -20 | } +LL | //~^ `y` does not live long enough [E0597] +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index ff9ac3cefc0..a9bb3e50295 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -1,10 +1,10 @@ error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope --> $DIR/E0599.rs:14:15 | -11 | struct Foo; +LL | struct Foo; | ----------- associated item `NotEvenReal` not found for this ... -14 | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 +LL | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 | ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0600.stderr b/src/test/ui/error-codes/E0600.stderr index 34e1c56fe2f..add05ac3062 100644 --- a/src/test/ui/error-codes/E0600.stderr +++ b/src/test/ui/error-codes/E0600.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` --> $DIR/E0600.rs:12:5 | -12 | !"a"; //~ ERROR E0600 +LL | !"a"; //~ ERROR E0600 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0602.stderr b/src/test/ui/error-codes/E0602.stderr index d72b426cf82..fb1144b616d 100644 --- a/src/test/ui/error-codes/E0602.stderr +++ b/src/test/ui/error-codes/E0602.stderr @@ -1,6 +1,6 @@ error[E0602]: unknown lint: `bogus` - | - = note: requested on the command line with `-D bogus` + | + = note: requested on the command line with `-D bogus` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0603.stderr b/src/test/ui/error-codes/E0603.stderr index 71af28add7b..db451cbc0fc 100644 --- a/src/test/ui/error-codes/E0603.stderr +++ b/src/test/ui/error-codes/E0603.stderr @@ -1,7 +1,7 @@ error[E0603]: constant `PRIVATE` is private --> $DIR/E0603.rs:16:5 | -16 | SomeModule::PRIVATE; //~ ERROR E0603 +LL | SomeModule::PRIVATE; //~ ERROR E0603 | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0604.stderr b/src/test/ui/error-codes/E0604.stderr index 28f77417ecc..875f326df37 100644 --- a/src/test/ui/error-codes/E0604.stderr +++ b/src/test/ui/error-codes/E0604.stderr @@ -1,7 +1,7 @@ error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:12:5 | -12 | 1u32 as char; //~ ERROR E0604 +LL | 1u32 as char; //~ ERROR E0604 | ^^^^^^^^^^^^ 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 fe694b3eb19..4e1f47cebb7 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` --> $DIR/E0605.rs:13:5 | -13 | x as Vec; //~ ERROR E0605 +LL | x as Vec; //~ ERROR E0605 | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -9,7 +9,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/E0605.rs:16:5 | -16 | v as &u8; //~ ERROR E0605 +LL | v as &u8; //~ ERROR E0605 | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/error-codes/E0606.stderr b/src/test/ui/error-codes/E0606.stderr index b606bd9113b..3c90e2d4beb 100644 --- a/src/test/ui/error-codes/E0606.stderr +++ b/src/test/ui/error-codes/E0606.stderr @@ -1,13 +1,13 @@ error[E0606]: casting `&u8` as `u8` is invalid --> $DIR/E0606.rs:12:5 | -12 | &0u8 as u8; //~ ERROR E0606 +LL | &0u8 as u8; //~ ERROR E0606 | ^^^^^^^^^^ cannot cast `&u8` as `u8` | help: did you mean `*&0u8`? --> $DIR/E0606.rs:12:5 | -12 | &0u8 as u8; //~ ERROR E0606 +LL | &0u8 as u8; //~ ERROR E0606 | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0607.stderr b/src/test/ui/error-codes/E0607.stderr index 2fcb050e628..62d2c2163bf 100644 --- a/src/test/ui/error-codes/E0607.stderr +++ b/src/test/ui/error-codes/E0607.stderr @@ -1,7 +1,7 @@ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/E0607.rs:13:5 | -13 | v as *const [u8]; //~ ERROR E0607 +LL | v as *const [u8]; //~ ERROR E0607 | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0608.stderr b/src/test/ui/error-codes/E0608.stderr index 89095cbdf81..43227b4f0a3 100644 --- a/src/test/ui/error-codes/E0608.stderr +++ b/src/test/ui/error-codes/E0608.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `u8` --> $DIR/E0608.rs:12:5 | -12 | 0u8[2]; //~ ERROR E0608 +LL | 0u8[2]; //~ ERROR E0608 | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0609.stderr b/src/test/ui/error-codes/E0609.stderr index 56c088fd2be..70deb168168 100644 --- a/src/test/ui/error-codes/E0609.stderr +++ b/src/test/ui/error-codes/E0609.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `foo` on type `Foo` --> $DIR/E0609.rs:18:15 | -18 | let _ = x.foo; //~ ERROR E0609 +LL | let _ = x.foo; //~ ERROR E0609 | ^^^ unknown field | = note: available fields are: `x` @@ -9,7 +9,7 @@ error[E0609]: no field `foo` on type `Foo` error[E0609]: no field `1` on type `Bar` --> $DIR/E0609.rs:21:5 | -21 | y.1; //~ ERROR E0609 +LL | y.1; //~ ERROR E0609 | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0610.stderr b/src/test/ui/error-codes/E0610.stderr index 3fa9be7e0de..d6b14642546 100644 --- a/src/test/ui/error-codes/E0610.stderr +++ b/src/test/ui/error-codes/E0610.stderr @@ -1,7 +1,7 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/E0610.rs:13:15 | -13 | let _ = x.foo; //~ ERROR E0610 +LL | let _ = x.foo; //~ ERROR E0610 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0611.stderr b/src/test/ui/error-codes/E0611.stderr index e08b2edd63f..90194afe4ff 100644 --- a/src/test/ui/error-codes/E0611.stderr +++ b/src/test/ui/error-codes/E0611.stderr @@ -1,7 +1,7 @@ error[E0611]: field `0` of tuple-struct `a::Foo` is private --> $DIR/E0611.rs:21:4 | -21 | y.0; //~ ERROR E0611 +LL | y.0; //~ ERROR E0611 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0612.stderr b/src/test/ui/error-codes/E0612.stderr index 0535f13a4c4..5c27635097f 100644 --- a/src/test/ui/error-codes/E0612.stderr +++ b/src/test/ui/error-codes/E0612.stderr @@ -1,7 +1,7 @@ error[E0612]: attempted out-of-bounds tuple index `1` on type `Foo` --> $DIR/E0612.rs:15:4 | -15 | y.1; //~ ERROR E0612 +LL | y.1; //~ ERROR E0612 | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0614.stderr b/src/test/ui/error-codes/E0614.stderr index 806fed59f79..b68887ef36b 100644 --- a/src/test/ui/error-codes/E0614.stderr +++ b/src/test/ui/error-codes/E0614.stderr @@ -1,7 +1,7 @@ error[E0614]: type `u32` cannot be dereferenced --> $DIR/E0614.rs:13:5 | -13 | *y; //~ ERROR E0614 +LL | *y; //~ ERROR E0614 | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index 3481a1e3a05..39e63825d6a 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `method` on type `Foo` --> $DIR/E0615.rs:21:7 | -21 | f.method; //~ ERROR E0615 +LL | f.method; //~ ERROR E0615 | ^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr index 2cf889ce6fb..38065f048ad 100644 --- a/src/test/ui/error-codes/E0616.stderr +++ b/src/test/ui/error-codes/E0616.stderr @@ -1,7 +1,7 @@ error[E0616]: field `x` of struct `a::Foo` is private --> $DIR/E0616.rs:23:5 | -23 | f.x; //~ ERROR E0616 +LL | f.x; //~ ERROR E0616 | ^^^ 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 b72ab2de414..11b1bf32ee0 100644 --- a/src/test/ui/error-codes/E0617.stderr +++ b/src/test/ui/error-codes/E0617.stderr @@ -1,41 +1,41 @@ error[E0617]: can't pass `f32` to variadic function --> $DIR/E0617.rs:19:36 | -19 | printf(::std::ptr::null(), 0f32); +LL | printf(::std::ptr::null(), 0f32); | ^^^^ help: cast the value to `c_double`: `0f32 as c_double` error[E0617]: can't pass `i8` to variadic function --> $DIR/E0617.rs:22:36 | -22 | printf(::std::ptr::null(), 0i8); +LL | printf(::std::ptr::null(), 0i8); | ^^^ help: cast the value to `c_int`: `0i8 as c_int` error[E0617]: can't pass `i16` to variadic function --> $DIR/E0617.rs:25:36 | -25 | printf(::std::ptr::null(), 0i16); +LL | printf(::std::ptr::null(), 0i16); | ^^^^ help: cast the value to `c_int`: `0i16 as c_int` error[E0617]: can't pass `u8` to variadic function --> $DIR/E0617.rs:28:36 | -28 | printf(::std::ptr::null(), 0u8); +LL | printf(::std::ptr::null(), 0u8); | ^^^ help: cast the value to `c_uint`: `0u8 as c_uint` error[E0617]: can't pass `u16` to variadic function --> $DIR/E0617.rs:31:36 | -31 | printf(::std::ptr::null(), 0u16); +LL | printf(::std::ptr::null(), 0u16); | ^^^^ help: cast the value to `c_uint`: `0u16 as c_uint` error[E0617]: can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function --> $DIR/E0617.rs:34:36 | -34 | printf(::std::ptr::null(), printf); +LL | printf(::std::ptr::null(), printf); | ^^^^^^ help: cast the value to `unsafe extern "C" fn(*const i8, ...)` | -34 | printf(::std::ptr::null(), printf as 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 9f364f55dd6..41ef37dca54 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -1,22 +1,22 @@ error[E0618]: expected function, found enum variant `X::Entry` --> $DIR/E0618.rs:16:5 | -12 | Entry, +LL | Entry, | ----- `X::Entry` defined here ... -16 | X::Entry(); +LL | X::Entry(); | ^^^^^^^^^^ not a function help: `X::Entry` is a unit variant, you need to write it without the parenthesis | -16 | X::Entry; +LL | X::Entry; | ^^^^^^^^ error[E0618]: expected function, found `i32` --> $DIR/E0618.rs:19:5 | -18 | let x = 0i32; +LL | let x = 0i32; | - `i32` defined here -19 | x(); +LL | x(); | ^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0620.stderr b/src/test/ui/error-codes/E0620.stderr index 5c18afebf5a..310dddc26f0 100644 --- a/src/test/ui/error-codes/E0620.stderr +++ b/src/test/ui/error-codes/E0620.stderr @@ -1,13 +1,13 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` --> $DIR/E0620.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead --> $DIR/E0620.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr index c9d5542ee17..fa11d7c77c0 100644 --- a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr @@ -1,28 +1,28 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 25:16... --> $DIR/E0621-does-not-trigger-for-closures.rs:25:16 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so that reference does not outlive borrowed content --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^ note: but, the lifetime must be valid for the call at 25:5... --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so type `&i32` of expression is valid during the expression --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 | -25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0622.stderr b/src/test/ui/error-codes/E0622.stderr index 9135da97825..da4d43f6041 100644 --- a/src/test/ui/error-codes/E0622.stderr +++ b/src/test/ui/error-codes/E0622.stderr @@ -1,7 +1,7 @@ error[E0622]: intrinsic must be a function --> $DIR/E0622.rs:13:5 | -13 | pub static breakpoint : unsafe extern "rust-intrinsic" fn(); +LL | pub static breakpoint : unsafe extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr index 621b82df43c..39061f9ec77 100644 --- a/src/test/ui/error-codes/E0624.stderr +++ b/src/test/ui/error-codes/E0624.stderr @@ -1,7 +1,7 @@ error[E0624]: method `method` is private --> $DIR/E0624.rs:21:9 | -21 | foo.method(); //~ ERROR method `method` is private [E0624] +LL | foo.method(); //~ ERROR method `method` is private [E0624] | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr index d035359b73a..d44a60760a7 100644 --- a/src/test/ui/error-codes/E0637.stderr +++ b/src/test/ui/error-codes/E0637.stderr @@ -1,19 +1,19 @@ error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:12:16 | -12 | struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_` +LL | struct Foo<'a: '_>(&'a u8); //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:13:12 | -13 | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_` +LL | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error[E0637]: invalid lifetime bound name: `'_` --> $DIR/E0637.rs:16:10 | -16 | impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_` +LL | impl<'a: '_> Bar<'a> { //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr index 82b0568b59a..34952dc73c2 100644 --- a/src/test/ui/error-codes/E0657.stderr +++ b/src/test/ui/error-codes/E0657.stderr @@ -1,13 +1,13 @@ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:20:31 | -20 | -> Box Id>> +LL | -> Box Id>> | ^^ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:29:35 | -29 | -> Box Id>> +LL | -> Box Id>> | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr index 461edabf5c9..b3425b59f31 100644 --- a/src/test/ui/error-codes/E0658.stderr +++ b/src/test/ui/error-codes/E0658.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'i128' (see issue #35118) --> $DIR/E0658.rs:12:13 | -12 | let _ = ::std::u128::MAX; //~ ERROR E0658 +LL | let _ = ::std::u128::MAX; //~ ERROR E0658 | ^^^^^^^^^^^^^^^^ | = help: add #![feature(i128)] to the crate attributes to enable diff --git a/src/test/ui/error-codes/E0659.stderr b/src/test/ui/error-codes/E0659.stderr index 266afa893bf..31a381a6edd 100644 --- a/src/test/ui/error-codes/E0659.stderr +++ b/src/test/ui/error-codes/E0659.stderr @@ -1,18 +1,18 @@ error[E0659]: `foo` is ambiguous --> $DIR/E0659.rs:25:5 | -25 | collider::foo(); //~ ERROR E0659 +LL | collider::foo(); //~ ERROR E0659 | ^^^^^^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/E0659.rs:20:13 | -20 | pub use moon::*; +LL | pub use moon::*; | ^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/E0659.rs:21:13 | -21 | pub use earth::*; +LL | pub use earth::*; | ^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index 35a35430fe1..231864e9655 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `y` in this scope --> $DIR/error-festival.rs:24:5 | -24 | y = 2; +LL | y = 2; | ^ did you mean `x`? error[E0603]: constant `FOO` is private --> $DIR/error-festival.rs:32:5 | -32 | foo::FOO; +LL | foo::FOO; | ^^^^^^^^ error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` --> $DIR/error-festival.rs:22:5 | -22 | x += 2; +LL | x += 2; | -^^^^^ | | | cannot use `+=` on type `&str` @@ -21,25 +21,25 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` error[E0599]: no method named `z` found for type `&str` in the current scope --> $DIR/error-festival.rs:26:7 | -26 | x.z(); +LL | x.z(); | ^ error[E0600]: cannot apply unary operator `!` to type `Question` --> $DIR/error-festival.rs:29:5 | -29 | !Question::Yes; +LL | !Question::Yes; | ^^^^^^^^^^^^^^ error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/error-festival.rs:35:5 | -35 | 0u32 as char; +LL | 0u32 as char; | ^^^^^^^^^^^^ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` --> $DIR/error-festival.rs:39:5 | -39 | x as Vec; +LL | x as Vec; | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -47,7 +47,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` error[E0054]: cannot cast as `bool` --> $DIR/error-festival.rs:43:24 | -43 | let x_is_nonzero = x as bool; +LL | let x_is_nonzero = x as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -55,19 +55,19 @@ error[E0054]: cannot cast as `bool` error[E0606]: casting `&u8` as `u32` is invalid --> $DIR/error-festival.rs:47:18 | -47 | let y: u32 = x as u32; +LL | let y: u32 = x as u32; | ^^^^^^^^ cannot cast `&u8` as `u32` | help: did you mean `*x`? --> $DIR/error-festival.rs:47:18 | -47 | let y: u32 = x as u32; +LL | let y: u32 = x as u32; | ^ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/error-festival.rs:51:5 | -51 | v as *const [u8]; +LL | v as *const [u8]; | ^^^^^^^^^^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/extern-const.stderr b/src/test/ui/extern-const.stderr index c5a3149e85a..f416f596b25 100644 --- a/src/test/ui/extern-const.stderr +++ b/src/test/ui/extern-const.stderr @@ -1,7 +1,7 @@ error: extern items cannot be `const` --> $DIR/extern-const.rs:14:5 | -14 | const C: u8; //~ ERROR extern items cannot be `const` +LL | const C: u8; //~ ERROR extern items cannot be `const` | ^^^^^ help: instead try using: `static` error: aborting due to previous error diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index cd8511426ff..383b5eb4601 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `&[i32]` as `usize` is invalid --> $DIR/fat-ptr-cast.rs:20:5 | -20 | a as usize; //~ ERROR casting +LL | a as usize; //~ ERROR casting | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -9,7 +9,7 @@ error[E0606]: casting `&[i32]` as `usize` is invalid error[E0606]: casting `&[i32]` as `isize` is invalid --> $DIR/fat-ptr-cast.rs:21:5 | -21 | a as isize; //~ ERROR casting +LL | a as isize; //~ ERROR casting | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -17,7 +17,7 @@ error[E0606]: casting `&[i32]` as `isize` is invalid error[E0606]: casting `&[i32]` as `i16` is invalid --> $DIR/fat-ptr-cast.rs:22:5 | -22 | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid +LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid | ^^^^^^^^ | = help: cast through a raw pointer first @@ -25,7 +25,7 @@ error[E0606]: casting `&[i32]` as `i16` is invalid error[E0606]: casting `&[i32]` as `u32` is invalid --> $DIR/fat-ptr-cast.rs:23:5 | -23 | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid +LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid | ^^^^^^^^ | = help: cast through a raw pointer first @@ -33,7 +33,7 @@ error[E0606]: casting `&[i32]` as `u32` is invalid error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` --> $DIR/fat-ptr-cast.rs:24:5 | -24 | b as usize; //~ ERROR non-primitive cast +LL | b as usize; //~ ERROR non-primitive cast | ^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -41,7 +41,7 @@ error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` error[E0606]: casting `*const [i32]` as `usize` is invalid --> $DIR/fat-ptr-cast.rs:25:5 | -25 | p as usize; +LL | p as usize; | ^^^^^^^^^^ | = help: cast through a thin pointer first @@ -49,19 +49,19 @@ error[E0606]: casting `*const [i32]` as `usize` is invalid error[E0607]: cannot cast thin pointer `*const i32` to fat pointer `*const [i32]` --> $DIR/fat-ptr-cast.rs:29:5 | -29 | q as *const [i32]; //~ ERROR cannot cast +LL | q as *const [i32]; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*mut Trait + 'static` is invalid --> $DIR/fat-ptr-cast.rs:32:37 | -32 | let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting +LL | let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting | ^^^^^^^^^^^ error[E0606]: casting `usize` as `*const str` is invalid --> $DIR/fat-ptr-cast.rs:33:32 | -33 | let mut fail: *const str = 0 as *const str; //~ ERROR casting +LL | let mut fail: *const str = 0 as *const str; //~ ERROR casting | ^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr index 9f8571a311d..ca55e95b914 100644 --- a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr +++ b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr @@ -1,7 +1,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi-msp430-interrupt.rs:14:1 | -14 | extern "msp430-interrupt" fn foo() {} +LL | extern "msp430-interrupt" fn foo() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-abi.stderr b/src/test/ui/feature-gate-abi.stderr index 7bef59e9b1e..c2d70cf8ec2 100644 --- a/src/test/ui/feature-gate-abi.stderr +++ b/src/test/ui/feature-gate-abi.stderr @@ -1,7 +1,7 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:19:1 | -19 | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:20:1 | -20 | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:21:1 | -21 | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:22:1 | -22 | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:23:1 | -23 | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:24:1 | -24 | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:25:1 | -25 | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:26:1 | -26 | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:30:5 | -30 | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:31:5 | -31 | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:32:5 | -32 | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:33:5 | -33 | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:34:5 | -34 | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:35:5 | -35 | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:36:5 | -36 | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:37:5 | -37 | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:39:5 | -39 | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -137,7 +137,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:40:5 | -40 | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -145,7 +145,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:41:5 | -41 | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -153,7 +153,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:42:5 | -42 | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -161,7 +161,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:43:5 | -43 | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -169,7 +169,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:44:5 | -44 | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -177,7 +177,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:45:5 | -45 | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -185,7 +185,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:46:5 | -46 | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -193,7 +193,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:53:5 | -53 | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -201,7 +201,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:54:5 | -54 | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -209,7 +209,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:55:5 | -55 | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -217,7 +217,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:56:5 | -56 | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -225,7 +225,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:57:5 | -57 | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -233,7 +233,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:58:5 | -58 | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -241,7 +241,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:59:5 | -59 | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -249,7 +249,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:60:5 | -60 | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -257,7 +257,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:65:5 | -65 | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -265,7 +265,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:66:5 | -66 | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -273,7 +273,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:67:5 | -67 | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -281,7 +281,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:68:5 | -68 | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -289,7 +289,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:69:5 | -69 | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -297,7 +297,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:70:5 | -70 | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -305,7 +305,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:71:5 | -71 | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -313,7 +313,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:72:5 | -72 | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -321,7 +321,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:76:11 | -76 | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change +LL | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -329,7 +329,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:77:11 | -77 | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental +LL | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -337,7 +337,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:78:11 | -78 | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change +LL | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -345,7 +345,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:79:11 | -79 | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change +LL | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -353,7 +353,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:80:11 | -80 | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental +LL | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -361,7 +361,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:81:11 | -81 | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change +LL | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -369,7 +369,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:82:11 | -82 | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental +LL | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -377,7 +377,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:83:11 | -83 | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change +LL | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -385,7 +385,7 @@ error[E0658]: thiscall is experimental and subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:86:1 | -86 | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -393,7 +393,7 @@ error[E0658]: intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:87:1 | -87 | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -401,7 +401,7 @@ error[E0658]: platform intrinsics are experimental and possibly buggy (see issue error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:88:1 | -88 | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -409,7 +409,7 @@ error[E0658]: vectorcall is experimental and subject to change error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:89:1 | -89 | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -417,7 +417,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:90:1 | -90 | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -425,7 +425,7 @@ error[E0658]: msp430-interrupt ABI is experimental and subject to change (see is error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:91:1 | -91 | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -433,7 +433,7 @@ error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:92:1 | -92 | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -441,7 +441,7 @@ error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:93:1 | -93 | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gate-abi_unadjusted.stderr index 62a6a2dfd99..2382b931244 100644 --- a/src/test/ui/feature-gate-abi_unadjusted.stderr +++ b/src/test/ui/feature-gate-abi_unadjusted.stderr @@ -1,9 +1,9 @@ error[E0658]: unadjusted ABI is an implementation detail and perma-unstable --> $DIR/feature-gate-abi_unadjusted.rs:11:1 | -11 | / extern "unadjusted" fn foo() { -12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable -13 | | } +LL | / extern "unadjusted" fn foo() { +LL | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable +LL | | } | |_^ | = help: add #![feature(abi_unadjusted)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-advanced-slice-features.stderr b/src/test/ui/feature-gate-advanced-slice-features.stderr index 4a6f41c453e..b589a01df17 100644 --- a/src/test/ui/feature-gate-advanced-slice-features.stderr +++ b/src/test/ui/feature-gate-advanced-slice-features.stderr @@ -1,7 +1,7 @@ error[E0658]: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) --> $DIR/feature-gate-advanced-slice-features.rs:18:9 | -18 | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches +LL | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches | ^^^^^^^^^^^^^^ | = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: multiple-element slice matches anywhere but at the end of a slice error[E0658]: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) --> $DIR/feature-gate-advanced-slice-features.rs:19:9 | -19 | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches +LL | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches | ^^^^^^^^^^^^^^ | = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gate-allocator_internals.stderr index dd06b1b7f31..53aa45e8672 100644 --- a/src/test/ui/feature-gate-allocator_internals.stderr +++ b/src/test/ui/feature-gate-allocator_internals.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[default_lib_allocator]` attribute is an experimental feature --> $DIR/feature-gate-allocator_internals.rs:11:1 | -11 | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature +LL | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr index 42789389a59..eab713ed79f 100644 --- a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr +++ b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -1,10 +1,10 @@ error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint --> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:18:9 | -18 | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps +LL | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | bar!(); +LL | bar!(); | ------- in this macro invocation | = help: add #![feature(allow_internal_unsafe)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr index 6d02a1cc57f..e2d48999be4 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -1,10 +1,10 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:18:9 | -18 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | bar!(); +LL | bar!(); | ------- in this macro invocation | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr index d5b6892e75a..115927c04cd 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-struct.rs:14:1 | -14 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gate-allow-internal-unstable.stderr index ec17a33da72..e46fce67aa9 100644 --- a/src/test/ui/feature-gate-allow-internal-unstable.stderr +++ b/src/test/ui/feature-gate-allow-internal-unstable.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable.rs:13:1 | -13 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-allow_fail.stderr b/src/test/ui/feature-gate-allow_fail.stderr index cb8c7d5d514..d73791fa780 100644 --- a/src/test/ui/feature-gate-allow_fail.stderr +++ b/src/test/ui/feature-gate-allow_fail.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_fail attribute is currently unstable (see issue #42219) --> $DIR/feature-gate-allow_fail.rs:13:1 | -13 | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable +LL | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable | ^^^^^^^^^^^^^ | = help: add #![feature(allow_fail)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr index bbb5e923452..b59c047e064 100644 --- a/src/test/ui/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr @@ -1,7 +1,7 @@ error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:14:18 | -14 | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable +LL | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: arbitrary `self` types are unstable (see issue #44874) error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:20:18 | -20 | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable +LL | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: arbitrary `self` types are unstable (see issue #44874) error[E0658]: arbitrary `self` types are unstable (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:24:18 | -24 | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable +LL | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr b/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr index e22c4bebfaf..4748ebdad21 100644 --- a/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr +++ b/src/test/ui/feature-gate-arbitrary_self_types-raw-pointer.stderr @@ -1,7 +1,7 @@ error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:19:18 | -19 | fn bar(self: *const Self); +LL | fn bar(self: *const Self); | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: raw pointer `self` is unstable (see issue #44874) error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18 | -14 | fn foo(self: *const Self) {} +LL | fn foo(self: *const Self) {} | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: raw pointer `self` is unstable (see issue #44874) error[E0658]: raw pointer `self` is unstable (see issue #44874) --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:24:18 | -24 | fn bar(self: *const Self) {} +LL | fn bar(self: *const Self) {} | ^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-asm.stderr b/src/test/ui/feature-gate-asm.stderr index 277193c07ed..68fe0a71d5a 100644 --- a/src/test/ui/feature-gate-asm.stderr +++ b/src/test/ui/feature-gate-asm.stderr @@ -1,7 +1,7 @@ error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm.rs:13:9 | -13 | asm!(""); //~ ERROR inline assembly is not stable enough +LL | asm!(""); //~ ERROR inline assembly is not stable enough | ^^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-asm2.stderr b/src/test/ui/feature-gate-asm2.stderr index 804e3d59dea..4d83ac6100e 100644 --- a/src/test/ui/feature-gate-asm2.stderr +++ b/src/test/ui/feature-gate-asm2.stderr @@ -1,7 +1,7 @@ error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm2.rs:15:24 | -15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable +LL | println!("{}", asm!("")); //~ ERROR inline assembly is not stable | ^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gate-assoc-type-defaults.stderr index 97fd18aab17..62a956d4aad 100644 --- a/src/test/ui/feature-gate-assoc-type-defaults.stderr +++ b/src/test/ui/feature-gate-assoc-type-defaults.stderr @@ -1,7 +1,7 @@ error[E0658]: associated type defaults are unstable (see issue #29661) --> $DIR/feature-gate-assoc-type-defaults.rs:14:5 | -14 | type Bar = u8; //~ ERROR associated type defaults are unstable +LL | type Bar = u8; //~ ERROR associated type defaults are unstable | ^^^^^^^^^^^^^^ | = help: add #![feature(associated_type_defaults)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box-expr.stderr b/src/test/ui/feature-gate-box-expr.stderr index a1d6d17bd4d..db025be0ab2 100644 --- a/src/test/ui/feature-gate-box-expr.stderr +++ b/src/test/ui/feature-gate-box-expr.stderr @@ -1,7 +1,7 @@ error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) --> $DIR/feature-gate-box-expr.rs:22:13 | -22 | let x = box 'c'; //~ ERROR box expression syntax is experimental +LL | let x = box 'c'; //~ ERROR box expression syntax is experimental | ^^^^^^^ | = help: add #![feature(box_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box_patterns.stderr b/src/test/ui/feature-gate-box_patterns.stderr index 7457fc27682..4e521f2519c 100644 --- a/src/test/ui/feature-gate-box_patterns.stderr +++ b/src/test/ui/feature-gate-box_patterns.stderr @@ -1,7 +1,7 @@ error[E0658]: box pattern syntax is experimental (see issue #29641) --> $DIR/feature-gate-box_patterns.rs:12:9 | -12 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental +LL | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental | ^^^^^ | = help: add #![feature(box_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-box_syntax.stderr b/src/test/ui/feature-gate-box_syntax.stderr index e3490edf9fb..8835b2cb14c 100644 --- a/src/test/ui/feature-gate-box_syntax.stderr +++ b/src/test/ui/feature-gate-box_syntax.stderr @@ -1,7 +1,7 @@ error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) --> $DIR/feature-gate-box_syntax.rs:14:13 | -14 | let x = box 3; +LL | let x = box 3; | ^^^^^ | = help: add #![feature(box_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-catch_expr.stderr b/src/test/ui/feature-gate-catch_expr.stderr index 73e9a9c896b..6d8b7f104d9 100644 --- a/src/test/ui/feature-gate-catch_expr.stderr +++ b/src/test/ui/feature-gate-catch_expr.stderr @@ -1,11 +1,11 @@ error[E0658]: `catch` expression is experimental (see issue #31436) --> $DIR/feature-gate-catch_expr.rs:12:24 | -12 | let catch_result = do catch { //~ ERROR `catch` expression is experimental +LL | let catch_result = do catch { //~ ERROR `catch` expression is experimental | ________________________^ -13 | | let x = 5; -14 | | x -15 | | }; +LL | | let x = 5; +LL | | x +LL | | }; | |_____^ | = help: add #![feature(catch_expr)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-feature.stderr b/src/test/ui/feature-gate-cfg-target-feature.stderr index 05f1a09a05b..e990c38de19 100644 --- a/src/test/ui/feature-gate-cfg-target-feature.stderr +++ b/src/test/ui/feature-gate-cfg-target-feature.stderr @@ -1,7 +1,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:12:12 | -12 | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental +LL | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:11:7 | -11 | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental +LL | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:15:19 | -15 | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental +LL | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_feature)` is experimental and subject to change (see i error[E0658]: `cfg(target_feature)` is experimental and subject to change (see issue #29717) --> $DIR/feature-gate-cfg-target-feature.rs:19:10 | -19 | cfg!(target_feature = "x"); +LL | cfg!(target_feature = "x"); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_feature)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr index 0a1332719b5..505f6b39724 100644 --- a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr +++ b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr @@ -1,7 +1,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:23:7 | -23 | #[cfg(target_has_atomic = "8")] +LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:29:7 | -29 | #[cfg(target_has_atomic = "8")] +LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:34:7 | -34 | #[cfg(target_has_atomic = "16")] +LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:39:7 | -39 | #[cfg(target_has_atomic = "16")] +LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:44:7 | -44 | #[cfg(target_has_atomic = "32")] +LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:49:7 | -49 | #[cfg(target_has_atomic = "32")] +LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:54:7 | -54 | #[cfg(target_has_atomic = "64")] +LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:59:7 | -59 | #[cfg(target_has_atomic = "64")] +LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:64:7 | -64 | #[cfg(target_has_atomic = "ptr")] +LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:69:7 | -69 | #[cfg(target_has_atomic = "ptr")] +LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:76:10 | -76 | cfg!(target_has_atomic = "8"); +LL | cfg!(target_has_atomic = "8"); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10 | -78 | cfg!(target_has_atomic = "16"); +LL | cfg!(target_has_atomic = "16"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10 | -80 | cfg!(target_has_atomic = "32"); +LL | cfg!(target_has_atomic = "32"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10 | -82 | cfg!(target_has_atomic = "64"); +LL | cfg!(target_has_atomic = "64"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (se error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10 | -84 | cfg!(target_has_atomic = "ptr"); +LL | cfg!(target_has_atomic = "ptr"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-thread-local.stderr b/src/test/ui/feature-gate-cfg-target-thread-local.stderr index 27126894749..a6af55b1b26 100644 --- a/src/test/ui/feature-gate-cfg-target-thread-local.stderr +++ b/src/test/ui/feature-gate-cfg-target-thread-local.stderr @@ -1,7 +1,7 @@ error[E0658]: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) --> $DIR/feature-gate-cfg-target-thread-local.rs:19:16 | -19 | #[cfg_attr(target_thread_local, thread_local)] +LL | #[cfg_attr(target_thread_local, thread_local)] | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-cfg-target-vendor.stderr b/src/test/ui/feature-gate-cfg-target-vendor.stderr index ff563978402..f19a2b7997a 100644 --- a/src/test/ui/feature-gate-cfg-target-vendor.stderr +++ b/src/test/ui/feature-gate-cfg-target-vendor.stderr @@ -1,7 +1,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:12:12 | -12 | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental +LL | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:11:7 | -11 | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental +LL | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:15:19 | -15 | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental +LL | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see is error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) --> $DIR/feature-gate-cfg-target-vendor.rs:19:10 | -19 | cfg!(target_vendor = "x"); +LL | cfg!(target_vendor = "x"); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-clone-closures.stderr b/src/test/ui/feature-gate-clone-closures.stderr index de0d3c36114..2b594f7faf3 100644 --- a/src/test/ui/feature-gate-clone-closures.stderr +++ b/src/test/ui/feature-gate-clone-closures.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `clone` found for type `[closure@$DIR/feature-gate-clone-closures.rs:16:17: 18:6 a:_]` in the current scope --> $DIR/feature-gate-clone-closures.rs:20:23 | -20 | let hello = hello.clone(); //~ ERROR no method named `clone` found for type +LL | let hello = hello.clone(); //~ ERROR no method named `clone` found for type | ^^^^^ | = note: hello is a function, perhaps you wish to call it diff --git a/src/test/ui/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gate-compiler-builtins.stderr index ee4e33f4005..3f8ef665d7a 100644 --- a/src/test/ui/feature-gate-compiler-builtins.stderr +++ b/src/test/ui/feature-gate-compiler-builtins.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable --> $DIR/feature-gate-compiler-builtins.rs:11:1 | -11 | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is +LL | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(compiler_builtins)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents.stderr b/src/test/ui/feature-gate-concat_idents.stderr index cec3ed47607..05e2e33e191 100644 --- a/src/test/ui/feature-gate-concat_idents.stderr +++ b/src/test/ui/feature-gate-concat_idents.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:15:13 | -15 | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable +LL | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to cha error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:16:13 | -16 | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable +LL | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gate-concat_idents2.stderr index 0d39479ba8f..548e7dbdcca 100644 --- a/src/test/ui/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gate-concat_idents2.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents2.rs:14:5 | -14 | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough +LL | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gate-concat_idents3.stderr index 2c4ed467ab4..2f5411fa7a5 100644 --- a/src/test/ui/feature-gate-concat_idents3.stderr +++ b/src/test/ui/feature-gate-concat_idents3.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:17:20 | -17 | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable +LL | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to cha error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:18:20 | -18 | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable +LL | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-conservative_impl_trait.stderr b/src/test/ui/feature-gate-conservative_impl_trait.stderr index 1448bad3d18..68cd1344680 100644 --- a/src/test/ui/feature-gate-conservative_impl_trait.stderr +++ b/src/test/ui/feature-gate-conservative_impl_trait.stderr @@ -1,7 +1,7 @@ error[E0658]: `impl Trait` in return position is experimental (see issue #34511) --> $DIR/feature-gate-conservative_impl_trait.rs:11:13 | -11 | fn foo() -> impl Fn() { || {} } +LL | fn foo() -> impl Fn() { || {} } | ^^^^^^^^^ | = help: add #![feature(conservative_impl_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-const-indexing.stderr b/src/test/ui/feature-gate-const-indexing.stderr index 18b855d6b4f..419400bb0ac 100644 --- a/src/test/ui/feature-gate-const-indexing.stderr +++ b/src/test/ui/feature-gate-const-indexing.stderr @@ -1,7 +1,7 @@ error[E0080]: constant evaluation error --> $DIR/feature-gate-const-indexing.rs:16:24 | -16 | const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error +LL | const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error | ^^^^^^ the index operation on const values is unstable error: aborting due to previous error diff --git a/src/test/ui/feature-gate-const_fn.stderr b/src/test/ui/feature-gate-const_fn.stderr index 9c22f89a7ef..09d377c0ace 100644 --- a/src/test/ui/feature-gate-const_fn.stderr +++ b/src/test/ui/feature-gate-const_fn.stderr @@ -1,25 +1,25 @@ error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:16:5 | -16 | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:18:5 | -18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:27:5 | -27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^ trait fns cannot be const error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:13:1 | -13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable +LL | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -27,7 +27,7 @@ error[E0658]: const fn is unstable (see issue #24111) error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:16:5 | -16 | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -35,7 +35,7 @@ error[E0658]: const fn is unstable (see issue #24111) error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:18:5 | -18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -43,7 +43,7 @@ error[E0658]: const fn is unstable (see issue #24111) error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:23:5 | -23 | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -51,7 +51,7 @@ error[E0658]: const fn is unstable (see issue #24111) error[E0658]: const fn is unstable (see issue #24111) --> $DIR/feature-gate-const_fn.rs:27:5 | -27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-copy-closures.stderr b/src/test/ui/feature-gate-copy-closures.stderr index 2604d8bb53d..b06ada02238 100644 --- a/src/test/ui/feature-gate-copy-closures.stderr +++ b/src/test/ui/feature-gate-copy-closures.stderr @@ -1,9 +1,9 @@ error[E0382]: use of moved value: `hello` --> $DIR/feature-gate-copy-closures.rs:18:9 | -17 | let b = hello; +LL | let b = hello; | - value moved here -18 | let c = hello; //~ ERROR use of moved value: `hello` [E0382] +LL | let c = hello; //~ ERROR use of moved value: `hello` [E0382] | ^ value used here after move | = note: move occurs because `hello` has type `[closure@$DIR/feature-gate-copy-closures.rs:13:17: 15:6 a:&i32]`, which does not implement the `Copy` trait diff --git a/src/test/ui/feature-gate-crate_in_paths.stderr b/src/test/ui/feature-gate-crate_in_paths.stderr index 0c080934446..21ae346e9c8 100644 --- a/src/test/ui/feature-gate-crate_in_paths.stderr +++ b/src/test/ui/feature-gate-crate_in_paths.stderr @@ -1,7 +1,7 @@ error[E0658]: `crate` in paths is experimental (see issue #45477) --> $DIR/feature-gate-crate_in_paths.rs:14:15 | -14 | let _ = ::crate::S; //~ ERROR `crate` in paths is experimental +LL | let _ = ::crate::S; //~ ERROR `crate` in paths is experimental | ^^^^^ | = help: add #![feature(crate_in_paths)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gate-crate_visibility_modifier.stderr index ede92642f75..e5e7c8c7420 100644 --- a/src/test/ui/feature-gate-crate_visibility_modifier.stderr +++ b/src/test/ui/feature-gate-crate_visibility_modifier.stderr @@ -1,7 +1,7 @@ error[E0658]: `crate` visibility modifier is experimental (see issue #45388) --> $DIR/feature-gate-crate_visibility_modifier.rs:11:1 | -11 | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental +LL | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental | ^^^^^ | = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gate-custom_attribute.stderr index 3652834ce8e..dd428e89ea2 100644 --- a/src/test/ui/feature-gate-custom_attribute.stderr +++ b/src/test/ui/feature-gate-custom_attribute.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:17:1 | -17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:18:1 | -18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:19:1 | -19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:20:1 | -20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:21:1 | -21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:22:1 | -22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:23:1 | -23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:24:1 | -24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:25:1 | -25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:26:1 | -26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:27:1 | -27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:28:1 | -28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:29:1 | -29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown +LL | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gate-custom_attribute2.stderr index fdc26a6c0e3..29cde7042f6 100644 --- a/src/test/ui/feature-gate-custom_attribute2.stderr +++ b/src/test/ui/feature-gate-custom_attribute2.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:23:13 | -23 | struct StLt<#[lt_struct] 'a>(&'a u32); +LL | struct StLt<#[lt_struct] 'a>(&'a u32); | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:25:13 | -25 | struct StTy<#[ty_struct] I>(I); +LL | struct StTy<#[ty_struct] I>(I); | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:28:11 | -28 | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } +LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and m error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:30:11 | -30 | enum EnTy<#[ty_enum] J> { A(J), B } +LL | enum EnTy<#[ty_enum] J> { A(J), B } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and m error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:33:12 | -33 | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } +LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:35:12 | -35 | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } +LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and error[E0658]: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:38:11 | -38 | type TyLt<#[lt_type] 'd> = &'d u32; +LL | type TyLt<#[lt_type] 'd> = &'d u32; | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: The attribute `lt_type` is currently unknown to the compiler and m error[E0658]: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:40:11 | -40 | type TyTy<#[ty_type] L> = (L, ); +LL | type TyTy<#[ty_type] L> = (L, ); | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: The attribute `ty_type` is currently unknown to the compiler and m error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:43:6 | -43 | impl<#[lt_inherent] 'e> StLt<'e> { } +LL | impl<#[lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler a error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:45:6 | -45 | impl<#[ty_inherent] M> StTy { } +LL | impl<#[ty_inherent] M> StTy { } | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler a error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:48:6 | -48 | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { +LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler a error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:52:6 | -52 | impl<#[ty_impl_for] N> TrTy for StTy { +LL | impl<#[ty_impl_for] N> TrTy for StTy { | ^^^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler a error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:57:9 | -57 | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } +LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:59:9 | -59 | fn f_ty<#[ty_fn] O>(_: O) { } +LL | fn f_ty<#[ty_fn] O>(_: O) { } | ^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:63:13 | -63 | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } +LL | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and m error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:65:13 | -65 | fn m_ty<#[ty_meth] P>(_: P) { } +LL | fn m_ty<#[ty_meth] P>(_: P) { } | ^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and m error[E0658]: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute2.rs:70:19 | -70 | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 +LL | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-custom_derive.stderr b/src/test/ui/feature-gate-custom_derive.stderr index 20168ba0e5a..18c8a081b23 100644 --- a/src/test/ui/feature-gate-custom_derive.stderr +++ b/src/test/ui/feature-gate-custom_derive.stderr @@ -1,7 +1,7 @@ error[E0658]: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644) --> $DIR/feature-gate-custom_derive.rs:11:1 | -11 | #[derive_Clone] +LL | #[derive_Clone] | ^^^^^^^^^^^^^^^ | = help: add #![feature(custom_derive)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-decl_macro.stderr b/src/test/ui/feature-gate-decl_macro.stderr index 37fbd9fa270..6438e81610e 100644 --- a/src/test/ui/feature-gate-decl_macro.stderr +++ b/src/test/ui/feature-gate-decl_macro.stderr @@ -1,7 +1,7 @@ error[E0658]: `macro` is experimental (see issue #39412) --> $DIR/feature-gate-decl_macro.rs:13:1 | -13 | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) +LL | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) | ^^^^^^^^^^^^ | = help: add #![feature(decl_macro)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr index d756a69e8c1..134bf29d2aa 100644 --- a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr @@ -1,7 +1,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. --> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8 | -13 | fn avg(_: T) {} +LL | fn avg(_: T) {} | ^ | = note: #[deny(invalid_type_param_default)] on by default @@ -11,7 +11,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type` error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. --> $DIR/feature-gate-default_type_parameter_fallback.rs:18:6 | -18 | impl S {} +LL | impl S {} | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gate-doc_cfg.stderr index df9da6b7a2c..0eaaab03eb5 100644 --- a/src/test/ui/feature-gate-doc_cfg.stderr +++ b/src/test/ui/feature-gate-doc_cfg.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(cfg(...))] is experimental (see issue #43781) --> $DIR/feature-gate-doc_cfg.rs:11:1 | -11 | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental +LL | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-doc_masked.stderr b/src/test/ui/feature-gate-doc_masked.stderr index 1aef2aea33a..f8885587115 100644 --- a/src/test/ui/feature-gate-doc_masked.stderr +++ b/src/test/ui/feature-gate-doc_masked.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(masked)] is experimental (see issue #44027) --> $DIR/feature-gate-doc_masked.rs:11:1 | -11 | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental +LL | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental | ^^^^^^^^^^^^^^ | = help: add #![feature(doc_masked)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gate-doc_spotlight.stderr index 7a23eeee44c..ed69f7edf0b 100644 --- a/src/test/ui/feature-gate-doc_spotlight.stderr +++ b/src/test/ui/feature-gate-doc_spotlight.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(spotlight)] is experimental (see issue #45040) --> $DIR/feature-gate-doc_spotlight.rs:11:1 | -11 | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental +LL | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_spotlight)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr index 2796686fe41..ef88d3307d2 100644 --- a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr +++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr @@ -1,7 +1,7 @@ error[E0658]: `..=` syntax in patterns is experimental (see issue #28237) --> $DIR/feature-gate-dotdoteq_in_patterns.rs:13:9 | -13 | 0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental +LL | 0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental | ^^^^^^^ | = help: add #![feature(dotdoteq_in_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dropck-ugeh-2.stderr b/src/test/ui/feature-gate-dropck-ugeh-2.stderr index 0555b485d4c..80d81ea03cb 100644 --- a/src/test/ui/feature-gate-dropck-ugeh-2.stderr +++ b/src/test/ui/feature-gate-dropck-ugeh-2.stderr @@ -1,13 +1,13 @@ error: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761 --> $DIR/feature-gate-dropck-ugeh-2.rs:17:5 | -17 | #[unsafe_destructor_blind_to_params] +LL | #[unsafe_destructor_blind_to_params] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | note: lint level defined here --> $DIR/feature-gate-dropck-ugeh-2.rs:11:9 | -11 | #![deny(deprecated)] +LL | #![deny(deprecated)] | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gate-dropck-ugeh.stderr index d6af01c1a9b..c200de76615 100644 --- a/src/test/ui/feature-gate-dropck-ugeh.stderr +++ b/src/test/ui/feature-gate-dropck-ugeh.stderr @@ -1,7 +1,7 @@ error[E0658]: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) --> $DIR/feature-gate-dropck-ugeh.rs:29:5 | -29 | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute +LL | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(dropck_parametricity)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr index ad744c0257c..d8db0bd5536 100644 --- a/src/test/ui/feature-gate-dyn-trait.stderr +++ b/src/test/ui/feature-gate-dyn-trait.stderr @@ -1,7 +1,7 @@ error[E0658]: `dyn Trait` syntax is unstable (see issue #44662) --> $DIR/feature-gate-dyn-trait.rs:12:14 | -12 | type A = Box; //~ ERROR `dyn Trait` syntax is unstable +LL | type A = Box; //~ ERROR `dyn Trait` syntax is unstable | ^^^^^^^^^ | = help: add #![feature(dyn_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gate-exclusive-range-pattern.stderr index e11791dcdf0..5a5ecb698a4 100644 --- a/src/test/ui/feature-gate-exclusive-range-pattern.stderr +++ b/src/test/ui/feature-gate-exclusive-range-pattern.stderr @@ -1,7 +1,7 @@ error[E0658]: exclusive range pattern syntax is experimental (see issue #37854) --> $DIR/feature-gate-exclusive-range-pattern.rs:13:9 | -13 | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental +LL | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental | ^^^^^^ | = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-extern_absolute_paths.stderr b/src/test/ui/feature-gate-extern_absolute_paths.stderr index 5e01782f2d4..730cfb9747b 100644 --- a/src/test/ui/feature-gate-extern_absolute_paths.stderr +++ b/src/test/ui/feature-gate-extern_absolute_paths.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `core` --> $DIR/feature-gate-extern_absolute_paths.rs:11:5 | -11 | use core::default; //~ ERROR unresolved import `core` +LL | use core::default; //~ ERROR unresolved import `core` | ^^^^ Maybe a missing `extern crate core;`? error[E0433]: failed to resolve. Maybe a missing `extern crate core;`? --> $DIR/feature-gate-extern_absolute_paths.rs:14:19 | -14 | let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve +LL | let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve | ^^^^ Maybe a missing `extern crate core;`? error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-extern_in_paths.stderr b/src/test/ui/feature-gate-extern_in_paths.stderr index 82228e40f0b..11387e81de2 100644 --- a/src/test/ui/feature-gate-extern_in_paths.stderr +++ b/src/test/ui/feature-gate-extern_in_paths.stderr @@ -1,7 +1,7 @@ error[E0658]: `extern` in paths is experimental (see issue #44660) --> $DIR/feature-gate-extern_in_paths.rs:14:13 | -14 | let _ = extern::std::vec::Vec::new(); //~ ERROR `extern` in paths is experimental +LL | let _ = extern::std::vec::Vec::new(); //~ ERROR `extern` in paths is experimental | ^^^^^^ | = help: add #![feature(extern_in_paths)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-extern_types.stderr b/src/test/ui/feature-gate-extern_types.stderr index c826ad637c4..6dabd6ab4a4 100644 --- a/src/test/ui/feature-gate-extern_types.stderr +++ b/src/test/ui/feature-gate-extern_types.stderr @@ -1,7 +1,7 @@ error[E0658]: extern types are experimental (see issue #43467) --> $DIR/feature-gate-extern_types.rs:12:5 | -12 | type T; //~ ERROR extern types are experimental +LL | type T; //~ ERROR extern types are experimental | ^^^^^^^ | = help: add #![feature(extern_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-external_doc.stderr b/src/test/ui/feature-gate-external_doc.stderr index 43d68c85b2e..0582548b5ba 100644 --- a/src/test/ui/feature-gate-external_doc.stderr +++ b/src/test/ui/feature-gate-external_doc.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(include = "...")] is experimental (see issue #44732) --> $DIR/feature-gate-external_doc.rs:11:1 | -11 | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental +LL | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(external_doc)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-feature-gate.stderr b/src/test/ui/feature-gate-feature-gate.stderr index 3d5f0d70bb2..256cf47c120 100644 --- a/src/test/ui/feature-gate-feature-gate.stderr +++ b/src/test/ui/feature-gate-feature-gate.stderr @@ -1,13 +1,13 @@ error: unstable feature --> $DIR/feature-gate-feature-gate.rs:12:12 | -12 | #![feature(intrinsics)] //~ ERROR unstable feature +LL | #![feature(intrinsics)] //~ ERROR unstable feature | ^^^^^^^^^^ | note: lint level defined here --> $DIR/feature-gate-feature-gate.rs:11:11 | -11 | #![forbid(unstable_features)] +LL | #![forbid(unstable_features)] | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr index 9b16e9be68a..a9952ff4fac 100644 --- a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr +++ b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr @@ -1,6 +1,6 @@ error: compilation successful --> $DIR/feature-gate-fn_must_use-cap-lints-allow.rs:22:1 | -22 | fn main() {} //~ ERROR compilation successful +LL | fn main() {} //~ ERROR compilation successful | ^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-fn_must_use.stderr b/src/test/ui/feature-gate-fn_must_use.stderr index ed4953d27b8..4772cf28f6c 100644 --- a/src/test/ui/feature-gate-fn_must_use.stderr +++ b/src/test/ui/feature-gate-fn_must_use.stderr @@ -1,7 +1,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) --> $DIR/feature-gate-fn_must_use.rs:16:5 | -16 | #[must_use] //~ WARN `#[must_use]` on methods is experimental +LL | #[must_use] //~ WARN `#[must_use]` on methods is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -9,7 +9,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) warning: `#[must_use]` on functions is experimental (see issue #43302) --> $DIR/feature-gate-fn_must_use.rs:20:1 | -20 | #[must_use] //~ WARN `#[must_use]` on functions is experimental +LL | #[must_use] //~ WARN `#[must_use]` on functions is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -17,6 +17,6 @@ warning: `#[must_use]` on functions is experimental (see issue #43302) error: compilation successful --> $DIR/feature-gate-fn_must_use.rs:31:1 | -31 | fn main() {} //~ ERROR compilation successful +LL | fn main() {} //~ ERROR compilation successful | ^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-fundamental.stderr b/src/test/ui/feature-gate-fundamental.stderr index 84a196e7178..2e91f1abbbd 100644 --- a/src/test/ui/feature-gate-fundamental.stderr +++ b/src/test/ui/feature-gate-fundamental.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[fundamental]` attribute is an experimental feature (see issue #29635) --> $DIR/feature-gate-fundamental.rs:11:1 | -11 | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature +LL | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature | ^^^^^^^^^^^^^^ | = help: add #![feature(fundamental)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generators.stderr b/src/test/ui/feature-gate-generators.stderr index 7991ff18662..ec7aad53b76 100644 --- a/src/test/ui/feature-gate-generators.stderr +++ b/src/test/ui/feature-gate-generators.stderr @@ -1,7 +1,7 @@ error[E0658]: yield syntax is experimental --> $DIR/feature-gate-generators.rs:12:5 | -12 | yield true; //~ ERROR yield syntax is experimental +LL | yield true; //~ ERROR yield syntax is experimental | ^^^^^^^^^^ | = help: add #![feature(generators)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr index 9d5d05d9aa3..f545da0be96 100644 --- a/src/test/ui/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gate-generic_associated_types.stderr @@ -1,7 +1,7 @@ error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:14:5 | -14 | type Pointer: Deref; +LL | type Pointer: Deref; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: generic associated types are unstable (see issue #44265) error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:16:5 | -16 | type Pointer2: Deref where T: Clone, U: Clone; +LL | type Pointer2: Deref where T: Clone, U: Clone; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: generic associated types are unstable (see issue #44265) error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:22:5 | -22 | type Pointer = Box; +LL | type Pointer = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: generic associated types are unstable (see issue #44265) error[E0658]: generic associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:24:5 | -24 | type Pointer2 = Box; +LL | type Pointer2 = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-generic_param_attrs.stderr b/src/test/ui/feature-gate-generic_param_attrs.stderr index 561037217d7..2d05d96549c 100644 --- a/src/test/ui/feature-gate-generic_param_attrs.stderr +++ b/src/test/ui/feature-gate-generic_param_attrs.stderr @@ -1,7 +1,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:22:13 | -22 | struct StLt<#[rustc_lt_struct] 'a>(&'a u32); +LL | struct StLt<#[rustc_lt_struct] 'a>(&'a u32); | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:24:13 | -24 | struct StTy<#[rustc_ty_struct] I>(I); +LL | struct StTy<#[rustc_ty_struct] I>(I); | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:27:11 | -27 | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B } +LL | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:29:11 | -29 | enum EnTy<#[rustc_ty_enum] J> { A(J), B } +LL | enum EnTy<#[rustc_ty_enum] J> { A(J), B } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:32:12 | -32 | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } +LL | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -41,7 +41,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:34:12 | -34 | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); } +LL | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -49,7 +49,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:37:11 | -37 | type TyLt<#[rustc_lt_type] 'd> = &'d u32; +LL | type TyLt<#[rustc_lt_type] 'd> = &'d u32; | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -57,7 +57,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:39:11 | -39 | type TyTy<#[rustc_ty_type] L> = (L, ); +LL | type TyTy<#[rustc_ty_type] L> = (L, ); | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -65,7 +65,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:42:6 | -42 | impl<#[rustc_lt_inherent] 'e> StLt<'e> { } +LL | impl<#[rustc_lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -73,7 +73,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:44:6 | -44 | impl<#[rustc_ty_inherent] M> StTy { } +LL | impl<#[rustc_ty_inherent] M> StTy { } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -81,7 +81,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:47:6 | -47 | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> { +LL | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -89,7 +89,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:51:6 | -51 | impl<#[rustc_ty_impl_for] N> TrTy for StTy { +LL | impl<#[rustc_ty_impl_for] N> TrTy for StTy { | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -97,7 +97,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:56:9 | -56 | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } +LL | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -105,7 +105,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:58:9 | -58 | fn f_ty<#[rustc_ty_fn] O>(_: O) { } +LL | fn f_ty<#[rustc_ty_fn] O>(_: O) { } | ^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -113,7 +113,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:62:13 | -62 | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } +LL | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -121,7 +121,7 @@ error[E0658]: attributes on lifetime bindings are experimental (see issue #34761 error[E0658]: attributes on type parameter bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:64:13 | -64 | fn m_ty<#[rustc_ty_meth] P>(_: P) { } +LL | fn m_ty<#[rustc_ty_meth] P>(_: P) { } | ^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable @@ -129,7 +129,7 @@ error[E0658]: attributes on type parameter bindings are experimental (see issue error[E0658]: attributes on lifetime bindings are experimental (see issue #34761) --> $DIR/feature-gate-generic_param_attrs.rs:69:19 | -69 | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 +LL | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^^^^^^^^^^ | = help: add #![feature(generic_param_attrs)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-global_allocator.stderr b/src/test/ui/feature-gate-global_allocator.stderr index 9e0c1577a92..400af3a33bd 100644 --- a/src/test/ui/feature-gate-global_allocator.stderr +++ b/src/test/ui/feature-gate-global_allocator.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[global_allocator]` attribute is an experimental feature --> $DIR/feature-gate-global_allocator.rs:11:1 | -11 | #[global_allocator] //~ ERROR: attribute is an experimental feature +LL | #[global_allocator] //~ ERROR: attribute is an experimental feature | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(global_allocator)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-global_asm.stderr b/src/test/ui/feature-gate-global_asm.stderr index 72a0729a2eb..b506a8e60d7 100644 --- a/src/test/ui/feature-gate-global_asm.stderr +++ b/src/test/ui/feature-gate-global_asm.stderr @@ -1,7 +1,7 @@ error[E0658]: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) --> $DIR/feature-gate-global_asm.rs:11:1 | -11 | global_asm!(""); //~ ERROR `global_asm!` is not stable +LL | global_asm!(""); //~ ERROR `global_asm!` is not stable | ^^^^^^^^^^^^^^^^ | = help: add #![feature(global_asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-i128_type.stderr b/src/test/ui/feature-gate-i128_type.stderr index c87852f6352..31802ff350a 100644 --- a/src/test/ui/feature-gate-i128_type.stderr +++ b/src/test/ui/feature-gate-i128_type.stderr @@ -1,7 +1,7 @@ error[E0658]: 128-bit integers are not stable (see issue #35118) --> $DIR/feature-gate-i128_type.rs:12:5 | -12 | 0i128; //~ ERROR 128-bit integers are not stable +LL | 0i128; //~ ERROR 128-bit integers are not stable | ^^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 128-bit integers are not stable (see issue #35118) error[E0658]: 128-bit integers are not stable (see issue #35118) --> $DIR/feature-gate-i128_type.rs:16:5 | -16 | 0u128; //~ ERROR 128-bit integers are not stable +LL | 0u128; //~ ERROR 128-bit integers are not stable | ^^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr index 76f50579f28..e3a7cf06cdf 100644 --- a/src/test/ui/feature-gate-i128_type2.stderr +++ b/src/test/ui/feature-gate-i128_type2.stderr @@ -1,7 +1,7 @@ error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:13:15 | -13 | fn test1() -> i128 { //~ ERROR 128-bit type is unstable +LL | fn test1() -> i128 { //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: 128-bit type is unstable (see issue #35118) error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:17:17 | -17 | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable +LL | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: 128-bit type is unstable (see issue #35118) error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:22:12 | -22 | let x: i128 = 0; //~ ERROR 128-bit type is unstable +LL | let x: i128 = 0; //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: 128-bit type is unstable (see issue #35118) error[E0658]: 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:26:12 | -26 | let x: u128 = 0; //~ ERROR 128-bit type is unstable +LL | let x: u128 = 0; //~ ERROR 128-bit type is unstable | ^^^^ | = help: add #![feature(i128_type)] to the crate attributes to enable @@ -35,9 +35,9 @@ error[E0601]: main function not found error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-i128_type2.rs:30:1 | -30 | / enum A { //~ ERROR 128-bit type is unstable -31 | | A(u64) -32 | | } +LL | / enum A { //~ ERROR 128-bit type is unstable +LL | | A(u64) +LL | | } | |_^ | = help: add #![feature(repr128)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-if_while_or_patterns.stderr b/src/test/ui/feature-gate-if_while_or_patterns.stderr index d9ebdcee0e9..6096804190e 100644 --- a/src/test/ui/feature-gate-if_while_or_patterns.stderr +++ b/src/test/ui/feature-gate-if_while_or_patterns.stderr @@ -1,9 +1,9 @@ error[E0658]: multiple patterns in `if let` and `while let` are unstable (see issue #48215) --> $DIR/feature-gate-if_while_or_patterns.rs:12:5 | -12 | / if let 0 | 1 = 0 { //~ ERROR multiple patterns in `if let` and `while let` are unstable -13 | | ; -14 | | } +LL | / if let 0 | 1 = 0 { //~ ERROR multiple patterns in `if let` and `while let` are unstable +LL | | ; +LL | | } | |_____^ | = help: add #![feature(if_while_or_patterns)] to the crate attributes to enable @@ -11,9 +11,9 @@ error[E0658]: multiple patterns in `if let` and `while let` are unstable (see is error[E0658]: multiple patterns in `if let` and `while let` are unstable (see issue #48215) --> $DIR/feature-gate-if_while_or_patterns.rs:15:5 | -15 | / while let 0 | 1 = 1 { //~ ERROR multiple patterns in `if let` and `while let` are unstable -16 | | break; -17 | | } +LL | / while let 0 | 1 = 1 { //~ ERROR multiple patterns in `if let` and `while let` are unstable +LL | | break; +LL | | } | |_____^ | = help: add #![feature(if_while_or_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gate-in_band_lifetimes.stderr index d39d568741e..2b72d13ae5e 100644 --- a/src/test/ui/feature-gate-in_band_lifetimes.stderr +++ b/src/test/ui/feature-gate-in_band_lifetimes.stderr @@ -1,103 +1,103 @@ error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:13:12 | -13 | fn foo(x: &'x u8) -> &'x u8 { x } +LL | fn foo(x: &'x u8) -> &'x u8 { x } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:13:23 | -13 | fn foo(x: &'x u8) -> &'x u8 { x } +LL | fn foo(x: &'x u8) -> &'x u8 { x } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:25:12 | -25 | impl<'a> X<'b> { +LL | impl<'a> X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:27:27 | -27 | fn inner_2(&self) -> &'b u8 { +LL | fn inner_2(&self) -> &'b u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:33:8 | -33 | impl X<'b> { +LL | impl X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:35:27 | -35 | fn inner_3(&self) -> &'b u8 { +LL | fn inner_3(&self) -> &'b u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:43:9 | -43 | impl Y<&'a u8> { +LL | impl Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:45:25 | -45 | fn inner(&self) -> &'a u8 { +LL | fn inner(&self) -> &'a u8 { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:53:27 | -53 | fn any_lifetime() -> &'b u8; +LL | fn any_lifetime() -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 | -55 | fn borrowed_lifetime(&'b self) -> &'b u8; +LL | fn borrowed_lifetime(&'b self) -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:55:40 | -55 | fn borrowed_lifetime(&'b self) -> &'b u8; +LL | fn borrowed_lifetime(&'b self) -> &'b u8; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:60:14 | -60 | impl MyTrait<'a> for Y<&'a u8> { +LL | impl MyTrait<'a> for Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:60:25 | -60 | impl MyTrait<'a> for Y<&'a u8> { +LL | impl MyTrait<'a> for Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/feature-gate-in_band_lifetimes.rs:63:31 | -63 | fn my_lifetime(&self) -> &'a u8 { self.0 } +LL | fn my_lifetime(&self) -> &'a u8 { self.0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:65:27 | -65 | fn any_lifetime() -> &'b u8 { &0 } +LL | fn any_lifetime() -> &'b u8 { &0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:67:27 | -67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:67:40 | -67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } | ^^ undeclared lifetime error: aborting due to 17 previous errors diff --git a/src/test/ui/feature-gate-intrinsics.stderr b/src/test/ui/feature-gate-intrinsics.stderr index 16a2099955c..bd8774a0941 100644 --- a/src/test/ui/feature-gate-intrinsics.stderr +++ b/src/test/ui/feature-gate-intrinsics.stderr @@ -1,9 +1,9 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:11:1 | -11 | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change -12 | | fn bar(); -13 | | } +LL | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change +LL | | fn bar(); +LL | | } | |_^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -11,8 +11,8 @@ error[E0658]: intrinsics are subject to change error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:15:1 | -15 | / extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change -16 | | } +LL | / extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change +LL | | } | |_^ | = help: add #![feature(intrinsics)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-lang-items.stderr b/src/test/ui/feature-gate-lang-items.stderr index 31c1c46734c..3c7000447d9 100644 --- a/src/test/ui/feature-gate-lang-items.stderr +++ b/src/test/ui/feature-gate-lang-items.stderr @@ -1,7 +1,7 @@ error[E0658]: language items are subject to change --> $DIR/feature-gate-lang-items.rs:11:1 | -11 | #[lang="foo"] //~ ERROR language items are subject to change +LL | #[lang="foo"] //~ ERROR language items are subject to change | ^^^^^^^^^^^^^ | = help: add #![feature(lang_items)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_args.stderr b/src/test/ui/feature-gate-link_args.stderr index b098a4377fe..dbf5086d02a 100644 --- a/src/test/ui/feature-gate-link_args.stderr +++ b/src/test/ui/feature-gate-link_args.stderr @@ -1,7 +1,7 @@ error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:22:1 | -22 | #[link_args = "-l expected_use_case"] +LL | #[link_args = "-l expected_use_case"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `link_args` attribute is experimental and not portable across error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:26:1 | -26 | #[link_args = "-l unexected_use_on_non_extern_item"] +LL | #[link_args = "-l unexected_use_on_non_extern_item"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: the `link_args` attribute is experimental and not portable across error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) --> $DIR/feature-gate-link_args.rs:19:1 | -19 | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] +LL | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_args)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_cfg.stderr b/src/test/ui/feature-gate-link_cfg.stderr index 796c0a0d283..91c3a7a21a2 100644 --- a/src/test/ui/feature-gate-link_cfg.stderr +++ b/src/test/ui/feature-gate-link_cfg.stderr @@ -1,7 +1,7 @@ error[E0658]: is feature gated (see issue #37406) --> $DIR/feature-gate-link_cfg.rs:11:1 | -11 | #[link(name = "foo", cfg(foo))] +LL | #[link(name = "foo", cfg(foo))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr index 28a57bcdfef..4072ce3cefb 100644 --- a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr +++ b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr @@ -1,7 +1,7 @@ error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602) --> $DIR/feature-gate-link_llvm_intrinsics.rs:13:5 | -13 | fn sqrt(x: f32) -> f32; +LL | fn sqrt(x: f32) -> f32; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-linkage.stderr b/src/test/ui/feature-gate-linkage.stderr index 008ccecc4fd..a598ca97aee 100644 --- a/src/test/ui/feature-gate-linkage.stderr +++ b/src/test/ui/feature-gate-linkage.stderr @@ -1,7 +1,7 @@ error[E0658]: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) --> $DIR/feature-gate-linkage.rs:12:5 | -12 | #[linkage = "extern_weak"] static foo: isize; +LL | #[linkage = "extern_weak"] static foo: isize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(linkage)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-linker-flavor.stderr b/src/test/ui/feature-gate-linker-flavor.stderr index dd773465ceb..d2f124397cc 100644 --- a/src/test/ui/feature-gate-linker-flavor.stderr +++ b/src/test/ui/feature-gate-linker-flavor.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-linker-flavor.rs:16:1 | -16 | #[used] +LL | #[used] | ^^^^^^^ | = help: add #![feature(used)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-log_syntax.stderr b/src/test/ui/feature-gate-log_syntax.stderr index d0c8f601b27..070fe99512e 100644 --- a/src/test/ui/feature-gate-log_syntax.stderr +++ b/src/test/ui/feature-gate-log_syntax.stderr @@ -1,7 +1,7 @@ error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax.rs:12:5 | -12 | log_syntax!() //~ ERROR `log_syntax!` is not stable enough +LL | log_syntax!() //~ ERROR `log_syntax!` is not stable enough | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gate-log_syntax2.stderr index 652f32448e2..8aedddcc886 100644 --- a/src/test/ui/feature-gate-log_syntax2.stderr +++ b/src/test/ui/feature-gate-log_syntax2.stderr @@ -1,7 +1,7 @@ error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax2.rs:14:20 | -14 | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable +LL | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr index 4693110d471..0e0977b2d1a 100644 --- a/src/test/ui/feature-gate-macro-lifetime-matcher.stderr +++ b/src/test/ui/feature-gate-macro-lifetime-matcher.stderr @@ -1,7 +1,7 @@ error[E0658]: :lifetime fragment specifier is experimental and subject to change (see issue #46895) --> $DIR/feature-gate-macro-lifetime-matcher.rs:14:19 | -14 | macro_rules! m { ($lt:lifetime) => {} } +LL | macro_rules! m { ($lt:lifetime) => {} } | ^^^^^^^^^^^^ | = help: add #![feature(macro_lifetime_matcher)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro-vis-matcher.stderr b/src/test/ui/feature-gate-macro-vis-matcher.stderr index c8b6d8efc2d..70a1374b020 100644 --- a/src/test/ui/feature-gate-macro-vis-matcher.stderr +++ b/src/test/ui/feature-gate-macro-vis-matcher.stderr @@ -1,7 +1,7 @@ error[E0658]: :vis fragment specifier is experimental and subject to change (see issue #41022) --> $DIR/feature-gate-macro-vis-matcher.rs:14:19 | -14 | macro_rules! m { ($v:vis) => {} } +LL | macro_rules! m { ($v:vis) => {} } | ^^^^^^ | = help: add #![feature(macro_vis_matcher)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-macro_at_most_once_rep.stderr b/src/test/ui/feature-gate-macro_at_most_once_rep.stderr index 0a4d68174ad..6089b25ac44 100644 --- a/src/test/ui/feature-gate-macro_at_most_once_rep.stderr +++ b/src/test/ui/feature-gate-macro_at_most_once_rep.stderr @@ -1,7 +1,7 @@ error[E0658]: Using the `?` macro Kleene operator for "at most one" repetition is unstable (see issue #48075) --> $DIR/feature-gate-macro_at_most_once_rep.rs:14:20 | -14 | macro_rules! m { ($(a)?) => {} } +LL | macro_rules! m { ($(a)?) => {} } | ^^^ | = help: add #![feature(macro_at_most_once_rep)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-main.stderr b/src/test/ui/feature-gate-main.stderr index e3810f4adeb..f6513f203d0 100644 --- a/src/test/ui/feature-gate-main.stderr +++ b/src/test/ui/feature-gate-main.stderr @@ -1,7 +1,7 @@ error[E0658]: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) --> $DIR/feature-gate-main.rs:12:1 | -12 | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time +LL | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time | ^^^^^^^^^^^ | = help: add #![feature(main)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-match_default_bindings.stderr b/src/test/ui/feature-gate-match_default_bindings.stderr index bf7e061eb2c..51f0b8cd98f 100644 --- a/src/test/ui/feature-gate-match_default_bindings.stderr +++ b/src/test/ui/feature-gate-match_default_bindings.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/feature-gate-match_default_bindings.rs:13:9 | -13 | Some(n) => {}, +LL | Some(n) => {}, | ^^^^^^^ help: consider using a reference: `&Some(n)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-may-dangle.stderr b/src/test/ui/feature-gate-may-dangle.stderr index 08dcc5ccd26..555f4f45614 100644 --- a/src/test/ui/feature-gate-may-dangle.stderr +++ b/src/test/ui/feature-gate-may-dangle.stderr @@ -1,7 +1,7 @@ error[E0658]: may_dangle has unstable semantics and may be removed in the future (see issue #34761) --> $DIR/feature-gate-may-dangle.rs:18:6 | -18 | impl<#[may_dangle] A> Drop for Pt { +LL | impl<#[may_dangle] A> Drop for Pt { | ^^^^^^^^^^^^^ | = help: add #![feature(dropck_eyepatch)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-naked_functions.stderr b/src/test/ui/feature-gate-naked_functions.stderr index 6f700a8216b..d4ba8ff4d73 100644 --- a/src/test/ui/feature-gate-naked_functions.stderr +++ b/src/test/ui/feature-gate-naked_functions.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:11:1 | -11 | #[naked] +LL | #[naked] | ^^^^^^^^ | = help: add #![feature(naked_functions)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32 error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) --> $DIR/feature-gate-naked_functions.rs:15:1 | -15 | #[naked] +LL | #[naked] | ^^^^^^^^ | = help: add #![feature(naked_functions)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gate-needs-allocator.stderr index 3cbd4d9053b..a526873f42d 100644 --- a/src/test/ui/feature-gate-needs-allocator.stderr +++ b/src/test/ui/feature-gate-needs-allocator.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[needs_allocator]` attribute is an experimental feature --> $DIR/feature-gate-needs-allocator.rs:11:1 | -11 | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is +LL | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-negate-unsigned.stderr b/src/test/ui/feature-gate-negate-unsigned.stderr index 5f1d5abcf34..3c3056f9748 100644 --- a/src/test/ui/feature-gate-negate-unsigned.stderr +++ b/src/test/ui/feature-gate-negate-unsigned.stderr @@ -1,13 +1,13 @@ error[E0600]: cannot apply unary operator `-` to type `usize` --> $DIR/feature-gate-negate-unsigned.rs:20:23 | -20 | let _max: usize = -1; +LL | let _max: usize = -1; | ^^ error[E0600]: cannot apply unary operator `-` to type `u8` --> $DIR/feature-gate-negate-unsigned.rs:24:14 | -24 | let _y = -x; +LL | let _y = -x; | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr index d38ac8e04fa..e0a194ca6e9 100644 --- a/src/test/ui/feature-gate-never_type.stderr +++ b/src/test/ui/feature-gate-never_type.stderr @@ -1,7 +1,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:17:17 | -17 | type Ma = (u32, !, i32); //~ ERROR type is experimental +LL | type Ma = (u32, !, i32); //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:18:20 | -18 | type Meeshka = Vec; //~ ERROR type is experimental +LL | type Meeshka = Vec; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:19:16 | -19 | type Mow = &fn(!) -> !; //~ ERROR type is experimental +LL | type Mow = &fn(!) -> !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:20:19 | -20 | type Skwoz = &mut !; //~ ERROR type is experimental +LL | type Skwoz = &mut !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -33,7 +33,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:23:16 | -23 | type Wub = !; //~ ERROR type is experimental +LL | type Wub = !; //~ ERROR type is experimental | ^ | = help: add #![feature(never_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-nll.stderr b/src/test/ui/feature-gate-nll.stderr index 129af48d6c7..8194680cef7 100644 --- a/src/test/ui/feature-gate-nll.stderr +++ b/src/test/ui/feature-gate-nll.stderr @@ -1,9 +1,9 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/feature-gate-nll.rs:17:5 | -16 | let p = &x; +LL | let p = &x; | - borrow of `x` occurs here -17 | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/feature-gate-no-debug-2.stderr b/src/test/ui/feature-gate-no-debug-2.stderr index 231fc400115..183feae2232 100644 --- a/src/test/ui/feature-gate-no-debug-2.stderr +++ b/src/test/ui/feature-gate-no-debug-2.stderr @@ -1,13 +1,13 @@ error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 --> $DIR/feature-gate-no-debug-2.rs:14:1 | -14 | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` +LL | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` | ^^^^^^^^^^^ help: remove this attribute | note: lint level defined here --> $DIR/feature-gate-no-debug-2.rs:11:9 | -11 | #![deny(deprecated)] +LL | #![deny(deprecated)] | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gate-no-debug.stderr b/src/test/ui/feature-gate-no-debug.stderr index 358e8b10188..943d3530d15 100644 --- a/src/test/ui/feature-gate-no-debug.stderr +++ b/src/test/ui/feature-gate-no-debug.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) --> $DIR/feature-gate-no-debug.rs:13:1 | -13 | #[no_debug] //~ ERROR the `#[no_debug]` attribute was +LL | #[no_debug] //~ ERROR the `#[no_debug]` attribute was | ^^^^^^^^^^^ | = help: add #![feature(no_debug)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-no_core.stderr b/src/test/ui/feature-gate-no_core.stderr index 5183856f6b9..caadb98a710 100644 --- a/src/test/ui/feature-gate-no_core.stderr +++ b/src/test/ui/feature-gate-no_core.stderr @@ -1,7 +1,7 @@ error[E0658]: no_core is experimental (see issue #29639) --> $DIR/feature-gate-no_core.rs:11:1 | -11 | #![no_core] //~ ERROR no_core is experimental +LL | #![no_core] //~ ERROR no_core is experimental | ^^^^^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gate-non_ascii_idents.stderr index e1b2e8abc44..38a2623267f 100644 --- a/src/test/ui/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gate-non_ascii_idents.stderr @@ -1,7 +1,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:11:1 | -11 | extern crate core as bäz; //~ ERROR non-ascii idents +LL | extern crate core as bäz; //~ ERROR non-ascii idents | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:13:5 | -13 | use föö::bar; //~ ERROR non-ascii idents +LL | use föö::bar; //~ ERROR non-ascii idents | ^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:15:1 | -15 | mod föö { //~ ERROR non-ascii idents +LL | mod föö { //~ ERROR non-ascii idents | ^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -25,13 +25,13 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:19:1 | -19 | / fn bär( //~ ERROR non-ascii idents -20 | | bäz: isize //~ ERROR non-ascii idents -21 | | ) { -22 | | let _ö: isize; //~ ERROR non-ascii idents +LL | / fn bär( //~ ERROR non-ascii idents +LL | | bäz: isize //~ ERROR non-ascii idents +LL | | ) { +LL | | let _ö: isize; //~ ERROR non-ascii idents ... | -26 | | } -27 | | } +LL | | } +LL | | } | |_^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -39,7 +39,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:20:5 | -20 | bäz: isize //~ ERROR non-ascii idents +LL | bäz: isize //~ ERROR non-ascii idents | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -47,7 +47,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:22:9 | -22 | let _ö: isize; //~ ERROR non-ascii idents +LL | let _ö: isize; //~ ERROR non-ascii idents | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -55,7 +55,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:25:10 | -25 | (_ä, _) => {} //~ ERROR non-ascii idents +LL | (_ä, _) => {} //~ ERROR non-ascii idents | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -63,7 +63,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:29:1 | -29 | struct Föö { //~ ERROR non-ascii idents +LL | struct Föö { //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -71,7 +71,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:30:5 | -30 | föö: isize //~ ERROR non-ascii idents +LL | föö: isize //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -79,7 +79,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:33:1 | -33 | enum Bär { //~ ERROR non-ascii idents +LL | enum Bär { //~ ERROR non-ascii idents | ^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -87,7 +87,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:34:5 | -34 | Bäz { //~ ERROR non-ascii idents +LL | Bäz { //~ ERROR non-ascii idents | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -95,7 +95,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:35:9 | -35 | qüx: isize //~ ERROR non-ascii idents +LL | qüx: isize //~ ERROR non-ascii idents | ^^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -103,7 +103,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #28979) error[E0658]: non-ascii idents are not fully supported. (see issue #28979) --> $DIR/feature-gate-non_ascii_idents.rs:40:5 | -40 | fn qüx(); //~ ERROR non-ascii idents +LL | fn qüx(); //~ ERROR non-ascii idents | ^^^^^^^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gate-non_exhaustive.stderr index 307c79dde04..468ef6e273c 100644 --- a/src/test/ui/feature-gate-non_exhaustive.stderr +++ b/src/test/ui/feature-gate-non_exhaustive.stderr @@ -1,7 +1,7 @@ error[E0658]: non exhaustive is an experimental feature (see issue #44109) --> $DIR/feature-gate-non_exhaustive.rs:13:1 | -13 | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) +LL | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(non_exhaustive)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr index 137369fb79a..ad8b12ea254 100644 --- a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr +++ b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:11:1 | -11 | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is +LL | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(omit_gdb_pretty_printer_section)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gate-on-unimplemented.stderr index 5924e80dcef..7cc956fa1f0 100644 --- a/src/test/ui/feature-gate-on-unimplemented.stderr +++ b/src/test/ui/feature-gate-on-unimplemented.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628) --> $DIR/feature-gate-on-unimplemented.rs:14:1 | -14 | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] +LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(on_unimplemented)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gate-optin-builtin-traits.stderr index 3bc15decae3..ec7856338fb 100644 --- a/src/test/ui/feature-gate-optin-builtin-traits.stderr +++ b/src/test/ui/feature-gate-optin-builtin-traits.stderr @@ -1,7 +1,7 @@ error[E0658]: auto traits are experimental and possibly buggy (see issue #13231) --> $DIR/feature-gate-optin-builtin-traits.rs:20:1 | -20 | auto trait AutoDummyTrait {} +LL | auto trait AutoDummyTrait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: auto traits are experimental and possibly buggy (see issue #13231) error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) --> $DIR/feature-gate-optin-builtin-traits.rs:23:1 | -23 | impl !DummyTrait for DummyStruct {} +LL | impl !DummyTrait for DummyStruct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-overlapping_marker_traits.stderr b/src/test/ui/feature-gate-overlapping_marker_traits.stderr index cd66dd812e2..2b30691c40d 100644 --- a/src/test/ui/feature-gate-overlapping_marker_traits.stderr +++ b/src/test/ui/feature-gate-overlapping_marker_traits.stderr @@ -1,9 +1,9 @@ error[E0119]: conflicting implementations of trait `MyMarker`: --> $DIR/feature-gate-overlapping_marker_traits.rs:16:1 | -15 | impl MyMarker for T {} +LL | impl MyMarker for T {} | ------------------------------- first implementation here -16 | impl MyMarker for T {} +LL | impl MyMarker for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error: aborting due to previous error diff --git a/src/test/ui/feature-gate-placement-expr.stderr b/src/test/ui/feature-gate-placement-expr.stderr index 20cdf786eca..96b38812cb0 100644 --- a/src/test/ui/feature-gate-placement-expr.stderr +++ b/src/test/ui/feature-gate-placement-expr.stderr @@ -1,7 +1,7 @@ error[E0658]: placement-in expression syntax is experimental and subject to change. (see issue #27779) --> $DIR/feature-gate-placement-expr.rs:24:13 | -24 | let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental +LL | let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental | ^^^^^^^^^^^ | = help: add #![feature(placement_in_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-plugin.stderr b/src/test/ui/feature-gate-plugin.stderr index b15d2c36a60..f9a98b13044 100644 --- a/src/test/ui/feature-gate-plugin.stderr +++ b/src/test/ui/feature-gate-plugin.stderr @@ -1,7 +1,7 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin.rs:13:1 | -13 | #![plugin(foo)] +LL | #![plugin(foo)] | ^^^^^^^^^^^^^^^ | = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gate-plugin_registrar.stderr index c612d1d90b4..731cca8f6a9 100644 --- a/src/test/ui/feature-gate-plugin_registrar.stderr +++ b/src/test/ui/feature-gate-plugin_registrar.stderr @@ -1,7 +1,7 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) --> $DIR/feature-gate-plugin_registrar.rs:16:1 | -16 | pub fn registrar() {} +LL | pub fn registrar() {} | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(plugin_registrar)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-prelude_import.stderr b/src/test/ui/feature-gate-prelude_import.stderr index e8845e87b5e..6b791ee2380 100644 --- a/src/test/ui/feature-gate-prelude_import.stderr +++ b/src/test/ui/feature-gate-prelude_import.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[prelude_import]` is for use by rustc only --> $DIR/feature-gate-prelude_import.rs:11:1 | -11 | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only +LL | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(prelude_import)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gate-profiler-runtime.stderr index 8998d742e03..ea321591143 100644 --- a/src/test/ui/feature-gate-profiler-runtime.stderr +++ b/src/test/ui/feature-gate-profiler-runtime.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable --> $DIR/feature-gate-profiler-runtime.rs:11:1 | -11 | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is +LL | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(profiler_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr-simd.stderr b/src/test/ui/feature-gate-repr-simd.stderr index 5363b3874f8..280dc4518dd 100644 --- a/src/test/ui/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gate-repr-simd.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-repr-simd.rs:11:1 | -11 | #[repr(simd)] //~ error: SIMD types are experimental +LL | #[repr(simd)] //~ error: SIMD types are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr128.stderr b/src/test/ui/feature-gate-repr128.stderr index 20720a786d3..fef28398df6 100644 --- a/src/test/ui/feature-gate-repr128.stderr +++ b/src/test/ui/feature-gate-repr128.stderr @@ -1,9 +1,9 @@ error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-repr128.rs:12:1 | -12 | / enum A { //~ ERROR repr with 128-bit type is unstable -13 | | A(u64) -14 | | } +LL | / enum A { //~ ERROR repr with 128-bit type is unstable +LL | | A(u64) +LL | | } | |_^ | = help: add #![feature(repr128)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-repr_transparent.stderr b/src/test/ui/feature-gate-repr_transparent.stderr index 29c6b3cf017..161ab0af341 100644 --- a/src/test/ui/feature-gate-repr_transparent.stderr +++ b/src/test/ui/feature-gate-repr_transparent.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[repr(transparent)]` attribute is experimental (see issue #43036) --> $DIR/feature-gate-repr_transparent.rs:11:1 | -11 | #[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental +LL | #[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(repr_transparent)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gate-rustc-attrs.stderr index 9c7323ea45c..6743f328f39 100644 --- a/src/test/ui/feature-gate-rustc-attrs.stderr +++ b/src/test/ui/feature-gate-rustc-attrs.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:15:1 | -15 | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable +LL | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit test error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:16:1 | -16 | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable +LL | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable | ^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests a error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) --> $DIR/feature-gate-rustc-attrs.rs:17:1 | -17 | #[rustc_foo] +LL | #[rustc_foo] | ^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr index 843879036ed..70b66db6083 100644 --- a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr +++ b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr @@ -1,19 +1,19 @@ error: cannot find macro `__build_diagnostic_array!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:22:1 | -22 | __build_diagnostic_array!(DIAGNOSTICS); +LL | __build_diagnostic_array!(DIAGNOSTICS); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot find macro `__register_diagnostic!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:14:1 | -14 | __register_diagnostic!(E0001); +LL | __register_diagnostic!(E0001); | ^^^^^^^^^^^^^^^^^^^^^ error: cannot find macro `__diagnostic_used!` in this scope --> $DIR/feature-gate-rustc-diagnostic-macros.rs:18:5 | -18 | __diagnostic_used!(E0001); +LL | __diagnostic_used!(E0001); | ^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gate-rustc_const_unstable.stderr index 781f621dfdb..25cc2e41016 100644 --- a/src/test/ui/feature-gate-rustc_const_unstable.stderr +++ b/src/test/ui/feature-gate-rustc_const_unstable.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[rustc_const_unstable]` attribute is an internal feature --> $DIR/feature-gate-rustc_const_unstable.rs:18:1 | -18 | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature +LL | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_const_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gate-sanitizer-runtime.stderr index eadda45a184..6640f59255a 100644 --- a/src/test/ui/feature-gate-sanitizer-runtime.stderr +++ b/src/test/ui/feature-gate-sanitizer-runtime.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable --> $DIR/feature-gate-sanitizer-runtime.rs:11:1 | -11 | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is +LL | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(sanitizer_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-simd-ffi.stderr b/src/test/ui/feature-gate-simd-ffi.stderr index ab1ebefa333..f7b17aa4e6a 100644 --- a/src/test/ui/feature-gate-simd-ffi.stderr +++ b/src/test/ui/feature-gate-simd-ffi.stderr @@ -1,7 +1,7 @@ error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:19:17 | -19 | fn baz() -> LocalSimd; //~ ERROR use of SIMD type +LL | fn baz() -> LocalSimd; //~ ERROR use of SIMD type | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable @@ -9,7 +9,7 @@ error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:20:15 | -20 | fn qux(x: LocalSimd); //~ ERROR use of SIMD type +LL | fn qux(x: LocalSimd); //~ ERROR use of SIMD type | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-simd.stderr b/src/test/ui/feature-gate-simd.stderr index c923ae6e9a9..b4ed7ee43c7 100644 --- a/src/test/ui/feature-gate-simd.stderr +++ b/src/test/ui/feature-gate-simd.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-simd.rs:14:1 | -14 | #[repr(simd)] //~ ERROR SIMD types are experimental +LL | #[repr(simd)] //~ ERROR SIMD types are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gate-slice-patterns.stderr index a7c275fe793..0f61313e092 100644 --- a/src/test/ui/feature-gate-slice-patterns.stderr +++ b/src/test/ui/feature-gate-slice-patterns.stderr @@ -1,7 +1,7 @@ error[E0658]: slice pattern syntax is experimental (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:16:9 | -16 | [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental +LL | [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental | ^^^^^^^^^^^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-staged_api.stderr b/src/test/ui/feature-gate-staged_api.stderr index 30593d45760..7b395ffb74b 100644 --- a/src/test/ui/feature-gate-staged_api.stderr +++ b/src/test/ui/feature-gate-staged_api.stderr @@ -1,13 +1,13 @@ error: stability attributes may not be used outside of the standard library --> $DIR/feature-gate-staged_api.rs:11:1 | -11 | #![stable(feature = "a", since = "b")] +LL | #![stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/feature-gate-staged_api.rs:18:1 | -18 | #[stable(feature = "a", since = "b")] +LL | #[stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate-start.stderr b/src/test/ui/feature-gate-start.stderr index 6e7a6741f5b..533cc31fb0a 100644 --- a/src/test/ui/feature-gate-start.stderr +++ b/src/test/ui/feature-gate-start.stderr @@ -1,7 +1,7 @@ error[E0658]: a #[start] function is an experimental feature whose signature may change over time (see issue #29633) --> $DIR/feature-gate-start.rs:12:1 | -12 | fn foo() {} //~ ERROR: a #[start] function is an experimental feature +LL | fn foo() {} //~ ERROR: a #[start] function is an experimental feature | ^^^^^^^^^^^ | = help: add #![feature(start)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gate-static-nobundle.stderr index 855eacb63ca..d872b8f4c52 100644 --- a/src/test/ui/feature-gate-static-nobundle.stderr +++ b/src/test/ui/feature-gate-static-nobundle.stderr @@ -1,7 +1,7 @@ error[E0658]: kind="static-nobundle" is feature gated (see issue #37403) --> $DIR/feature-gate-static-nobundle.rs:11:1 | -11 | #[link(name="foo", kind="static-nobundle")] +LL | #[link(name="foo", kind="static-nobundle")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(static_nobundle)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gate-stmt_expr_attributes.stderr index 992772c9116..8aca511ec16 100644 --- a/src/test/ui/feature-gate-stmt_expr_attributes.stderr +++ b/src/test/ui/feature-gate-stmt_expr_attributes.stderr @@ -1,7 +1,7 @@ error[E0658]: attributes on non-item statements and expressions are experimental. (see issue #15701) --> $DIR/feature-gate-stmt_expr_attributes.rs:11:16 | -11 | const X: i32 = #[allow(dead_code)] 8; +LL | const X: i32 = #[allow(dead_code)] 8; | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-target_feature.stderr b/src/test/ui/feature-gate-target_feature.stderr index 064c9f7e247..0b7313de04d 100644 --- a/src/test/ui/feature-gate-target_feature.stderr +++ b/src/test/ui/feature-gate-target_feature.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[target_feature]` attribute is an experimental feature --> $DIR/feature-gate-target_feature.rs:11:1 | -11 | #[target_feature = "+sse2"] +LL | #[target_feature = "+sse2"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(target_feature)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-thread_local.stderr b/src/test/ui/feature-gate-thread_local.stderr index 1846ebbb106..0bbcb6a24b2 100644 --- a/src/test/ui/feature-gate-thread_local.stderr +++ b/src/test/ui/feature-gate-thread_local.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors. (see issue #29594) --> $DIR/feature-gate-thread_local.rs:18:1 | -18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature +LL | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature | ^^^^^^^^^^^^^^^ | = help: add #![feature(thread_local)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-trace_macros.stderr b/src/test/ui/feature-gate-trace_macros.stderr index 2a126dde0bc..56d69bbbb40 100644 --- a/src/test/ui/feature-gate-trace_macros.stderr +++ b/src/test/ui/feature-gate-trace_macros.stderr @@ -1,7 +1,7 @@ error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-trace_macros.rs:12:5 | -12 | trace_macros!(true); //~ ERROR: `trace_macros` is not stable +LL | trace_macros!(true); //~ ERROR: `trace_macros` is not stable | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-type_ascription.stderr b/src/test/ui/feature-gate-type_ascription.stderr index 95da92acd85..bd0ff84c438 100644 --- a/src/test/ui/feature-gate-type_ascription.stderr +++ b/src/test/ui/feature-gate-type_ascription.stderr @@ -1,7 +1,7 @@ error[E0658]: type ascription is experimental (see issue #23416) --> $DIR/feature-gate-type_ascription.rs:14:13 | -14 | let a = 10: u8; //~ ERROR type ascription is experimental +LL | let a = 10: u8; //~ ERROR type ascription is experimental | ^^^^^^ | = help: add #![feature(type_ascription)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr index 661be5b21eb..5d1f4d09227 100644 --- a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr @@ -1,7 +1,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:20:5 | -20 | extern "rust-call" fn call(self, args: ()) -> () {} +LL | extern "rust-call" fn call(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:25:5 | -25 | extern "rust-call" fn call_once(self, args: ()) -> () {} +LL | extern "rust-call" fn call_once(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:5 | -30 | extern "rust-call" fn call_mut(&self, args: ()) -> () {} +LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -25,7 +25,7 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:5 | -35 | extern "rust-call" fn call_once(&self, args: ()) -> () {} +LL | extern "rust-call" fn call_once(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr index 808b21f50fc..7eb938110f3 100644 --- a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7 | -14 | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7 | -15 | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7 | -16 | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr index 47441afbea7..5db2ea6167c 100644 --- a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5 | -14 | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5 | -15 | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5 | -16 | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gate-unboxed-closures.stderr index 18baf0450c3..54e75ce8ef4 100644 --- a/src/test/ui/feature-gate-unboxed-closures.stderr +++ b/src/test/ui/feature-gate-unboxed-closures.stderr @@ -1,9 +1,9 @@ error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-unboxed-closures.rs:16:5 | -16 | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { -17 | | a + b -18 | | } +LL | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { +LL | | a + b +LL | | } | |_____^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-underscore-lifetimes.stderr b/src/test/ui/feature-gate-underscore-lifetimes.stderr index 6e5b0573f6c..b92662f8a82 100644 --- a/src/test/ui/feature-gate-underscore-lifetimes.stderr +++ b/src/test/ui/feature-gate-underscore-lifetimes.stderr @@ -1,7 +1,7 @@ error[E0658]: underscore lifetimes are unstable (see issue #44524) --> $DIR/feature-gate-underscore-lifetimes.rs:13:23 | -13 | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable +LL | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable | ^^ | = help: add #![feature(underscore_lifetimes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-universal.stderr b/src/test/ui/feature-gate-universal.stderr index 75820283cc7..8d2e81055fe 100644 --- a/src/test/ui/feature-gate-universal.stderr +++ b/src/test/ui/feature-gate-universal.stderr @@ -1,7 +1,7 @@ error[E0658]: `impl Trait` in argument position is experimental (see issue #34511) --> $DIR/feature-gate-universal.rs:13:11 | -13 | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); } +LL | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); } | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(universal_impl_trait)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr index 51d68132ac4..e0bfab164ff 100644 --- a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr +++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr @@ -1,7 +1,7 @@ error[E0658]: Unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877) --> $DIR/feature-gate-unsized_tuple_coercion.rs:12:24 | -12 | let _ : &(Send,) = &((),); +LL | let _ : &(Send,) = &((),); | ^^^^^^ | = help: add #![feature(unsized_tuple_coercion)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gate-untagged_unions.stderr index a1f8dcbb8bf..eef42e8b6fd 100644 --- a/src/test/ui/feature-gate-untagged_unions.stderr +++ b/src/test/ui/feature-gate-untagged_unions.stderr @@ -1,9 +1,9 @@ error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:19:1 | -19 | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable -20 | | a: String, -21 | | } +LL | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable +LL | | a: String, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable @@ -11,9 +11,9 @@ error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:23:1 | -23 | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable -24 | | a: T, -25 | | } +LL | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable +LL | | a: T, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable @@ -21,9 +21,9 @@ error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) error[E0658]: unions with `Drop` implementations are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:27:1 | -27 | / union U5 { //~ ERROR unions with `Drop` implementations are unstable -28 | | a: u8, -29 | | } +LL | / union U5 { //~ ERROR unions with `Drop` implementations are unstable +LL | | a: u8, +LL | | } | |_^ | = help: add #![feature(untagged_unions)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gate-unwind-attributes.stderr index 0e122ea5d56..d22b56ca386 100644 --- a/src/test/ui/feature-gate-unwind-attributes.stderr +++ b/src/test/ui/feature-gate-unwind-attributes.stderr @@ -1,7 +1,7 @@ error[E0658]: #[unwind] is experimental --> $DIR/feature-gate-unwind-attributes.rs:21:5 | -21 | #[unwind] //~ ERROR #[unwind] is experimental +LL | #[unwind] //~ ERROR #[unwind] is experimental | ^^^^^^^^^ | = help: add #![feature(unwind_attributes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-used.stderr b/src/test/ui/feature-gate-used.stderr index d263fe5ffbe..44c7c142c55 100644 --- a/src/test/ui/feature-gate-used.stderr +++ b/src/test/ui/feature-gate-used.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[used]` attribute is an experimental feature (see issue #40289) --> $DIR/feature-gate-used.rs:11:1 | -11 | #[used] +LL | #[used] | ^^^^^^^ | = help: add #![feature(used)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate-wasm_import_memory.stderr b/src/test/ui/feature-gate-wasm_import_memory.stderr index 04350a145fd..0ec50272467 100644 --- a/src/test/ui/feature-gate-wasm_import_memory.stderr +++ b/src/test/ui/feature-gate-wasm_import_memory.stderr @@ -1,7 +1,7 @@ error[E0658]: wasm_import_memory attribute is currently unstable --> $DIR/feature-gate-wasm_import_memory.rs:11:1 | -11 | #![wasm_import_memory] //~ ERROR: currently unstable +LL | #![wasm_import_memory] //~ ERROR: currently unstable | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(wasm_import_memory)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index df831ded9a7..9c4fb79f6f1 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -1,1318 +1,1318 @@ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:513:1 - | -513 | #[macro_escape] - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:513:1 + | +LL | #[macro_escape] + | ^^^^^^^^^^^^^^^ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 - | -516 | mod inner { #![macro_escape] } - | ^^^^^^^^^^^^^^^^ - | - = help: consider an outer attribute, #[macro_use] mod ... + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 + | +LL | mod inner { #![macro_escape] } + | ^^^^^^^^^^^^^^^^ + | + = help: consider an outer attribute, #[macro_use] mod ... warning: `#[must_use]` on functions is experimental (see issue #43302) - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5 - | -663 | #[must_use = "1400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(fn_must_use)] to the crate attributes to enable + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5 + | +LL | #[must_use = "1400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(fn_must_use)] to the crate attributes to enable warning: unknown lint: `x5400` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:49:33 | -49 | #![warn (x5400)] //~ WARN unknown lint: `x5400` +LL | #![warn (x5400)] //~ WARN unknown lint: `x5400` | ^^^^^ | note: lint level defined here --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:28 | -44 | #![warn(unused_attributes, unknown_lints)] +LL | #![warn(unused_attributes, unknown_lints)] | ^^^^^^^^^^^^^ warning: unknown lint: `x5300` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:50:33 | -50 | #![allow (x5300)] //~ WARN unknown lint: `x5300` +LL | #![allow (x5300)] //~ WARN unknown lint: `x5300` | ^^^^^ warning: unknown lint: `x5200` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:51:33 | -51 | #![forbid (x5200)] //~ WARN unknown lint: `x5200` +LL | #![forbid (x5200)] //~ WARN unknown lint: `x5200` | ^^^^^ warning: unknown lint: `x5100` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:33 | -52 | #![deny (x5100)] //~ WARN unknown lint: `x5100` +LL | #![deny (x5100)] //~ WARN unknown lint: `x5100` | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:8 - | -113 | #[warn(x5400)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:8 + | +LL | #[warn(x5400)] + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:25 - | -116 | mod inner { #![warn(x5400)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:25 + | +LL | mod inner { #![warn(x5400)] } + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 - | -119 | #[warn(x5400)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 + | +LL | #[warn(x5400)] fn f() { } + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 - | -122 | #[warn(x5400)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 + | +LL | #[warn(x5400)] struct S; + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 - | -125 | #[warn(x5400)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 + | +LL | #[warn(x5400)] type T = S; + | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:12 - | -128 | #[warn(x5400)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:12 + | +LL | #[warn(x5400)] impl S { } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:9 - | -132 | #[allow(x5300)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:9 + | +LL | #[allow(x5300)] + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:26 - | -135 | mod inner { #![allow(x5300)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:26 + | +LL | mod inner { #![allow(x5300)] } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 - | -138 | #[allow(x5300)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 + | +LL | #[allow(x5300)] fn f() { } + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 - | -141 | #[allow(x5300)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 + | +LL | #[allow(x5300)] struct S; + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 - | -144 | #[allow(x5300)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 + | +LL | #[allow(x5300)] type T = S; + | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:13 - | -147 | #[allow(x5300)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:13 + | +LL | #[allow(x5300)] impl S { } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:10 - | -151 | #[forbid(x5200)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:10 + | +LL | #[forbid(x5200)] + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:27 - | -154 | mod inner { #![forbid(x5200)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:27 + | +LL | mod inner { #![forbid(x5200)] } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 - | -157 | #[forbid(x5200)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 + | +LL | #[forbid(x5200)] fn f() { } + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 - | -160 | #[forbid(x5200)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 + | +LL | #[forbid(x5200)] struct S; + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 - | -163 | #[forbid(x5200)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 + | +LL | #[forbid(x5200)] type T = S; + | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:14 - | -166 | #[forbid(x5200)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:14 + | +LL | #[forbid(x5200)] impl S { } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:8 - | -170 | #[deny(x5100)] - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:8 + | +LL | #[deny(x5100)] + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:25 - | -173 | mod inner { #![deny(x5100)] } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:25 + | +LL | mod inner { #![deny(x5100)] } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 - | -176 | #[deny(x5100)] fn f() { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 + | +LL | #[deny(x5100)] fn f() { } + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 - | -179 | #[deny(x5100)] struct S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 + | +LL | #[deny(x5100)] struct S; + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 - | -182 | #[deny(x5100)] type T = S; - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 + | +LL | #[deny(x5100)] type T = S; + | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:12 - | -185 | #[deny(x5100)] impl S { } - | ^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:12 + | +LL | #[deny(x5100)] impl S { } + | ^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:17 - | -192 | mod inner { #![macro_reexport="5000"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:17 + | +LL | mod inner { #![macro_reexport="5000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | note: lint level defined here - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9 - | -44 | #![warn(unused_attributes, unknown_lints)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9 + | +LL | #![warn(unused_attributes, unknown_lints)] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5 - | -195 | #[macro_reexport = "5000"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5 + | +LL | #[macro_reexport = "5000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 - | -198 | #[macro_reexport = "5000"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 + | +LL | #[macro_reexport = "5000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 - | -201 | #[macro_reexport = "5000"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 + | +LL | #[macro_reexport = "5000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 - | -204 | #[macro_reexport = "5000"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 + | +LL | #[macro_reexport = "5000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:189:1 - | -189 | #[macro_reexport = "5000"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:189:1 + | +LL | #[macro_reexport = "5000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 - | -212 | #[macro_use] fn f() { } - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 + | +LL | #[macro_use] fn f() { } + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5 - | -215 | #[macro_use] struct S; - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5 + | +LL | #[macro_use] struct S; + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5 - | -218 | #[macro_use] type T = S; - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5 + | +LL | #[macro_use] type T = S; + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:5 - | -221 | #[macro_use] impl S { } - | ^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:5 + | +LL | #[macro_use] impl S { } + | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:228:17 - | -228 | mod inner { #![macro_export="4800"] } - | ^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:228:17 + | +LL | mod inner { #![macro_export="4800"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:5 - | -231 | #[macro_export = "4800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:5 + | +LL | #[macro_export = "4800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:234:5 - | -234 | #[macro_export = "4800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:234:5 + | +LL | #[macro_export = "4800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:237:5 - | -237 | #[macro_export = "4800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:237:5 + | +LL | #[macro_export = "4800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 - | -240 | #[macro_export = "4800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 + | +LL | #[macro_export = "4800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:1 - | -225 | #[macro_export = "4800"] - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:1 + | +LL | #[macro_export = "4800"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:17 - | -247 | mod inner { #![plugin_registrar="4700"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:17 + | +LL | mod inner { #![plugin_registrar="4700"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:252:5 - | -252 | #[plugin_registrar = "4700"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:252:5 + | +LL | #[plugin_registrar = "4700"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:255:5 - | -255 | #[plugin_registrar = "4700"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:255:5 + | +LL | #[plugin_registrar = "4700"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 - | -258 | #[plugin_registrar = "4700"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 + | +LL | #[plugin_registrar = "4700"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:244:1 - | -244 | #[plugin_registrar = "4700"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:244:1 + | +LL | #[plugin_registrar = "4700"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:17 - | -265 | mod inner { #![main="4300"] } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:17 + | +LL | mod inner { #![main="4300"] } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5 - | -270 | #[main = "4400"] struct S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5 + | +LL | #[main = "4400"] struct S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:273:5 - | -273 | #[main = "4400"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:273:5 + | +LL | #[main = "4400"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5 - | -276 | #[main = "4400"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5 + | +LL | #[main = "4400"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:262:1 - | -262 | #[main = "4400"] - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:262:1 + | +LL | #[main = "4400"] + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:17 - | -283 | mod inner { #![start="4300"] } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:17 + | +LL | mod inner { #![start="4300"] } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:288:5 - | -288 | #[start = "4300"] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:288:5 + | +LL | #[start = "4300"] struct S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:291:5 - | -291 | #[start = "4300"] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:291:5 + | +LL | #[start = "4300"] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:294:5 - | -294 | #[start = "4300"] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:294:5 + | +LL | #[start = "4300"] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:280:1 - | -280 | #[start = "4300"] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:280:1 + | +LL | #[start = "4300"] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:17 - | -333 | mod inner { #![repr="3900"] } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:17 + | +LL | mod inner { #![repr="3900"] } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5 - | -336 | #[repr = "3900"] fn f() { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5 + | +LL | #[repr = "3900"] fn f() { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 - | -341 | #[repr = "3900"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 + | +LL | #[repr = "3900"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 - | -344 | #[repr = "3900"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 + | +LL | #[repr = "3900"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:1 - | -330 | #[repr = "3900"] - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:1 + | +LL | #[repr = "3900"] + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:5 - | -352 | #[path = "3800"] fn f() { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:5 + | +LL | #[path = "3800"] fn f() { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 - | -355 | #[path = "3800"] struct S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 + | +LL | #[path = "3800"] struct S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:358:5 - | -358 | #[path = "3800"] type T = S; - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:358:5 + | +LL | #[path = "3800"] type T = S; + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5 - | -361 | #[path = "3800"] impl S { } - | ^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5 + | +LL | #[path = "3800"] impl S { } + | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:17 - | -368 | mod inner { #![abi="3700"] } - | ^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:17 + | +LL | mod inner { #![abi="3700"] } + | ^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 - | -371 | #[abi = "3700"] fn f() { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 + | +LL | #[abi = "3700"] fn f() { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 - | -374 | #[abi = "3700"] struct S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 + | +LL | #[abi = "3700"] struct S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5 - | -377 | #[abi = "3700"] type T = S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5 + | +LL | #[abi = "3700"] type T = S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5 - | -380 | #[abi = "3700"] impl S { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5 + | +LL | #[abi = "3700"] impl S { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:1 - | -365 | #[abi = "3700"] - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:1 + | +LL | #[abi = "3700"] + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17 - | -387 | mod inner { #![automatically_derived="3600"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17 + | +LL | mod inner { #![automatically_derived="3600"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 - | -390 | #[automatically_derived = "3600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 + | +LL | #[automatically_derived = "3600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 - | -393 | #[automatically_derived = "3600"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 + | +LL | #[automatically_derived = "3600"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 - | -396 | #[automatically_derived = "3600"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 + | +LL | #[automatically_derived = "3600"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5 - | -399 | #[automatically_derived = "3600"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5 + | +LL | #[automatically_derived = "3600"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1 - | -384 | #[automatically_derived = "3600"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1 + | +LL | #[automatically_derived = "3600"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:27 - | -407 | #[no_mangle = "3500"] fn f() { } - | -^^^^^^^^^ - | | - | help: try making it public: `pub` - | - = note: #[warn(private_no_mangle_fns)] on by default + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:27 + | +LL | #[no_mangle = "3500"] fn f() { } + | -^^^^^^^^^ + | | + | help: try making it public: `pub` + | + = note: #[warn(private_no_mangle_fns)] on by default warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17 - | -420 | mod inner { #![no_link="3400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17 + | +LL | mod inner { #![no_link="3400"] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 - | -423 | #[no_link = "3400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 + | +LL | #[no_link = "3400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5 - | -426 | #[no_link = "3400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5 + | +LL | #[no_link = "3400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 - | -429 | #[no_link = "3400"]type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 + | +LL | #[no_link = "3400"]type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5 - | -432 | #[no_link = "3400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5 + | +LL | #[no_link = "3400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1 - | -417 | #[no_link = "3400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1 + | +LL | #[no_link = "3400"] + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17 - | -439 | mod inner { #![should_panic="3200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17 + | +LL | mod inner { #![should_panic="3200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 - | -442 | #[should_panic = "3200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 + | +LL | #[should_panic = "3200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 - | -445 | #[should_panic = "3200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 + | +LL | #[should_panic = "3200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5 - | -448 | #[should_panic = "3200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5 + | +LL | #[should_panic = "3200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 - | -451 | #[should_panic = "3200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 + | +LL | #[should_panic = "3200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1 - | -436 | #[should_panic = "3200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1 + | +LL | #[should_panic = "3200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 - | -458 | mod inner { #![ignore="3100"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 + | +LL | mod inner { #![ignore="3100"] } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 - | -461 | #[ignore = "3100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 + | +LL | #[ignore = "3100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 - | -464 | #[ignore = "3100"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 + | +LL | #[ignore = "3100"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 - | -467 | #[ignore = "3100"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 + | +LL | #[ignore = "3100"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 - | -470 | #[ignore = "3100"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 + | +LL | #[ignore = "3100"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 - | -455 | #[ignore = "3100"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 + | +LL | #[ignore = "3100"] + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17 - | -477 | mod inner { #![no_implicit_prelude="3000"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17 + | +LL | mod inner { #![no_implicit_prelude="3000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5 - | -480 | #[no_implicit_prelude = "3000"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5 + | +LL | #[no_implicit_prelude = "3000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5 - | -483 | #[no_implicit_prelude = "3000"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5 + | +LL | #[no_implicit_prelude = "3000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 - | -486 | #[no_implicit_prelude = "3000"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 + | +LL | #[no_implicit_prelude = "3000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5 - | -489 | #[no_implicit_prelude = "3000"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5 + | +LL | #[no_implicit_prelude = "3000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 - | -474 | #[no_implicit_prelude = "3000"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 + | +LL | #[no_implicit_prelude = "3000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17 - | -496 | mod inner { #![reexport_test_harness_main="2900"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17 + | +LL | mod inner { #![reexport_test_harness_main="2900"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 - | -499 | #[reexport_test_harness_main = "2900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 + | +LL | #[reexport_test_harness_main = "2900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 - | -502 | #[reexport_test_harness_main = "2900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 + | +LL | #[reexport_test_harness_main = "2900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 - | -505 | #[reexport_test_harness_main = "2900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 + | +LL | #[reexport_test_harness_main = "2900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 - | -508 | #[reexport_test_harness_main = "2900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 + | +LL | #[reexport_test_harness_main = "2900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 - | -493 | #[reexport_test_harness_main = "2900"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 + | +LL | #[reexport_test_harness_main = "2900"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 - | -519 | #[macro_escape] fn f() { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 + | +LL | #[macro_escape] fn f() { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 - | -522 | #[macro_escape] struct S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 + | +LL | #[macro_escape] struct S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:5 - | -525 | #[macro_escape] type T = S; - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:5 + | +LL | #[macro_escape] type T = S; + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5 - | -528 | #[macro_escape] impl S { } - | ^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5 + | +LL | #[macro_escape] impl S { } + | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 - | -536 | mod inner { #![no_std="2600"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 + | +LL | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 - | -536 | mod inner { #![no_std="2600"] } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:17 + | +LL | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 - | -540 | #[no_std = "2600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 + | +LL | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 - | -540 | #[no_std = "2600"] fn f() { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:540:5 + | +LL | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 - | -544 | #[no_std = "2600"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 + | +LL | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 - | -544 | #[no_std = "2600"] struct S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 + | +LL | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 - | -548 | #[no_std = "2600"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 + | +LL | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 - | -548 | #[no_std = "2600"] type T = S; - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:548:5 + | +LL | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 - | -552 | #[no_std = "2600"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 + | +LL | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 - | -552 | #[no_std = "2600"] impl S { } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:5 + | +LL | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 - | -532 | #[no_std = "2600"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 + | +LL | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 - | -532 | #[no_std = "2600"] - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 + | +LL | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 - | -692 | mod inner { #![crate_name="0900"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 + | +LL | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 - | -692 | mod inner { #![crate_name="0900"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:17 + | +LL | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 - | -696 | #[crate_name = "0900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 + | +LL | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 - | -696 | #[crate_name = "0900"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5 + | +LL | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 - | -700 | #[crate_name = "0900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 + | +LL | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 - | -700 | #[crate_name = "0900"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 + | +LL | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 - | -704 | #[crate_name = "0900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 + | +LL | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 - | -704 | #[crate_name = "0900"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 + | +LL | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 - | -708 | #[crate_name = "0900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 + | +LL | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 - | -708 | #[crate_name = "0900"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 + | +LL | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 - | -688 | #[crate_name = "0900"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 + | +LL | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 - | -688 | #[crate_name = "0900"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 + | +LL | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 - | -717 | mod inner { #![crate_type="0800"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 + | +LL | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 - | -717 | mod inner { #![crate_type="0800"] } - | ^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:17 + | +LL | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 - | -721 | #[crate_type = "0800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 + | +LL | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 - | -721 | #[crate_type = "0800"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 + | +LL | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 - | -725 | #[crate_type = "0800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + | +LL | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 - | -725 | #[crate_type = "0800"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + | +LL | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 - | -729 | #[crate_type = "0800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + | +LL | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 - | -729 | #[crate_type = "0800"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + | +LL | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 - | -733 | #[crate_type = "0800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 + | +LL | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 - | -733 | #[crate_type = "0800"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 + | +LL | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 - | -713 | #[crate_type = "0800"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 + | +LL | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 - | -713 | #[crate_type = "0800"] - | ^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:1 + | +LL | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 - | -742 | mod inner { #![feature(x0600)] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 + | +LL | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 - | -742 | mod inner { #![feature(x0600)] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:17 + | +LL | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 - | -746 | #[feature(x0600)] fn f() { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + | +LL | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 - | -746 | #[feature(x0600)] fn f() { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + | +LL | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 - | -750 | #[feature(x0600)] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + | +LL | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 - | -750 | #[feature(x0600)] struct S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + | +LL | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 - | -754 | #[feature(x0600)] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + | +LL | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 - | -754 | #[feature(x0600)] type T = S; - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + | +LL | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 - | -758 | #[feature(x0600)] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 + | +LL | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 - | -758 | #[feature(x0600)] impl S { } - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 + | +LL | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 - | -738 | #[feature(x0600)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 + | +LL | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 - | -738 | #[feature(x0600)] - | ^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:1 + | +LL | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 - | -768 | mod inner { #![no_main="0400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 + | +LL | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 - | -768 | mod inner { #![no_main="0400"] } - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:17 + | +LL | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 - | -772 | #[no_main = "0400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 + | +LL | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 - | -772 | #[no_main = "0400"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:5 + | +LL | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 - | -776 | #[no_main = "0400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 + | +LL | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 - | -776 | #[no_main = "0400"] struct S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 + | +LL | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 - | -780 | #[no_main = "0400"] type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + | +LL | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 - | -780 | #[no_main = "0400"] type T = S; - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + | +LL | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 - | -784 | #[no_main = "0400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + | +LL | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 - | -784 | #[no_main = "0400"] impl S { } - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + | +LL | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 - | -764 | #[no_main = "0400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 + | +LL | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 - | -764 | #[no_main = "0400"] - | ^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:1 + | +LL | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 - | -806 | mod inner { #![recursion_limit="0200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 + | +LL | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 - | -806 | mod inner { #![recursion_limit="0200"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:17 + | +LL | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 - | -810 | #[recursion_limit="0200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 + | +LL | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 - | -810 | #[recursion_limit="0200"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 + | +LL | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 - | -814 | #[recursion_limit="0200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 + | +LL | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 - | -814 | #[recursion_limit="0200"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 + | +LL | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 - | -818 | #[recursion_limit="0200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 + | +LL | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 - | -818 | #[recursion_limit="0200"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 + | +LL | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 - | -822 | #[recursion_limit="0200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 + | +LL | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 - | -822 | #[recursion_limit="0200"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 + | +LL | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 - | -802 | #[recursion_limit="0200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 + | +LL | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 - | -802 | #[recursion_limit="0200"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 + | +LL | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 - | -831 | mod inner { #![type_length_limit="0100"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 + | +LL | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 - | -831 | mod inner { #![type_length_limit="0100"] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:17 + | +LL | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 - | -835 | #[type_length_limit="0100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + | +LL | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 - | -835 | #[type_length_limit="0100"] fn f() { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + | +LL | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 - | -839 | #[type_length_limit="0100"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + | +LL | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 - | -839 | #[type_length_limit="0100"] struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + | +LL | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 - | -843 | #[type_length_limit="0100"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 + | +LL | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 - | -843 | #[type_length_limit="0100"] type T = S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 + | +LL | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 - | -847 | #[type_length_limit="0100"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 + | +LL | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 - | -847 | #[type_length_limit="0100"] impl S { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:5 + | +LL | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 - | -827 | #[type_length_limit="0100"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 + | +LL | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 - | -827 | #[type_length_limit="0100"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:1 + | +LL | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1 | -53 | #![macro_reexport = "5000"] //~ WARN unused attribute +LL | #![macro_reexport = "5000"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:1 | -55 | #![macro_export = "4800"] //~ WARN unused attribute +LL | #![macro_export = "4800"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1 | -56 | #![plugin_registrar = "4700"] //~ WARN unused attribute +LL | #![plugin_registrar = "4700"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 | -59 | #![main = "x4400"] //~ WARN unused attribute +LL | #![main = "x4400"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1 | -60 | #![start = "x4300"] //~ WARN unused attribute +LL | #![start = "x4300"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:63:1 | -63 | #![repr = "3900"] //~ WARN unused attribute +LL | #![repr = "3900"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1 | -64 | #![path = "3800"] //~ WARN unused attribute +LL | #![path = "3800"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1 | -65 | #![abi = "3700"] //~ WARN unused attribute +LL | #![abi = "3700"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1 | -66 | #![automatically_derived = "3600"] //~ WARN unused attribute +LL | #![automatically_derived = "3600"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1 | -68 | #![no_link = "3400"] //~ WARN unused attribute +LL | #![no_link = "3400"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:70:1 | -70 | #![should_panic = "3200"] //~ WARN unused attribute +LL | #![should_panic = "3200"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:71:1 | -71 | #![ignore = "3100"] //~ WARN unused attribute +LL | #![ignore = "3100"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:77:1 | -77 | #![proc_macro_derive = "2500"] //~ WARN unused attribute +LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: compilation successful - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:1 - | -858 | / fn main() { //~ ERROR compilation successful -859 | | println!("Hello World"); -860 | | } - | |_^ + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:1 + | +LL | / fn main() { //~ ERROR compilation successful +LL | | println!("Hello World"); +LL | | } + | |_^ diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr index a413fcc56a0..83f6e016370 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr @@ -1,8 +1,8 @@ error: compilation successful --> $DIR/issue-43106-gating-of-deprecated.rs:29:1 | -29 | / fn main() { //~ ERROR compilation successful -30 | | println!("Hello World"); -31 | | } +LL | / fn main() { //~ ERROR compilation successful +LL | | println!("Hello World"); +LL | | } | |_^ diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr index c5b33384b91..8f63b16b0cf 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr @@ -1,19 +1,19 @@ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:14:14 | -14 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:18:14 | -18 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: cannot find derive macro `x3300` in this scope --> $DIR/issue-43106-gating-of-derive-2.rs:22:14 | -22 | #[derive(x3300)] +LL | #[derive(x3300)] | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr index a0b12585f3c..6f5df6beba3 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr @@ -1,37 +1,37 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:14:1 | -14 | #![derive(Debug)] +LL | #![derive(Debug)] | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:17:1 | -17 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:20:17 | -20 | mod inner { #![derive(Debug)] } +LL | mod inner { #![derive(Debug)] } | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:23:5 | -23 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:36:5 | -36 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43106-gating-of-derive.rs:40:5 | -40 | #[derive(Debug)] +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr index 8af406aef6d..40a81171a89 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -3,40 +3,40 @@ error[E0601]: main function not found error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:21:1 | -21 | #[inline = "2100"] +LL | #[inline = "2100"] | ^^^^^^^^^^^^^^^^^^ -22 | //~^ ERROR attribute should be applied to function -23 | / mod inline { -24 | | mod inner { #![inline="2100"] } -25 | | //~^ ERROR attribute should be applied to function -26 | | +LL | //~^ ERROR attribute should be applied to function +LL | / mod inline { +LL | | mod inner { #![inline="2100"] } +LL | | //~^ ERROR attribute should be applied to function +LL | | ... | -36 | | //~^ ERROR attribute should be applied to function -37 | | } +LL | | //~^ ERROR attribute should be applied to function +LL | | } | |_- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:24:17 | -24 | mod inner { #![inline="2100"] } +LL | mod inner { #![inline="2100"] } | ------------^^^^^^^^^^^^^^^^^-- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:29:5 | -29 | #[inline = "2100"] struct S; +LL | #[inline = "2100"] struct S; | ^^^^^^^^^^^^^^^^^^ --------- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:32:5 | -32 | #[inline = "2100"] type T = S; +LL | #[inline = "2100"] type T = S; | ^^^^^^^^^^^^^^^^^^ ----------- not a function error[E0518]: attribute should be applied to function --> $DIR/issue-43106-gating-of-inline.rs:35:5 | -35 | #[inline = "2100"] impl S { } +LL | #[inline = "2100"] impl S { } | ^^^^^^^^^^^^^^^^^^ ---------- not a function error: aborting due to 6 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr index c0d8aa5c31c..5e540f9139e 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr @@ -1,7 +1,7 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/issue-43106-gating-of-macro_escape.rs:16:1 | -16 | #![macro_escape] +LL | #![macro_escape] | ^^^^^^^^^^^^^^^^ | = help: consider an outer attribute, #[macro_use] mod ... diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr index 2977384f62d..0a491cd3b56 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr @@ -1,19 +1,19 @@ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:16:1 | -16 | #![macro_use = "4900"] //~ ERROR arguments to macro_use are not allowed here +LL | #![macro_use = "4900"] //~ ERROR arguments to macro_use are not allowed here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:18:1 | -18 | #[macro_use = "2700"] +LL | #[macro_use = "2700"] | ^^^^^^^^^^^^^^^^^^^^^ error: arguments to macro_use are not allowed here --> $DIR/issue-43106-gating-of-macro_use.rs:21:17 | -21 | mod inner { #![macro_use="2700"] } +LL | mod inner { #![macro_use="2700"] } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr index 4e844ba5889..5a184897a09 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr @@ -1,37 +1,37 @@ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:20:1 | -20 | #[proc_macro_derive = "2500"] +LL | #[proc_macro_derive = "2500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:28:17 | -28 | mod inner { #![proc_macro_derive="2500"] } +LL | mod inner { #![proc_macro_derive="2500"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:31:5 | -31 | #[proc_macro_derive = "2500"] fn f() { } +LL | #[proc_macro_derive = "2500"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:34:5 | -34 | #[proc_macro_derive = "2500"] struct S; +LL | #[proc_macro_derive = "2500"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:37:5 | -37 | #[proc_macro_derive = "2500"] type T = S; +LL | #[proc_macro_derive = "2500"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute may only be used on bare functions --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:40:5 | -40 | #[proc_macro_derive = "2500"] impl S { } +LL | #[proc_macro_derive = "2500"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0601]: main function not found diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr index a603836daa0..1d453085256 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:17:1 | -17 | #![rustc_deprecated = "1500"] +LL | #![rustc_deprecated = "1500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:20:1 | -20 | #[rustc_deprecated = "1500"] +LL | #[rustc_deprecated = "1500"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:17 | -23 | mod inner { #![rustc_deprecated="1500"] } +LL | mod inner { #![rustc_deprecated="1500"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5 | -26 | #[rustc_deprecated = "1500"] fn f() { } +LL | #[rustc_deprecated = "1500"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:29:5 | -29 | #[rustc_deprecated = "1500"] struct S; +LL | #[rustc_deprecated = "1500"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:32:5 | -32 | #[rustc_deprecated = "1500"] type T = S; +LL | #[rustc_deprecated = "1500"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:35:5 | -35 | #[rustc_deprecated = "1500"] impl S { } +LL | #[rustc_deprecated = "1500"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr index ebf7100c35b..f7f426299da 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:17:1 | -17 | #![stable = "1300"] +LL | #![stable = "1300"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:20:1 | -20 | #[stable = "1300"] +LL | #[stable = "1300"] | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:23:17 | -23 | mod inner { #![stable="1300"] } +LL | mod inner { #![stable="1300"] } | ^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:26:5 | -26 | #[stable = "1300"] fn f() { } +LL | #[stable = "1300"] fn f() { } | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:29:5 | -29 | #[stable = "1300"] struct S; +LL | #[stable = "1300"] struct S; | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:32:5 | -32 | #[stable = "1300"] type T = S; +LL | #[stable = "1300"] type T = S; | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-stable.rs:35:5 | -35 | #[stable = "1300"] impl S { } +LL | #[stable = "1300"] impl S { } | ^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr index c91b262c7ed..afa44421711 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr @@ -3,43 +3,43 @@ error[E0601]: main function not found error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:17:1 | -17 | #![unstable = "1200"] +LL | #![unstable = "1200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:20:1 | -20 | #[unstable = "1200"] +LL | #[unstable = "1200"] | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:23:17 | -23 | mod inner { #![unstable="1200"] } +LL | mod inner { #![unstable="1200"] } | ^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:26:5 | -26 | #[unstable = "1200"] fn f() { } +LL | #[unstable = "1200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:29:5 | -29 | #[unstable = "1200"] struct S; +LL | #[unstable = "1200"] struct S; | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:32:5 | -32 | #[unstable = "1200"] type T = S; +LL | #[unstable = "1200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/issue-43106-gating-of-unstable.rs:35:5 | -35 | #[unstable = "1200"] impl S { } +LL | #[unstable = "1200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/fmt/format-string-error.stderr b/src/test/ui/fmt/format-string-error.stderr index 1c775929cf4..a7a66722e52 100644 --- a/src/test/ui/fmt/format-string-error.stderr +++ b/src/test/ui/fmt/format-string-error.stderr @@ -1,7 +1,7 @@ error: invalid format string: expected `'}'` but string was terminated --> $DIR/format-string-error.rs:12:5 | -12 | println!("{"); +LL | println!("{"); | ^^^^^^^^^^^^^^ | = note: if you intended to print `{`, you can escape it using `{{` @@ -10,7 +10,7 @@ error: invalid format string: expected `'}'` but string was terminated error: invalid format string: unmatched `}` found --> $DIR/format-string-error.rs:14:5 | -14 | println!("}"); +LL | println!("}"); | ^^^^^^^^^^^^^^ | = note: if you intended to print `}`, you can escape it using `}}` diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index 7e2b6a43dd4..0943b64c5c0 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` is not satisfied in `[std::fmt::ArgumentV1<'_>]` --> $DIR/send-sync.rs:18:5 | -18 | send(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied +LL | send(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely | = help: within `[std::fmt::ArgumentV1<'_>]`, the trait `std::marker::Sync` is not implemented for `*mut std::ops::Fn() + 'static` @@ -15,13 +15,13 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` note: required by `send` --> $DIR/send-sync.rs:11:1 | -11 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` is not satisfied in `std::fmt::Arguments<'_>` --> $DIR/send-sync.rs:19:5 | -19 | sync(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied +LL | sync(format_args!("{:?}", c)); //~ ERROR Sync` is not satisfied | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely | = help: within `std::fmt::Arguments<'_>`, the trait `std::marker::Sync` is not implemented for `*mut std::ops::Fn() + 'static` @@ -35,7 +35,7 @@ error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` note: required by `sync` --> $DIR/send-sync.rs:12:1 | -12 | fn sync(_: T) {} +LL | fn sync(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/auto-trait-regions.stderr b/src/test/ui/generator/auto-trait-regions.stderr index 2fc359946fa..8f78bb8fa88 100644 --- a/src/test/ui/generator/auto-trait-regions.stderr +++ b/src/test/ui/generator/auto-trait-regions.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `No: Foo` is not satisfied in `[generator@$DIR/auto-trait-regions.rs:35:15: 39:6 x:&&'static OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]` --> $DIR/auto-trait-regions.rs:40:5 | -40 | assert_foo(gen); //~ ERROR the trait bound `No: Foo` is not satisfied +LL | assert_foo(gen); //~ ERROR the trait bound `No: Foo` is not satisfied | ^^^^^^^^^^ within `[generator@$DIR/auto-trait-regions.rs:35:15: 39:6 x:&&'static OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]`, the trait `Foo` is not implemented for `No` | = help: the following implementations were found: @@ -13,13 +13,13 @@ error[E0277]: the trait bound `No: Foo` is not satisfied in `[generator@$DIR/aut note: required by `assert_foo` --> $DIR/auto-trait-regions.rs:30:1 | -30 | fn assert_foo(f: T) {} +LL | fn assert_foo(f: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0279]: the requirement `for<'r, 's> 'r : 's` is not satisfied (`expected bound lifetime parameter, found concrete lifetime`) --> $DIR/auto-trait-regions.rs:57:5 | -57 | assert_foo(gen); //~ ERROR the requirement `for<'r, 's> 'r : 's` is not satisfied +LL | assert_foo(gen); //~ ERROR the requirement `for<'r, 's> 'r : 's` is not satisfied | ^^^^^^^^^^ | = note: required because of the requirements on the impl of `for<'r, 's> Foo` for `A<'_, '_>` @@ -28,7 +28,7 @@ error[E0279]: the requirement `for<'r, 's> 'r : 's` is not satisfied (`expected note: required by `assert_foo` --> $DIR/auto-trait-regions.rs:30:1 | -30 | fn assert_foo(f: T) {} +LL | fn assert_foo(f: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index 1d58bca15fa..a27d950c045 100644 --- a/src/test/ui/generator/borrowing.stderr +++ b/src/test/ui/generator/borrowing.stderr @@ -1,28 +1,28 @@ error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:18:20 | -18 | (|| yield &a).resume() +LL | (|| yield &a).resume() | -- ^ borrowed value does not live long enough | | | capture occurs here -19 | //~^ ERROR: `a` does not live long enough -20 | }; +LL | //~^ ERROR: `a` does not live long enough +LL | }; | - borrowed value only lives until here ... -29 | } +LL | } | - borrowed value needs to live until here error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:25:20 | -24 | || { +LL | || { | -- capture occurs here -25 | yield &a +LL | yield &a | ^ borrowed value does not live long enough ... -28 | }; +LL | }; | - borrowed value only lives until here -29 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/dropck.stderr b/src/test/ui/generator/dropck.stderr index 01ef5753424..c4ae9051138 100644 --- a/src/test/ui/generator/dropck.stderr +++ b/src/test/ui/generator/dropck.stderr @@ -1,13 +1,13 @@ error[E0597]: `ref_` does not live long enough --> $DIR/dropck.rs:23:18 | -21 | gen = || { +LL | gen = || { | -- capture occurs here -22 | // but the generator can use it to drop a `Ref<'a, i32>`. -23 | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough +LL | // but the generator can use it to drop a `Ref<'a, i32>`. +LL | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough | ^^^^ borrowed value does not live long enough ... -28 | } +LL | } | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr index ab81501f237..49542dd0ac3 100644 --- a/src/test/ui/generator/generator-with-nll.stderr +++ b/src/test/ui/generator/generator-with-nll.stderr @@ -1,28 +1,28 @@ error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/generator-with-nll.rs:19:23 | -19 | let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ ... -22 | yield (); +LL | yield (); | -------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/generator-with-nll.rs:20:22 | -20 | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ -21 | //~^ borrow may still be in use when generator yields (Mir) -22 | yield (); +LL | //~^ borrow may still be in use when generator yields (Mir) +LL | yield (); | -------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/generator-with-nll.rs:20:17 | -20 | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) +LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^^^^^^ -21 | //~^ borrow may still be in use when generator yields (Mir) -22 | yield (); +LL | //~^ borrow may still be in use when generator yields (Mir) +LL | yield (); | -------- possible yield occurs here error: aborting due to 3 previous errors diff --git a/src/test/ui/generator/issue-48048.stderr b/src/test/ui/generator/issue-48048.stderr index 04e4397cc5c..75918766754 100644 --- a/src/test/ui/generator/issue-48048.stderr +++ b/src/test/ui/generator/issue-48048.stderr @@ -1,9 +1,9 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/issue-48048.rs:19:9 | -19 | x.0({ //~ ERROR borrow may still be in use when generator yields +LL | x.0({ //~ ERROR borrow may still be in use when generator yields | ^^^ -20 | yield; +LL | yield; | ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/no-arguments-on-generators.stderr b/src/test/ui/generator/no-arguments-on-generators.stderr index 84a5edf4f22..6091946f2fa 100644 --- a/src/test/ui/generator/no-arguments-on-generators.stderr +++ b/src/test/ui/generator/no-arguments-on-generators.stderr @@ -1,7 +1,7 @@ error[E0628]: generators cannot have explicit arguments --> $DIR/no-arguments-on-generators.rs:14:15 | -14 | let gen = |start| { //~ ERROR generators cannot have explicit arguments +LL | let gen = |start| { //~ ERROR generators cannot have explicit arguments | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generator/not-send-sync.stderr b/src/test/ui/generator/not-send-sync.stderr index cd2d16fd662..6ca583bf16d 100644 --- a/src/test/ui/generator/not-send-sync.stderr +++ b/src/test/ui/generator/not-send-sync.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not satisfied --> $DIR/not-send-sync.rs:26:5 | -26 | assert_send(|| { +LL | assert_send(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` @@ -10,13 +10,13 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not s note: required by `main::assert_send` --> $DIR/not-send-sync.rs:17:5 | -17 | fn assert_send(_: T) {} +LL | fn assert_send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not satisfied in `[generator@$DIR/not-send-sync.rs:19:17: 23:6 {std::cell::Cell, ()}]` --> $DIR/not-send-sync.rs:19:5 | -19 | assert_sync(|| { +LL | assert_sync(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely | = help: within `[generator@$DIR/not-send-sync.rs:19:17: 23:6 {std::cell::Cell, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell` @@ -25,7 +25,7 @@ error[E0277]: the trait bound `std::cell::Cell: std::marker::Sync` is not s note: required by `main::assert_sync` --> $DIR/not-send-sync.rs:16:5 | -16 | fn assert_sync(_: T) {} +LL | fn assert_sync(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/pattern-borrow.stderr b/src/test/ui/generator/pattern-borrow.stderr index 2346714b212..6acfd96d887 100644 --- a/src/test/ui/generator/pattern-borrow.stderr +++ b/src/test/ui/generator/pattern-borrow.stderr @@ -1,9 +1,9 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/pattern-borrow.rs:19:24 | -19 | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields +LL | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields | ^^^^^^ -20 | yield (); +LL | yield (); | -------- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr index b752a4c064c..7cd07adf0b1 100644 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr +++ b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr @@ -1,12 +1,12 @@ error[E0597]: `b` does not live long enough --> $DIR/ref-escapes-but-not-over-yield.rs:24:14 | -24 | a = &b; +LL | a = &b; | ^ borrowed value does not live long enough -25 | //~^ ERROR `b` does not live long enough -26 | }; +LL | //~^ ERROR `b` does not live long enough +LL | }; | - `b` dropped here while still borrowed -27 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index a61adcf4a77..c10adad99eb 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -1,10 +1,10 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/sized-yield.rs:17:26 | -17 | let mut gen = move || { //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied +LL | let mut gen = move || { //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | __________________________^ -18 | | yield s[..]; -19 | | }; +LL | | yield s[..]; +LL | | }; | |____^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -13,7 +13,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/sized-yield.rs:20:8 | -20 | gen.resume(); //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied +LL | gen.resume(); //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` diff --git a/src/test/ui/generator/unsafe-immovable.stderr b/src/test/ui/generator/unsafe-immovable.stderr index 87a85c6845f..a6755283bce 100644 --- a/src/test/ui/generator/unsafe-immovable.stderr +++ b/src/test/ui/generator/unsafe-immovable.stderr @@ -1,9 +1,9 @@ error[E0133]: construction of immovable generator requires unsafe function or block --> $DIR/unsafe-immovable.rs:14:5 | -14 | / static || { //~ ERROR: construction of immovable generator requires unsafe -15 | | yield; -16 | | }; +LL | / static || { //~ ERROR: construction of immovable generator requires unsafe +LL | | yield; +LL | | }; | |_____^ construction of immovable generator error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index f69948c9004..26152f73f5a 100644 --- a/src/test/ui/generator/yield-in-args.stderr +++ b/src/test/ui/generator/yield-in-args.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-in-args.rs:18:14 | -18 | foo(&b, yield); //~ ERROR +LL | foo(&b, yield); //~ ERROR | ^ ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-const.stderr b/src/test/ui/generator/yield-in-const.stderr index b7faca23ed3..119f94695e7 100644 --- a/src/test/ui/generator/yield-in-const.stderr +++ b/src/test/ui/generator/yield-in-const.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-const.rs:13:17 | -13 | const A: u8 = { yield 3u8; 3u8}; +LL | const A: u8 = { yield 3u8; 3u8}; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-in-function.stderr b/src/test/ui/generator/yield-in-function.stderr index 3aa4130a148..b1d76b41fa2 100644 --- a/src/test/ui/generator/yield-in-function.stderr +++ b/src/test/ui/generator/yield-in-function.stderr @@ -1,7 +1,7 @@ error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-function.rs:13:13 | -13 | fn main() { yield; } +LL | fn main() { yield; } | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-static.stderr b/src/test/ui/generator/yield-in-static.stderr index 2f3c41f71c3..0a2da21e692 100644 --- a/src/test/ui/generator/yield-in-static.stderr +++ b/src/test/ui/generator/yield-in-static.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-static.rs:13:18 | -13 | static B: u8 = { yield 3u8; 3u8}; +LL | static B: u8 = { yield 3u8; 3u8}; | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index 27a13a6382c..c1a047f6c2a 100644 --- a/src/test/ui/generator/yield-while-iterating.stderr +++ b/src/test/ui/generator/yield-while-iterating.stderr @@ -1,23 +1,23 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-while-iterating.rs:22:19 | -22 | for p in &x { //~ ERROR +LL | for p in &x { //~ ERROR | ^ -23 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable --> $DIR/yield-while-iterating.rs:67:20 | -62 | let mut b = || { +LL | let mut b = || { | -- mutable borrow occurs here -63 | for p in &mut x { +LL | for p in &mut x { | - previous borrow occurs due to use of `x` in closure ... -67 | println!("{}", x[0]); //~ ERROR +LL | println!("{}", x[0]); //~ ERROR | ^ immutable borrow occurs here -68 | b.resume(); -69 | } +LL | b.resume(); +LL | } | - mutable borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/yield-while-local-borrowed.stderr b/src/test/ui/generator/yield-while-local-borrowed.stderr index d28ea1d4368..7417cdd9aa5 100644 --- a/src/test/ui/generator/yield-while-local-borrowed.stderr +++ b/src/test/ui/generator/yield-while-local-borrowed.stderr @@ -1,37 +1,37 @@ error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/yield-while-local-borrowed.rs:24:22 | -24 | let a = &mut 3; +LL | let a = &mut 3; | ^ ... -27 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Ast) --> $DIR/yield-while-local-borrowed.rs:52:22 | -52 | let b = &a; +LL | let b = &a; | ^ ... -55 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/yield-while-local-borrowed.rs:24:17 | -24 | let a = &mut 3; +LL | let a = &mut 3; | ^^^^^^ ... -27 | yield(); +LL | yield(); | ------- possible yield occurs here error[E0626]: borrow may still be in use when generator yields (Mir) --> $DIR/yield-while-local-borrowed.rs:52:21 | -52 | let b = &a; +LL | let b = &a; | ^^ ... -55 | yield(); +LL | yield(); | ------- possible yield occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index d2aa84f3c09..57d688e78f6 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.stderr @@ -1,15 +1,15 @@ error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access --> $DIR/yield-while-ref-reborrowed.rs:45:20 | -40 | let mut b = || { +LL | let mut b = || { | -- closure construction occurs here -41 | let a = &mut *x; +LL | let a = &mut *x; | - previous borrow occurs due to use of `x` in closure ... -45 | println!("{}", x); //~ ERROR +LL | println!("{}", x); //~ ERROR | ^ borrow occurs here -46 | b.resume(); -47 | } +LL | b.resume(); +LL | } | - borrow from closure ends here error: aborting due to previous error diff --git a/src/test/ui/generic-type-less-params-with-defaults.stderr b/src/test/ui/generic-type-less-params-with-defaults.stderr index 6726f40dd06..327a36df80c 100644 --- a/src/test/ui/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generic-type-less-params-with-defaults.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected at least 1, found 0 --> $DIR/generic-type-less-params-with-defaults.rs:19:12 | -19 | let _: Vec; +LL | let _: Vec; | ^^^ expected at least 1 type argument error: aborting due to previous error diff --git a/src/test/ui/generic-type-more-params-with-defaults.stderr b/src/test/ui/generic-type-more-params-with-defaults.stderr index aa06e82a250..1f60d7997e3 100644 --- a/src/test/ui/generic-type-more-params-with-defaults.stderr +++ b/src/test/ui/generic-type-more-params-with-defaults.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected at most 2, found 3 --> $DIR/generic-type-more-params-with-defaults.rs:19:12 | -19 | let _: Vec; +LL | let _: Vec; | ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type arguments error: aborting due to previous error diff --git a/src/test/ui/if-let-arm-types.stderr b/src/test/ui/if-let-arm-types.stderr index fb1cf205b62..b20426103f4 100644 --- a/src/test/ui/if-let-arm-types.stderr +++ b/src/test/ui/if-let-arm-types.stderr @@ -1,13 +1,13 @@ error[E0308]: `if let` arms have incompatible types --> $DIR/if-let-arm-types.rs:12:5 | -12 | / if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types -13 | | //~^ expected (), found integral variable -14 | | //~| expected type `()` -15 | | //~| found type `{integer}` +LL | / if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types +LL | | //~^ expected (), found integral variable +LL | | //~| expected type `()` +LL | | //~| found type `{integer}` ... | -18 | | 1 -19 | | }; +LL | | 1 +LL | | }; | |_____^ expected (), found integral variable | = note: expected type `()` @@ -15,10 +15,10 @@ error[E0308]: `if let` arms have incompatible types note: `if let` arm with an incompatible type --> $DIR/if-let-arm-types.rs:17:12 | -17 | } else { +LL | } else { | ____________^ -18 | | 1 -19 | | }; +LL | | 1 +LL | | }; | |_____^ error: aborting due to previous error diff --git a/src/test/ui/impl-duplicate-methods.stderr b/src/test/ui/impl-duplicate-methods.stderr index 53bc268e327..dcbac5cfa0b 100644 --- a/src/test/ui/impl-duplicate-methods.stderr +++ b/src/test/ui/impl-duplicate-methods.stderr @@ -1,9 +1,9 @@ error[E0201]: duplicate definitions with name `orange`: --> $DIR/impl-duplicate-methods.rs:15:5 | -14 | fn orange(&self) {} +LL | fn orange(&self) {} | ------------------- previous definition of `orange` here -15 | fn orange(&self) {} +LL | fn orange(&self) {} | ^^^^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index f69840238a7..bf7705881c9 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:27:5 | -27 | send(before()); +LL | send(before()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` @@ -10,13 +10,13 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::rc::Rc>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:30:5 | -30 | send(after()); +LL | send(after()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` @@ -25,34 +25,34 @@ error[E0277]: the trait bound `std::rc::Rc>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send(_: T) {} +LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0391]: cyclic dependency detected --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when processing `cycle1`... --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle2::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:52:16 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which then requires processing `cycle2`... --> $DIR/auto-trait-leak.rs:52:1 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle1::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:44:16 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ = note: ...which then again requires processing `cycle1`, completing the cycle. diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index c30b0d7f648..0c72468a267 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/equality.rs:25:5 | -25 | 0_u32 +LL | 0_u32 | ^^^^^ expected i32, found u32 | = note: expected type `i32` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0277]: cannot add `impl Foo` to `u32` --> $DIR/equality.rs:34:11 | -34 | n + sum_to(n - 1) +LL | n + sum_to(n - 1) | ^ no implementation for `u32 + impl Foo` | = help: the trait `std::ops::Add` is not implemented for `u32` @@ -18,7 +18,7 @@ error[E0277]: cannot add `impl Foo` to `u32` error[E0308]: mismatched types --> $DIR/equality.rs:53:18 | -53 | let _: u32 = hide(0_u32); +LL | let _: u32 = hide(0_u32); | ^^^^^^^^^^^ expected u32, found anonymized type | = note: expected type `u32` @@ -27,7 +27,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:59:18 | -59 | let _: i32 = Leak::leak(hide(0_i32)); +LL | let _: i32 = Leak::leak(hide(0_i32)); | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type | = note: expected type `i32` @@ -36,7 +36,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:66:10 | -66 | x = (x.1, +LL | x = (x.1, | ^^^ expected u32, found i32 | = note: expected type `impl Foo` (u32) @@ -45,7 +45,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:69:10 | -69 | x.0); +LL | x.0); | ^^^ expected i32, found u32 | = note: expected type `impl Foo` (i32) diff --git a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr index 7010ab1e471..1d4159aaa45 100644 --- a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr +++ b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr @@ -1,67 +1,67 @@ error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:33:18 | -33 | type A = fn() -> impl A +; +LL | type A = fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:35:18 | -35 | type A = fn() -> impl A + B; +LL | type A = fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:37:18 | -37 | type A = fn() -> dyn A + B; +LL | type A = fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> A` --> $DIR/impl-trait-plus-priority.rs:39:10 | -39 | type A = fn() -> A + B; +LL | type A = fn() -> A + B; | ^^^^^^^^^^^^^ perhaps you forgot parentheses? error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:42:18 | -42 | type A = Fn() -> impl A +; +LL | type A = Fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:44:18 | -44 | type A = Fn() -> impl A + B; +LL | type A = Fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:46:18 | -46 | type A = Fn() -> dyn A + B; +LL | type A = Fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:50:11 | -50 | type A = &impl A +; +LL | type A = &impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:52:11 | -52 | type A = &impl A + B; +LL | type A = &impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:54:11 | -54 | type A = &dyn A + B; +LL | type A = &dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `&A` --> $DIR/impl-trait-plus-priority.rs:56:10 | -56 | type A = &A + B; +LL | type A = &A + B; | ^^^^^^ help: try adding parentheses: `&(A + B)` error: aborting due to 11 previous errors diff --git a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr index d5cc1ea8085..d80251200b2 100644 --- a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr +++ b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `foo` found for type `Bar` in the current scope --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:30:8 | -23 | struct Bar; +LL | struct Bar; | ----------- method `foo` not found for this ... -30 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index 8ffbd29eabe..b441ff518bd 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope --> $DIR/method-suggestion-no-duplication.rs:19:15 | -14 | struct Foo; +LL | struct Foo; | ----------- method `is_empty` not found for this ... -19 | foo(|s| s.is_empty()); +LL | foo(|s| s.is_empty()); | ^^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index f136fd4072c..d5250b42cc2 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -1,94 +1,94 @@ error[E0599]: no method named `method` found for type `u32` in the current scope --> $DIR/no-method-suggested-traits.rs:33:10 | -33 | 1u32.method(); +LL | 1u32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following traits are implemented but not in scope, perhaps add a `use` for one of them: | -14 | use foo::Bar; +LL | use foo::Bar; | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | -14 | use no_method_suggested_traits::qux::PrivPub; +LL | use no_method_suggested_traits::qux::PrivPub; | -14 | use no_method_suggested_traits::Reexported; +LL | use no_method_suggested_traits::Reexported; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:36:44 | -36 | std::rc::Rc::new(&mut Box::new(&1u32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following traits are implemented but not in scope, perhaps add a `use` for one of them: | -14 | use foo::Bar; +LL | use foo::Bar; | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | -14 | use no_method_suggested_traits::qux::PrivPub; +LL | use no_method_suggested_traits::qux::PrivPub; | -14 | use no_method_suggested_traits::Reexported; +LL | use no_method_suggested_traits::Reexported; | error[E0599]: no method named `method` found for type `char` in the current scope --> $DIR/no-method-suggested-traits.rs:40:9 | -40 | 'a'.method(); +LL | 'a'.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use foo::Bar; +LL | use foo::Bar; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope --> $DIR/no-method-suggested-traits.rs:42:43 | -42 | std::rc::Rc::new(&mut Box::new(&'a')).method(); +LL | std::rc::Rc::new(&mut Box::new(&'a')).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use foo::Bar; +LL | use foo::Bar; | error[E0599]: no method named `method` found for type `i32` in the current scope --> $DIR/no-method-suggested-traits.rs:45:10 | -45 | 1i32.method(); +LL | 1i32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:47:44 | -47 | std::rc::Rc::new(&mut Box::new(&1i32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -14 | use no_method_suggested_traits::foo::PubPub; +LL | use no_method_suggested_traits::foo::PubPub; | error[E0599]: no method named `method` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:50:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method` not found for this ... -50 | Foo.method(); +LL | Foo.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -101,7 +101,7 @@ error[E0599]: no method named `method` found for type `Foo` in the current scope error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:52:43 | -52 | std::rc::Rc::new(&mut Box::new(&Foo)).method(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -114,7 +114,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box error[E0599]: no method named `method2` found for type `u64` in the current scope --> $DIR/no-method-suggested-traits.rs:55:10 | -55 | 1u64.method2(); +LL | 1u64.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -124,7 +124,7 @@ error[E0599]: no method named `method2` found for type `u64` in the current scop error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope --> $DIR/no-method-suggested-traits.rs:57:44 | -57 | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -134,7 +134,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:60:37 | -60 | no_method_suggested_traits::Foo.method2(); +LL | no_method_suggested_traits::Foo.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -144,7 +144,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:62:71 | -62 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -154,7 +154,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:64:40 | -64 | no_method_suggested_traits::Bar::X.method2(); +LL | no_method_suggested_traits::Bar::X.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -164,7 +164,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:66:74 | -66 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -174,10 +174,10 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:69:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method3` not found for this ... -69 | Foo.method3(); +LL | Foo.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -187,7 +187,7 @@ error[E0599]: no method named `method3` found for type `Foo` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:71:43 | -71 | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -197,10 +197,10 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:73:12 | -15 | enum Bar { X } +LL | enum Bar { X } | -------- method `method3` not found for this ... -73 | Bar::X.method3(); +LL | Bar::X.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -210,7 +210,7 @@ error[E0599]: no method named `method3` found for type `Bar` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:75:46 | -75 | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -220,37 +220,37 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `usize` in the current scope --> $DIR/no-method-suggested-traits.rs:79:13 | -79 | 1_usize.method3(); //~ ERROR no method named +LL | 1_usize.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:80:47 | -80 | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named +LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:81:37 | -81 | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:82:71 | -82 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:84:40 | -84 | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:85:74 | -85 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); | ^^^^^^^ error: aborting due to 24 previous errors diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index 134386825d6..6c2fde03de3 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -1,7 +1,7 @@ error[E0053]: method `fmt` has an incompatible type for trait --> $DIR/trait_type.rs:17:4 | -17 | fn fmt(&self, x: &str) -> () { } +LL | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -10,7 +10,7 @@ error[E0053]: method `fmt` has an incompatible type for trait error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 --> $DIR/trait_type.rs:22:11 | -22 | fn fmt(&self) -> () { } +LL | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -18,7 +18,7 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl --> $DIR/trait_type.rs:27:4 | -27 | fn fmt() -> () { } +LL | fn fmt() -> () { } | ^^^^^^^^^^^^^^ expected `&self` in impl | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -26,7 +26,7 @@ error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in th error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/trait_type.rs:31:1 | -31 | impl std::fmt::Display for MyType4 {} +LL | impl std::fmt::Display for MyType4 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index 688d0b3be44..67b3dacdaf5 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/universal-mismatched-type.rs:16:5 | -15 | fn foo(x: impl Debug) -> String { +LL | fn foo(x: impl Debug) -> String { | ------ expected `std::string::String` because of return type -16 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found type parameter | = note: expected type `std::string::String` diff --git a/src/test/ui/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr index ab41e44cdea..4309c1a9bc9 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/universal-two-impl-traits.rs:17:9 | -17 | a = y; //~ ERROR mismatched +LL | a = y; //~ ERROR mismatched | ^ expected type parameter, found a different type parameter | = note: expected type `impl Debug` (type parameter) diff --git a/src/test/ui/impl-trait/universal_wrong_bounds.stderr b/src/test/ui/impl-trait/universal_wrong_bounds.stderr index d3ae05eb4e5..6cf0baa5fcc 100644 --- a/src/test/ui/impl-trait/universal_wrong_bounds.stderr +++ b/src/test/ui/impl-trait/universal_wrong_bounds.stderr @@ -1,27 +1,27 @@ error[E0425]: cannot find function `wants_clone` in this scope --> $DIR/universal_wrong_bounds.rs:18:5 | -18 | wants_clone(f); //~ ERROR cannot find +LL | wants_clone(f); //~ ERROR cannot find | ^^^^^^^^^^^ did you mean `wants_cone`? error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:21:24 | -21 | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use std::fmt::Debug; +LL | use std::fmt::Debug; | error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:22:26 | -22 | fn wants_display(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_display(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use std::fmt::Debug; +LL | use std::fmt::Debug; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/impl-unused-rps-in-assoc-type.stderr b/src/test/ui/impl-unused-rps-in-assoc-type.stderr index d8e31a750ff..fb3cf9a30c8 100644 --- a/src/test/ui/impl-unused-rps-in-assoc-type.stderr +++ b/src/test/ui/impl-unused-rps-in-assoc-type.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/impl-unused-rps-in-assoc-type.rs:21:6 | -21 | impl<'a> Fun for Holder { //~ ERROR E0207 +LL | impl<'a> Fun for Holder { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index a0a24cc9d04..f519f21215e 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -1,31 +1,31 @@ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:23:51 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:30:9 | -30 | -> ::Item +LL | -> ::Item | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:37:27 | -37 | -> <::std::ops::Range as Iterator>::Item +LL | -> <::std::ops::Range as Iterator>::Item | ^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:44:29 | -44 | -> as Iterator>::Item +LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type --> $DIR/impl_trait_projections.rs:23:50 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Item` diff --git a/src/test/ui/imports/duplicate.stderr b/src/test/ui/imports/duplicate.stderr index 707f0081cd6..0715674077a 100644 --- a/src/test/ui/imports/duplicate.stderr +++ b/src/test/ui/imports/duplicate.stderr @@ -1,86 +1,86 @@ error[E0252]: the name `foo` is defined multiple times --> $DIR/duplicate.rs:25:9 | -24 | use a::foo; +LL | use a::foo; | ------ previous import of the value `foo` here -25 | use a::foo; //~ ERROR the name `foo` is defined multiple times +LL | use a::foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -25 | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times +LL | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times | ^^^^^^^^^^^^^^^^^^^ error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:56:9 | -56 | use self::foo::bar; //~ ERROR `foo` is ambiguous +LL | use self::foo::bar; //~ ERROR `foo` is ambiguous | ^^^^^^^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:53:9 | -53 | use self::m1::*; +LL | use self::m1::*; | ^^^^^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:54:9 | -54 | use self::m2::*; +LL | use self::m2::*; | ^^^^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:45:5 | -45 | f::foo(); //~ ERROR `foo` is ambiguous +LL | f::foo(); //~ ERROR `foo` is ambiguous | ^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:34:13 | -34 | pub use a::*; +LL | pub use a::*; | ^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:35:13 | -35 | pub use b::*; +LL | pub use b::*; | ^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:46:5 | -46 | g::foo(); //~ ERROR `foo` is ambiguous +LL | g::foo(); //~ ERROR `foo` is ambiguous | ^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:39:13 | -39 | pub use a::*; +LL | pub use a::*; | ^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:40:13 | -40 | pub use f::*; +LL | pub use f::*; | ^^^^ = note: consider adding an explicit import of `foo` to disambiguate error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:59:9 | -59 | foo::bar(); //~ ERROR `foo` is ambiguous +LL | foo::bar(); //~ ERROR `foo` is ambiguous | ^^^^^^^^ | note: `foo` could refer to the name imported here --> $DIR/duplicate.rs:53:9 | -53 | use self::m1::*; +LL | use self::m1::*; | ^^^^^^^^^^^ note: `foo` could also refer to the name imported here --> $DIR/duplicate.rs:54:9 | -54 | use self::m2::*; +LL | use self::m2::*; | ^^^^^^^^^^^ = note: consider adding an explicit import of `foo` to disambiguate diff --git a/src/test/ui/imports/macro-paths.stderr b/src/test/ui/imports/macro-paths.stderr index 02e7e34d32e..815694919c7 100644 --- a/src/test/ui/imports/macro-paths.stderr +++ b/src/test/ui/imports/macro-paths.stderr @@ -1,38 +1,38 @@ error[E0659]: `bar` is ambiguous --> $DIR/macro-paths.rs:25:5 | -25 | bar::m! { //~ ERROR ambiguous +LL | bar::m! { //~ ERROR ambiguous | ^^^^^^ | note: `bar` could refer to the name defined here --> $DIR/macro-paths.rs:26:9 | -26 | mod bar { pub use two_macros::m; } +LL | mod bar { pub use two_macros::m; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `bar` could also refer to the name imported here --> $DIR/macro-paths.rs:24:9 | -24 | use foo::*; +LL | use foo::*; | ^^^^^^ = note: macro-expanded items do not shadow when used in a macro invocation path error[E0659]: `baz` is ambiguous --> $DIR/macro-paths.rs:35:5 | -35 | baz::m! { //~ ERROR ambiguous +LL | baz::m! { //~ ERROR ambiguous | ^^^^^^ | note: `baz` could refer to the name defined here --> $DIR/macro-paths.rs:36:9 | -36 | mod baz { pub use two_macros::m; } +LL | mod baz { pub use two_macros::m; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `baz` could also refer to the name defined here --> $DIR/macro-paths.rs:30:1 | -30 | / pub mod baz { -31 | | pub use two_macros::m; -32 | | } +LL | / pub mod baz { +LL | | pub use two_macros::m; +LL | | } | |_^ = note: macro-expanded items do not shadow when used in a macro invocation path diff --git a/src/test/ui/imports/macros.stderr b/src/test/ui/imports/macros.stderr index 6b917b98062..c32fb56cd5d 100644 --- a/src/test/ui/imports/macros.stderr +++ b/src/test/ui/imports/macros.stderr @@ -1,53 +1,53 @@ error: `m` is ambiguous --> $DIR/macros.rs:50:5 | -50 | m!(); //~ ERROR ambiguous +LL | m!(); //~ ERROR ambiguous | ^ | note: `m` could refer to the macro defined here --> $DIR/macros.rs:48:5 | -48 | macro_rules! m { () => {} } +LL | macro_rules! m { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `m` could also refer to the macro imported here --> $DIR/macros.rs:49:9 | -49 | use two_macros::m; +LL | use two_macros::m; | ^^^^^^^^^^^^^ error[E0659]: `m` is ambiguous --> $DIR/macros.rs:28:5 | -28 | m! { //~ ERROR ambiguous +LL | m! { //~ ERROR ambiguous | ^ | note: `m` could refer to the name imported here --> $DIR/macros.rs:29:13 | -29 | use foo::m; +LL | use foo::m; | ^^^^^^ note: `m` could also refer to the name imported here --> $DIR/macros.rs:27:9 | -27 | use two_macros::*; +LL | use two_macros::*; | ^^^^^^^^^^^^^ = note: macro-expanded macro imports do not shadow error[E0659]: `m` is ambiguous --> $DIR/macros.rs:41:9 | -41 | m! { //~ ERROR ambiguous +LL | m! { //~ ERROR ambiguous | ^ | note: `m` could refer to the name imported here --> $DIR/macros.rs:42:17 | -42 | use two_macros::n as m; +LL | use two_macros::n as m; | ^^^^^^^^^^^^^^^^^^ note: `m` could also refer to the name imported here --> $DIR/macros.rs:34:9 | -34 | use two_macros::m; +LL | use two_macros::m; | ^^^^^^^^^^^^^ = note: macro-expanded macro imports do not shadow diff --git a/src/test/ui/imports/rfc-1560-warning-cycle.stderr b/src/test/ui/imports/rfc-1560-warning-cycle.stderr index 1fec7311272..452fcc4c1a9 100644 --- a/src/test/ui/imports/rfc-1560-warning-cycle.stderr +++ b/src/test/ui/imports/rfc-1560-warning-cycle.stderr @@ -1,11 +1,11 @@ error: `Foo` is ambiguous --> $DIR/rfc-1560-warning-cycle.rs:21:17 | -19 | use *; +LL | use *; | - `Foo` could refer to the name imported here -20 | use bar::*; +LL | use bar::*; | ------ `Foo` could also refer to the name imported here -21 | fn f(_: Foo) {} +LL | fn f(_: Foo) {} | ^^^ | = note: #[deny(legacy_imports)] on by default diff --git a/src/test/ui/imports/shadow_builtin_macros.stderr b/src/test/ui/imports/shadow_builtin_macros.stderr index 709a36dab29..8c72d27d6aa 100644 --- a/src/test/ui/imports/shadow_builtin_macros.stderr +++ b/src/test/ui/imports/shadow_builtin_macros.stderr @@ -1,10 +1,10 @@ error: `panic` is already in scope --> $DIR/shadow_builtin_macros.rs:42:9 | -42 | macro_rules! panic { () => {} } //~ ERROR `panic` is already in scope +LL | macro_rules! panic { () => {} } //~ ERROR `panic` is already in scope | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -43 | } } -44 | m!(); +LL | } } +LL | m!(); | ----- in this macro invocation | = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560) @@ -12,13 +12,13 @@ error: `panic` is already in scope error[E0659]: `panic` is ambiguous --> $DIR/shadow_builtin_macros.rs:27:14 | -27 | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } //~ ERROR ambiguous | ^^^^^ | note: `panic` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:26:9 | -26 | use foo::*; +LL | use foo::*; | ^^^^^^ = note: `panic` is also a builtin macro = note: consider adding an explicit import of `panic` to disambiguate @@ -26,13 +26,13 @@ note: `panic` could refer to the name imported here error[E0659]: `panic` is ambiguous --> $DIR/shadow_builtin_macros.rs:32:14 | -32 | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } //~ ERROR ambiguous | ^^^^^ | note: `panic` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:31:26 | -31 | ::two_macros::m!(use foo::panic;); +LL | ::two_macros::m!(use foo::panic;); | ^^^^^^^^^^ = note: `panic` is also a builtin macro = note: macro-expanded macro imports do not shadow @@ -40,18 +40,18 @@ note: `panic` could refer to the name imported here error[E0659]: `n` is ambiguous --> $DIR/shadow_builtin_macros.rs:61:5 | -61 | n!(); //~ ERROR ambiguous +LL | n!(); //~ ERROR ambiguous | ^ | note: `n` could refer to the name imported here --> $DIR/shadow_builtin_macros.rs:60:9 | -60 | use bar::*; +LL | use bar::*; | ^^^^^^ note: `n` could also refer to the name imported here --> $DIR/shadow_builtin_macros.rs:48:13 | -48 | #[macro_use(n)] +LL | #[macro_use(n)] | ^ = note: consider adding an explicit import of `n` to disambiguate diff --git a/src/test/ui/impossible_range.stderr b/src/test/ui/impossible_range.stderr index 9b3a8e7f6c3..0754dbc796b 100644 --- a/src/test/ui/impossible_range.stderr +++ b/src/test/ui/impossible_range.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:20:8 | -20 | ..=; //~ERROR inclusive range with no end +LL | ..=; //~ERROR inclusive range with no end | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) @@ -9,7 +9,7 @@ error[E0586]: inclusive range with no end error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:27:9 | -27 | 0..=; //~ERROR inclusive range with no end +LL | 0..=; //~ERROR inclusive range with no end | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr index 66451f49f28..e1fa4164cc4 100644 --- a/src/test/ui/in-band-lifetimes/E0687.stderr +++ b/src/test/ui/in-band-lifetimes/E0687.stderr @@ -1,25 +1,25 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:14:15 | -14 | fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:16:16 | -16 | fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:18:15 | -18 | fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly +LL | fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:23:26 | -23 | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error: aborting due to 4 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr index 0a63092acf7..74da124c9c7 100644 --- a/src/test/ui/in-band-lifetimes/E0687_where.stderr +++ b/src/test/ui/in-band-lifetimes/E0687_where.stderr @@ -1,13 +1,13 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:14:31 | -14 | fn bar(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly +LL | fn bar(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:16:21 | -16 | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr index 0e4e75469a9..3521e370dc5 100644 --- a/src/test/ui/in-band-lifetimes/E0688.stderr +++ b/src/test/ui/in-band-lifetimes/E0688.stderr @@ -1,7 +1,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:14:28 | -14 | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix +LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -9,7 +9,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:19:44 | -19 | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix +LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -17,7 +17,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:22:14 | -22 | impl<'b> Foo<'a> { //~ ERROR cannot mix +LL | impl<'b> Foo<'a> { //~ ERROR cannot mix | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here diff --git a/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr b/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr index 613a7be6ed2..ba58ca1ed95 100644 --- a/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr @@ -1,13 +1,13 @@ error: hidden lifetime parameters are deprecated, try `Foo<'_>` --> $DIR/ellided-lifetimes.rs:15:12 | -15 | fn foo(x: &Foo) { +LL | fn foo(x: &Foo) { | ^^^ | note: lint level defined here --> $DIR/ellided-lifetimes.rs:12:9 | -12 | #![deny(elided_lifetime_in_path)] +LL | #![deny(elided_lifetime_in_path)] | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr index b81b5f56f14..9485c9652a9 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.stderr @@ -1,7 +1,7 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched.rs:14:42 | -14 | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required +LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required | - ^ lifetime `'a` required | | | consider changing the type of `y` to `&'a u32` @@ -9,7 +9,7 @@ error[E0621]: explicit lifetime required in the type of `y` error[E0623]: lifetime mismatch --> $DIR/mismatched.rs:16:46 | -16 | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch +LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch | ------- ------- ^ ...but data from `y` is returned here | | | this parameter and the return type are declared with different lifetimes... diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr index 8e5a37b03c5..5007701afdb 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched_trait.rs:16:9 | -15 | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { +LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { | - consider changing the type of `y` to `&'a u32` -16 | y //~ ERROR explicit lifetime required +LL | y //~ ERROR explicit lifetime required | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr index 0345e0dd611..bc55b1c56cf 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr @@ -3,15 +3,15 @@ error[E0601]: main function not found error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements --> $DIR/mismatched_trait_impl-2.rs:18:5 | -18 | fn deref(&self) -> &Trait { +LL | fn deref(&self) -> &Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 18:5... --> $DIR/mismatched_trait_impl-2.rs:18:5 | -18 | / fn deref(&self) -> &Trait { -19 | | unimplemented!(); -20 | | } +LL | / fn deref(&self) -> &Trait { +LL | | unimplemented!(); +LL | | } | |_____^ = note: ...but the lifetime must also be valid for the static lifetime... = note: ...so that the method type is compatible with trait: diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr index b970afe0bae..41b0c77ea14 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr @@ -1,20 +1,20 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 19:5... --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer -20 | | x -21 | | } +LL | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | | x +LL | | } | |_____^ note: ...but the lifetime must also be valid for the lifetime 'a as defined on the method body at 19:5... --> $DIR/mismatched_trait_impl.rs:19:5 | -19 | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...so that the method type is compatible with trait: expected fn(&i32, &'a u32, &u32) -> &'a u32 diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr index 192eb5d3e8a..258b369f257 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr @@ -1,9 +1,9 @@ error[E0506]: cannot assign to `p` because it is borrowed --> $DIR/mut_while_borrow.rs:19:5 | -18 | let r = foo(&p); +LL | let r = foo(&p); | - borrow of `p` occurs here -19 | p += 1; //~ ERROR cannot assign to `p` because it is borrowed +LL | p += 1; //~ ERROR cannot assign to `p` because it is borrowed | ^^^^^^ assignment to borrowed `p` occurs here error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr index a9cc6845133..7cba013c96b 100644 --- a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr +++ b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:15:9 | -15 | x: &'test u32, //~ ERROR undeclared lifetime +LL | x: &'test u32, //~ ERROR undeclared lifetime | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:19:10 | -19 | Baz(&'test u32), //~ ERROR undeclared lifetime +LL | Baz(&'test u32), //~ ERROR undeclared lifetime | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors 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 265eb32b3cc..7b1d0509bbd 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 @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:15:13 | -15 | let y: &'test u32 = x; //~ ERROR use of undeclared lifetime +LL | let y: &'test u32 = x; //~ ERROR use of undeclared lifetime | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:20:16 | -20 | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime +LL | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/shadow.stderr b/src/test/ui/in-band-lifetimes/shadow.stderr index 1aa3e21beba..b22b18aa929 100644 --- a/src/test/ui/in-band-lifetimes/shadow.stderr +++ b/src/test/ui/in-band-lifetimes/shadow.stderr @@ -1,18 +1,18 @@ error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope --> $DIR/shadow.rs:17:12 | -16 | impl Foo<&'s u8> { +LL | impl Foo<&'s u8> { | -- first declared here -17 | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name | ^^ lifetime 's already in scope error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope --> $DIR/shadow.rs:18:19 | -16 | impl Foo<&'s u8> { +LL | impl Foo<&'s u8> { | -- first declared here -17 | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name -18 | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name +LL | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name | ^^ lifetime 's already in scope error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr index a90add79b76..38d05369fb8 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-2.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-2.rs:12:10 | -12 | fn deref<'x>() -> &'x u32 { //~ ERROR lifetime name `'x` only used once +LL | fn deref<'x>() -> &'x u32 { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-2.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr index 8595ce5effb..49c06aafbe5 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-3.stderr @@ -1,19 +1,19 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-3.rs:11:12 | -11 | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-3.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: lifetime name `'y` only used once --> $DIR/single_use_lifetimes-3.rs:16:6 | -16 | impl<'y> Foo<'y> { //~ ERROR lifetime name `'y` only used once +LL | impl<'y> Foo<'y> { //~ ERROR lifetime name `'y` only used once | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr index 1b952c8db09..2df370f5d02 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-4.stderr @@ -1,19 +1,19 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-4.rs:12:12 | -12 | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | struct Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-4.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-4.rs:16:10 | -16 | enum Bar<'x> { //~ ERROR lifetime name `'x` only used once +LL | enum Bar<'x> { //~ ERROR lifetime name `'x` only used once | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr index 59e1254836b..eec426e4e63 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes-5.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes-5.rs:12:11 | -12 | trait Foo<'x> { //~ ERROR lifetime name `'x` only used once +LL | trait Foo<'x> { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes-5.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr b/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr index bdcce1f22ec..15917d3c085 100644 --- a/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/single_use_lifetimes.stderr @@ -1,13 +1,13 @@ error: lifetime name `'x` only used once --> $DIR/single_use_lifetimes.rs:12:10 | -12 | fn deref<'x>(v: &'x u32) -> u32 { //~ ERROR lifetime name `'x` only used once +LL | fn deref<'x>(v: &'x u32) -> u32 { //~ ERROR lifetime name `'x` only used once | ^^ | note: lint level defined here --> $DIR/single_use_lifetimes.rs:10:9 | -10 | #![deny(single_use_lifetime)] +LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/index-help.stderr b/src/test/ui/index-help.stderr index d9ed32f6bb9..f4dde95b104 100644 --- a/src/test/ui/index-help.stderr +++ b/src/test/ui/index-help.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::vec::Vec<{integer}>: std::ops::Index` is not satisfied --> $DIR/index-help.rs:13:5 | -13 | x[0i32]; //~ ERROR E0277 +LL | x[0i32]; //~ ERROR E0277 | ^^^^^^^ vector indices are of type `usize` or ranges of `usize` | = help: the trait `std::ops::Index` is not implemented for `std::vec::Vec<{integer}>` diff --git a/src/test/ui/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference-variable-behind-raw-pointer.stderr index bb1d921f1c6..e1d4df85c2f 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference-variable-behind-raw-pointer.stderr @@ -1,7 +1,7 @@ warning: type annotations needed --> $DIR/inference-variable-behind-raw-pointer.rs:18:13 | -18 | if data.is_null() {} +LL | if data.is_null() {} | ^^^^^^^ | = note: #[warn(tyvar_behind_raw_pointer)] on by default diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index 78b790be87f..e27353eda09 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::cell::UnsafeCell: std::panic::RefUnwindSafe` is not satisfied in `std::cell::Cell` --> $DIR/interior-mutability.rs:15:5 | -15 | catch_unwind(|| { x.set(23); }); //~ ERROR the trait bound +LL | catch_unwind(|| { x.set(23); }); //~ ERROR the trait bound | ^^^^^^^^^^^^ the type std::cell::UnsafeCell may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | = help: within `std::cell::Cell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` diff --git a/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr b/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr index 1fa998bef37..2dac52d6f81 100644 --- a/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr +++ b/src/test/ui/invalid-module-declaration/invalid-module-declaration.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `baz` --> $DIR/auxiliary/foo/bar.rs:11:9 | -11 | pub mod baz; +LL | pub mod baz; | ^^^ | = help: name the file either bar/baz.rs or bar/baz/mod.rs inside the directory "$DIR/auxiliary/foo" diff --git a/src/test/ui/invalid-path-in-const.stderr b/src/test/ui/invalid-path-in-const.stderr index 5dbef279db4..06eb6005d71 100644 --- a/src/test/ui/invalid-path-in-const.stderr +++ b/src/test/ui/invalid-path-in-const.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope --> $DIR/invalid-path-in-const.rs:12:18 | -12 | fn f(a: [u8; u32::DOESNOTEXIST]) {} +LL | fn f(a: [u8; u32::DOESNOTEXIST]) {} | ^^^^^^^^^^^^^^^^^ associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/invalid-variadic-function.stderr b/src/test/ui/invalid-variadic-function.stderr index 15a908b3f00..13678d10ef5 100644 --- a/src/test/ui/invalid-variadic-function.stderr +++ b/src/test/ui/invalid-variadic-function.stderr @@ -1,13 +1,13 @@ error: only foreign functions are allowed to be variadic --> $DIR/invalid-variadic-function.rs:11:26 | -11 | extern "C" fn foo(x: u8, ...); +LL | extern "C" fn foo(x: u8, ...); | ^^^ error: expected one of `->`, `where`, or `{`, found `;` --> $DIR/invalid-variadic-function.rs:11:30 | -11 | extern "C" fn foo(x: u8, ...); +LL | extern "C" fn foo(x: u8, ...); | ^ expected one of `->`, `where`, or `{` here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-10969.stderr b/src/test/ui/issue-10969.stderr index 24ca8c0c437..b4d365dcc00 100644 --- a/src/test/ui/issue-10969.stderr +++ b/src/test/ui/issue-10969.stderr @@ -1,17 +1,17 @@ error[E0618]: expected function, found `i32` --> $DIR/issue-10969.rs:12:5 | -11 | fn func(i: i32) { +LL | fn func(i: i32) { | - `i32` defined here -12 | i(); //~ERROR expected function, found `i32` +LL | i(); //~ERROR expected function, found `i32` | ^^^ not a function error[E0618]: expected function, found `i32` --> $DIR/issue-10969.rs:16:5 | -15 | let i = 0i32; +LL | let i = 0i32; | - `i32` defined here -16 | i(); //~ERROR expected function, found `i32` +LL | i(); //~ERROR expected function, found `i32` | ^^^ not a function error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-11004.stderr b/src/test/ui/issue-11004.stderr index ce243b6963f..4cfc7d23bd0 100644 --- a/src/test/ui/issue-11004.stderr +++ b/src/test/ui/issue-11004.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `x` on type `*mut A` --> $DIR/issue-11004.rs:17:21 | -17 | let x : i32 = n.x; //~ no field `x` on type `*mut A` +LL | let x : i32 = n.x; //~ no field `x` on type `*mut A` | ^ | = note: `n` is a native pointer; perhaps you need to deref with `(*n).x` @@ -9,7 +9,7 @@ error[E0609]: no field `x` on type `*mut A` error[E0609]: no field `y` on type `*mut A` --> $DIR/issue-11004.rs:18:21 | -18 | let y : f64 = n.y; //~ no field `y` on type `*mut A` +LL | let y : f64 = n.y; //~ no field `y` on type `*mut A` | ^ | = note: `n` is a native pointer; perhaps you need to deref with `(*n).y` diff --git a/src/test/ui/issue-11319.stderr b/src/test/ui/issue-11319.stderr index 2ab61bf90db..b94f8001ccf 100644 --- a/src/test/ui/issue-11319.stderr +++ b/src/test/ui/issue-11319.stderr @@ -1,15 +1,15 @@ error[E0308]: match arms have incompatible types --> $DIR/issue-11319.rs:12:5 | -12 | / match Some(10) { -13 | | //~^ ERROR match arms have incompatible types -14 | | //~| expected type `bool` -15 | | //~| found type `()` +LL | / match Some(10) { +LL | | //~^ ERROR match arms have incompatible types +LL | | //~| expected type `bool` +LL | | //~| found type `()` ... | -19 | | None => (), +LL | | None => (), | | -- match arm with an incompatible type -20 | | _ => true -21 | | } +LL | | _ => true +LL | | } | |_____^ expected bool, found () | = note: expected type `bool` diff --git a/src/test/ui/issue-12187-1.stderr b/src/test/ui/issue-12187-1.stderr index 9ce8b066b37..29b1e985183 100644 --- a/src/test/ui/issue-12187-1.stderr +++ b/src/test/ui/issue-12187-1.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-12187-1.rs:16:10 | -16 | let &v = new(); +LL | let &v = new(); | -^ | || | |cannot infer type for `_` diff --git a/src/test/ui/issue-12187-2.stderr b/src/test/ui/issue-12187-2.stderr index 46add9bec2c..327105bee16 100644 --- a/src/test/ui/issue-12187-2.stderr +++ b/src/test/ui/issue-12187-2.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-12187-2.rs:16:10 | -16 | let &v = new(); +LL | let &v = new(); | -^ | || | |cannot infer type for `_` diff --git a/src/test/ui/issue-12511.stderr b/src/test/ui/issue-12511.stderr index 932fd5a82dd..3f0c0e7ee13 100644 --- a/src/test/ui/issue-12511.stderr +++ b/src/test/ui/issue-12511.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-12511.rs:14:1 | -14 | trait t2 : t1 { +LL | trait t2 : t1 { | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when computing the supertraits of `t1`... --> $DIR/issue-12511.rs:11:1 | -11 | trait t1 : t2 { +LL | trait t1 : t2 { | ^^^^^^^^^^^^^ note: ...which then requires computing the supertraits of `t2`... --> $DIR/issue-12511.rs:11:1 | -11 | trait t1 : t2 { +LL | trait t1 : t2 { | ^^^^^^^^^^^^^ = note: ...which then again requires computing the supertraits of `t1`, completing the cycle. diff --git a/src/test/ui/issue-13058.stderr b/src/test/ui/issue-13058.stderr index fb73fbcd007..30936d4c90d 100644 --- a/src/test/ui/issue-13058.stderr +++ b/src/test/ui/issue-13058.stderr @@ -1,16 +1,16 @@ error[E0621]: explicit lifetime required in the type of `cont` --> $DIR/issue-13058.rs:24:26 | -22 | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool +LL | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool | ---- consider changing the type of `cont` to `&'r T` -23 | { -24 | let cont_iter = cont.iter(); +LL | { +LL | let cont_iter = cont.iter(); | ^^^^ lifetime `'r` required error[E0308]: mismatched types --> $DIR/issue-13058.rs:36:11 | -36 | check((3, 5)); +LL | check((3, 5)); | ^^^^^^ | | | expected reference, found tuple diff --git a/src/test/ui/issue-13483.stderr b/src/test/ui/issue-13483.stderr index 344e1796953..afcb8b8da17 100644 --- a/src/test/ui/issue-13483.stderr +++ b/src/test/ui/issue-13483.stderr @@ -1,13 +1,13 @@ error: missing condition for `if` statemement --> $DIR/issue-13483.rs:13:14 | -13 | } else if { //~ ERROR missing condition +LL | } else if { //~ ERROR missing condition | ^ expected if condition here error: missing condition for `if` statemement --> $DIR/issue-13483.rs:20:14 | -20 | } else if { //~ ERROR missing condition +LL | } else if { //~ ERROR missing condition | ^ expected if condition here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-14092.stderr b/src/test/ui/issue-14092.stderr index b500e706b36..209ca27a20b 100644 --- a/src/test/ui/issue-14092.stderr +++ b/src/test/ui/issue-14092.stderr @@ -1,7 +1,7 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 --> $DIR/issue-14092.rs:11:11 | -11 | fn fn1(0: Box) {} +LL | fn fn1(0: Box) {} | ^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/issue-15260.stderr b/src/test/ui/issue-15260.stderr index 1d41e207147..1b0a39d02f5 100644 --- a/src/test/ui/issue-15260.stderr +++ b/src/test/ui/issue-15260.stderr @@ -1,34 +1,34 @@ error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:18:9 | -17 | a: _, +LL | a: _, | ---- first use of `a` -18 | a: _ +LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:24:9 | -23 | a, +LL | a, | - first use of `a` -24 | a: _ +LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:30:9 | -29 | a, +LL | a, | - first use of `a` -30 | a: _, +LL | a: _, | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern --> $DIR/issue-15260.rs:32:9 | -29 | a, +LL | a, | - first use of `a` ... -32 | a: x +LL | a: x | ^^^^ multiple uses of `a` in pattern error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-15524.stderr b/src/test/ui/issue-15524.stderr index ccbcda57db1..1cb16dfe19a 100644 --- a/src/test/ui/issue-15524.stderr +++ b/src/test/ui/issue-15524.stderr @@ -1,27 +1,27 @@ error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:15:9 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` -15 | B = 1, +LL | B = 1, | ^ enum already has `1isize` error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:18:5 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` ... -18 | D, +LL | D, | ^ enum already has `1isize` error[E0081]: discriminant value `1isize` already exists --> $DIR/issue-15524.rs:21:9 | -14 | A = 1, +LL | A = 1, | - first use of `1isize` ... -21 | E = N, +LL | E = N, | ^ enum already has `1isize` error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-17263.stderr b/src/test/ui/issue-17263.stderr index 306c713da44..e321a9f4562 100644 --- a/src/test/ui/issue-17263.stderr +++ b/src/test/ui/issue-17263.stderr @@ -1,23 +1,23 @@ error[E0499]: cannot borrow `x` (via `x.b`) as mutable more than once at a time --> $DIR/issue-17263.rs:17:34 | -17 | let (a, b) = (&mut x.a, &mut x.b); +LL | let (a, b) = (&mut x.a, &mut x.b); | --- ^^^ second mutable borrow occurs here (via `x.b`) | | | first mutable borrow occurs here (via `x.a`) ... -23 | } +LL | } | - first borrow ends here error[E0502]: cannot borrow `foo` (via `foo.b`) as immutable because `foo` is also borrowed as mutable (via `foo.a`) --> $DIR/issue-17263.rs:21:32 | -21 | let (c, d) = (&mut foo.a, &foo.b); +LL | let (c, d) = (&mut foo.a, &foo.b); | ----- ^^^^^ immutable borrow occurs here (via `foo.b`) | | | mutable borrow occurs here (via `foo.a`) -22 | //~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable -23 | } +LL | //~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable +LL | } | - mutable borrow ends here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-17441.stderr b/src/test/ui/issue-17441.stderr index 244da658f80..ec0f33caffc 100644 --- a/src/test/ui/issue-17441.stderr +++ b/src/test/ui/issue-17441.stderr @@ -1,19 +1,19 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` --> $DIR/issue-17441.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead --> $DIR/issue-17441.rs:12:16 | -12 | let _foo = &[1_usize, 2] as [usize]; +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0620]: cast to unsized type: `std::boxed::Box` as `std::fmt::Debug` --> $DIR/issue-17441.rs:15:16 | -15 | let _bar = Box::new(1_usize) as std::fmt::Debug; +LL | let _bar = Box::new(1_usize) as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^--------------- | | | help: try casting to a `Box` instead: `Box` @@ -21,25 +21,25 @@ error[E0620]: cast to unsized type: `std::boxed::Box` as `std::fmt::Debug error[E0620]: cast to unsized type: `usize` as `std::fmt::Debug` --> $DIR/issue-17441.rs:18:16 | -18 | let _baz = 1_usize as std::fmt::Debug; +LL | let _baz = 1_usize as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate --> $DIR/issue-17441.rs:18:16 | -18 | let _baz = 1_usize as std::fmt::Debug; +LL | let _baz = 1_usize as std::fmt::Debug; | ^^^^^^^ error[E0620]: cast to unsized type: `[usize; 2]` as `[usize]` --> $DIR/issue-17441.rs:21:17 | -21 | let _quux = [1_usize, 2] as [usize]; +LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate --> $DIR/issue-17441.rs:21:17 | -21 | let _quux = [1_usize, 2] as [usize]; +LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-18183.stderr b/src/test/ui/issue-18183.stderr index cb8a9608075..93cd351cbc5 100644 --- a/src/test/ui/issue-18183.stderr +++ b/src/test/ui/issue-18183.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/issue-18183.rs:11:20 | -11 | pub struct Foo(Bar); //~ ERROR E0128 +LL | pub struct Foo(Bar); //~ ERROR E0128 | ^^^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/issue-18819.stderr b/src/test/ui/issue-18819.stderr index d2f3219b233..e714707c2c3 100644 --- a/src/test/ui/issue-18819.stderr +++ b/src/test/ui/issue-18819.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/issue-18819.rs:26:5 | -21 | fn print_x(_: &Foo, extra: &str) { +LL | fn print_x(_: &Foo, extra: &str) { | ------------------------------------------- defined here ... -26 | print_x(X); +LL | print_x(X); | ^^^^^^^^^^ expected 2 parameters error: aborting due to previous error diff --git a/src/test/ui/issue-19100.stderr b/src/test/ui/issue-19100.stderr index a567e86cfdb..96835f69b78 100644 --- a/src/test/ui/issue-19100.stderr +++ b/src/test/ui/issue-19100.stderr @@ -1,7 +1,7 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` --> $DIR/issue-19100.rs:27:1 | -27 | Bar if true +LL | Bar if true | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Bar` @@ -9,7 +9,7 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants o warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` --> $DIR/issue-19100.rs:31:1 | -31 | Baz if false +LL | Baz if false | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Baz` diff --git a/src/test/ui/issue-19498.stderr b/src/test/ui/issue-19498.stderr index 7c3f0aad4f6..b2793dff2bf 100644 --- a/src/test/ui/issue-19498.stderr +++ b/src/test/ui/issue-19498.stderr @@ -1,45 +1,45 @@ error[E0255]: the name `A` is defined multiple times --> $DIR/issue-19498.rs:13:1 | -11 | use self::A; +LL | use self::A; | ------- previous import of the module `A` here -12 | use self::B; -13 | mod A {} //~ ERROR the name `A` is defined multiple times +LL | use self::B; +LL | mod A {} //~ ERROR the name `A` is defined multiple times | ^^^^^ `A` redefined here | = note: `A` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use self::A as OtherA; +LL | use self::A as OtherA; | ^^^^^^^^^^^^^^^^^ error[E0255]: the name `B` is defined multiple times --> $DIR/issue-19498.rs:15:1 | -12 | use self::B; +LL | use self::B; | ------- previous import of the module `B` here ... -15 | pub mod B {} //~ ERROR the name `B` is defined multiple times +LL | pub mod B {} //~ ERROR the name `B` is defined multiple times | ^^^^^^^^^ `B` redefined here | = note: `B` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use self::B as OtherB; +LL | use self::B as OtherB; | ^^^^^^^^^^^^^^^^^ error[E0255]: the name `D` is defined multiple times --> $DIR/issue-19498.rs:19:5 | -18 | use C::D; +LL | use C::D; | ---- previous import of the module `D` here -19 | mod D {} //~ ERROR the name `D` is defined multiple times +LL | mod D {} //~ ERROR the name `D` is defined multiple times | ^^^^^ `D` redefined here | = note: `D` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -18 | use C::D as OtherD; +LL | use C::D as OtherD; | ^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-1962.stderr b/src/test/ui/issue-1962.stderr index 5f920316b5c..b7c2bd84481 100644 --- a/src/test/ui/issue-1962.stderr +++ b/src/test/ui/issue-1962.stderr @@ -1,7 +1,7 @@ error: denote infinite loops with `loop { ... }` --> $DIR/issue-1962.rs:14:3 | -14 | while true { //~ ERROR denote infinite loops with `loop +LL | while true { //~ ERROR denote infinite loops with `loop | ^^^^^^^^^^ help: use `loop` | = note: requested on the command line with `-D while-true` diff --git a/src/test/ui/issue-19707.stderr b/src/test/ui/issue-19707.stderr index 42f768139b1..22a892c9252 100644 --- a/src/test/ui/issue-19707.stderr +++ b/src/test/ui/issue-19707.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:13:28 | -13 | type foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier +LL | type foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = 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 @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:15:27 | -15 | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier +LL | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = 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 diff --git a/src/test/ui/issue-19922.stderr b/src/test/ui/issue-19922.stderr index 023c12ecce8..ac64cb12ef0 100644 --- a/src/test/ui/issue-19922.stderr +++ b/src/test/ui/issue-19922.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Homura::Akemi` has no field named `kaname` --> $DIR/issue-19922.rs:16:34 | -16 | let homura = Homura::Akemi { kaname: () }; +LL | let homura = Homura::Akemi { kaname: () }; | ^^^^^^ `Homura::Akemi` does not have this field | = note: available fields are: `madoka` diff --git a/src/test/ui/issue-20692.stderr b/src/test/ui/issue-20692.stderr index e0dc9560462..1c23f42f3cc 100644 --- a/src/test/ui/issue-20692.stderr +++ b/src/test/ui/issue-20692.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Array` cannot be made into an object --> $DIR/issue-20692.rs:17:5 | -17 | &Array; +LL | &Array; | ^^^^^^ the trait `Array` cannot be made into an object | = note: the trait cannot require that `Self : Sized` @@ -9,7 +9,7 @@ error[E0038]: the trait `Array` cannot be made into an object error[E0038]: the trait `Array` cannot be made into an object --> $DIR/issue-20692.rs:14:13 | -14 | let _ = x +LL | let _ = x | ^ the trait `Array` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/issue-21546.stderr b/src/test/ui/issue-21546.stderr index 1be006865b0..6f8000f2492 100644 --- a/src/test/ui/issue-21546.stderr +++ b/src/test/ui/issue-21546.stderr @@ -1,10 +1,10 @@ error[E0428]: the name `Foo` is defined multiple times --> $DIR/issue-21546.rs:17:1 | -14 | mod Foo { } +LL | mod Foo { } | ------- previous definition of the module `Foo` here ... -17 | struct Foo; +LL | struct Foo; | ^^^^^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module @@ -12,10 +12,10 @@ error[E0428]: the name `Foo` is defined multiple times error[E0428]: the name `Bar` is defined multiple times --> $DIR/issue-21546.rs:24:1 | -21 | mod Bar { } +LL | mod Bar { } | ------- previous definition of the module `Bar` here ... -24 | struct Bar(i32); +LL | struct Bar(i32); | ^^^^^^^^^^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module @@ -23,10 +23,10 @@ error[E0428]: the name `Bar` is defined multiple times error[E0428]: the name `Baz` is defined multiple times --> $DIR/issue-21546.rs:32:1 | -29 | struct Baz(i32); +LL | struct Baz(i32); | ---------------- previous definition of the type `Baz` here ... -32 | mod Baz { } +LL | mod Baz { } | ^^^^^^^ `Baz` redefined here | = note: `Baz` must be defined only once in the type namespace of this module @@ -34,10 +34,10 @@ error[E0428]: the name `Baz` is defined multiple times error[E0428]: the name `Qux` is defined multiple times --> $DIR/issue-21546.rs:40:1 | -37 | struct Qux { x: bool } +LL | struct Qux { x: bool } | ---------- previous definition of the type `Qux` here ... -40 | mod Qux { } +LL | mod Qux { } | ^^^^^^^ `Qux` redefined here | = note: `Qux` must be defined only once in the type namespace of this module @@ -45,10 +45,10 @@ error[E0428]: the name `Qux` is defined multiple times error[E0428]: the name `Quux` is defined multiple times --> $DIR/issue-21546.rs:48:1 | -45 | struct Quux; +LL | struct Quux; | ------------ previous definition of the type `Quux` here ... -48 | mod Quux { } +LL | mod Quux { } | ^^^^^^^^ `Quux` redefined here | = note: `Quux` must be defined only once in the type namespace of this module @@ -56,10 +56,10 @@ error[E0428]: the name `Quux` is defined multiple times error[E0428]: the name `Corge` is defined multiple times --> $DIR/issue-21546.rs:56:1 | -53 | enum Corge { A, B } +LL | enum Corge { A, B } | ---------- previous definition of the type `Corge` here ... -56 | mod Corge { } +LL | mod Corge { } | ^^^^^^^^^ `Corge` redefined here | = note: `Corge` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issue-21600.stderr b/src/test/ui/issue-21600.stderr index fab7d8698ca..b1dcf1cd730 100644 --- a/src/test/ui/issue-21600.stderr +++ b/src/test/ui/issue-21600.stderr @@ -1,30 +1,30 @@ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:24:17 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^^ | help: consider changing this to accept closures that implement `FnMut` --> $DIR/issue-21600.rs:22:13 | -22 | call_it(|| { +LL | call_it(|| { | _____________^ -23 | | call_it(|| x.gen()); -24 | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer -25 | | //~^ ERROR cannot borrow data mutably in a captured outer -26 | | }); +LL | | call_it(|| x.gen()); +LL | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | | //~^ ERROR cannot borrow data mutably in a captured outer +LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:24:20 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^ | help: consider changing this closure to take self by mutable reference --> $DIR/issue-21600.rs:24:17 | -24 | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-21950.stderr b/src/test/ui/issue-21950.stderr index 9bf44df608a..9d33e1fd0ab 100644 --- a/src/test/ui/issue-21950.stderr +++ b/src/test/ui/issue-21950.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-21950.rs:17:14 | -17 | &Add; +LL | &Add; | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -9,7 +9,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified --> $DIR/issue-21950.rs:17:14 | -17 | &Add; +LL | &Add; | ^^^ missing associated type `Output` value error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-22370.stderr b/src/test/ui/issue-22370.stderr index 70e17bdd063..79362ce7aa3 100644 --- a/src/test/ui/issue-22370.stderr +++ b/src/test/ui/issue-22370.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `T` must be explicitly specified --> $DIR/issue-22370.rs:15:10 | -15 | fn f(a: &A) {} +LL | fn f(a: &A) {} | ^ missing reference to `T` | = note: because of the default `Self` reference, type parameters must be specified on object types diff --git a/src/test/ui/issue-22560.stderr b/src/test/ui/issue-22560.stderr index 1e3685403f5..907b0d8822d 100644 --- a/src/test/ui/issue-22560.stderr +++ b/src/test/ui/issue-22560.stderr @@ -1,7 +1,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-22560.rs:15:13 | -15 | type Test = Add + +LL | type Test = Add + | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -9,7 +9,7 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0393]: the type parameter `RHS` must be explicitly specified --> $DIR/issue-22560.rs:18:13 | -18 | Sub; +LL | Sub; | ^^^ missing reference to `RHS` | = note: because of the default `Self` reference, type parameters must be specified on object types @@ -17,17 +17,17 @@ error[E0393]: the type parameter `RHS` must be explicitly specified error[E0225]: only auto traits can be used as additional traits in a trait object --> $DIR/issue-22560.rs:18:13 | -18 | Sub; +LL | Sub; | ^^^ non-auto additional trait error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified --> $DIR/issue-22560.rs:15:13 | -15 | type Test = Add + +LL | type Test = Add + | _____________^ -16 | | //~^ ERROR E0393 -17 | | //~| ERROR E0191 -18 | | Sub; +LL | | //~^ ERROR E0393 +LL | | //~| ERROR E0191 +LL | | Sub; | |_______________^ missing associated type `Output` value error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-22644.stderr b/src/test/ui/issue-22644.stderr index 91107fbe356..d5e87f89417 100644 --- a/src/test/ui/issue-22644.stderr +++ b/src/test/ui/issue-22644.stderr @@ -1,7 +1,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:16:31 | -16 | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic | ---------- ^ --------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -10,7 +10,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:17:33 | -17 | println!("{}{}", a as usize < long_name, long_name); +LL | println!("{}{}", a as usize < long_name, long_name); | ---------- ^ -------------------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -19,7 +19,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:19:31 | -19 | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic | ---------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -28,7 +28,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:21:31 | -21 | println!("{}{}", a: usize < long_name, long_name); +LL | println!("{}{}", a: usize < long_name, long_name); | -------- ^ -------------------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -37,7 +37,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:23:29 | -23 | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic | -------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -46,38 +46,38 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:28:20 | -28 | < //~ ERROR `<` is interpreted as a start of generic +LL | < //~ ERROR `<` is interpreted as a start of generic | ^ not interpreted as comparison -29 | 4); +LL | 4); | - interpreted as generic arguments help: try comparing the casted value | -25 | println!("{}", (a -26 | as -27 | usize) +LL | println!("{}", (a +LL | as +LL | usize) | error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:37:20 | -37 | < //~ ERROR `<` is interpreted as a start of generic +LL | < //~ ERROR `<` is interpreted as a start of generic | ^ not interpreted as comparison -38 | 5); +LL | 5); | - interpreted as generic arguments help: try comparing the casted value | -30 | println!("{}", (a -31 | -32 | -33 | as -34 | -35 | +LL | println!("{}", (a +LL | +LL | +LL | as +LL | +LL | ... error: `<` is interpreted as a start of generic arguments for `usize`, not a shift --> $DIR/issue-22644.rs:40:31 | -40 | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic | ---------- ^^ --------- interpreted as generic arguments | | | | | not interpreted as shift @@ -86,6 +86,6 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a shi error: expected type, found `4` --> $DIR/issue-22644.rs:42:28 | -42 | println!("{}", a: &mut 4); //~ ERROR expected type, found `4` +LL | println!("{}", a: &mut 4); //~ ERROR expected type, found `4` | ^ expecting a type here because of type ascription diff --git a/src/test/ui/issue-22886.stderr b/src/test/ui/issue-22886.stderr index f884c80ccae..4a69e6bc4c2 100644 --- a/src/test/ui/issue-22886.stderr +++ b/src/test/ui/issue-22886.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-22886.rs:23:6 | -23 | impl<'a> Iterator for Newtype { //~ ERROR E0207 +LL | impl<'a> Iterator for Newtype { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issue-22933-2.stderr b/src/test/ui/issue-22933-2.stderr index 5b87b95b81a..41324fd8b75 100644 --- a/src/test/ui/issue-22933-2.stderr +++ b/src/test/ui/issue-22933-2.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope --> $DIR/issue-22933-2.rs:14:44 | -11 | enum Delicious { +LL | enum Delicious { | -------------- variant `PIE` not found here ... -14 | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, +LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, | ^^^^^^^^^^^^^^ variant not found in `Delicious` error: aborting due to previous error diff --git a/src/test/ui/issue-23041.stderr b/src/test/ui/issue-23041.stderr index 7626324b2f2..cf4e677ed0c 100644 --- a/src/test/ui/issue-23041.stderr +++ b/src/test/ui/issue-23041.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-23041.rs:16:22 | -16 | b.downcast_ref::_>(); //~ ERROR E0282 +LL | b.downcast_ref::_>(); //~ ERROR E0282 | ^^^^^^^^ cannot infer type for `_` error: aborting due to previous error diff --git a/src/test/ui/issue-23173.stderr b/src/test/ui/issue-23173.stderr index c84657b4c59..bf2c67f93f8 100644 --- a/src/test/ui/issue-23173.stderr +++ b/src/test/ui/issue-23173.stderr @@ -1,37 +1,37 @@ error[E0599]: no variant named `Homura` found for type `Token` in the current scope --> $DIR/issue-23173.rs:19:16 | -11 | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } +LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } | ---------- variant `Homura` not found here ... -19 | use_token(&Token::Homura); +LL | use_token(&Token::Homura); | ^^^^^^^^^^^^^ variant not found in `Token` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:21:5 | -12 | struct Struct { +LL | struct Struct { | ------------- function or associated item `method` not found for this ... -21 | Struct::method(); +LL | Struct::method(); | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:23:5 | -12 | struct Struct { +LL | struct Struct { | ------------- function or associated item `method` not found for this ... -23 | Struct::method; +LL | Struct::method; | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope --> $DIR/issue-23173.rs:25:5 | -12 | struct Struct { +LL | struct Struct { | ------------- associated item `Assoc` not found for this ... -25 | Struct::Assoc; +LL | Struct::Assoc; | ^^^^^^^^^^^^^ associated item not found in `Struct` error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-23217.stderr b/src/test/ui/issue-23217.stderr index 638e783e067..7abe4bd7b21 100644 --- a/src/test/ui/issue-23217.stderr +++ b/src/test/ui/issue-23217.stderr @@ -1,9 +1,9 @@ error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope --> $DIR/issue-23217.rs:12:9 | -11 | pub enum SomeEnum { +LL | pub enum SomeEnum { | ----------------- variant `A` not found here -12 | B = SomeEnum::A, +LL | B = SomeEnum::A, | ^^^^^^^^^^^ variant not found in `SomeEnum` error: aborting due to previous error diff --git a/src/test/ui/issue-23302-1.stderr b/src/test/ui/issue-23302-1.stderr index 1248d2075a5..13a2a23cc52 100644 --- a/src/test/ui/issue-23302-1.stderr +++ b/src/test/ui/issue-23302-1.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-1.rs:14:9 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `X::A::{{initializer}}`... --> $DIR/issue-23302-1.rs:14:5 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-2.stderr b/src/test/ui/issue-23302-2.stderr index 5438ce4b797..f303fa7c671 100644 --- a/src/test/ui/issue-23302-2.stderr +++ b/src/test/ui/issue-23302-2.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-2.rs:14:9 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `Y::A::{{initializer}}`... --> $DIR/issue-23302-2.rs:14:5 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-3.stderr b/src/test/ui/issue-23302-3.stderr index 0a7e239d32f..ec615809749 100644 --- a/src/test/ui/issue-23302-3.stderr +++ b/src/test/ui/issue-23302-3.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-3.rs:11:16 | -11 | const A: i32 = B; //~ ERROR E0391 +LL | const A: i32 = B; //~ ERROR E0391 | ^ cyclic reference | note: the cycle begins when processing `B`... --> $DIR/issue-23302-3.rs:13:1 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^^^^^^^^^^^^^^^^^ note: ...which then requires processing `A`... --> $DIR/issue-23302-3.rs:13:16 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^ = note: ...which then again requires processing `B`, completing the cycle. diff --git a/src/test/ui/issue-23543.stderr b/src/test/ui/issue-23543.stderr index e5ea6a5dd6f..c62af8f0635 100644 --- a/src/test/ui/issue-23543.stderr +++ b/src/test/ui/issue-23543.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/issue-23543.rs:17:17 | -17 | where T: A; +LL | where T: A; | ^^^^^^^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/issue-23544.stderr b/src/test/ui/issue-23544.stderr index 36875037959..882703cdb5a 100644 --- a/src/test/ui/issue-23544.stderr +++ b/src/test/ui/issue-23544.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/issue-23544.rs:15:17 | -15 | where T: A; +LL | where T: A; | ^^^^^^^^^^^^^^^^^^^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/issue-23716.stderr b/src/test/ui/issue-23716.stderr index 9b2ab554794..739c8d66e71 100644 --- a/src/test/ui/issue-23716.stderr +++ b/src/test/ui/issue-23716.stderr @@ -1,19 +1,19 @@ error[E0530]: function parameters cannot shadow statics --> $DIR/issue-23716.rs:13:8 | -11 | static foo: i32 = 0; +LL | static foo: i32 = 0; | -------------------- a static `foo` is defined here -12 | -13 | fn bar(foo: i32) {} +LL | +LL | fn bar(foo: i32) {} | ^^^ cannot be named the same as a static error[E0530]: function parameters cannot shadow statics --> $DIR/issue-23716.rs:23:13 | -21 | use self::submod::answer; +LL | use self::submod::answer; | -------------------- a static `answer` is imported here -22 | -23 | fn question(answer: i32) {} +LL | +LL | fn question(answer: i32) {} | ^^^^^^ cannot be named the same as a static error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-24036.stderr b/src/test/ui/issue-24036.stderr index 893ff498513..bbf64d8305d 100644 --- a/src/test/ui/issue-24036.stderr +++ b/src/test/ui/issue-24036.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-24036.rs:13:9 | -13 | x = |c| c + 1; +LL | x = |c| c + 1; | ^^^^^^^^^ expected closure, found a different closure | = note: expected type `[closure@$DIR/issue-24036.rs:12:17: 12:26]` @@ -12,14 +12,14 @@ error[E0308]: mismatched types error[E0308]: match arms have incompatible types --> $DIR/issue-24036.rs:18:13 | -18 | let x = match 1usize { +LL | let x = match 1usize { | _____________^ -19 | | //~^ ERROR match arms have incompatible types -20 | | 1 => |c| c + 1, -21 | | 2 => |c| c - 1, +LL | | //~^ ERROR match arms have incompatible types +LL | | 1 => |c| c + 1, +LL | | 2 => |c| c - 1, | | --------- match arm with an incompatible type -22 | | _ => |c| c - 1 -23 | | }; +LL | | _ => |c| c - 1 +LL | | }; | |_____^ expected closure, found a different closure | = note: expected type `[closure@$DIR/issue-24036.rs:20:14: 20:23]` diff --git a/src/test/ui/issue-24081.stderr b/src/test/ui/issue-24081.stderr index 9df8386e671..257e32f9198 100644 --- a/src/test/ui/issue-24081.stderr +++ b/src/test/ui/issue-24081.stderr @@ -1,76 +1,76 @@ error[E0255]: the name `Add` is defined multiple times --> $DIR/issue-24081.rs:17:1 | -11 | use std::ops::Add; +LL | use std::ops::Add; | ------------- previous import of the trait `Add` here ... -17 | type Add = bool; //~ ERROR the name `Add` is defined multiple times +LL | type Add = bool; //~ ERROR the name `Add` is defined multiple times | ^^^^^^^^^^^^^^^^ `Add` redefined here | = note: `Add` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::ops::Add as OtherAdd; +LL | use std::ops::Add as OtherAdd; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Sub` is defined multiple times --> $DIR/issue-24081.rs:19:1 | -12 | use std::ops::Sub; +LL | use std::ops::Sub; | ------------- previous import of the trait `Sub` here ... -19 | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times +LL | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times | ^^^^^^^^^^ `Sub` redefined here | = note: `Sub` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use std::ops::Sub as OtherSub; +LL | use std::ops::Sub as OtherSub; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Mul` is defined multiple times --> $DIR/issue-24081.rs:21:1 | -13 | use std::ops::Mul; +LL | use std::ops::Mul; | ------------- previous import of the trait `Mul` here ... -21 | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times +LL | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times | ^^^^^^^^ `Mul` redefined here | = note: `Mul` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -13 | use std::ops::Mul as OtherMul; +LL | use std::ops::Mul as OtherMul; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Div` is defined multiple times --> $DIR/issue-24081.rs:23:1 | -14 | use std::ops::Div; +LL | use std::ops::Div; | ------------- previous import of the trait `Div` here ... -23 | mod Div { } //~ ERROR the name `Div` is defined multiple times +LL | mod Div { } //~ ERROR the name `Div` is defined multiple times | ^^^^^^^ `Div` redefined here | = note: `Div` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | use std::ops::Div as OtherDiv; +LL | use std::ops::Div as OtherDiv; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0255]: the name `Rem` is defined multiple times --> $DIR/issue-24081.rs:25:1 | -15 | use std::ops::Rem; +LL | use std::ops::Rem; | ------------- previous import of the trait `Rem` here ... -25 | trait Rem { } //~ ERROR the name `Rem` is defined multiple times +LL | trait Rem { } //~ ERROR the name `Rem` is defined multiple times | ^^^^^^^^^ `Rem` redefined here | = note: `Rem` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -15 | use std::ops::Rem as OtherRem; +LL | use std::ops::Rem as OtherRem; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/issue-24424.stderr b/src/test/ui/issue-24424.stderr index de1e30dc08b..c3d5211cddc 100644 --- a/src/test/ui/issue-24424.stderr +++ b/src/test/ui/issue-24424.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `T0: Trait0<'l0>` --> $DIR/issue-24424.rs:14:1 | -14 | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} +LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by `Trait0` --> $DIR/issue-24424.rs:12:1 | -12 | trait Trait0<'l0> {} +LL | trait Trait0<'l0> {} | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-25385.stderr b/src/test/ui/issue-25385.stderr index e774f538a99..88e30d7fae0 100644 --- a/src/test/ui/issue-25385.stderr +++ b/src/test/ui/issue-25385.stderr @@ -1,16 +1,16 @@ error[E0599]: no method named `foo` found for type `i32` in the current scope --> $DIR/issue-25385.rs:13:23 | -13 | ($e:expr) => { $e.foo() } +LL | ($e:expr) => { $e.foo() } | ^^^ ... -19 | foo!(a); +LL | foo!(a); | -------- in this macro invocation error[E0599]: no method named `foo` found for type `i32` in the current scope --> $DIR/issue-25385.rs:21:15 | -21 | foo!(1i32.foo()); +LL | foo!(1i32.foo()); | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-25793.stderr b/src/test/ui/issue-25793.stderr index bb7f58cf3cd..2d8b5d6f499 100644 --- a/src/test/ui/issue-25793.stderr +++ b/src/test/ui/issue-25793.stderr @@ -1,10 +1,10 @@ error[E0503]: cannot use `self.width` because it was mutably borrowed --> $DIR/issue-25793.rs:13:9 | -13 | $this.width.unwrap() +LL | $this.width.unwrap() | ^^^^^^^^^^^ use of borrowed `*self` ... -28 | self.get_size(width!(self)) +LL | self.get_size(width!(self)) | ---- ------------ in this macro invocation | | | borrow of `*self` occurs here diff --git a/src/test/ui/issue-25826.stderr b/src/test/ui/issue-25826.stderr index c617a1ce507..94cbcf53f43 100644 --- a/src/test/ui/issue-25826.stderr +++ b/src/test/ui/issue-25826.stderr @@ -1,7 +1,7 @@ error[E0395]: raw pointers cannot be compared in constants --> $DIR/issue-25826.rs:13:21 | -13 | const A: bool = id:: as *const () < id:: as *const (); +LL | const A: bool = id:: as *const () < id:: as *const (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static error: aborting due to previous error diff --git a/src/test/ui/issue-26056.stderr b/src/test/ui/issue-26056.stderr index 8adb3570dfe..c806308562c 100644 --- a/src/test/ui/issue-26056.stderr +++ b/src/test/ui/issue-26056.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Map` cannot be made into an object --> $DIR/issue-26056.rs:30:13 | -30 | as &Map; +LL | as &Map; | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Map` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses diff --git a/src/test/ui/issue-26093.stderr b/src/test/ui/issue-26093.stderr index 77565c3c057..29ffd9635c6 100644 --- a/src/test/ui/issue-26093.stderr +++ b/src/test/ui/issue-26093.stderr @@ -1,10 +1,10 @@ error[E0070]: invalid left-hand side expression --> $DIR/issue-26093.rs:13:9 | -13 | $thing = 42; +LL | $thing = 42; | ^^^^^^^^^^^ left-hand of expression not valid ... -19 | not_a_place!(99); +LL | not_a_place!(99); | ----------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/issue-26472.stderr b/src/test/ui/issue-26472.stderr index 07a9b61fb7a..345008b4578 100644 --- a/src/test/ui/issue-26472.stderr +++ b/src/test/ui/issue-26472.stderr @@ -1,7 +1,7 @@ error[E0616]: field `len` of struct `sub::S` is private --> $DIR/issue-26472.rs:21:13 | -21 | let v = s.len; +LL | let v = s.len; | ^^^^^ | = note: a method `len` also exists, perhaps you wish to call it diff --git a/src/test/ui/issue-26638.stderr b/src/test/ui/issue-26638.stderr index 1d4fb6a3399..a5fc3ba26d6 100644 --- a/src/test/ui/issue-26638.stderr +++ b/src/test/ui/issue-26638.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:11:58 | -11 | fn parse_type(iter: Box+'static>) -> &str { iter.next() } +LL | fn parse_type(iter: Box+'static>) -> &str { iter.next() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `iter`'s 2 lifetimes it is borrowed from @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:14:40 | -14 | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } +LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -18,7 +18,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-26638.rs:17:22 | -17 | fn parse_type_3() -> &str { unimplemented!() } +LL | fn parse_type_3() -> &str { unimplemented!() } | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from diff --git a/src/test/ui/issue-26886.stderr b/src/test/ui/issue-26886.stderr index 842276453a4..dc812d1bae3 100644 --- a/src/test/ui/issue-26886.stderr +++ b/src/test/ui/issue-26886.stderr @@ -1,30 +1,30 @@ error[E0252]: the name `Arc` is defined multiple times --> $DIR/issue-26886.rs:12:5 | -11 | use std::sync::{self, Arc}; +LL | use std::sync::{self, Arc}; | --- previous import of the type `Arc` here -12 | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times +LL | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times | ^^^^^^^^^^^^^^ `Arc` reimported here | = note: `Arc` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -12 | use std::sync::Arc as OtherArc; //~ ERROR the name `Arc` is defined multiple times +LL | use std::sync::Arc as OtherArc; //~ ERROR the name `Arc` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0252]: the name `sync` is defined multiple times --> $DIR/issue-26886.rs:14:5 | -11 | use std::sync::{self, Arc}; +LL | use std::sync::{self, Arc}; | ---- previous import of the module `sync` here ... -14 | use std::sync; //~ ERROR the name `sync` is defined multiple times +LL | use std::sync; //~ ERROR the name `sync` is defined multiple times | ^^^^^^^^^ `sync` reimported here | = note: `sync` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times +LL | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-27842.stderr b/src/test/ui/issue-27842.stderr index 0feb1fbfc37..98f2b18dc77 100644 --- a/src/test/ui/issue-27842.stderr +++ b/src/test/ui/issue-27842.stderr @@ -1,13 +1,13 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})` --> $DIR/issue-27842.rs:14:13 | -14 | let _ = tup[0]; +LL | let _ = tup[0]; | ^^^^^^ help: to access tuple elements, use: `tup.0` error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})` --> $DIR/issue-27842.rs:19:13 | -19 | let _ = tup[i]; +LL | let _ = tup[i]; | ^^^^^^ | = help: to access tuple elements, use tuple indexing syntax (e.g. `tuple.0`) diff --git a/src/test/ui/issue-27942.stderr b/src/test/ui/issue-27942.stderr index 8958cf0139a..19654a647c5 100644 --- a/src/test/ui/issue-27942.stderr +++ b/src/test/ui/issue-27942.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Resources<'_>` @@ -9,18 +9,18 @@ error[E0308]: mismatched types note: the anonymous lifetime #1 defined on the method body at 15:5... --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'a as defined on the trait at 13:1 --> $DIR/issue-27942.rs:13:1 | -13 | pub trait Buffer<'a, R: Resources<'a>> { +LL | pub trait Buffer<'a, R: Resources<'a>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Resources<'_>` @@ -28,12 +28,12 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the trait at 13:1... --> $DIR/issue-27942.rs:13:1 | -13 | pub trait Buffer<'a, R: Resources<'a>> { +LL | pub trait Buffer<'a, R: Resources<'a>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 15:5 --> $DIR/issue-27942.rs:15:5 | -15 | fn select(&self) -> BufferViewHandle; +LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-2848.stderr b/src/test/ui/issue-2848.stderr index 3b5eed4e7b8..6ab018b0014 100644 --- a/src/test/ui/issue-2848.stderr +++ b/src/test/ui/issue-2848.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `beta` is not bound in all patterns --> $DIR/issue-2848.rs:22:7 | -22 | alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns +LL | alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns | ^^^^^ ---- variable not in all patterns | | | pattern doesn't bind `beta` diff --git a/src/test/ui/issue-28568.stderr b/src/test/ui/issue-28568.stderr index d7e7c953c4b..fecc5a41b3b 100644 --- a/src/test/ui/issue-28568.stderr +++ b/src/test/ui/issue-28568.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `MyStruct`: --> $DIR/issue-28568.rs:17:1 | -13 | impl Drop for MyStruct { +LL | impl Drop for MyStruct { | ---------------------- first implementation here ... -17 | impl Drop for MyStruct { +LL | impl Drop for MyStruct { | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyStruct` error: aborting due to previous error diff --git a/src/test/ui/issue-28776.stderr b/src/test/ui/issue-28776.stderr index e6e88f300e5..e426f05ddf6 100644 --- a/src/test/ui/issue-28776.stderr +++ b/src/test/ui/issue-28776.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/issue-28776.rs:14:5 | -14 | (&ptr::write)(1 as *mut _, 42); +LL | (&ptr::write)(1 as *mut _, 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/issue-28837.stderr b/src/test/ui/issue-28837.stderr index 6999a745034..62fc0ebec32 100644 --- a/src/test/ui/issue-28837.stderr +++ b/src/test/ui/issue-28837.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `A` --> $DIR/issue-28837.rs:16:5 | -16 | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` +LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `A` @@ -9,7 +9,7 @@ error[E0369]: binary operation `+` cannot be applied to type `A` error[E0369]: binary operation `-` cannot be applied to type `A` --> $DIR/issue-28837.rs:18:5 | -18 | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` +LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Sub` might be missing for `A` @@ -17,7 +17,7 @@ error[E0369]: binary operation `-` cannot be applied to type `A` error[E0369]: binary operation `*` cannot be applied to type `A` --> $DIR/issue-28837.rs:20:5 | -20 | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` +LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Mul` might be missing for `A` @@ -25,7 +25,7 @@ error[E0369]: binary operation `*` cannot be applied to type `A` error[E0369]: binary operation `/` cannot be applied to type `A` --> $DIR/issue-28837.rs:22:5 | -22 | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` +LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Div` might be missing for `A` @@ -33,7 +33,7 @@ error[E0369]: binary operation `/` cannot be applied to type `A` error[E0369]: binary operation `%` cannot be applied to type `A` --> $DIR/issue-28837.rs:24:5 | -24 | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` +LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::Rem` might be missing for `A` @@ -41,7 +41,7 @@ error[E0369]: binary operation `%` cannot be applied to type `A` error[E0369]: binary operation `&` cannot be applied to type `A` --> $DIR/issue-28837.rs:26:5 | -26 | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` +LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::BitAnd` might be missing for `A` @@ -49,7 +49,7 @@ error[E0369]: binary operation `&` cannot be applied to type `A` error[E0369]: binary operation `|` cannot be applied to type `A` --> $DIR/issue-28837.rs:28:5 | -28 | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` +LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::ops::BitOr` might be missing for `A` @@ -57,7 +57,7 @@ error[E0369]: binary operation `|` cannot be applied to type `A` error[E0369]: binary operation `<<` cannot be applied to type `A` --> $DIR/issue-28837.rs:30:5 | -30 | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` +LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::ops::Shl` might be missing for `A` @@ -65,7 +65,7 @@ error[E0369]: binary operation `<<` cannot be applied to type `A` error[E0369]: binary operation `>>` cannot be applied to type `A` --> $DIR/issue-28837.rs:32:5 | -32 | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` +LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::ops::Shr` might be missing for `A` @@ -73,7 +73,7 @@ error[E0369]: binary operation `>>` cannot be applied to type `A` error[E0369]: binary operation `==` cannot be applied to type `A` --> $DIR/issue-28837.rs:34:5 | -34 | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` +LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -81,7 +81,7 @@ error[E0369]: binary operation `==` cannot be applied to type `A` error[E0369]: binary operation `!=` cannot be applied to type `A` --> $DIR/issue-28837.rs:36:5 | -36 | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` +LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -89,7 +89,7 @@ error[E0369]: binary operation `!=` cannot be applied to type `A` error[E0369]: binary operation `<` cannot be applied to type `A` --> $DIR/issue-28837.rs:38:5 | -38 | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` +LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -97,7 +97,7 @@ error[E0369]: binary operation `<` cannot be applied to type `A` error[E0369]: binary operation `<=` cannot be applied to type `A` --> $DIR/issue-28837.rs:40:5 | -40 | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` +LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -105,7 +105,7 @@ error[E0369]: binary operation `<=` cannot be applied to type `A` error[E0369]: binary operation `>` cannot be applied to type `A` --> $DIR/issue-28837.rs:42:5 | -42 | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` +LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -113,7 +113,7 @@ error[E0369]: binary operation `>` cannot be applied to type `A` error[E0369]: binary operation `>=` cannot be applied to type `A` --> $DIR/issue-28837.rs:44:5 | -44 | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` +LL | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` diff --git a/src/test/ui/issue-28971.stderr b/src/test/ui/issue-28971.stderr index 5b753e6f385..ebd759a9c3c 100644 --- a/src/test/ui/issue-28971.stderr +++ b/src/test/ui/issue-28971.stderr @@ -1,10 +1,10 @@ error[E0599]: no variant named `Baz` found for type `Foo` in the current scope --> $DIR/issue-28971.rs:19:13 | -13 | enum Foo { +LL | enum Foo { | -------- variant `Baz` not found here ... -19 | Foo::Baz(..) => (), +LL | Foo::Baz(..) => (), | ^^^^^^^^^^^^ variant not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/issue-29124.stderr b/src/test/ui/issue-29124.stderr index 32e40787758..091671b2309 100644 --- a/src/test/ui/issue-29124.stderr +++ b/src/test/ui/issue-29124.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `x` found for type `fn() -> ret {obj::func}` in the current scope --> $DIR/issue-29124.rs:25:15 | -25 | obj::func.x(); +LL | obj::func.x(); | ^ | = note: obj::func is a function, perhaps you wish to call it @@ -9,7 +9,7 @@ error[E0599]: no method named `x` found for type `fn() -> ret {obj::func}` in th error[E0599]: no method named `x` found for type `fn() -> ret {func}` in the current scope --> $DIR/issue-29124.rs:27:10 | -27 | func.x(); +LL | func.x(); | ^ | = note: func is a function, perhaps you wish to call it diff --git a/src/test/ui/issue-29723.stderr b/src/test/ui/issue-29723.stderr index 9564e225f64..1b4c750471f 100644 --- a/src/test/ui/issue-29723.stderr +++ b/src/test/ui/issue-29723.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `s` --> $DIR/issue-29723.rs:22:13 | -18 | 0 if { drop(s); false } => String::from("oops"), +LL | 0 if { drop(s); false } => String::from("oops"), | - value moved here ... -22 | s +LL | s | ^ value used here after move | = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/issue-30007.stderr b/src/test/ui/issue-30007.stderr index 24458ef44c4..a467ff6dd0a 100644 --- a/src/test/ui/issue-30007.stderr +++ b/src/test/ui/issue-30007.stderr @@ -1,13 +1,13 @@ error: macro expansion ignores token `;` and any following --> $DIR/issue-30007.rs:12:20 | -12 | () => ( String ; ); //~ ERROR macro expansion ignores token `;` +LL | () => ( String ; ); //~ ERROR macro expansion ignores token `;` | ^ | note: caused by the macro expansion here; the usage of `t!` is likely invalid in type context --> $DIR/issue-30007.rs:16:16 | -16 | let i: Vec; +LL | let i: Vec; | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-3008-1.stderr b/src/test/ui/issue-3008-1.stderr index 4f080774073..282181d51cd 100644 --- a/src/test/ui/issue-3008-1.stderr +++ b/src/test/ui/issue-3008-1.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `Bar` has infinite size --> $DIR/issue-3008-1.rs:15:1 | -15 | enum Bar { +LL | enum Bar { | ^^^^^^^^ recursive type has infinite size ... -18 | BarSome(Bar) +LL | BarSome(Bar) | ---- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable diff --git a/src/test/ui/issue-3008-2.stderr b/src/test/ui/issue-3008-2.stderr index d5e21463b60..a015e6d621d 100644 --- a/src/test/ui/issue-3008-2.stderr +++ b/src/test/ui/issue-3008-2.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `bar` has infinite size --> $DIR/issue-3008-2.rs:12:1 | -12 | struct bar { x: bar } +LL | struct bar { x: bar } | ^^^^^^^^^^ ------ recursive without indirection | | | recursive type has infinite size diff --git a/src/test/ui/issue-30255.stderr b/src/test/ui/issue-30255.stderr index edd4549f09a..6a55025d7b1 100644 --- a/src/test/ui/issue-30255.stderr +++ b/src/test/ui/issue-30255.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:18:24 | -18 | fn f(a: &S, b: i32) -> &i32 { +LL | fn f(a: &S, b: i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `a`'s 2 lifetimes it is borrowed from @@ -9,7 +9,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:23:34 | -23 | fn g(a: &S, b: bool, c: &i32) -> &i32 { +LL | fn g(a: &S, b: bool, c: &i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from one of `a`'s 2 lifetimes or `c` @@ -17,7 +17,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-30255.rs:28:44 | -28 | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { +LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `a`, one of `c`'s 2 lifetimes, or `d` diff --git a/src/test/ui/issue-30302.stderr b/src/test/ui/issue-30302.stderr index 66e43d0859f..6528058428a 100644 --- a/src/test/ui/issue-30302.stderr +++ b/src/test/ui/issue-30302.stderr @@ -1,7 +1,7 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants of the type `Stack` --> $DIR/issue-30302.rs:23:9 | -23 | Nil => true, +LL | Nil => true, | ^^^ | = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Stack::Nil` @@ -9,16 +9,16 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants o error: unreachable pattern --> $DIR/issue-30302.rs:25:9 | -23 | Nil => true, +LL | Nil => true, | --- matches any value -24 | //~^ WARN pattern binding `Nil` is named the same as one of the variants of the type `Stack` -25 | _ => false +LL | //~^ WARN pattern binding `Nil` is named the same as one of the variants of the type `Stack` +LL | _ => false | ^ unreachable pattern | note: lint level defined here --> $DIR/issue-30302.rs:14:9 | -14 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-3044.stderr b/src/test/ui/issue-3044.stderr index d6d37753c4d..00f9b302ffb 100644 --- a/src/test/ui/issue-3044.stderr +++ b/src/test/ui/issue-3044.stderr @@ -1,7 +1,7 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/issue-3044.rs:14:23 | -14 | needlesArr.iter().fold(|x, y| { +LL | needlesArr.iter().fold(|x, y| { | ^^^^ expected 2 parameters error: aborting due to previous error diff --git a/src/test/ui/issue-30730.stderr b/src/test/ui/issue-30730.stderr index 192c1f542de..696c3acce72 100644 --- a/src/test/ui/issue-30730.stderr +++ b/src/test/ui/issue-30730.stderr @@ -1,13 +1,13 @@ error: unused import: `std::thread` --> $DIR/issue-30730.rs:13:5 | -13 | use std::thread; +LL | use std::thread; | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/issue-30730.rs:12:9 | -12 | #![deny(warnings)] +LL | #![deny(warnings)] | ^^^^^^^^ = note: #[deny(unused_imports)] implied by #[deny(warnings)] diff --git a/src/test/ui/issue-31221.stderr b/src/test/ui/issue-31221.stderr index 1db48346c6e..56c7b8ab6e7 100644 --- a/src/test/ui/issue-31221.stderr +++ b/src/test/ui/issue-31221.stderr @@ -1,31 +1,31 @@ error: unreachable pattern --> $DIR/issue-31221.rs:28:9 | -27 | Var3 => (), +LL | Var3 => (), | ---- matches any value -28 | Var2 => (), +LL | Var2 => (), | ^^^^ unreachable pattern | note: lint level defined here --> $DIR/issue-31221.rs:14:9 | -14 | #![deny(unreachable_patterns)] +LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern --> $DIR/issue-31221.rs:34:9 | -33 | &Var3 => (), +LL | &Var3 => (), | ----- matches any value -34 | &Var2 => (), +LL | &Var2 => (), | ^^^^^ unreachable pattern error: unreachable pattern --> $DIR/issue-31221.rs:41:9 | -40 | (c, d) => (), +LL | (c, d) => (), | ------ matches any value -41 | anything => () +LL | anything => () | ^^^^^^^^ unreachable pattern error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-32326.stderr b/src/test/ui/issue-32326.stderr index 24eaf17e6a7..290c491b489 100644 --- a/src/test/ui/issue-32326.stderr +++ b/src/test/ui/issue-32326.stderr @@ -1,9 +1,9 @@ error[E0072]: recursive type `Expr` has infinite size --> $DIR/issue-32326.rs:15:1 | -15 | enum Expr { //~ ERROR E0072 +LL | enum Expr { //~ ERROR E0072 | ^^^^^^^^^ recursive type has infinite size -16 | Plus(Expr, Expr), +LL | Plus(Expr, Expr), | ----- ----- recursive without indirection | | | recursive without indirection diff --git a/src/test/ui/issue-32950.stderr b/src/test/ui/issue-32950.stderr index abfa03f4d58..0363bf05f00 100644 --- a/src/test/ui/issue-32950.stderr +++ b/src/test/ui/issue-32950.stderr @@ -1,7 +1,7 @@ error: `derive` cannot be used on items with type macros --> $DIR/issue-32950.rs:15:5 | -15 | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros +LL | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-33525.stderr b/src/test/ui/issue-33525.stderr index dfb94fefda1..ad308b87b37 100644 --- a/src/test/ui/issue-33525.stderr +++ b/src/test/ui/issue-33525.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `a` in this scope --> $DIR/issue-33525.rs:12:5 | -12 | a; //~ ERROR cannot find value `a` +LL | a; //~ ERROR cannot find value `a` | ^ not found in this scope error[E0609]: no field `lorem` on type `&'static str` --> $DIR/issue-33525.rs:13:8 | -13 | "".lorem; //~ ERROR no field +LL | "".lorem; //~ ERROR no field | ^^^^^ error[E0609]: no field `ipsum` on type `&'static str` --> $DIR/issue-33525.rs:14:8 | -14 | "".ipsum; //~ ERROR no field +LL | "".ipsum; //~ ERROR no field | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-33941.stderr b/src/test/ui/issue-33941.stderr index c71f6956122..ef76158682b 100644 --- a/src/test/ui/issue-33941.stderr +++ b/src/test/ui/issue-33941.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:14:36 | -14 | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` @@ -10,7 +10,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:14:14 | -14 | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` diff --git a/src/test/ui/issue-34047.stderr b/src/test/ui/issue-34047.stderr index f8c26beb127..efd6222db20 100644 --- a/src/test/ui/issue-34047.stderr +++ b/src/test/ui/issue-34047.stderr @@ -1,10 +1,10 @@ error[E0530]: match bindings cannot shadow constants --> $DIR/issue-34047.rs:15:13 | -11 | const C: u8 = 0; +LL | const C: u8 = 0; | ---------------- a constant `C` is defined here ... -15 | mut C => {} //~ ERROR match bindings cannot shadow constants +LL | mut C => {} //~ ERROR match bindings cannot shadow constants | ^ cannot be named the same as a constant error: aborting due to previous error diff --git a/src/test/ui/issue-34209.stderr b/src/test/ui/issue-34209.stderr index 9033e864706..faf3f3856fd 100644 --- a/src/test/ui/issue-34209.stderr +++ b/src/test/ui/issue-34209.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/issue-34209.rs:17:9 | -17 | S::B{ } => { }, +LL | S::B{ } => { }, | ^^^^ ambiguous associated type | = note: specify the type using the syntax `::B` diff --git a/src/test/ui/issue-35139.stderr b/src/test/ui/issue-35139.stderr index ec6b1029915..79b0ecff94e 100644 --- a/src/test/ui/issue-35139.stderr +++ b/src/test/ui/issue-35139.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-35139.rs:19:6 | -19 | impl<'a> MethodType for MTFn { //~ ERROR E0207 +LL | impl<'a> MethodType for MTFn { //~ ERROR E0207 | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issue-35241.stderr b/src/test/ui/issue-35241.stderr index 09cc49e1b4d..be0b21f9460 100644 --- a/src/test/ui/issue-35241.stderr +++ b/src/test/ui/issue-35241.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35241.rs:13:20 | -13 | fn test() -> Foo { Foo } //~ ERROR mismatched types +LL | fn test() -> Foo { Foo } //~ ERROR mismatched types | --- ^^^ | | | | | expected struct `Foo`, found fn item diff --git a/src/test/ui/issue-35675.stderr b/src/test/ui/issue-35675.stderr index d8b357e0cee..84054b532de 100644 --- a/src/test/ui/issue-35675.stderr +++ b/src/test/ui/issue-35675.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Apple` in this scope --> $DIR/issue-35675.rs:17:29 | -17 | fn should_return_fruit() -> Apple { +LL | fn should_return_fruit() -> Apple { | ^^^^^ | | | not found in this scope @@ -10,17 +10,17 @@ error[E0412]: cannot find type `Apple` in this scope error[E0425]: cannot find function `Apple` in this scope --> $DIR/issue-35675.rs:19:5 | -19 | Apple(5) +LL | Apple(5) | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -12 | use Fruit::Apple; +LL | use Fruit::Apple; | error[E0573]: expected type, found variant `Fruit::Apple` --> $DIR/issue-35675.rs:23:33 | -23 | fn should_return_fruit_too() -> Fruit::Apple { +LL | fn should_return_fruit_too() -> Fruit::Apple { | ^^^^^^^^^^^^ | | | not a type @@ -29,17 +29,17 @@ error[E0573]: expected type, found variant `Fruit::Apple` error[E0425]: cannot find function `Apple` in this scope --> $DIR/issue-35675.rs:25:5 | -25 | Apple(5) +LL | Apple(5) | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -12 | use Fruit::Apple; +LL | use Fruit::Apple; | error[E0573]: expected type, found variant `Ok` --> $DIR/issue-35675.rs:29:13 | -29 | fn foo() -> Ok { +LL | fn foo() -> Ok { | ^^ not a type | = help: there is an enum variant `std::prelude::v1::Ok`, try using `std::prelude::v1`? @@ -48,7 +48,7 @@ error[E0573]: expected type, found variant `Ok` error[E0412]: cannot find type `Variant3` in this scope --> $DIR/issue-35675.rs:34:13 | -34 | fn bar() -> Variant3 { +LL | fn bar() -> Variant3 { | ^^^^^^^^ | | | not found in this scope @@ -57,7 +57,7 @@ error[E0412]: cannot find type `Variant3` in this scope error[E0573]: expected type, found variant `Some` --> $DIR/issue-35675.rs:38:13 | -38 | fn qux() -> Some { +LL | fn qux() -> Some { | ^^^^ not a type | = help: there is an enum variant `std::prelude::v1::Option::Some`, try using `std::prelude::v1::Option`? diff --git a/src/test/ui/issue-35869.stderr b/src/test/ui/issue-35869.stderr index 001aa6ed86b..e90906ee841 100644 --- a/src/test/ui/issue-35869.stderr +++ b/src/test/ui/issue-35869.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/issue-35869.rs:23:15 | -14 | fn foo(_: fn(u8) -> ()); +LL | fn foo(_: fn(u8) -> ()); | ------------ type in trait ... -23 | fn foo(_: fn(u16) -> ()) {} +LL | fn foo(_: fn(u16) -> ()) {} | ^^^^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn(fn(u8))` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/issue-35869.rs:25:15 | -15 | fn bar(_: Option); +LL | fn bar(_: Option); | ---------- type in trait ... -25 | fn bar(_: Option) {} +LL | fn bar(_: Option) {} | ^^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn(std::option::Option)` @@ -25,10 +25,10 @@ error[E0053]: method `bar` has an incompatible type for trait error[E0053]: method `baz` has an incompatible type for trait --> $DIR/issue-35869.rs:27:15 | -16 | fn baz(_: (u8, u16)); +LL | fn baz(_: (u8, u16)); | --------- type in trait ... -27 | fn baz(_: (u16, u16)) {} +LL | fn baz(_: (u16, u16)) {} | ^^^^^^^^^^ expected u8, found u16 | = note: expected type `fn((u8, u16))` @@ -37,10 +37,10 @@ error[E0053]: method `baz` has an incompatible type for trait error[E0053]: method `qux` has an incompatible type for trait --> $DIR/issue-35869.rs:29:17 | -17 | fn qux() -> u8; +LL | fn qux() -> u8; | -- type in trait ... -29 | fn qux() -> u16 { 5u16 } +LL | fn qux() -> u16 { 5u16 } | ^^^ expected u8, found u16 | = note: expected type `fn() -> u8` diff --git a/src/test/ui/issue-35976.stderr b/src/test/ui/issue-35976.stderr index 146d0ff72d8..f97ba33dfd3 100644 --- a/src/test/ui/issue-35976.stderr +++ b/src/test/ui/issue-35976.stderr @@ -1,11 +1,11 @@ error: the `wait` method cannot be invoked on a trait object --> $DIR/issue-35976.rs:24:9 | -24 | arg.wait(); +LL | arg.wait(); | ^^^^ help: another candidate was found in the following trait, perhaps add a `use` for it: | -11 | use private::Future; +LL | use private::Future; | error: aborting due to previous error diff --git a/src/test/ui/issue-36163.stderr b/src/test/ui/issue-36163.stderr index 22e1f8c91ae..c511b576a21 100644 --- a/src/test/ui/issue-36163.stderr +++ b/src/test/ui/issue-36163.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-36163.rs:14:9 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^ cyclic reference | note: the cycle begins when const-evaluating `Foo::B::{{initializer}}`... --> $DIR/issue-36163.rs:14:5 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^^^^^ note: ...which then requires const-evaluating `A`... --> $DIR/issue-36163.rs:14:9 | -14 | B = A, //~ ERROR E0391 +LL | B = A, //~ ERROR E0391 | ^ = note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-36400.stderr b/src/test/ui/issue-36400.stderr index 22003fe2d03..4a632356b4e 100644 --- a/src/test/ui/issue-36400.stderr +++ b/src/test/ui/issue-36400.stderr @@ -1,9 +1,9 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable --> $DIR/issue-36400.rs:15:12 | -14 | let x = Box::new(3); +LL | let x = Box::new(3); | - consider changing this to `mut x` -15 | f(&mut *x); //~ ERROR cannot borrow immutable +LL | f(&mut *x); //~ ERROR cannot borrow immutable | ^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issue-36708.stderr b/src/test/ui/issue-36708.stderr index 7d06b0b7e72..d2aa5b6c0ec 100644 --- a/src/test/ui/issue-36708.stderr +++ b/src/test/ui/issue-36708.stderr @@ -1,7 +1,7 @@ error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters --> $DIR/issue-36708.rs:18:11 | -18 | fn foo() {} +LL | fn foo() {} | ^^^ found 1 type parameter, expected 0 error: aborting due to previous error diff --git a/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr b/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr index fe173867da1..a563c844359 100644 --- a/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr +++ b/src/test/ui/issue-37311-type-length-limit/issue-37311.stderr @@ -1,9 +1,9 @@ error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(), &()), &(&()...` --> $DIR/issue-37311.rs:23:5 | -23 | / fn recurse(&self) { //~ ERROR reached the type-length limit -24 | | (self, self).recurse(); -25 | | } +LL | / fn recurse(&self) { //~ ERROR reached the type-length limit +LL | | (self, self).recurse(); +LL | | } | |_____^ | = note: consider adding a `#![type_length_limit="2097152"]` attribute to your crate diff --git a/src/test/ui/issue-3779.stderr b/src/test/ui/issue-3779.stderr index 2c0ed7b34e0..6dcbabbe39a 100644 --- a/src/test/ui/issue-3779.stderr +++ b/src/test/ui/issue-3779.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `S` has infinite size --> $DIR/issue-3779.rs:11:1 | -11 | struct S { +LL | struct S { | ^^^^^^^^ recursive type has infinite size -12 | //~^ ERROR E0072 -13 | element: Option +LL | //~^ ERROR E0072 +LL | element: Option | ------------------ recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `S` representable diff --git a/src/test/ui/issue-37884.stderr b/src/test/ui/issue-37884.stderr index 10dddd2b227..d1f6cb7d922 100644 --- a/src/test/ui/issue-37884.stderr +++ b/src/test/ui/issue-37884.stderr @@ -1,12 +1,12 @@ error[E0308]: method not compatible with trait --> $DIR/issue-37884.rs:16:5 | -16 | / fn next(&'a mut self) -> Option -17 | | //~^ ERROR method not compatible with trait -18 | | //~| lifetime mismatch -19 | | { -20 | | Some(&mut self.0) -21 | | } +LL | / fn next(&'a mut self) -> Option +LL | | //~^ ERROR method not compatible with trait +LL | | //~| lifetime mismatch +LL | | { +LL | | Some(&mut self.0) +LL | | } | |_____^ lifetime mismatch | = note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` @@ -14,17 +14,17 @@ error[E0308]: method not compatible with trait note: the anonymous lifetime #1 defined on the method body at 16:5... --> $DIR/issue-37884.rs:16:5 | -16 | / fn next(&'a mut self) -> Option -17 | | //~^ ERROR method not compatible with trait -18 | | //~| lifetime mismatch -19 | | { -20 | | Some(&mut self.0) -21 | | } +LL | / fn next(&'a mut self) -> Option +LL | | //~^ ERROR method not compatible with trait +LL | | //~| lifetime mismatch +LL | | { +LL | | Some(&mut self.0) +LL | | } | |_____^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 13:1 --> $DIR/issue-37884.rs:13:1 | -13 | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { +LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-38875/issue_38875.stderr b/src/test/ui/issue-38875/issue_38875.stderr index 4cdf4ece5cf..9a412be6a67 100644 --- a/src/test/ui/issue-38875/issue_38875.stderr +++ b/src/test/ui/issue-38875/issue_38875.stderr @@ -1,13 +1,13 @@ error[E0080]: constant evaluation error --> $DIR/auxiliary/issue_38875_b.rs:11:24 | -11 | pub const FOO: usize = *&0; +LL | pub const FOO: usize = *&0; | ^^^ unimplemented constant expression: deref operation | note: for constant expression here --> $DIR/issue_38875.rs:16:22 | -16 | let test_x = [0; issue_38875_b::FOO]; +LL | let test_x = [0; issue_38875_b::FOO]; | ^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr b/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr index 902f8cd607d..999583dcd31 100644 --- a/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr +++ b/src/test/ui/issue-40402-ref-hints/issue-40402-1.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-1.rs:19:13 | -19 | let e = f.v[0]; //~ ERROR cannot move out of indexed content +LL | let e = f.v[0]; //~ ERROR cannot move out of indexed content | ^^^^^^ | | | cannot move out of indexed content diff --git a/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr b/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr index 023ed328da1..3703d32be06 100644 --- a/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr +++ b/src/test/ui/issue-40402-ref-hints/issue-40402-2.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-2.rs:15:18 | -15 | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content +LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content | - - ^^^^ cannot move out of indexed content | | | | | ...and here (use `ref b` or `ref mut b`) diff --git a/src/test/ui/issue-40782.stderr b/src/test/ui/issue-40782.stderr index 543233e0cc6..bd646d7ce8c 100644 --- a/src/test/ui/issue-40782.stderr +++ b/src/test/ui/issue-40782.stderr @@ -1,7 +1,7 @@ error: missing `in` in `for` loop --> $DIR/issue-40782.rs:12:10 | -12 | for i 0..2 { //~ ERROR missing `in` +LL | for i 0..2 { //~ ERROR missing `in` | ^ help: try adding `in` here error: aborting due to previous error diff --git a/src/test/ui/issue-41652/issue_41652.stderr b/src/test/ui/issue-41652/issue_41652.stderr index 7dce5cc4291..df7b8a6525f 100644 --- a/src/test/ui/issue-41652/issue_41652.stderr +++ b/src/test/ui/issue-41652/issue_41652.stderr @@ -1,11 +1,11 @@ error[E0689]: can't call method `f` on ambiguous numeric type `{integer}` --> $DIR/issue_41652.rs:19:11 | -19 | 3.f() +LL | 3.f() | ^ help: you must specify a concrete type for this numeric value, like `i32` | -19 | 3_i32.f() +LL | 3_i32.f() | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-42106.stderr b/src/test/ui/issue-42106.stderr index b9f9a92b60a..c9629cc6e61 100644 --- a/src/test/ui/issue-42106.stderr +++ b/src/test/ui/issue-42106.stderr @@ -1,11 +1,11 @@ error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable --> $DIR/issue-42106.rs:13:5 | -12 | let _a = &collection; +LL | let _a = &collection; | ---------- immutable borrow occurs here -13 | collection.swap(1, 2); //~ ERROR also borrowed as immutable +LL | collection.swap(1, 2); //~ ERROR also borrowed as immutable | ^^^^^^^^^^ mutable borrow occurs here -14 | } +LL | } | - immutable borrow ends here error: aborting due to previous error diff --git a/src/test/ui/issue-42954.stderr b/src/test/ui/issue-42954.stderr index d0fc410c474..1a3984181f6 100644 --- a/src/test/ui/issue-42954.stderr +++ b/src/test/ui/issue-42954.stderr @@ -1,13 +1,13 @@ error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison --> $DIR/issue-42954.rs:13:19 | -13 | $i as u32 < 0 //~ `<` is interpreted as a start of generic arguments +LL | $i as u32 < 0 //~ `<` is interpreted as a start of generic arguments | --------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison | help: try comparing the casted value: `($i as u32)` ... -19 | is_plainly_printable!(c); +LL | is_plainly_printable!(c); | ------------------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/issue-4335.stderr b/src/test/ui/issue-4335.stderr index bb713a4af2f..90b94a597a5 100644 --- a/src/test/ui/issue-4335.stderr +++ b/src/test/ui/issue-4335.stderr @@ -1,19 +1,19 @@ error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function --> $DIR/issue-4335.rs:16:17 | -16 | id(Box::new(|| *v)) +LL | id(Box::new(|| *v)) | ^^ - `v` is borrowed here | | | may outlive borrowed value `v` help: to force the closure to take ownership of `v` (and any other referenced variables), use the `move` keyword | -16 | id(Box::new(move || *v)) +LL | id(Box::new(move || *v)) | ^^^^^^^ error[E0507]: cannot move out of borrowed content --> $DIR/issue-4335.rs:16:20 | -16 | id(Box::new(|| *v)) +LL | id(Box::new(|| *v)) | ^^ cannot move out of borrowed content error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-44023.stderr b/src/test/ui/issue-44023.stderr index 7cc1b834126..a3dde7321c2 100644 --- a/src/test/ui/issue-44023.stderr +++ b/src/test/ui/issue-44023.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-44023.rs:15:42 | -15 | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types +LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types | __________________________________________^ -16 | | } +LL | | } | |_^ expected isize, found () | = note: expected type `isize` diff --git a/src/test/ui/issue-44078.stderr b/src/test/ui/issue-44078.stderr index 49e461bd18d..e8dce656f65 100644 --- a/src/test/ui/issue-44078.stderr +++ b/src/test/ui/issue-44078.stderr @@ -1,9 +1,9 @@ error: unterminated double quote string --> $DIR/issue-44078.rs:12:8 | -12 | "😊""; //~ ERROR unterminated double quote +LL | "😊""; //~ ERROR unterminated double quote | _________^ -13 | | } +LL | | } | |__^ error: aborting due to previous error diff --git a/src/test/ui/issue-44406.stderr b/src/test/ui/issue-44406.stderr index 32deabd0229..443b28cf099 100644 --- a/src/test/ui/issue-44406.stderr +++ b/src/test/ui/issue-44406.stderr @@ -1,15 +1,15 @@ error: expected identifier, found keyword `true` --> $DIR/issue-44406.rs:18:10 | -18 | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); //~ ERROR expected type, found keyword | ^^^^ expected identifier, found keyword error: expected type, found keyword `true` --> $DIR/issue-44406.rs:18:10 | -13 | bar(baz: $rest) +LL | bar(baz: $rest) | - help: did you mean to use `;` here? ... -18 | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); //~ ERROR expected type, found keyword | ^^^^ expecting a type here because of type ascription diff --git a/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr b/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr index 8c34cc4b73c..eaf7569100a 100644 --- a/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr +++ b/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr @@ -1,34 +1,34 @@ error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block -16 | let f = |v: &mut Vec<_>| { -17 | unsafe { //~ ERROR unnecessary `unsafe` +LL | let f = |v: &mut Vec<_>| { +LL | unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:11:8 | -11 | #[deny(unused_unsafe)] +LL | #[deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block ... -19 | |w: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |w: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:23:34 | -15 | unsafe { +LL | unsafe { | ------ because it's nested under this `unsafe` block ... -23 | |x: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |x: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` | ^^^^^^ unnecessary `unsafe` block error: aborting due to 3 previous errors diff --git a/src/test/ui/issue-45157.stderr b/src/test/ui/issue-45157.stderr index 9df58ac4b83..3ce93da6ad5 100644 --- a/src/test/ui/issue-45157.stderr +++ b/src/test/ui/issue-45157.stderr @@ -1,19 +1,19 @@ error[E0502]: cannot borrow `u.z.c` as immutable because it is also borrowed as mutable --> $DIR/issue-45157.rs:37:20 | -34 | let mref = &mut u.s.a; +LL | let mref = &mut u.s.a; | ---------- mutable borrow occurs here ... -37 | let nref = &u.z.c; +LL | let nref = &u.z.c; | ^^^^^^ immutable borrow occurs here error[E0502]: cannot borrow `u.s.a` as mutable because it is also borrowed as immutable --> $DIR/issue-45157.rs:39:27 | -37 | let nref = &u.z.c; +LL | let nref = &u.z.c; | ------ immutable borrow occurs here -38 | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502] -39 | println!("{} {}", mref, nref) +LL | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502] +LL | println!("{} {}", mref, nref) | ^^^^ mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-45296.stderr b/src/test/ui/issue-45296.stderr index 45a80750de7..96ee3ccc89d 100644 --- a/src/test/ui/issue-45296.stderr +++ b/src/test/ui/issue-45296.stderr @@ -1,7 +1,7 @@ error: an inner attribute is not permitted in this context --> $DIR/issue-45296.rs:14:7 | -14 | #![allow(unused_variables)] //~ ERROR not permitted in this context +LL | #![allow(unused_variables)] //~ ERROR not permitted in this context | ^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. diff --git a/src/test/ui/issue-45697-1.stderr b/src/test/ui/issue-45697-1.stderr index 68d5aac612a..2a6d219267d 100644 --- a/src/test/ui/issue-45697-1.stderr +++ b/src/test/ui/issue-45697-1.stderr @@ -1,17 +1,17 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) --> $DIR/issue-45697-1.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) --> $DIR/issue-45697-1.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ use of borrowed `y` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-45697.stderr b/src/test/ui/issue-45697.stderr index a177b5946a7..30baded7dad 100644 --- a/src/test/ui/issue-45697.stderr +++ b/src/test/ui/issue-45697.stderr @@ -1,17 +1,17 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) --> $DIR/issue-45697.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) --> $DIR/issue-45697.rs:30:9 | -29 | let z = copy_borrowed_ptr(&mut y); +LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here -30 | *y.pointer += 1; +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ use of borrowed `y` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-45730.stderr b/src/test/ui/issue-45730.stderr index 0585720e3ac..b10c69f26c5 100644 --- a/src/test/ui/issue-45730.stderr +++ b/src/test/ui/issue-45730.stderr @@ -1,7 +1,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:13:23 | -13 | let x: *const _ = 0 as _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as _; //~ ERROR cannot cast | ^^^^^- | | | help: consider giving more type information @@ -11,7 +11,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:15:23 | -15 | let x: *const _ = 0 as *const _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast | ^^^^^-------- | | | help: consider giving more type information @@ -21,7 +21,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:18:13 | -18 | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast +LL | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ | | | help: consider giving more type information diff --git a/src/test/ui/issue-46112.stderr b/src/test/ui/issue-46112.stderr index 2a5ca097594..7c679684165 100644 --- a/src/test/ui/issue-46112.stderr +++ b/src/test/ui/issue-46112.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-46112.rs:19:21 | -19 | fn main() { test(Ok(())); } +LL | fn main() { test(Ok(())); } | ^^ | | | expected enum `std::option::Option`, found () diff --git a/src/test/ui/issue-46186.stderr b/src/test/ui/issue-46186.stderr index 3cc9531bb5b..f6847097dbe 100644 --- a/src/test/ui/issue-46186.stderr +++ b/src/test/ui/issue-46186.stderr @@ -1,7 +1,7 @@ error: expected item, found `;` --> $DIR/issue-46186.rs:13:2 | -13 | }; //~ ERROR expected item, found `;` +LL | }; //~ ERROR expected item, found `;` | ^ help: consider removing this semicolon error: aborting due to previous error diff --git a/src/test/ui/issue-46332.stderr b/src/test/ui/issue-46332.stderr index 70b8e4ec475..c3b17884676 100644 --- a/src/test/ui/issue-46332.stderr +++ b/src/test/ui/issue-46332.stderr @@ -1,7 +1,7 @@ error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope --> $DIR/issue-46332.rs:19:5 | -19 | TyUInt {}; +LL | TyUInt {}; | ^^^^^^ did you mean `TyUint`? error: aborting due to previous error diff --git a/src/test/ui/issue-46471-1.stderr b/src/test/ui/issue-46471-1.stderr index 1f8e7fec1e2..b46bcbd6911 100644 --- a/src/test/ui/issue-46471-1.stderr +++ b/src/test/ui/issue-46471-1.stderr @@ -1,23 +1,23 @@ error[E0597]: `z` does not live long enough (Ast) --> $DIR/issue-46471-1.rs:16:14 | -16 | &mut z +LL | &mut z | ^ borrowed value does not live long enough -17 | }; +LL | }; | - `z` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error[E0597]: `z` does not live long enough (Mir) --> $DIR/issue-46471-1.rs:16:9 | -16 | &mut z +LL | &mut z | ^^^^^^ borrowed value does not live long enough -17 | }; +LL | }; | - `z` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-46471.stderr b/src/test/ui/issue-46471.stderr index 21529e8eb8e..ce2b2c31025 100644 --- a/src/test/ui/issue-46471.stderr +++ b/src/test/ui/issue-46471.stderr @@ -1,10 +1,10 @@ error[E0597]: `x` does not live long enough (Ast) --> $DIR/issue-46471.rs:15:6 | -15 | &x +LL | &x | ^ borrowed value does not live long enough ... -18 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for the static lifetime... @@ -12,10 +12,10 @@ error[E0597]: `x` does not live long enough (Ast) error[E0597]: `x` does not live long enough (Mir) --> $DIR/issue-46471.rs:15:5 | -15 | &x +LL | &x | ^^ borrowed value does not live long enough ... -18 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for the static lifetime... diff --git a/src/test/ui/issue-46472.stderr b/src/test/ui/issue-46472.stderr index c4fa80e0eb4..a0d41c961a4 100644 --- a/src/test/ui/issue-46472.stderr +++ b/src/test/ui/issue-46472.stderr @@ -1,31 +1,31 @@ error[E0597]: borrowed value does not live long enough (Ast) --> $DIR/issue-46472.rs:14:10 | -14 | &mut 4 +LL | &mut 4 | ^ temporary value does not live long enough ... -17 | } +LL | } | - temporary value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1... --> $DIR/issue-46472.rs:13:1 | -13 | fn bar<'a>() -> &'a mut u32 { +LL | fn bar<'a>() -> &'a mut u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: borrowed value does not live long enough (Mir) --> $DIR/issue-46472.rs:14:10 | -14 | &mut 4 +LL | &mut 4 | ^ temporary value does not live long enough ... -17 | } +LL | } | - temporary value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1... --> $DIR/issue-46472.rs:13:1 | -13 | fn bar<'a>() -> &'a mut u32 { +LL | fn bar<'a>() -> &'a mut u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-46576.stderr b/src/test/ui/issue-46576.stderr index e0be6b4fdc2..0590de0bd35 100644 --- a/src/test/ui/issue-46576.stderr +++ b/src/test/ui/issue-46576.stderr @@ -1,13 +1,13 @@ error: unused import: `BufRead` --> $DIR/issue-46576.rs:17:15 | -17 | use std::io::{BufRead, BufReader, Read}; +LL | use std::io::{BufRead, BufReader, Read}; | ^^^^^^^ | note: lint level defined here --> $DIR/issue-46576.rs:14:9 | -14 | #![deny(unused_imports)] +LL | #![deny(unused_imports)] | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-46983.stderr b/src/test/ui/issue-46983.stderr index dd7a55baf58..67c8fa8261f 100644 --- a/src/test/ui/issue-46983.stderr +++ b/src/test/ui/issue-46983.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/issue-46983.rs:14:5 | -13 | fn foo(x: &u32) -> &'static u32 { +LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&'static u32` -14 | &*x +LL | &*x | ^^^ lifetime `'static` required error: aborting due to previous error diff --git a/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr b/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr index 24b3c263b63..9603ac01fef 100644 --- a/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr +++ b/src/test/ui/issue-47073-zero-padded-tuple-struct-indices.stderr @@ -1,13 +1,13 @@ error: invalid tuple or struct index --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:18:30 | -18 | let _condemned = justice.00; +LL | let _condemned = justice.00; | ^^ help: try simplifying the index: `0` error: invalid tuple or struct index --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:20:31 | -20 | let _punishment = justice.001; +LL | let _punishment = justice.001; | ^^^ help: try simplifying the index: `1` error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47094.stderr b/src/test/ui/issue-47094.stderr index 5276b881e4c..f4b622a00fe 100644 --- a/src/test/ui/issue-47094.stderr +++ b/src/test/ui/issue-47094.stderr @@ -1,14 +1,14 @@ warning[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:13:8 | -13 | #[repr(C,u8)] +LL | #[repr(C,u8)] | ^ ^^ warning[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:19:8 | -19 | #[repr(C)] +LL | #[repr(C)] | ^ -20 | #[repr(u8)] +LL | #[repr(u8)] | ^^ diff --git a/src/test/ui/issue-47377.stderr b/src/test/ui/issue-47377.stderr index 76c75ca7c16..2de117489c3 100644 --- a/src/test/ui/issue-47377.stderr +++ b/src/test/ui/issue-47377.stderr @@ -1,11 +1,11 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47377.rs:13:12 | -13 | let _a = b + ", World!"; +LL | let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings 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 | -13 | let _a = b.to_owned() + ", World!"; +LL | let _a = b.to_owned() + ", World!"; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47380.stderr b/src/test/ui/issue-47380.stderr index 0442017ebf0..968dc614ad6 100644 --- a/src/test/ui/issue-47380.stderr +++ b/src/test/ui/issue-47380.stderr @@ -1,11 +1,11 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47380.rs:12:33 | -12 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; +LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings 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 | -12 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; +LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47511.stderr b/src/test/ui/issue-47511.stderr index aaae6d708ae..2b8ba8794fb 100644 --- a/src/test/ui/issue-47511.stderr +++ b/src/test/ui/issue-47511.stderr @@ -1,7 +1,7 @@ error[E0581]: return type references an anonymous lifetime which is not constrained by the fn input types --> $DIR/issue-47511.rs:15:15 | -15 | fn f(_: X) -> X { +LL | fn f(_: X) -> X { | ^ | = note: lifetimes appearing in an associated type are not considered constrained @@ -9,7 +9,7 @@ error[E0581]: return type references an anonymous lifetime which is not constrai error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types --> $DIR/issue-47511.rs:20:23 | -20 | fn g<'a>(_: X<'a>) -> X<'a> { +LL | fn g<'a>(_: X<'a>) -> X<'a> { | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47623.stderr b/src/test/ui/issue-47623.stderr index e5143d30d00..fd15ce78420 100644 --- a/src/test/ui/issue-47623.stderr +++ b/src/test/ui/issue-47623.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/issue-47623.rs:11:5 | -11 | use self; //~ERROR `self` imports are only allowed within a { } list +LL | use self; //~ERROR `self` imports are only allowed within a { } list | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issue-47706-trait.stderr b/src/test/ui/issue-47706-trait.stderr index 8da397c33bc..a6a270b057a 100644 --- a/src/test/ui/issue-47706-trait.stderr +++ b/src/test/ui/issue-47706-trait.stderr @@ -3,9 +3,9 @@ error[E0601]: main function not found error[E0593]: function is expected to take a single 0-tuple as argument, but it takes 2 distinct arguments --> $DIR/issue-47706-trait.rs:13:20 | -12 | fn f(&self, _: ()) { +LL | fn f(&self, _: ()) { | ------------------ takes 2 distinct arguments -13 | None::<()>.map(Self::f); +LL | None::<()>.map(Self::f); | ^^^ expected function that takes a single 0-tuple as argument error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47706.stderr b/src/test/ui/issue-47706.stderr index f2afbb2052a..ef48d4d7aae 100644 --- a/src/test/ui/issue-47706.stderr +++ b/src/test/ui/issue-47706.stderr @@ -1,29 +1,29 @@ error[E0593]: function is expected to take 1 argument, but it takes 2 arguments --> $DIR/issue-47706.rs:21:18 | -16 | pub fn new(foo: Option, _: ()) -> Foo { +LL | pub fn new(foo: Option, _: ()) -> Foo { | ------------------------------------------ takes 2 arguments ... -21 | self.foo.map(Foo::new) +LL | self.foo.map(Foo::new) | ^^^ expected function that takes 1 argument error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:37:5 | -27 | Bar(i32), +LL | Bar(i32), | -------- takes 1 argument ... -37 | foo(Qux::Bar); +LL | foo(Qux::Bar); | ^^^ expected function that takes 0 arguments | note: required by `foo` --> $DIR/issue-47706.rs:30:1 | -30 | / fn foo(f: F) -31 | | where -32 | | F: Fn(), -33 | | { -34 | | } +LL | / fn foo(f: F) +LL | | where +LL | | F: Fn(), +LL | | { +LL | | } | |_^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-4935.stderr b/src/test/ui/issue-4935.stderr index 0ea88a31301..fb5a2261c1f 100644 --- a/src/test/ui/issue-4935.stderr +++ b/src/test/ui/issue-4935.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/issue-4935.rs:15:13 | -13 | fn foo(a: usize) {} +LL | fn foo(a: usize) {} | ---------------- defined here -14 | //~^ defined here -15 | fn main() { foo(5, 6) } +LL | //~^ defined here +LL | fn main() { foo(5, 6) } | ^^^^^^^^^ expected 1 parameter error: aborting due to previous error diff --git a/src/test/ui/issue-5239-1.stderr b/src/test/ui/issue-5239-1.stderr index 4a225f4acd0..6a640572623 100644 --- a/src/test/ui/issue-5239-1.stderr +++ b/src/test/ui/issue-5239-1.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `&isize` --> $DIR/issue-5239-1.rs:14:30 | -14 | let x = |ref x: isize| { x += 1; }; +LL | let x = |ref x: isize| { x += 1; }; | -^^^^^ | | | cannot use `+=` on type `&isize` diff --git a/src/test/ui/issue-6458-3.stderr b/src/test/ui/issue-6458-3.stderr index fc2c54abfa3..8eb864a878a 100644 --- a/src/test/ui/issue-6458-3.stderr +++ b/src/test/ui/issue-6458-3.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-6458-3.rs:14:5 | -14 | mem::transmute(0); +LL | mem::transmute(0); | ^^^^^^^^^^^^^^ cannot infer type for `U` error: aborting due to previous error diff --git a/src/test/ui/issue-6458-4.stderr b/src/test/ui/issue-6458-4.stderr index 6beeca554ff..2615085a930 100644 --- a/src/test/ui/issue-6458-4.stderr +++ b/src/test/ui/issue-6458-4.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types --> $DIR/issue-6458-4.rs:11:40 | -11 | fn foo(b: bool) -> Result { //~ ERROR mismatched types +LL | fn foo(b: bool) -> Result { //~ ERROR mismatched types | ________________________________________^ -12 | | Err("bar".to_string()); +LL | | Err("bar".to_string()); | | - help: consider removing this semicolon -13 | | } +LL | | } | |_^ expected enum `std::result::Result`, found () | = note: expected type `std::result::Result` diff --git a/src/test/ui/issue-6458.stderr b/src/test/ui/issue-6458.stderr index 2da6c4d1217..058a6ea5c7d 100644 --- a/src/test/ui/issue-6458.stderr +++ b/src/test/ui/issue-6458.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-6458.rs:19:4 | -19 | foo(TypeWithState(marker::PhantomData)); +LL | foo(TypeWithState(marker::PhantomData)); | ^^^ cannot infer type for `State` error: aborting due to previous error diff --git a/src/test/ui/issue-7813.stderr b/src/test/ui/issue-7813.stderr index 99112b240b1..b4291684db4 100644 --- a/src/test/ui/issue-7813.stderr +++ b/src/test/ui/issue-7813.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-7813.rs:12:13 | -12 | let v = &[]; //~ ERROR type annotations needed +LL | let v = &[]; //~ ERROR type annotations needed | - ^^^ cannot infer type for `_` | | | consider giving `v` a type diff --git a/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr index 2399520b9a1..b8145a893aa 100644 --- a/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr +++ b/src/test/ui/lifetime-elision-return-type-requires-explicit-lifetime.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:12:11 | -12 | fn f() -> &isize { //~ ERROR missing lifetime specifier +LL | fn f() -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from @@ -10,7 +10,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:33 | -17 | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_x` or `_y` @@ -18,7 +18,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:27:19 | -27 | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier +LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `_x`'s 2 lifetimes it is borrowed from @@ -26,7 +26,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:31:20 | -31 | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -35,7 +35,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:44:24 | -44 | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier +LL | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -44,7 +44,7 @@ error[E0106]: missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:50:49 | -50 | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { +LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments diff --git a/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr b/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr index 5337f5167af..4cf0ad0888b 100644 --- a/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr +++ b/src/test/ui/lifetime-errors/42701_one_named_and_one_anonymous.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/42701_one_named_and_one_anonymous.rs:20:9 | -15 | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { +LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` ... -20 | &*x //~ ERROR explicit lifetime +LL | &*x //~ ERROR explicit lifetime | ^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr index bdaee89f2f7..5b65dffdb38 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `other` --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 | -17 | fn bar(&self, other: Foo) -> Foo<'a> { +LL | fn bar(&self, other: Foo) -> Foo<'a> { | ----- consider changing the type of `other` to `Foo<'a>` ... -21 | other //~ ERROR explicit lifetime +LL | other //~ ERROR explicit lifetime | ^^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr index 824102de3fb..b11b96595df 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 | -11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr index 748dfa992fd..a334f97b3cc 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in parameter type --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 | -11 | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { +LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { | ------ consider changing type to `(&'a i32, &'a i32)` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr index 72d62477aaf..d61292330b8 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15 | -13 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` -14 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr index fff6c57593e..9efdb33f7e5 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36 | -16 | fn foo<'a>(&'a self, x: &i32) -> &i32 { +LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { | - consider changing the type of `x` to `&'a i32` -17 | -18 | if true { &self.field } else { x } //~ ERROR explicit lifetime +LL | +LL | if true { &self.field } else { x } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index 17df0294bb9..f27d869a4d4 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 | -19 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- ------- | | | this parameter and the return type are declared with different lifetimes... -20 | -21 | if x > y { x } else { y } //~ ERROR lifetime mismatch +LL | +LL | if x > y { x } else { y } //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index edf0cddffe3..d098df514e1 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 | -11 | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { +LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { | - consider changing the type of `y` to `&'a i32` -12 | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index 92a6ac9acea..c72d25fe2a9 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 | -16 | fn foo<'a>(&self, x: &'a i32) -> &i32 { +LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { | ------- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | -18 | x //~ ERROR lifetime mismatch +LL | +LL | x //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index fb20ff69496..4d9e26c0632 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr @@ -1,12 +1,12 @@ error[E0623]: lifetime mismatch --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 | -16 | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { +LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { | ----- ------- | | | this parameter and the return type are declared with different lifetimes... -17 | -18 | if true { x } else { self } //~ ERROR lifetime mismatch +LL | +LL | if true { x } else { self } //~ ERROR lifetime mismatch | ^^^^ ...but data from `self` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr b/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr index a7cee33978e..90f21014852 100644 --- a/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1b-return-no-names-if-else.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/ex1b-return-no-names-if-else.rs:11:29 | -11 | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime +LL | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y` diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr index d44900f538f..5d331627691 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex2a-push-one-existing-name-2.rs:16:12 | -15 | fn foo<'a>(x: Ref, y: &mut Vec>) { +LL | fn foo<'a>(x: Ref, y: &mut Vec>) { | - consider changing the type of `x` to `Ref<'a, i32>` -16 | y.push(x); //~ ERROR explicit lifetime +LL | y.push(x); //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr index 97f7a14bcea..d840467835b 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr @@ -1,10 +1,10 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12 | -13 | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) +LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) | - consider changing the type of `y` to `&'a T` ... -17 | x.push(y); //~ ERROR explicit lifetime required +LL | x.push(y); //~ ERROR explicit lifetime required | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr index 1bdf23ec979..a5433ec0834 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr @@ -1,9 +1,9 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name.rs:16:12 | -15 | fn foo<'a>(x: &mut Vec>, y: Ref) { +LL | fn foo<'a>(x: &mut Vec>, y: Ref) { | - consider changing the type of `y` to `Ref<'a, i32>` -16 | x.push(y); //~ ERROR explicit lifetime +LL | x.push(y); //~ ERROR explicit lifetime | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr index 626f8c28ed5..dd220a7e661 100644 --- a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2b-push-no-existing-names.rs:16:12 | -15 | fn foo(x: &mut Vec>, y: Ref) { +LL | fn foo(x: &mut Vec>, y: Ref) { | -------- -------- these two types are declared with different lifetimes... -16 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr index 5f6e98892db..bba52f408b0 100644 --- a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr @@ -1,10 +1,10 @@ error[E0623]: lifetime mismatch --> $DIR/ex2c-push-inference-variable.rs:17:12 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let z = Ref { data: y.data }; -17 | x.push(z); //~ ERROR lifetime mismatch +LL | let z = Ref { data: y.data }; +LL | x.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr index b84072140a5..673aee256b4 100644 --- a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2d-push-inference-variable-2.rs:16:33 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr index 09e4290eb13..cbe48abbb99 100644 --- a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex2e-push-inference-variable-3.rs:16:33 | -15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr index 57c6740cfe8..eb7985a565f 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-2.rs:12:9 | -11 | fn foo((v, w): (&u8, &u8), x: &u8) { +LL | fn foo((v, w): (&u8, &u8), x: &u8) { | --- --- these two types are declared with different lifetimes... -12 | v = x; //~ ERROR lifetime mismatch +LL | v = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr index 0c3e444a7c7..e9c156149d4 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr @@ -1,17 +1,17 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-3.rs:12:13 | -11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -12 | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); //~ ERROR lifetime mismatch | ^ ...but data flows into `z` here error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-3.rs:12:15 | -11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -12 | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); //~ ERROR lifetime mismatch | ^ ...but data flows into `z` here error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr index 7ac8c7ac25b..19cd661505a 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:11 | -15 | fn foo(mut x: Ref, y: Ref) { +LL | fn foo(mut x: Ref, y: Ref) { | --- --- these two types are declared with different lifetimes... -16 | x.b = y.b; //~ ERROR lifetime mismatch +LL | x.b = y.b; //~ ERROR lifetime mismatch | ^^^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr index 40121ecca1d..52a319fad61 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:11 | -15 | fn foo(mut x: Ref) { +LL | fn foo(mut x: Ref) { | --- | | | this type is declared with multiple lifetimes... -16 | x.a = x.b; //~ ERROR lifetime mismatch +LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr index 639849ab1a3..121afa47bc1 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11 | -15 | fn foo(mut x: Ref) { +LL | fn foo(mut x: Ref) { | --- | | | this type is declared with multiple lifetimes... -16 | x.a = x.b; //~ ERROR lifetime mismatch +LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr index 896fa2d9855..7348b366e80 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr @@ -1,10 +1,10 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:12 | -14 | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) | ------- ------- these two types are declared with different lifetimes... ... -18 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr index 5344afc7d31..5478abfdbc0 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:12 | -14 | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { | ------- ------- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr index 0ecfa772aad..1cde0d83feb 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12 | -14 | fn foo(mut x: Vec, y: Ref) { +LL | fn foo(mut x: Vec, y: Ref) { | --- --- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr index 97386ce4bf3..ca6c4337b9b 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:12 | -11 | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { +LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { | ------ ------ these two types are declared with different lifetimes... -12 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr index 18d63aa09f3..8bcc7d4a92b 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:9 | -13 | fn foo(mut x: Ref, y: &u32) { +LL | fn foo(mut x: Ref, y: &u32) { | --- ---- | | | these two types are declared with different lifetimes... -14 | y = x.b; //~ ERROR lifetime mismatch +LL | y = x.b; //~ ERROR lifetime mismatch | ^^^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr index a74592625e4..80639d9359e 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:11 | -13 | fn foo(mut y: Ref, x: &u32) { +LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -14 | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr index 9944db0ea18..c0ceefdea17 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:11 | -13 | fn foo(mut y: Ref, x: &u32) { +LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -14 | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; //~ ERROR lifetime mismatch | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr index 4fb91b6ef9d..28af2905e4a 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:11 | -16 | fn foo(mut x: Ref, y: &u32) { +LL | fn foo(mut x: Ref, y: &u32) { | --- ---- these two types are declared with different lifetimes... -17 | x.b = y; //~ ERROR lifetime mismatch +LL | x.b = y; //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr index 87f40f55ab8..ff2492b9436 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 | -16 | fn foo<'a>(&self, x: &i32) -> &i32 { +LL | fn foo<'a>(&self, x: &i32) -> &i32 { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | x //~ ERROR lifetime mismatch +LL | x //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr index 07375c2e44a..b6bd1c5c922 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr @@ -1,11 +1,11 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 | -16 | fn foo<'a>(&self, x: &Foo) -> &Foo { +LL | fn foo<'a>(&self, x: &Foo) -> &Foo { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | if true { x } else { self } //~ ERROR lifetime mismatch +LL | if true { x } else { self } //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr index efc34461273..5a5abf3f98b 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:10 | -10 | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { +LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -11 | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr index 587ff105465..b09877ede38 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:16 | -14 | fn foo(x: &mut Vec<&u8>, y: &u8) { +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -15 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr index 1f0fed6ad5f..9e18c2e11bf 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:10 | -10 | fn foo(x:Box , y: Vec<&u8>, z: &u8) { +LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -11 | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr index 8ff1220c109..d73af970e56 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr @@ -1,9 +1,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions.rs:12:12 | -11 | fn foo(x: &mut Vec<&u8>, y: &u8) { +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -12 | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr b/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr index a66c6efe670..8a69514932a 100644 --- a/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr +++ b/src/test/ui/lifetime-errors/liveness-assign-imm-local-notes.stderr @@ -1,63 +1,63 @@ error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:23:9 | -22 | x = 2; +LL | x = 2; | ----- first assignment to `x` -23 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:35:13 | -34 | x = 2; +LL | x = 2; | ----- first assignment to `x` -35 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:45:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:48:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` ... -48 | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:23:9 | -22 | x = 2; +LL | x = 2; | ----- first assignment to `x` -23 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:35:13 | -34 | x = 2; +LL | x = 2; | ----- first assignment to `x` -35 | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:45:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) --> $DIR/liveness-assign-imm-local-notes.rs:48:13 | -45 | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` ... -48 | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; //~ ERROR (Ast) [E0384] | ^^^^^ cannot assign twice to immutable variable error: aborting due to 8 previous errors diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index a33ef772649..aaa01a86d60 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -1,11 +1,11 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion.rs:12:13 | -12 | let x = vec![1].iter(); +LL | let x = vec![1].iter(); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough -13 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr index a92213e60e5..b58cbfd7b2e 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr @@ -1,112 +1,112 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5 | -17 | struct List<'a, T: ListItem<'a>> { +LL | struct List<'a, T: ListItem<'a>> { | -- help: consider adding an explicit lifetime bound `T: 'a`... -18 | slice: &'a [T] +LL | slice: &'a [T] | ^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a [T]` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5 | -18 | slice: &'a [T] +LL | slice: &'a [T] | ^^^^^^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | -28 | struct Foo { +LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... -29 | foo: &'static T +LL | foo: &'static T | ^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 | -29 | foo: &'static T +LL | foo: &'static T | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | -33 | trait X: Sized { +LL | trait X: Sized { | - help: consider adding an explicit lifetime bound `K: 'a`... -34 | fn foo<'a, L: X<&'a Nested>>(); +LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 | -34 | fn foo<'a, L: X<&'a Nested>>(); +LL | fn foo<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `Self` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | -38 | fn bar<'a, L: X<&'a Nested>>(); +LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `Self: 'a`... note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5 | -38 | fn bar<'a, L: X<&'a Nested>>(); +LL | fn bar<'a, L: X<&'a Nested>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `L` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | -42 | fn baz<'a, L, M: X<&'a Nested>>() { +LL | fn baz<'a, L, M: X<&'a Nested>>() { | ^ - help: consider adding an explicit lifetime bound `L: 'a`... | _____| | | -43 | | //~^ ERROR may not live long enough -44 | | } +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5 | -42 | / fn baz<'a, L, M: X<&'a Nested>>() { -43 | | //~^ ERROR may not live long enough -44 | | } +LL | / fn baz<'a, L, M: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error[E0309]: the parameter type `K` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | -50 | impl Nested { +LL | impl Nested { | - help: consider adding an explicit lifetime bound `K: 'a`... -51 | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -52 | | //~^ ERROR may not live long enough -53 | | } +LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:51:5 | -51 | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -52 | | //~^ ERROR may not live long enough -53 | | } +LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error[E0309]: the parameter type `M` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | -54 | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { +LL | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { | ^ -- help: consider adding an explicit lifetime bound `M: 'a`... | _____| | | -55 | | //~^ ERROR may not live long enough -56 | | } +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ | note: ...so that the reference type `&'a Nested` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:54:5 | -54 | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { -55 | | //~^ ERROR may not live long enough -56 | | } +LL | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { +LL | | //~^ ERROR may not live long enough +LL | | } | |_____^ error: aborting due to 7 previous errors diff --git a/src/test/ui/lint-ctypes.stderr b/src/test/ui/lint-ctypes.stderr index 748c311055f..76b500e7d23 100644 --- a/src/test/ui/lint-ctypes.stderr +++ b/src/test/ui/lint-ctypes.stderr @@ -1,38 +1,38 @@ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:54:28 | -54 | pub fn ptr_type1(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type1(size: *const Foo); //~ ERROR: uses type `Foo` | ^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-ctypes.rs:11:9 | -11 | #![deny(improper_ctypes)] +LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct note: type defined here --> $DIR/lint-ctypes.rs:32:1 | -32 | pub struct Foo; +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:55:28 | -55 | pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct note: type defined here --> $DIR/lint-ctypes.rs:32:1 | -32 | pub struct Foo; +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: `extern` block uses type `[u32]` which is not FFI-safe: slices have no C equivalent --> $DIR/lint-ctypes.rs:56:26 | -56 | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` +LL | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` | ^^^^^^ | = help: consider using a raw pointer instead @@ -40,7 +40,7 @@ error: `extern` block uses type `[u32]` which is not FFI-safe: slices have no C error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:57:24 | -57 | pub fn str_type(p: &str); //~ ERROR: uses type `str` +LL | pub fn str_type(p: &str); //~ ERROR: uses type `str` | ^^^^ | = help: consider using `*const u8` and a length instead @@ -48,7 +48,7 @@ error: `extern` block uses type `str` which is not FFI-safe: string slices have error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:58:24 | -58 | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` +LL | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` | ^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -56,7 +56,7 @@ error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: th error: `extern` block uses type `char` which is not FFI-safe: the `char` type has no C equivalent --> $DIR/lint-ctypes.rs:59:25 | -59 | pub fn char_type(p: char); //~ ERROR uses type `char` +LL | pub fn char_type(p: char); //~ ERROR uses type `char` | ^^^^ | = help: consider using `u32` or `libc::wchar_t` instead @@ -64,25 +64,25 @@ error: `extern` block uses type `char` which is not FFI-safe: the `char` type ha error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:60:25 | -60 | pub fn i128_type(p: i128); //~ ERROR uses type `i128` +LL | pub fn i128_type(p: i128); //~ ERROR uses type `i128` | ^^^^ error: `extern` block uses type `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:61:25 | -61 | pub fn u128_type(p: u128); //~ ERROR uses type `u128` +LL | pub fn u128_type(p: u128); //~ ERROR uses type `u128` | ^^^^ error: `extern` block uses type `std::clone::Clone` which is not FFI-safe: trait objects have no C equivalent --> $DIR/lint-ctypes.rs:62:26 | -62 | pub fn trait_type(p: &Clone); //~ ERROR uses type `std::clone::Clone` +LL | pub fn trait_type(p: &Clone); //~ ERROR uses type `std::clone::Clone` | ^^^^^^ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:63:26 | -63 | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` | ^^^^^^^^^^ | = help: consider using a struct instead @@ -90,7 +90,7 @@ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:64:27 | -64 | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` | ^^^^^^^ | = help: consider using a struct instead @@ -98,32 +98,32 @@ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have error: `extern` block uses type `ZeroSize` which is not FFI-safe: this struct has no fields --> $DIR/lint-ctypes.rs:65:25 | -65 | pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields +LL | pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields | ^^^^^^^^ | = help: consider adding a member to this struct note: type defined here --> $DIR/lint-ctypes.rs:28:1 | -28 | pub struct ZeroSize; +LL | pub struct ZeroSize; | ^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `ZeroSizeWithPhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:66:33 | -66 | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~ ERROR composed only of PhantomData +LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~ ERROR composed only of PhantomData | ^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `std::marker::PhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:68:12 | -68 | -> ::std::marker::PhantomData; //~ ERROR: composed only of PhantomData +LL | -> ::std::marker::PhantomData; //~ ERROR: composed only of PhantomData | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:69:23 | -69 | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific | ^^^^^^ | = help: consider using an `fn "extern"(...) -> ...` function pointer instead @@ -131,7 +131,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:70:24 | -70 | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific | ^^^^ | = help: consider using an `fn "extern"(...) -> ...` function pointer instead @@ -139,7 +139,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:71:28 | -71 | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -147,13 +147,13 @@ error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: th error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:72:32 | -72 | pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` +LL | pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` | ^^^^^^^^^^^^^^^ error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:73:31 | -73 | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` +LL | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` | ^^^^^^^^^^^^^^ | = help: consider using `*const u8` and a length instead @@ -161,7 +161,7 @@ error: `extern` block uses type `str` which is not FFI-safe: string slices have error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:74:30 | -74 | pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` | ^^^^^^^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct diff --git a/src/test/ui/lint-forbid-attr.stderr b/src/test/ui/lint-forbid-attr.stderr index a0e66611567..73a40a46c11 100644 --- a/src/test/ui/lint-forbid-attr.stderr +++ b/src/test/ui/lint-forbid-attr.stderr @@ -1,10 +1,10 @@ error[E0453]: allow(deprecated) overruled by outer forbid(deprecated) --> $DIR/lint-forbid-attr.rs:13:9 | -11 | #![forbid(deprecated)] +LL | #![forbid(deprecated)] | ---------- `forbid` level set here -12 | -13 | #[allow(deprecated)] +LL | +LL | #[allow(deprecated)] | ^^^^^^^^^^ overruled by previous forbid error: aborting due to previous error diff --git a/src/test/ui/lint-output-format-2.stderr b/src/test/ui/lint-output-format-2.stderr index 75e7e1f42ff..b2d1e1ac058 100644 --- a/src/test/ui/lint-output-format-2.stderr +++ b/src/test/ui/lint-output-format-2.stderr @@ -1,7 +1,7 @@ warning: use of deprecated item 'lint_output_format::foo': text --> $DIR/lint-output-format-2.rs:20:26 | -20 | use lint_output_format::{foo, bar}; +LL | use lint_output_format::{foo, bar}; | ^^^ | = note: #[warn(deprecated)] on by default @@ -9,16 +9,16 @@ warning: use of deprecated item 'lint_output_format::foo': text warning: use of deprecated item 'lint_output_format::foo': text --> $DIR/lint-output-format-2.rs:25:14 | -25 | let _x = foo(); +LL | let _x = foo(); | ^^^ error: compilation successful --> $DIR/lint-output-format-2.rs:24:1 | -24 | / fn main() { //~ ERROR: compilation successful -25 | | let _x = foo(); -26 | | //~^ WARNING use of deprecated item 'lint_output_format::foo': text -27 | | let _y = bar(); -28 | | } +LL | / fn main() { //~ ERROR: compilation successful +LL | | let _x = foo(); +LL | | //~^ WARNING use of deprecated item 'lint_output_format::foo': text +LL | | let _y = bar(); +LL | | } | |_^ diff --git a/src/test/ui/lint-unconditional-recursion.stderr b/src/test/ui/lint-unconditional-recursion.stderr index f6f97654b57..933c191551d 100644 --- a/src/test/ui/lint-unconditional-recursion.stderr +++ b/src/test/ui/lint-unconditional-recursion.stderr @@ -1,28 +1,28 @@ error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:14:1 | -14 | fn foo() { //~ ERROR function cannot return without recurring +LL | fn foo() { //~ ERROR function cannot return without recurring | ^^^^^^^^ cannot return without recurring -15 | foo(); +LL | foo(); | ----- recursive call site | note: lint level defined here --> $DIR/lint-unconditional-recursion.rs:11:9 | -11 | #![deny(unconditional_recursion)] +LL | #![deny(unconditional_recursion)] | ^^^^^^^^^^^^^^^^^^^^^^^ = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:24:1 | -24 | fn baz() { //~ ERROR function cannot return without recurring +LL | fn baz() { //~ ERROR function cannot return without recurring | ^^^^^^^^ cannot return without recurring -25 | if true { -26 | baz() +LL | if true { +LL | baz() | ----- recursive call site -27 | } else { -28 | baz() +LL | } else { +LL | baz() | ----- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -30,13 +30,13 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:36:1 | -36 | fn quz() -> bool { //~ ERROR function cannot return without recurring +LL | fn quz() -> bool { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^^^^ cannot return without recurring -37 | if true { -38 | while quz() {} +LL | if true { +LL | while quz() {} | ----- recursive call site ... -41 | loop { quz(); } +LL | loop { quz(); } | ----- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -44,9 +44,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:47:5 | -47 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -48 | self.bar() +LL | self.bar() | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -54,10 +54,10 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:53:5 | -53 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -54 | loop { -55 | self.bar() +LL | loop { +LL | self.bar() | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -65,9 +65,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:62:5 | -62 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -63 | 0.bar() +LL | 0.bar() | ------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -75,9 +75,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:75:5 | -75 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -76 | Foo2::bar(self) +LL | Foo2::bar(self) | --------------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -85,10 +85,10 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:81:5 | -81 | fn bar(&self) { //~ ERROR function cannot return without recurring +LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -82 | loop { -83 | Foo2::bar(self) +LL | loop { +LL | Foo2::bar(self) | --------------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -96,9 +96,9 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:91:5 | -91 | fn qux(&self) { //~ ERROR function cannot return without recurring +LL | fn qux(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring -92 | self.qux(); +LL | self.qux(); | ---------- recursive call site | = help: a `loop` may express intention better if this is on purpose @@ -106,52 +106,52 @@ error: function cannot return without recurring error: function cannot return without recurring --> $DIR/lint-unconditional-recursion.rs:96:5 | -96 | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring +LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -97 | Baz::as_ref(self) +LL | Baz::as_ref(self) | ----------------- recursive call site | = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:103:5 - | -103 | fn default() -> Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^ cannot return without recurring -104 | let x = Default::default(); - | ------------------ recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:103:5 + | +LL | fn default() -> Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | let x = Default::default(); + | ------------------ recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:112:5 - | -112 | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -113 | &**self - | ------ recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:112:5 + | +LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | &**self + | ------ recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:119:5 - | -119 | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -120 | &self[x] - | ------- recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:119:5 + | +LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | &self[x] + | ------- recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:128:5 - | -128 | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring -129 | self.as_ref() - | ---- recursive call site - | - = help: a `loop` may express intention better if this is on purpose + --> $DIR/lint-unconditional-recursion.rs:128:5 + | +LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring + | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring +LL | self.as_ref() + | ---- recursive call site + | + = help: a `loop` may express intention better if this is on purpose error: aborting due to 14 previous errors diff --git a/src/test/ui/lint/command-line-lint-group-deny.stderr b/src/test/ui/lint/command-line-lint-group-deny.stderr index a6182de0a75..45a20434dd2 100644 --- a/src/test/ui/lint/command-line-lint-group-deny.stderr +++ b/src/test/ui/lint/command-line-lint-group-deny.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-deny.rs:14:9 | -14 | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D non-snake-case` implied by `-D bad-style` diff --git a/src/test/ui/lint/command-line-lint-group-forbid.stderr b/src/test/ui/lint/command-line-lint-group-forbid.stderr index 7ae6734c8a3..1fe51c62786 100644 --- a/src/test/ui/lint/command-line-lint-group-forbid.stderr +++ b/src/test/ui/lint/command-line-lint-group-forbid.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-forbid.rs:14:9 | -14 | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-F non-snake-case` implied by `-F bad-style` diff --git a/src/test/ui/lint/command-line-lint-group-warn.stderr b/src/test/ui/lint/command-line-lint-group-warn.stderr index 6562e16a45d..e4628509635 100644 --- a/src/test/ui/lint/command-line-lint-group-warn.stderr +++ b/src/test/ui/lint/command-line-lint-group-warn.stderr @@ -1,7 +1,7 @@ warning: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` --> $DIR/command-line-lint-group-warn.rs:15:9 | -15 | let _InappropriateCamelCasing = true; +LL | let _InappropriateCamelCasing = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-W non-snake-case` implied by `-W bad-style` diff --git a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr index 694fe69e016..35fe5479406 100644 --- a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr +++ b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr @@ -1,26 +1,26 @@ warning: unused variable: `i_think_continually` --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:22:9 | -22 | let i_think_continually = 2; +LL | let i_think_continually = 2; | ^^^^^^^^^^^^^^^^^^^ help: consider using `_i_think_continually` instead | note: lint level defined here --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:13:9 | -13 | #![warn(unused)] // UI tests pass `-A unused` (#43896) +LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: unused variable: `corridors_of_light` --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:29:26 | -29 | if let SoulHistory { corridors_of_light, +LL | if let SoulHistory { corridors_of_light, | ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _` warning: variable `hours_are_suns` is assigned to, but never used --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:30:26 | -30 | mut hours_are_suns, +LL | mut hours_are_suns, | ^^^^^^^^^^^^^^^^^^ | = note: consider using `_hours_are_suns` instead @@ -28,13 +28,13 @@ warning: variable `hours_are_suns` is assigned to, but never used warning: value assigned to `hours_are_suns` is never read --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:32:9 | -32 | hours_are_suns = false; +LL | hours_are_suns = false; | ^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:13:9 | -13 | #![warn(unused)] // UI tests pass `-A unused` (#43896) +LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ = note: #[warn(unused_assignments)] implied by #[warn(unused)] diff --git a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr index 097ec1b1c80..ac5df471c55 100644 --- a/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr +++ b/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.stderr @@ -1,15 +1,15 @@ warning: unnecessary parentheses around function argument --> $DIR/issue-47775-nested-macro-unnecessary-parens-arg.rs:32:83 | -32 | #[allow(dead_code)] fn the_night_for_the_morrow() -> Option { Some((2)) } +LL | #[allow(dead_code)] fn the_night_for_the_morrow() -> Option { Some((2)) } | ^^^ help: remove these parentheses ... -38 | and_the_heavens_reject_not!(); +LL | and_the_heavens_reject_not!(); | ------------------------------ in this macro invocation | note: lint level defined here --> $DIR/issue-47775-nested-macro-unnecessary-parens-arg.rs:13:9 | -13 | #![warn(unused_parens)] +LL | #![warn(unused_parens)] | ^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-group-nonstandard-style.stderr b/src/test/ui/lint/lint-group-nonstandard-style.stderr index b0ce19e35ee..6979510e500 100644 --- a/src/test/ui/lint/lint-group-nonstandard-style.stderr +++ b/src/test/ui/lint/lint-group-nonstandard-style.stderr @@ -1,65 +1,65 @@ error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:14:1 | -14 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:11:9 | -11 | #![deny(nonstandard_style)] +LL | #![deny(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)] error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:22:9 | -22 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:20:14 | -20 | #[forbid(nonstandard_style)] +LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)] error: static variable `bad` should have an upper case name such as `BAD` --> $DIR/lint-group-nonstandard-style.rs:24:9 | -24 | static bad: isize = 1; //~ ERROR should have an upper +LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:20:14 | -20 | #[forbid(nonstandard_style)] +LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)] warning: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:30:9 | -30 | fn CamelCase() {} //~ WARN should have a snake +LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:28:17 | -28 | #![warn(nonstandard_style)] +LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] warning: type `snake_case` should have a camel case name such as `SnakeCase` --> $DIR/lint-group-nonstandard-style.rs:32:9 | -32 | struct snake_case; //~ WARN should have a camel +LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:28:17 | -28 | #![warn(nonstandard_style)] +LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)] diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr index 3dfe2cee991..c1b15160bc5 100644 --- a/src/test/ui/lint/lint-group-style.stderr +++ b/src/test/ui/lint/lint-group-style.stderr @@ -1,65 +1,65 @@ error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:14:1 | -14 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:11:9 | -11 | #![deny(bad_style)] +LL | #![deny(bad_style)] | ^^^^^^^^^ = note: #[deny(non_snake_case)] implied by #[deny(bad_style)] error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:22:9 | -22 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -20 | #[forbid(bad_style)] +LL | #[forbid(bad_style)] | ^^^^^^^^^ = note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)] error: static variable `bad` should have an upper case name such as `BAD` --> $DIR/lint-group-style.rs:24:9 | -24 | static bad: isize = 1; //~ ERROR should have an upper +LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -20 | #[forbid(bad_style)] +LL | #[forbid(bad_style)] | ^^^^^^^^^ = note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)] warning: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:30:9 | -30 | fn CamelCase() {} //~ WARN should have a snake +LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -28 | #![warn(bad_style)] +LL | #![warn(bad_style)] | ^^^^^^^^^ = note: #[warn(non_snake_case)] implied by #[warn(bad_style)] warning: type `snake_case` should have a camel case name such as `SnakeCase` --> $DIR/lint-group-style.rs:32:9 | -32 | struct snake_case; //~ WARN should have a camel +LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -28 | #![warn(bad_style)] +LL | #![warn(bad_style)] | ^^^^^^^^^ = note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)] diff --git a/src/test/ui/lint/not_found.stderr b/src/test/ui/lint/not_found.stderr index 16daceecb98..603b5410444 100644 --- a/src/test/ui/lint/not_found.stderr +++ b/src/test/ui/lint/not_found.stderr @@ -1,7 +1,7 @@ warning: unknown lint: `FOO_BAR` --> $DIR/not_found.rs:16:9 | -16 | #[allow(FOO_BAR)] +LL | #[allow(FOO_BAR)] | ^^^^^^^ | = note: #[warn(unknown_lints)] on by default @@ -9,12 +9,12 @@ warning: unknown lint: `FOO_BAR` warning: unknown lint: `DEAD_CODE` --> $DIR/not_found.rs:18:8 | -18 | #[warn(DEAD_CODE)] +LL | #[warn(DEAD_CODE)] | ^^^^^^^^^ help: lowercase the lint name: `dead_code` warning: unknown lint: `Warnings` --> $DIR/not_found.rs:20:8 | -20 | #[deny(Warnings)] +LL | #[deny(Warnings)] | ^^^^^^^^ help: lowercase the lint name: `warnings` diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr index 75ec71e729f..62bec0fe7b3 100644 --- a/src/test/ui/lint/outer-forbid.stderr +++ b/src/test/ui/lint/outer-forbid.stderr @@ -1,28 +1,28 @@ error[E0453]: allow(unused_variables) overruled by outer forbid(unused) --> $DIR/outer-forbid.rs:19:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here -18 | -19 | #[allow(unused_variables)] //~ ERROR overruled +LL | +LL | #[allow(unused_variables)] //~ ERROR overruled | ^^^^^^^^^^^^^^^^ overruled by previous forbid error[E0453]: allow(unused) overruled by outer forbid(unused) --> $DIR/outer-forbid.rs:22:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here ... -22 | #[allow(unused)] //~ ERROR overruled +LL | #[allow(unused)] //~ ERROR overruled | ^^^^^^ overruled by previous forbid error[E0453]: allow(bad_style) overruled by outer forbid(non_snake_case) --> $DIR/outer-forbid.rs:25:9 | -17 | #![forbid(unused, non_snake_case)] +LL | #![forbid(unused, non_snake_case)] | -------------- `forbid` level set here ... -25 | #[allow(bad_style)] //~ ERROR overruled +LL | #[allow(bad_style)] //~ ERROR overruled | ^^^^^^^^^ overruled by previous forbid error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index 90d6bd312e4..84a2e4a91ec 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -1,19 +1,19 @@ warning: unnecessary parentheses around assigned value --> $DIR/suggestions.rs:48:21 | -48 | let mut a = (1); // should suggest no `mut`, no parens +LL | let mut a = (1); // should suggest no `mut`, no parens | ^^^ help: remove these parentheses | note: lint level defined here --> $DIR/suggestions.rs:13:21 | -13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 +LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 | ^^^^^^^^^^^^^ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 --> $DIR/suggestions.rs:43:1 | -43 | #[no_debug] // should suggest removal of deprecated attribute +LL | #[no_debug] // should suggest removal of deprecated attribute | ^^^^^^^^^^^ help: remove this attribute | = note: #[warn(deprecated)] on by default @@ -21,7 +21,7 @@ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was warning: variable does not need to be mutable --> $DIR/suggestions.rs:48:13 | -48 | let mut a = (1); // should suggest no `mut`, no parens +LL | let mut a = (1); // should suggest no `mut`, no parens | ----^ | | | help: remove this `mut` @@ -29,17 +29,17 @@ warning: variable does not need to be mutable note: lint level defined here --> $DIR/suggestions.rs:13:9 | -13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 +LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 | ^^^^^^^^^^ warning: variable does not need to be mutable --> $DIR/suggestions.rs:52:13 | -52 | let mut +LL | let mut | _____________^ | |_____________| | || -53 | || b = 1; +LL | || b = 1; | ||____________-^ | |____________| | help: remove this `mut` @@ -47,7 +47,7 @@ warning: variable does not need to be mutable warning: static is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:16:14 | -16 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` +LL | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` | -^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: try making it public: `pub` @@ -57,7 +57,7 @@ warning: static is marked #[no_mangle], but not exported error: const items should never be #[no_mangle] --> $DIR/suggestions.rs:18:14 | -18 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` +LL | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` | -----^^^^^^^^^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` @@ -67,9 +67,9 @@ error: const items should never be #[no_mangle] warning: functions generic over types must be mangled --> $DIR/suggestions.rs:22:1 | -21 | #[no_mangle] // should suggest removal (generics can't be no-mangle) +LL | #[no_mangle] // should suggest removal (generics can't be no-mangle) | ------------ help: remove this attribute -22 | pub fn defiant(_t: T) {} +LL | pub fn defiant(_t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(no_mangle_generic_items)] on by default @@ -77,7 +77,7 @@ warning: functions generic over types must be mangled warning: function is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:26:1 | -26 | fn rio_grande() {} // should suggest `pub` +LL | fn rio_grande() {} // should suggest `pub` | -^^^^^^^^^^^^^^^^^ | | | help: try making it public: `pub` @@ -87,19 +87,19 @@ warning: function is marked #[no_mangle], but not exported warning: static is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:33:18 | -33 | #[no_mangle] pub static DAUNTLESS: bool = true; +LL | #[no_mangle] pub static DAUNTLESS: bool = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported --> $DIR/suggestions.rs:35:18 | -35 | #[no_mangle] pub fn val_jean() {} +LL | #[no_mangle] pub fn val_jean() {} | ^^^^^^^^^^^^^^^^^^^^ warning: denote infinite loops with `loop { ... }` --> $DIR/suggestions.rs:46:5 | -46 | while true { // should suggest `loop` +LL | while true { // should suggest `loop` | ^^^^^^^^^^ help: use `loop` | = note: #[warn(while_true)] on by default @@ -107,7 +107,7 @@ warning: denote infinite loops with `loop { ... }` warning: the `warp_factor:` in this pattern is redundant --> $DIR/suggestions.rs:57:23 | -57 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand +LL | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand | ------------^^^^^^^^^^^^ | | | help: remove this diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.stderr b/src/test/ui/lint/unreachable_pub-pub_crate.stderr index 0c2841a9e15..d1711be456b 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.stderr +++ b/src/test/ui/lint/unreachable_pub-pub_crate.stderr @@ -1,7 +1,7 @@ warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:26:5 | -26 | pub use std::fmt; +LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -9,14 +9,14 @@ warning: unreachable `pub` item note: lint level defined here --> $DIR/unreachable_pub-pub_crate.rs:22:9 | -22 | #![warn(unreachable_pub)] +LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:28:5 | -28 | pub struct Hydrogen { +LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -26,7 +26,7 @@ warning: unreachable `pub` item warning: unreachable `pub` field --> $DIR/unreachable_pub-pub_crate.rs:30:9 | -30 | pub neutrons: usize, +LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -34,7 +34,7 @@ warning: unreachable `pub` field warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:36:9 | -36 | pub fn count_neutrons(&self) -> usize { self.neutrons } +LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -42,7 +42,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:40:5 | -40 | pub enum Helium {} +LL | pub enum Helium {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -52,7 +52,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:41:5 | -41 | pub union Lithium { c1: usize, c2: u8 } +LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -62,7 +62,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:42:5 | -42 | pub fn beryllium() {} +LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -72,7 +72,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:43:5 | -43 | pub trait Boron {} +LL | pub trait Boron {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -82,7 +82,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:44:5 | -44 | pub const CARBON: usize = 1; +LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -92,7 +92,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:45:5 | -45 | pub static NITROGEN: usize = 2; +LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -102,7 +102,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:46:5 | -46 | pub type Oxygen = bool; +LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` @@ -112,12 +112,12 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:49:47 | -49 | ($visibility: vis, $name: ident) => { $visibility struct $name {} } +LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` -50 | } -51 | define_empty_struct_with_visibility!(pub, Fluorine); +LL | } +LL | define_empty_struct_with_visibility!(pub, Fluorine); | ---------------------------------------------------- in this macro invocation | = help: or consider exporting it for use by other crates @@ -125,7 +125,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:54:9 | -54 | pub fn catalyze() -> bool; +LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` diff --git a/src/test/ui/lint/unreachable_pub.stderr b/src/test/ui/lint/unreachable_pub.stderr index 093870866c0..1d693161108 100644 --- a/src/test/ui/lint/unreachable_pub.stderr +++ b/src/test/ui/lint/unreachable_pub.stderr @@ -1,7 +1,7 @@ warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:21:5 | -21 | pub use std::fmt; +LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -9,14 +9,14 @@ warning: unreachable `pub` item note: lint level defined here --> $DIR/unreachable_pub.rs:17:9 | -17 | #![warn(unreachable_pub)] +LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:23:5 | -23 | pub struct Hydrogen { +LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -26,7 +26,7 @@ warning: unreachable `pub` item warning: unreachable `pub` field --> $DIR/unreachable_pub.rs:25:9 | -25 | pub neutrons: usize, +LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -34,7 +34,7 @@ warning: unreachable `pub` field warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:31:9 | -31 | pub fn count_neutrons(&self) -> usize { self.neutrons } +LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -42,7 +42,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:35:5 | -35 | pub enum Helium {} +LL | pub enum Helium {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -52,7 +52,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:36:5 | -36 | pub union Lithium { c1: usize, c2: u8 } +LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -62,7 +62,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:37:5 | -37 | pub fn beryllium() {} +LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -72,7 +72,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:38:5 | -38 | pub trait Boron {} +LL | pub trait Boron {} | ---^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -82,7 +82,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:39:5 | -39 | pub const CARBON: usize = 1; +LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -92,7 +92,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:40:5 | -40 | pub static NITROGEN: usize = 2; +LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -102,7 +102,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:41:5 | -41 | pub type Oxygen = bool; +LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` @@ -112,12 +112,12 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:44:47 | -44 | ($visibility: vis, $name: ident) => { $visibility struct $name {} } +LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` -45 | } -46 | define_empty_struct_with_visibility!(pub, Fluorine); +LL | } +LL | define_empty_struct_with_visibility!(pub, Fluorine); | ---------------------------------------------------- in this macro invocation | = help: or consider exporting it for use by other crates @@ -125,7 +125,7 @@ warning: unreachable `pub` item warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:49:9 | -49 | pub fn catalyze() -> bool; +LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `crate` diff --git a/src/test/ui/lint/unused_parens_json_suggestion.stderr b/src/test/ui/lint/unused_parens_json_suggestion.stderr index 37eb9a98f74..cd4379d90cf 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.stderr +++ b/src/test/ui/lint/unused_parens_json_suggestion.stderr @@ -90,13 +90,13 @@ "rendered": "warning: unnecessary parentheses around assigned value --> $DIR/unused_parens_json_suggestion.rs:25:14 | -25 | let _a = (1 / (2 + 3)); +LL | let _a = (1 / (2 + 3)); | ^^^^^^^^^^^^^ help: remove these parentheses | note: lint level defined here --> $DIR/unused_parens_json_suggestion.rs:20:9 | -20 | #![warn(unused_parens)] +LL | #![warn(unused_parens)] | ^^^^^^^^^^^^^ " diff --git a/src/test/ui/lint/use_suggestion_json.stderr b/src/test/ui/lint/use_suggestion_json.stderr index 368b223722d..00624f7e5ca 100644 --- a/src/test/ui/lint/use_suggestion_json.stderr +++ b/src/test/ui/lint/use_suggestion_json.stderr @@ -370,17 +370,17 @@ mod foo { "rendered": "error[E0412]: cannot find type `Iter` in this scope --> $DIR/use_suggestion_json.rs:21:12 | -21 | let x: Iter; +LL | let x: Iter; | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -20 | use std::collections::binary_heap::Iter; +LL | use std::collections::binary_heap::Iter; | -20 | use std::collections::btree_map::Iter; +LL | use std::collections::btree_map::Iter; | -20 | use std::collections::btree_set::Iter; +LL | use std::collections::btree_set::Iter; | -20 | use std::collections::hash_map::Iter; +LL | use std::collections::hash_map::Iter; | and 8 other candidates diff --git a/src/test/ui/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness-return-last-stmt-semi.stderr index ede41118891..faf098296e8 100644 --- a/src/test/ui/liveness-return-last-stmt-semi.stderr +++ b/src/test/ui/liveness-return-last-stmt-semi.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:13:45 | -13 | macro_rules! test { () => { fn foo() -> i32 { 1; } } } +LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } | ^^^-^^ | | | | | help: consider removing this semicolon | expected i32, found () ... -27 | test!(); +LL | test!(); | -------- in this macro invocation | = note: expected type `i32` @@ -16,7 +16,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:16:23 | -16 | fn no_return() -> i32 {} //~ ERROR mismatched types +LL | fn no_return() -> i32 {} //~ ERROR mismatched types | ^^ expected i32, found () | = note: expected type `i32` @@ -25,11 +25,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:18:23 | -18 | fn bar(x: u32) -> u32 { //~ ERROR mismatched types +LL | fn bar(x: u32) -> u32 { //~ ERROR mismatched types | _______________________^ -19 | | x * 2; +LL | | x * 2; | | - help: consider removing this semicolon -20 | | } +LL | | } | |_^ expected u32, found () | = note: expected type `u32` @@ -38,10 +38,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:22:23 | -22 | fn baz(x: u64) -> u32 { //~ ERROR mismatched types +LL | fn baz(x: u64) -> u32 { //~ ERROR mismatched types | _______________________^ -23 | | x * 2; -24 | | } +LL | | x * 2; +LL | | } | |_^ expected u32, found () | = note: expected type `u32` diff --git a/src/test/ui/loop-break-value-no-repeat.stderr b/src/test/ui/loop-break-value-no-repeat.stderr index 427fade0ce0..0f04847df4c 100644 --- a/src/test/ui/loop-break-value-no-repeat.stderr +++ b/src/test/ui/loop-break-value-no-repeat.stderr @@ -1,11 +1,11 @@ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value-no-repeat.rs:22:9 | -22 | break 22 //~ ERROR `break` with value from a `for` loop +LL | break 22 //~ ERROR `break` with value from a `for` loop | ^^^^^^^^ can only break with a value inside `loop` help: instead, use `break` on its own without a value inside this `for` loop | -22 | break //~ ERROR `break` with value from a `for` loop +LL | break //~ ERROR `break` with value from a `for` loop | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/loops-reject-duplicate-labels-2.stderr b/src/test/ui/loops-reject-duplicate-labels-2.stderr index 488046b71b3..d35ed4ff88a 100644 --- a/src/test/ui/loops-reject-duplicate-labels-2.stderr +++ b/src/test/ui/loops-reject-duplicate-labels-2.stderr @@ -1,72 +1,72 @@ warning: label name `'fl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:23:7 | -22 | { 'fl: for _ in 0..10 { break; } } +LL | { 'fl: for _ in 0..10 { break; } } | --- first declared here -23 | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows a label name that is already in scope | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:25:7 | -24 | { 'lf: loop { break; } } +LL | { 'lf: loop { break; } } | --- first declared here -25 | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows a label name that is already in scope | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:27:7 | -26 | { 'wl: while 2 > 1 { break; } } +LL | { 'wl: while 2 > 1 { break; } } | --- first declared here -27 | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows a label name that is already in scope | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:29:7 | -28 | { 'lw: loop { break; } } +LL | { 'lw: loop { break; } } | --- first declared here -29 | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows a label name that is already in scope | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:31:7 | -30 | { 'fw: for _ in 0..10 { break; } } +LL | { 'fw: for _ in 0..10 { break; } } | --- first declared here -31 | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows a label name that is already in scope | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:33:7 | -32 | { 'wf: while 2 > 1 { break; } } +LL | { 'wf: while 2 > 1 { break; } } | --- first declared here -33 | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows a label name that is already in scope | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:35:7 | -34 | { 'tl: while let Some(_) = None:: { break; } } +LL | { 'tl: while let Some(_) = None:: { break; } } | --- first declared here -35 | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows a label name that is already in scope | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels-2.rs:37:7 | -36 | { 'lt: loop { break; } } +LL | { 'lt: loop { break; } } | --- first declared here -37 | { 'lt: while let Some(_) = None:: { break; } } +LL | { 'lt: while let Some(_) = None:: { break; } } | ^^^ lifetime 'lt already in scope error: compilation successful --> $DIR/loops-reject-duplicate-labels-2.rs:42:1 | -42 | / pub fn main() { //~ ERROR compilation successful -43 | | foo(); -44 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/loops-reject-duplicate-labels.stderr b/src/test/ui/loops-reject-duplicate-labels.stderr index 3c287138c92..d1b874ea997 100644 --- a/src/test/ui/loops-reject-duplicate-labels.stderr +++ b/src/test/ui/loops-reject-duplicate-labels.stderr @@ -1,75 +1,75 @@ warning: label name `'fl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:20:5 | -19 | 'fl: for _ in 0..10 { break; } +LL | 'fl: for _ in 0..10 { break; } | --- first declared here -20 | 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:23:5 | -22 | 'lf: loop { break; } +LL | 'lf: loop { break; } | --- first declared here -23 | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a label name that is already in scope | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:25:5 | -24 | 'wl: while 2 > 1 { break; } +LL | 'wl: while 2 > 1 { break; } | --- first declared here -25 | 'wl: loop { break; } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | 'wl: loop { break; } //~ WARN label name `'wl` shadows a label name that is already in scope | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:27:5 | -26 | 'lw: loop { break; } +LL | 'lw: loop { break; } | --- first declared here -27 | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a label name that is already in scope | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:29:5 | -28 | 'fw: for _ in 0..10 { break; } +LL | 'fw: for _ in 0..10 { break; } | --- first declared here -29 | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a label name that is already in scope | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:31:5 | -30 | 'wf: while 2 > 1 { break; } +LL | 'wf: while 2 > 1 { break; } | --- first declared here -31 | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a label name that is already in scope | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:33:5 | -32 | 'tl: while let Some(_) = None:: { break; } +LL | 'tl: while let Some(_) = None:: { break; } | --- first declared here -33 | 'tl: loop { break; } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | 'tl: loop { break; } //~ WARN label name `'tl` shadows a label name that is already in scope | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope --> $DIR/loops-reject-duplicate-labels.rs:35:5 | -34 | 'lt: loop { break; } +LL | 'lt: loop { break; } | --- first declared here -35 | 'lt: while let Some(_) = None:: { break; } +LL | 'lt: while let Some(_) = None:: { break; } | ^^^ lifetime 'lt already in scope error: compilation successful --> $DIR/loops-reject-duplicate-labels.rs:49:1 | -49 | / pub fn main() { //~ ERROR compilation successful -50 | | let s = S; -51 | | s.m1(); -52 | | s.m2(); -53 | | foo(); -54 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | let s = S; +LL | | s.m1(); +LL | | s.m2(); +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr index 07dbb68725d..0cdd58fdbd7 100644 --- a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr +++ b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr @@ -1,110 +1,110 @@ warning: label name `'a` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:20:9 | -19 | fn foo<'a>() { +LL | fn foo<'a>() { | -- first declared here -20 | 'a: loop { break 'a; } +LL | 'a: loop { break 'a; } | ^^ lifetime 'a already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:45:13 | -43 | impl<'bad, 'c> Struct<'bad, 'c> { +LL | impl<'bad, 'c> Struct<'bad, 'c> { | ---- first declared here -44 | fn meth_bad(&self) { -45 | 'bad: loop { break 'bad; } +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:52:13 | -50 | impl<'b, 'bad> Struct<'b, 'bad> { +LL | impl<'b, 'bad> Struct<'b, 'bad> { | ---- first declared here -51 | fn meth_bad2(&self) { -52 | 'bad: loop { break 'bad; } +LL | fn meth_bad2(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:59:13 | -58 | fn meth_bad3<'bad>(x: &'bad i8) { +LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here -59 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:64:13 | -63 | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { +LL | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { | ---- first declared here -64 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:71:13 | -69 | impl <'bad, 'e> Enum<'bad, 'e> { +LL | impl <'bad, 'e> Enum<'bad, 'e> { | ---- first declared here -70 | fn meth_bad(&self) { -71 | 'bad: loop { break 'bad; } +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:77:13 | -75 | impl <'d, 'bad> Enum<'d, 'bad> { +LL | impl <'d, 'bad> Enum<'d, 'bad> { | ---- first declared here -76 | fn meth_bad2(&self) { -77 | 'bad: loop { break 'bad; } +LL | fn meth_bad2(&self) { +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:83:13 | -82 | fn meth_bad3<'bad>(x: &'bad i8) { +LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here -83 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:88:13 | -87 | fn meth_bad4<'a,'bad>(x: &'bad i8) { +LL | fn meth_bad4<'a,'bad>(x: &'bad i8) { | ---- first declared here -88 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:98:13 | -93 | trait HasDefaultMethod1<'bad> { +LL | trait HasDefaultMethod1<'bad> { | ---- first declared here ... -98 | 'bad: loop { break 'bad; } +LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13 - | -102 | trait HasDefaultMethod2<'a,'bad> { - | ---- first declared here -103 | fn meth_bad(&self) { -104 | 'bad: loop { break 'bad; } - | ^^^^ lifetime 'bad already in scope + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13 + | +LL | trait HasDefaultMethod2<'a,'bad> { + | ---- first declared here +LL | fn meth_bad(&self) { +LL | 'bad: loop { break 'bad; } + | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13 - | -109 | fn meth_bad<'bad>(&self) { - | ---- first declared here -110 | 'bad: loop { break 'bad; } - | ^^^^ lifetime 'bad already in scope + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13 + | +LL | fn meth_bad<'bad>(&self) { + | ---- first declared here +LL | 'bad: loop { break 'bad; } + | ^^^^ lifetime 'bad already in scope error: compilation successful - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 - | -117 | / pub fn main() { //~ ERROR compilation successful -118 | | foo(); -119 | | } - | |_^ + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 + | +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } + | |_^ diff --git a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr index d44b1b7b623..a050aec50c7 100644 --- a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr +++ b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr @@ -1,16 +1,16 @@ warning: lifetime name `'a` shadows a label name that is already in scope --> $DIR/loops-reject-lifetime-shadowing-label.rs:31:51 | -30 | 'a: loop { +LL | 'a: loop { | -- first declared here -31 | let b = Box::new(|x: &i8| *x) as Box Fn(&'a i8) -> i8>; +LL | let b = Box::new(|x: &i8| *x) as Box Fn(&'a i8) -> i8>; | ^^ lifetime 'a already in scope error: compilation successful --> $DIR/loops-reject-lifetime-shadowing-label.rs:39:1 | -39 | / pub fn main() { //~ ERROR compilation successful -40 | | foo(); -41 | | } +LL | / pub fn main() { //~ ERROR compilation successful +LL | | foo(); +LL | | } | |_^ diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr index d308ae10f14..0fa6fdae481 100644 --- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr @@ -1,12 +1,12 @@ error[E0308]: match arms have incompatible types --> $DIR/old-lub-glb-hr.rs:18:13 | -18 | let z = match 22 { //~ ERROR incompatible types +LL | let z = match 22 { //~ ERROR incompatible types | _____________^ -19 | | 0 => x, -20 | | _ => y, +LL | | 0 => x, +LL | | _ => y, | | - match arm with an incompatible type -21 | | }; +LL | | }; | |_____^ expected bound lifetime parameter, found concrete lifetime | = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)` diff --git a/src/test/ui/lub-glb/old-lub-glb-object.stderr b/src/test/ui/lub-glb/old-lub-glb-object.stderr index 21e1d3a04a2..49fb063a9c6 100644 --- a/src/test/ui/lub-glb/old-lub-glb-object.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr @@ -1,12 +1,12 @@ error[E0308]: match arms have incompatible types --> $DIR/old-lub-glb-object.rs:20:13 | -20 | let z = match 22 { //~ ERROR incompatible types +LL | let z = match 22 { //~ ERROR incompatible types | _____________^ -21 | | 0 => x, -22 | | _ => y, +LL | | 0 => x, +LL | | _ => y, | | - match arm with an incompatible type -23 | | }; +LL | | }; | |_____^ expected bound lifetime parameter 'a, found concrete lifetime | = note: expected type `&for<'a, 'b> Foo<&'a u8, &'b u8>` diff --git a/src/test/ui/macro-context.stderr b/src/test/ui/macro-context.stderr index 2be89b67d11..65bbe09a212 100644 --- a/src/test/ui/macro-context.stderr +++ b/src/test/ui/macro-context.stderr @@ -1,45 +1,45 @@ error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:13:15 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in type context --> $DIR/macro-context.rs:20:12 | -20 | let a: m!(); +LL | let a: m!(); | ^^^^ error: macro expansion ignores token `typeof` and any following --> $DIR/macro-context.rs:13:17 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^^^^^^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in expression context --> $DIR/macro-context.rs:21:13 | -21 | let i = m!(); +LL | let i = m!(); | ^^^^ error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:13:15 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^ | note: caused by the macro expansion here; the usage of `m!` is likely invalid in pattern context --> $DIR/macro-context.rs:23:9 | -23 | m!() => {} +LL | m!() => {} | ^^^^ error: expected expression, found reserved keyword `typeof` --> $DIR/macro-context.rs:13:17 | -13 | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` | ^^^^^^ ... -26 | m!(); +LL | m!(); | ----- in this macro invocation diff --git a/src/test/ui/macro-invalid-fragment-spec.stderr b/src/test/ui/macro-invalid-fragment-spec.stderr index b279933bd05..bdb0e4a5c40 100644 --- a/src/test/ui/macro-invalid-fragment-spec.stderr +++ b/src/test/ui/macro-invalid-fragment-spec.stderr @@ -1,7 +1,7 @@ error: invalid fragment specifier `foo` --> $DIR/macro-invalid-fragment-spec.rs:12:6 | -12 | ($x:foo) => () +LL | ($x:foo) => () | ^^^^^^ | = help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `path`, `meta`, `tt`, `item` and `vis` diff --git a/src/test/ui/macro-shadowing.stderr b/src/test/ui/macro-shadowing.stderr index 9ed372f275d..28f09509a62 100644 --- a/src/test/ui/macro-shadowing.stderr +++ b/src/test/ui/macro-shadowing.stderr @@ -1,10 +1,10 @@ error: `macro_two` is already in scope --> $DIR/macro-shadowing.rs:22:5 | -22 | #[macro_use] //~ ERROR `macro_two` is already in scope +LL | #[macro_use] //~ ERROR `macro_two` is already in scope | ^^^^^^^^^^^^ ... -25 | m1!(); +LL | m1!(); | ------ in this macro invocation | = note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560) @@ -12,10 +12,10 @@ error: `macro_two` is already in scope error: `foo` is already in scope --> $DIR/macro-shadowing.rs:20:5 | -20 | macro_rules! foo { () => {} } //~ ERROR `foo` is already in scope +LL | macro_rules! foo { () => {} } //~ ERROR `foo` is already in scope | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -25 | m1!(); +LL | m1!(); | ------ in this macro invocation | = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560) diff --git a/src/test/ui/macro_backtrace/main.stderr b/src/test/ui/macro_backtrace/main.stderr index 48138ee711b..10eabca6353 100644 --- a/src/test/ui/macro_backtrace/main.stderr +++ b/src/test/ui/macro_backtrace/main.stderr @@ -1,30 +1,30 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` ... -26 | pong!(); +LL | pong!(); | -------- in this macro invocation error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` ... -27 | ping!(); +LL | ping!(); | -------- in this macro invocation | ::: :1:1 | -1 | ( ) => { pong ! ( ) ; } +LL | ( ) => { pong ! ( ) ; } | ------------------------- | | | | | in this macro invocation @@ -33,18 +33,18 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` --> $DIR/main.rs:19:20 | -18 | / macro_rules! pong { -19 | | () => { syntax error }; +LL | / macro_rules! pong { +LL | | () => { syntax error }; | | ^^^^^ expected one of 8 possible tokens here -20 | | } +LL | | } | |_- in this expansion of `pong!` (#5) ... -28 | deep!(); +LL | deep!(); | -------- in this macro invocation (#1) | ::: :1:1 | -1 | ( ) => { foo ! ( ) ; } +LL | ( ) => { foo ! ( ) ; } | ------------------------ | | | | | in this macro invocation (#2) @@ -52,7 +52,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { bar ! ( ) ; } +LL | ( ) => { bar ! ( ) ; } | ------------------------ | | | | | in this macro invocation (#3) @@ -60,7 +60,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { ping ! ( ) ; } +LL | ( ) => { ping ! ( ) ; } | ------------------------- | | | | | in this macro invocation (#4) @@ -68,7 +68,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found | ::: :1:1 | -1 | ( ) => { pong ! ( ) ; } +LL | ( ) => { pong ! ( ) ; } | ------------------------- | | | | | in this macro invocation (#5) diff --git a/src/test/ui/macros/bad_hello.stderr b/src/test/ui/macros/bad_hello.stderr index 825aa64e40f..578ff4ab9d4 100644 --- a/src/test/ui/macros/bad_hello.stderr +++ b/src/test/ui/macros/bad_hello.stderr @@ -1,7 +1,7 @@ error: expected a literal --> $DIR/bad_hello.rs:12:14 | -12 | println!(3 + 4); //~ ERROR expected a literal +LL | println!(3 + 4); //~ ERROR expected a literal | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/format-foreign.stderr b/src/test/ui/macros/format-foreign.stderr index f9852c54773..6804ce95fa8 100644 --- a/src/test/ui/macros/format-foreign.stderr +++ b/src/test/ui/macros/format-foreign.stderr @@ -1,7 +1,7 @@ error: multiple unused formatting arguments --> $DIR/format-foreign.rs:12:30 | -12 | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments +LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments | -------------------------^^^^^^^^--^^^^^^^--^-- multiple unused arguments in this statement | = help: `%.*3$s` should be written as `{:.2$}` @@ -12,7 +12,7 @@ error: multiple unused formatting arguments error: argument never used --> $DIR/format-foreign.rs:13:29 | -13 | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used +LL | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used | ^^^^^^^ | = help: `%1$*2$.*3$f` should be written as `{0:1$.2$}` @@ -21,13 +21,13 @@ error: argument never used error: argument never used --> $DIR/format-foreign.rs:17:30 | -17 | println!("{} %f", "one", 2.0); //~ ERROR never used +LL | println!("{} %f", "one", 2.0); //~ ERROR never used | ^^^ error: named argument never used --> $DIR/format-foreign.rs:19:39 | -19 | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used +LL | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used | ^^^^^ | = help: `$NAME` should be written as `{NAME}` diff --git a/src/test/ui/macros/format-unused-lables.stderr b/src/test/ui/macros/format-unused-lables.stderr index 64ea5626c1d..777b492dcb6 100644 --- a/src/test/ui/macros/format-unused-lables.stderr +++ b/src/test/ui/macros/format-unused-lables.stderr @@ -1,7 +1,7 @@ error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:12:22 | -12 | println!("Test", 123, 456, 789); +LL | println!("Test", 123, 456, 789); | -----------------^^^--^^^--^^^-- multiple unused arguments in this statement | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,14 +9,14 @@ error: multiple unused formatting arguments error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:16:9 | -15 | / println!("Test2", -16 | | 123, //~ ERROR multiple unused formatting arguments +LL | / println!("Test2", +LL | | 123, //~ ERROR multiple unused formatting arguments | | ^^^ -17 | | 456, +LL | | 456, | | ^^^ -18 | | 789 +LL | | 789 | | ^^^ -19 | | ); +LL | | ); | |______- multiple unused arguments in this statement | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -24,19 +24,19 @@ error: multiple unused formatting arguments error: named argument never used --> $DIR/format-unused-lables.rs:21:35 | -21 | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used +LL | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used | ^^^^^^ error: multiple unused formatting arguments --> $DIR/format-unused-lables.rs:24:9 | -23 | / println!("Some more $STUFF", -24 | | "woo!", //~ ERROR multiple unused formatting arguments +LL | / println!("Some more $STUFF", +LL | | "woo!", //~ ERROR multiple unused formatting arguments | | ^^^^^^ -25 | | STUFF= -26 | | "things" +LL | | STUFF= +LL | | "things" | | ^^^^^^^^ -27 | | , UNUSED="args"); +LL | | , UNUSED="args"); | |_______________________^^^^^^_- multiple unused arguments in this statement | = help: `$STUFF` should be written as `{STUFF}` diff --git a/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr index 67a77e0a481..d382082a575 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr @@ -1,79 +1,79 @@ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:40:11 | -40 | foo!(a?a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:41:11 | -41 | foo!(a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:42:11 | -42 | foo!(a?); //~ ERROR no rules expected the token `?` +LL | foo!(a?); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:43:11 | -43 | baz!(a?a?a); //~ ERROR no rules expected the token `?` +LL | baz!(a?a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:44:11 | -44 | baz!(a?a); //~ ERROR no rules expected the token `?` +LL | baz!(a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:45:11 | -45 | baz!(a?); //~ ERROR no rules expected the token `?` +LL | baz!(a?); //~ ERROR no rules expected the token `?` | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:46:11 | -46 | baz!(a,); //~ ERROR unexpected end of macro invocation +LL | baz!(a,); //~ ERROR unexpected end of macro invocation | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:47:11 | -47 | baz!(a?a?a,); //~ ERROR no rules expected the token `?` +LL | baz!(a?a?a,); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:48:11 | -48 | baz!(a?a,); //~ ERROR no rules expected the token `?` +LL | baz!(a?a,); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:49:11 | -49 | baz!(a?,); //~ ERROR no rules expected the token `?` +LL | baz!(a?,); //~ ERROR no rules expected the token `?` | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:50:5 | -50 | barplus!(); //~ ERROR unexpected end of macro invocation +LL | barplus!(); //~ ERROR unexpected end of macro invocation | ^^^^^^^^^^^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:51:15 | -51 | barplus!(a?); //~ ERROR unexpected end of macro invocation +LL | barplus!(a?); //~ ERROR unexpected end of macro invocation | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:52:15 | -52 | barstar!(a?); //~ ERROR unexpected end of macro invocation +LL | barstar!(a?); //~ ERROR unexpected end of macro invocation | ^ error: aborting due to 13 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 b11a0b63bcb..58fc3c3a65b 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -1,81 +1,81 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:15:13 | -15 | 1.fake() //~ ERROR no method +LL | 1.fake() //~ ERROR no method | ^^^^ ... -62 | fake_method_stmt!(); +LL | fake_method_stmt!(); | -------------------- in this macro invocation error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:21:13 | -21 | 1.fake //~ ERROR doesn't have fields +LL | 1.fake //~ ERROR doesn't have fields | ^^^^ ... -63 | fake_field_stmt!(); +LL | fake_field_stmt!(); | ------------------- in this macro invocation error[E0609]: no field `0` on type `{integer}` --> $DIR/macro-backtrace-invalid-internals.rs:27:11 | -27 | (1).0 //~ ERROR no field +LL | (1).0 //~ ERROR no field | ^^^^^ ... -64 | fake_anon_field_stmt!(); +LL | fake_anon_field_stmt!(); | ------------------------ in this macro invocation error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:51:15 | -51 | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^ ... -65 | real_method_stmt!(); +LL | real_method_stmt!(); | -------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -51 | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^^^^ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:33:13 | -33 | 1.fake() //~ ERROR no method +LL | 1.fake() //~ ERROR no method | ^^^^ ... -67 | let _ = fake_method_expr!(); +LL | let _ = fake_method_expr!(); | ------------------- in this macro invocation error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:39:13 | -39 | 1.fake //~ ERROR doesn't have fields +LL | 1.fake //~ ERROR doesn't have fields | ^^^^ ... -68 | let _ = fake_field_expr!(); +LL | let _ = fake_field_expr!(); | ------------------ in this macro invocation error[E0609]: no field `0` on type `{integer}` --> $DIR/macro-backtrace-invalid-internals.rs:45:11 | -45 | (1).0 //~ ERROR no field +LL | (1).0 //~ ERROR no field | ^^^^^ ... -69 | let _ = fake_anon_field_expr!(); +LL | let _ = fake_anon_field_expr!(); | ----------------------- in this macro invocation error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:57:15 | -57 | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^ ... -70 | let _ = real_method_expr!(); +LL | let _ = real_method_expr!(); | ------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -57 | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` +LL | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous numeric type `{float}` | ^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/macros/macro-backtrace-nested.stderr b/src/test/ui/macros/macro-backtrace-nested.stderr index 2d3ce35c65f..a0ed467b5af 100644 --- a/src/test/ui/macros/macro-backtrace-nested.stderr +++ b/src/test/ui/macros/macro-backtrace-nested.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:15:12 | -15 | () => (fake) //~ ERROR cannot find +LL | () => (fake) //~ ERROR cannot find | ^^^^ not found in this scope ... -28 | 1 + call_nested_expr!(); +LL | 1 + call_nested_expr!(); | ------------------- in this macro invocation error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:15:12 | -15 | () => (fake) //~ ERROR cannot find +LL | () => (fake) //~ ERROR cannot find | ^^^^ not found in this scope ... -29 | call_nested_expr_sum!(); +LL | call_nested_expr_sum!(); | ------------------------ in this macro invocation error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-backtrace-println.stderr b/src/test/ui/macros/macro-backtrace-println.stderr index c587654d880..8f2eb0173a4 100644 --- a/src/test/ui/macros/macro-backtrace-println.stderr +++ b/src/test/ui/macros/macro-backtrace-println.stderr @@ -1,10 +1,10 @@ error: 1 positional argument in format string, but no arguments were given --> $DIR/macro-backtrace-println.rs:24:30 | -24 | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); //~ ERROR no arguments were given +LL | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); //~ ERROR no arguments were given | ^^^^^^^^^^^^^^^^^^^ ... -28 | myprintln!("{}"); +LL | myprintln!("{}"); | ----------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/macros/macro-name-typo.stderr b/src/test/ui/macros/macro-name-typo.stderr index ebe95356c26..4152d2eb96e 100644 --- a/src/test/ui/macros/macro-name-typo.stderr +++ b/src/test/ui/macros/macro-name-typo.stderr @@ -1,7 +1,7 @@ error: cannot find macro `printlx!` in this scope --> $DIR/macro-name-typo.rs:12:5 | -12 | printlx!("oh noes!"); //~ ERROR cannot find +LL | printlx!("oh noes!"); //~ ERROR cannot find | ^^^^^^^ help: you could try the macro: `println` error: aborting due to previous error diff --git a/src/test/ui/macros/macro_path_as_generic_bound.stderr b/src/test/ui/macros/macro_path_as_generic_bound.stderr index fc5e915d9b0..d573523a5a0 100644 --- a/src/test/ui/macros/macro_path_as_generic_bound.stderr +++ b/src/test/ui/macros/macro_path_as_generic_bound.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve. Use of undeclared type or module `m` --> $DIR/macro_path_as_generic_bound.rs:17:6 | -17 | foo!(m::m2::A); //~ ERROR failed to resolve +LL | foo!(m::m2::A); //~ ERROR failed to resolve | ^ Use of undeclared type or module `m` error: cannot continue compilation due to previous error diff --git a/src/test/ui/macros/macro_undefined.stderr b/src/test/ui/macros/macro_undefined.stderr index 8d6da6a4732..8d44df8af0c 100644 --- a/src/test/ui/macros/macro_undefined.stderr +++ b/src/test/ui/macros/macro_undefined.stderr @@ -1,7 +1,7 @@ error: cannot find macro `kl!` in this scope --> $DIR/macro_undefined.rs:22:5 | -22 | kl!(); //~ ERROR cannot find +LL | kl!(); //~ ERROR cannot find | ^^ | = help: have you added the `#[macro_use]` on the module/import? @@ -9,7 +9,7 @@ error: cannot find macro `kl!` in this scope error: cannot find macro `k!` in this scope --> $DIR/macro_undefined.rs:21:5 | -21 | k!(); //~ ERROR cannot find +LL | k!(); //~ ERROR cannot find | ^ help: you could try the macro: `kl` error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/span-covering-argument-1.stderr b/src/test/ui/macros/span-covering-argument-1.stderr index a35eb4e34ca..3343c210d24 100644 --- a/src/test/ui/macros/span-covering-argument-1.stderr +++ b/src/test/ui/macros/span-covering-argument-1.stderr @@ -1,12 +1,12 @@ error[E0596]: cannot borrow immutable local variable `foo` as mutable --> $DIR/span-covering-argument-1.rs:15:19 | -14 | let $s = 0; +LL | let $s = 0; | -- consider changing this to `mut $s` -15 | *&mut $s = 0; +LL | *&mut $s = 0; | ^^ cannot borrow mutably ... -22 | bad!(foo whatever); +LL | bad!(foo whatever); | ------------------- in this macro invocation error: aborting due to previous error diff --git a/src/test/ui/macros/trace-macro.stderr b/src/test/ui/macros/trace-macro.stderr index 842799648b2..938f876872f 100644 --- a/src/test/ui/macros/trace-macro.stderr +++ b/src/test/ui/macros/trace-macro.stderr @@ -1,7 +1,7 @@ note: trace_macro --> $DIR/trace-macro.rs:15:5 | -15 | println!("Hello, World!"); +LL | println!("Hello, World!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expanding `println! { "Hello, World!" }` diff --git a/src/test/ui/macros/trace_faulty_macros.stderr b/src/test/ui/macros/trace_faulty_macros.stderr index b0e4a56a3d1..9fb5b17a311 100644 --- a/src/test/ui/macros/trace_faulty_macros.stderr +++ b/src/test/ui/macros/trace_faulty_macros.stderr @@ -1,16 +1,16 @@ error: no rules expected the token `bcd` --> $DIR/trace_faulty_macros.rs:17:26 | -17 | my_faulty_macro!(bcd); //~ ERROR no rules +LL | my_faulty_macro!(bcd); //~ ERROR no rules | ^^^ ... -43 | my_faulty_macro!(); +LL | my_faulty_macro!(); | ------------------- in this macro invocation note: trace_macro --> $DIR/trace_faulty_macros.rs:43:5 | -43 | my_faulty_macro!(); +LL | my_faulty_macro!(); | ^^^^^^^^^^^^^^^^^^^ | = note: expanding `my_faulty_macro! { }` @@ -20,10 +20,10 @@ note: trace_macro error: recursion limit reached while expanding the macro `my_recursive_macro` --> $DIR/trace_faulty_macros.rs:32:9 | -32 | my_recursive_macro!(); //~ ERROR recursion limit +LL | my_recursive_macro!(); //~ ERROR recursion limit | ^^^^^^^^^^^^^^^^^^^^^^ ... -44 | my_recursive_macro!(); +LL | my_recursive_macro!(); | ---------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="8"]` attribute to your crate @@ -31,7 +31,7 @@ error: recursion limit reached while expanding the macro `my_recursive_macro` note: trace_macro --> $DIR/trace_faulty_macros.rs:44:5 | -44 | my_recursive_macro!(); +LL | my_recursive_macro!(); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: expanding `my_recursive_macro! { }` diff --git a/src/test/ui/main-wrong-location.stderr b/src/test/ui/main-wrong-location.stderr index 7dadb495cf1..0f775dba536 100644 --- a/src/test/ui/main-wrong-location.stderr +++ b/src/test/ui/main-wrong-location.stderr @@ -1,11 +1,11 @@ error[E0601]: main function not found - | - = note: the main function must be defined at the crate level but you have one or more functions named 'main' that are not defined at the crate level. Either move the definition or attach the `#[main]` attribute to override this behavior. + | + = note: the main function must be defined at the crate level but you have one or more functions named 'main' that are not defined at the crate level. Either move the definition or attach the `#[main]` attribute to override this behavior. note: here is a function named 'main' - --> $DIR/main-wrong-location.rs:14:5 - | -14| fn main() { } - | ^^^^^^^^^^^^^ + --> $DIR/main-wrong-location.rs:14:5 + | +LL | fn main() { } + | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/maybe-bounds.stderr b/src/test/ui/maybe-bounds.stderr index df9c3bca364..72f052b75e3 100644 --- a/src/test/ui/maybe-bounds.stderr +++ b/src/test/ui/maybe-bounds.stderr @@ -1,7 +1,7 @@ error: `?Trait` is not permitted in supertraits --> $DIR/maybe-bounds.rs:11:12 | -11 | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits +LL | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits | ^^^^^ | = note: traits are `?Sized` by default @@ -9,13 +9,13 @@ error: `?Trait` is not permitted in supertraits error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:13:17 | -13 | type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types +LL | type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types | ^^^^^ error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:14:25 | -14 | type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types +LL | type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/method-call-err-msg.stderr b/src/test/ui/method-call-err-msg.stderr index 7def583e92a..05d5bde18cf 100644 --- a/src/test/ui/method-call-err-msg.stderr +++ b/src/test/ui/method-call-err-msg.stderr @@ -1,37 +1,37 @@ error[E0061]: this function takes 0 parameters but 1 parameter was supplied --> $DIR/method-call-err-msg.rs:22:7 | -15 | fn zero(self) -> Foo { self } +LL | fn zero(self) -> Foo { self } | -------------------- defined here ... -22 | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied +LL | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied | ^^^^ expected 0 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/method-call-err-msg.rs:23:7 | -16 | fn one(self, _: isize) -> Foo { self } +LL | fn one(self, _: isize) -> Foo { self } | ----------------------------- defined here ... -23 | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied +LL | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied | ^^^ expected 1 parameter error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/method-call-err-msg.rs:24:7 | -17 | fn two(self, _: isize, _: isize) -> Foo { self } +LL | fn two(self, _: isize, _: isize) -> Foo { self } | --------------------------------------- defined here ... -24 | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied +LL | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied | ^^^ expected 2 parameters error[E0599]: no method named `take` found for type `Foo` in the current scope --> $DIR/method-call-err-msg.rs:28:7 | -13 | pub struct Foo; +LL | pub struct Foo; | --------------- method `take` not found for this ... -28 | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope +LL | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope | ^^^^ | = note: the method `take` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/method-call-lifetime-args-lint.stderr b/src/test/ui/method-call-lifetime-args-lint.stderr index e319b54aa2c..1cb6804fa47 100644 --- a/src/test/ui/method-call-lifetime-args-lint.stderr +++ b/src/test/ui/method-call-lifetime-args-lint.stderr @@ -1,16 +1,16 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args-lint.rs:22:14 | -17 | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} +LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | -- the late bound lifetime parameter is introduced here ... -22 | S.late::<'static>(&0, &0); +LL | S.late::<'static>(&0, &0); | ^^^^^^^ | note: lint level defined here --> $DIR/method-call-lifetime-args-lint.rs:11:9 | -11 | #![deny(late_bound_lifetime_arguments)] +LL | #![deny(late_bound_lifetime_arguments)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 @@ -18,10 +18,10 @@ note: lint level defined here error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args-lint.rs:26:23 | -18 | fn late_implicit(self, _: &u8, _: &u8) {} +LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here ... -26 | S.late_implicit::<'static>(&0, &0); +LL | S.late_implicit::<'static>(&0, &0); | ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/method-call-lifetime-args.stderr b/src/test/ui/method-call-lifetime-args.stderr index a6c1b8efe27..8bc48cc8e73 100644 --- a/src/test/ui/method-call-lifetime-args.stderr +++ b/src/test/ui/method-call-lifetime-args.stderr @@ -1,25 +1,25 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args.rs:19:15 | -19 | S::late::<'static>(S, &0, &0); +LL | S::late::<'static>(S, &0, &0); | ^^^^^^^ | note: the late bound lifetime parameter is introduced here --> $DIR/method-call-lifetime-args.rs:14:13 | -14 | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} +LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | ^^ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present --> $DIR/method-call-lifetime-args.rs:21:24 | -21 | S::late_implicit::<'static>(S, &0, &0); +LL | S::late_implicit::<'static>(S, &0, &0); | ^^^^^^^ | note: the late bound lifetime parameter is introduced here --> $DIR/method-call-lifetime-args.rs:15:31 | -15 | fn late_implicit(self, _: &u8, _: &u8) {} +LL | fn late_implicit(self, _: &u8, _: &u8) {} | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/method-missing-call.stderr b/src/test/ui/method-missing-call.stderr index 675855dcf34..a5715d4a7ad 100644 --- a/src/test/ui/method-missing-call.stderr +++ b/src/test/ui/method-missing-call.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` --> $DIR/method-missing-call.rs:32:26 | -32 | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` +LL | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` | ^^^^^ | = help: maybe a `()` to call it is missing? @@ -9,7 +9,7 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` error[E0615]: attempted to take value of method `filter_map` on type `std::iter::Filter, [closure@$DIR/method-missing-call.rs:37:20: 37:25]>, [closure@$DIR/method-missing-call.rs:38:23: 38:35]>` --> $DIR/method-missing-call.rs:39:16 | -39 | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type +LL | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type | ^^^^^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/mismatched_types/E0053.stderr b/src/test/ui/mismatched_types/E0053.stderr index e63fd140f11..8256c9328d9 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/src/test/ui/mismatched_types/E0053.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/E0053.rs:19:15 | -12 | fn foo(x: u16); +LL | fn foo(x: u16); | --- type in trait ... -19 | fn foo(x: i16) { } +LL | fn foo(x: i16) { } | ^^^ expected u16, found i16 | = note: expected type `fn(u16)` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/E0053.rs:21:12 | -13 | fn bar(&self); +LL | fn bar(&self); | ----- type in trait ... -21 | fn bar(&mut self) { } +LL | fn bar(&mut self) { } | ^^^^^^^^^ types differ in mutability | = note: expected type `fn(&Bar)` diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index 676a296661e..93cea816824 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -1,7 +1,7 @@ error[E0409]: variable `y` is bound in inconsistent ways within the same match arm --> $DIR/E0409.rs:15:23 | -15 | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | - ^ bound in different ways | | | first binding @@ -9,7 +9,7 @@ error[E0409]: variable `y` is bound in inconsistent ways within the same match a error[E0308]: mismatched types --> $DIR/E0409.rs:15:23 | -15 | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | ^ expected &{integer}, found integral variable | = note: expected type `&{integer}` diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index 722c246f032..4560771f21e 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:17:5 | -17 | foo(|_: isize| {}); //~ ERROR type mismatch +LL | foo(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -9,13 +9,13 @@ error[E0631]: type mismatch in closure arguments note: required by `foo` --> $DIR/E0631.rs:13:1 | -13 | fn foo(_: F) {} +LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:18:5 | -18 | bar(|_: isize| {}); //~ ERROR type mismatch +LL | bar(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -23,37 +23,37 @@ error[E0631]: type mismatch in closure arguments note: required by `bar` --> $DIR/E0631.rs:14:1 | -14 | fn bar>(_: F) {} +LL | fn bar>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:19:5 | -16 | fn f(_: u64) {} +LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -19 | foo(f); //~ ERROR type mismatch +LL | foo(f); //~ ERROR type mismatch | ^^^ expected signature of `fn(usize) -> _` | note: required by `foo` --> $DIR/E0631.rs:13:1 | -13 | fn foo(_: F) {} +LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:20:5 | -16 | fn f(_: u64) {} +LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -20 | bar(f); //~ ERROR type mismatch +LL | bar(f); //~ ERROR type mismatch | ^^^ expected signature of `fn(usize) -> _` | note: required by `bar` --> $DIR/E0631.rs:14:1 | -14 | fn bar>(_: F) {} +LL | fn bar>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 a52f2d3f6a1..423b460e31d 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/abridged.rs:26:5 | -25 | fn a() -> Foo { +LL | fn a() -> Foo { | --- expected `Foo` because of return type -26 | Some(Foo { bar: 1 }) //~ ERROR mismatched types +LL | Some(Foo { bar: 1 }) //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option` | = note: expected type `Foo` @@ -12,9 +12,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:30:5 | -29 | fn a2() -> Foo { +LL | fn a2() -> Foo { | --- expected `Foo` because of return type -30 | Ok(Foo { bar: 1}) //~ ERROR mismatched types +LL | Ok(Foo { bar: 1}) //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result` | = note: expected type `Foo` @@ -23,9 +23,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:34:5 | -33 | fn b() -> Option { +LL | fn b() -> Option { | ----------- expected `std::option::Option` because of return type -34 | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } //~ ERROR mismatched types | ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo` | = note: expected type `std::option::Option` @@ -34,9 +34,9 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:38:5 | -37 | fn c() -> Result { +LL | fn c() -> Result { | ---------------- expected `std::result::Result` because of return type -38 | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } //~ ERROR mismatched types | ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo` | = note: expected type `std::result::Result` @@ -45,10 +45,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:49:5 | -41 | fn d() -> X, String> { +LL | fn d() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -49 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found integral variable | = note: expected type `X, std::string::String>` @@ -57,10 +57,10 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/abridged.rs:60:5 | -52 | fn e() -> X, String> { +LL | fn e() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -60 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found integral variable | = note: expected type `X, _>` diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index 7bc3e878099..75950c0f6d3 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` --> $DIR/binops.rs:12:7 | -12 | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` +LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` | ^ no implementation for `{integer} + std::option::Option<{integer}>` | = help: the trait `std::ops::Add>` is not implemented for `{integer}` @@ -9,7 +9,7 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` --> $DIR/binops.rs:13:16 | -13 | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` +LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` | ^ no implementation for `usize - std::option::Option<{integer}>` | = help: the trait `std::ops::Sub>` is not implemented for `usize` @@ -17,7 +17,7 @@ error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` error[E0277]: cannot multiply `()` to `{integer}` --> $DIR/binops.rs:14:7 | -14 | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` +LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` | ^ no implementation for `{integer} * ()` | = help: the trait `std::ops::Mul<()>` is not implemented for `{integer}` @@ -25,7 +25,7 @@ error[E0277]: cannot multiply `()` to `{integer}` error[E0277]: cannot divide `{integer}` by `&str` --> $DIR/binops.rs:15:7 | -15 | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` +LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` | ^ no implementation for `{integer} / &str` | = help: the trait `std::ops::Div<&str>` is not implemented for `{integer}` @@ -33,7 +33,7 @@ error[E0277]: cannot divide `{integer}` by `&str` error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd` is not satisfied --> $DIR/binops.rs:16:7 | -16 | 5 < String::new(); //~ ERROR is not satisfied +LL | 5 < String::new(); //~ ERROR is not satisfied | ^ can't compare `{integer}` with `std::string::String` | = help: the trait `std::cmp::PartialOrd` is not implemented for `{integer}` @@ -41,7 +41,7 @@ error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd>` is not satisfied --> $DIR/binops.rs:17:7 | -17 | 6 == Ok(1); //~ ERROR is not satisfied +LL | 6 == Ok(1); //~ ERROR is not satisfied | ^^ can't compare `{integer}` with `std::result::Result<{integer}, _>` | = help: the trait `std::cmp::PartialEq>` is not implemented for `{integer}` diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 5c0a23031f3..a4e5a897e49 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*const U` as `*const V` is invalid --> $DIR/cast-rfc0401.rs:13:5 | -13 | u as *const V //~ ERROR is invalid +LL | u as *const V //~ ERROR is invalid | ^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -9,7 +9,7 @@ error[E0606]: casting `*const U` as `*const V` is invalid error[E0606]: casting `*const U` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:18:5 | -18 | u as *const str //~ ERROR is invalid +LL | u as *const str //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -17,13 +17,13 @@ error[E0606]: casting `*const U` as `*const str` is invalid error[E0609]: no field `f` on type `fn() {main}` --> $DIR/cast-rfc0401.rs:75:18 | -75 | let _ = main.f as *const u32; //~ ERROR no field +LL | let _ = main.f as *const u32; //~ ERROR no field | ^ error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/cast-rfc0401.rs:39:13 | -39 | let _ = v as &u8; //~ ERROR non-primitive cast +LL | let _ = v as &u8; //~ ERROR non-primitive cast | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -31,7 +31,7 @@ error[E0605]: non-primitive cast: `*const u8` as `&u8` error[E0605]: non-primitive cast: `*const u8` as `E` --> $DIR/cast-rfc0401.rs:40:13 | -40 | let _ = v as E; //~ ERROR non-primitive cast +LL | let _ = v as E; //~ ERROR non-primitive cast | ^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -39,7 +39,7 @@ error[E0605]: non-primitive cast: `*const u8` as `E` error[E0605]: non-primitive cast: `*const u8` as `fn()` --> $DIR/cast-rfc0401.rs:41:13 | -41 | let _ = v as fn(); //~ ERROR non-primitive cast +LL | let _ = v as fn(); //~ ERROR non-primitive cast | ^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -47,7 +47,7 @@ error[E0605]: non-primitive cast: `*const u8` as `fn()` error[E0605]: non-primitive cast: `*const u8` as `(u32,)` --> $DIR/cast-rfc0401.rs:42:13 | -42 | let _ = v as (u32,); //~ ERROR non-primitive cast +LL | let _ = v as (u32,); //~ ERROR non-primitive cast | ^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -55,7 +55,7 @@ error[E0605]: non-primitive cast: `*const u8` as `(u32,)` error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8` --> $DIR/cast-rfc0401.rs:43:13 | -43 | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast +LL | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast | ^^^^^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -63,19 +63,19 @@ error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u error[E0606]: casting `*const u8` as `f32` is invalid --> $DIR/cast-rfc0401.rs:45:13 | -45 | let _ = v as f32; //~ ERROR is invalid +LL | let _ = v as f32; //~ ERROR is invalid | ^^^^^^^^ error[E0606]: casting `fn() {main}` as `f64` is invalid --> $DIR/cast-rfc0401.rs:46:13 | -46 | let _ = main as f64; //~ ERROR is invalid +LL | let _ = main as f64; //~ ERROR is invalid | ^^^^^^^^^^^ error[E0606]: casting `&*const u8` as `usize` is invalid --> $DIR/cast-rfc0401.rs:47:13 | -47 | let _ = &v as usize; //~ ERROR is invalid +LL | let _ = &v as usize; //~ ERROR is invalid | ^^^^^^^^^^^ | = help: cast through a raw pointer first @@ -83,13 +83,13 @@ error[E0606]: casting `&*const u8` as `usize` is invalid error[E0606]: casting `f32` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:48:13 | -48 | let _ = f as *const u8; //~ ERROR is invalid +LL | let _ = f as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:49:13 | -49 | let _ = 3_i32 as bool; //~ ERROR cannot cast +LL | let _ = 3_i32 as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -97,7 +97,7 @@ error[E0054]: cannot cast as `bool` error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:50:13 | -50 | let _ = E::A as bool; //~ ERROR cannot cast +LL | let _ = E::A as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -105,13 +105,13 @@ error[E0054]: cannot cast as `bool` error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/cast-rfc0401.rs:51:13 | -51 | let _ = 0x61u32 as char; //~ ERROR can be cast as +LL | let _ = 0x61u32 as char; //~ ERROR can be cast as | ^^^^^^^^^^^^^^^ error[E0606]: casting `bool` as `f32` is invalid --> $DIR/cast-rfc0401.rs:53:13 | -53 | let _ = false as f32; //~ ERROR is invalid +LL | let _ = false as f32; //~ ERROR is invalid | ^^^^^^^^^^^^ | = help: cast through an integer first @@ -119,7 +119,7 @@ error[E0606]: casting `bool` as `f32` is invalid error[E0606]: casting `E` as `f32` is invalid --> $DIR/cast-rfc0401.rs:54:13 | -54 | let _ = E::A as f32; //~ ERROR is invalid +LL | let _ = E::A as f32; //~ ERROR is invalid | ^^^^^^^^^^^ | = help: cast through an integer first @@ -127,7 +127,7 @@ error[E0606]: casting `E` as `f32` is invalid error[E0606]: casting `char` as `f32` is invalid --> $DIR/cast-rfc0401.rs:55:13 | -55 | let _ = 'a' as f32; //~ ERROR is invalid +LL | let _ = 'a' as f32; //~ ERROR is invalid | ^^^^^^^^^^ | = help: cast through an integer first @@ -135,67 +135,67 @@ error[E0606]: casting `char` as `f32` is invalid error[E0606]: casting `bool` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:57:13 | -57 | let _ = false as *const u8; //~ ERROR is invalid +LL | let _ = false as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ error[E0606]: casting `E` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:58:13 | -58 | let _ = E::A as *const u8; //~ ERROR is invalid +LL | let _ = E::A as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `char` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:59:13 | -59 | let _ = 'a' as *const u8; //~ ERROR is invalid +LL | let _ = 'a' as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*const [u8]` is invalid --> $DIR/cast-rfc0401.rs:61:13 | -61 | let _ = 42usize as *const [u8]; //~ ERROR is invalid +LL | let _ = 42usize as *const [u8]; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^^^^^ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/cast-rfc0401.rs:62:13 | -62 | let _ = v as *const [u8]; //~ ERROR cannot cast +LL | let _ = v as *const [u8]; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:64:13 | -64 | let _ = foo as *const str; //~ ERROR is invalid +LL | let _ = foo as *const str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:65:13 | -65 | let _ = foo as *mut str; //~ ERROR is invalid +LL | let _ = foo as *mut str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ error[E0606]: casting `fn() {main}` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:66:13 | -66 | let _ = main as *mut str; //~ ERROR is invalid +LL | let _ = main as *mut str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*mut f32` is invalid --> $DIR/cast-rfc0401.rs:67:13 | -67 | let _ = &f as *mut f32; //~ ERROR is invalid +LL | let _ = &f as *mut f32; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*const f64` is invalid --> $DIR/cast-rfc0401.rs:68:13 | -68 | let _ = &f as *const f64; //~ ERROR is invalid +LL | let _ = &f as *const f64; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `*const [i8]` as `usize` is invalid --> $DIR/cast-rfc0401.rs:69:13 | -69 | let _ = fat_sv as usize; //~ ERROR is invalid +LL | let _ = fat_sv as usize; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ | = help: cast through a thin pointer first @@ -203,7 +203,7 @@ error[E0606]: casting `*const [i8]` as `usize` is invalid error[E0606]: casting `*const Foo` as `*const [u16]` is invalid --> $DIR/cast-rfc0401.rs:78:13 | -78 | let _ = cf as *const [u16]; //~ ERROR is invalid +LL | let _ = cf as *const [u16]; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -211,7 +211,7 @@ error[E0606]: casting `*const Foo` as `*const [u16]` is invalid error[E0606]: casting `*const Foo` as `*const Bar` is invalid --> $DIR/cast-rfc0401.rs:79:13 | -79 | let _ = cf as *const Bar; //~ ERROR is invalid +LL | let _ = cf as *const Bar; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -219,7 +219,7 @@ error[E0606]: casting `*const Foo` as `*const Bar` is invalid error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied --> $DIR/cast-rfc0401.rs:63:13 | -63 | let _ = fat_v as *const Foo; //~ ERROR is not satisfied +LL | let _ = fat_v as *const Foo; //~ ERROR is not satisfied | ^^^^^ `[u8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` @@ -228,7 +228,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/cast-rfc0401.rs:72:13 | -72 | let _ = a as *const Foo; //~ ERROR is not satisfied +LL | let _ = a as *const Foo; //~ ERROR is not satisfied | ^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -237,13 +237,13 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0606]: casting `&{float}` as `f32` is invalid --> $DIR/cast-rfc0401.rs:81:30 | -81 | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid +LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid | ^^^^^^^^ cannot cast `&{float}` as `f32` | help: did you mean `*s`? --> $DIR/cast-rfc0401.rs:81:30 | -81 | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid +LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid | ^ error: aborting due to 34 previous errors 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 1ab2a8c872a..46cb027c907 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 @@ -1,13 +1,13 @@ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count-expected-type-issue-47244.rs:24:14 | -24 | m.iter().map( |_, b| { +LL | m.iter().map( |_, b| { | ^^^ ------ takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -24 | m.iter().map( |(_, b)| { +LL | 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 79e1df0d4cf..0370c2596cc 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count.stderr @@ -1,7 +1,7 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments --> $DIR/closure-arg-count.rs:15:15 | -15 | [1, 2, 3].sort_by(|| panic!()); +LL | [1, 2, 3].sort_by(|| panic!()); | ^^^^^^^ -- takes 0 arguments | | | expected closure that takes 2 arguments @@ -9,7 +9,7 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument --> $DIR/closure-arg-count.rs:17:15 | -17 | [1, 2, 3].sort_by(|tuple| panic!()); +LL | [1, 2, 3].sort_by(|tuple| panic!()); | ^^^^^^^ ------- takes 1 argument | | | expected closure that takes 2 arguments @@ -17,31 +17,31 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument --> $DIR/closure-arg-count.rs:19:15 | -19 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); +LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ^^^^^^^ ----------------- takes a single 2-tuple as argument | | | expected closure that takes 2 distinct arguments help: change the closure to take multiple arguments instead of a single tuple | -19 | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); +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:21:15 | -21 | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); +LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); | ^^^^^^^ ----------------------------- takes a single 2-tuple as argument | | | expected closure that takes 2 distinct arguments help: change the closure to take multiple arguments instead of a single tuple | -21 | [1, 2, 3].sort_by(|tuple, tuple2| panic!()); +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:23:5 | -23 | f(|| panic!()); +LL | f(|| panic!()); | ^ -- takes 0 arguments | | | expected closure that takes 1 argument @@ -49,37 +49,37 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments note: required by `f` --> $DIR/closure-arg-count.rs:13:1 | -13 | fn f>(_: F) {} +LL | fn f>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:26:53 | -26 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); | ^^^ ------ takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -26 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); +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:28:53 | -28 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); | ^^^ ------------- takes 2 distinct arguments | | | expected closure that takes a single 2-tuple as argument help: change the closure to accept a tuple instead of individual arguments | -28 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i); +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:30:53 | -30 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); | ^^^ --------- takes 3 distinct arguments | | | expected closure that takes a single 2-tuple as argument @@ -87,33 +87,33 @@ error[E0593]: closure is expected to take a single 2-tuple as argument, but it t error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:32:53 | -32 | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo); | ^^^ expected function that takes a single 2-tuple as argument ... -44 | fn foo() {} +LL | fn foo() {} | -------- takes 0 arguments error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments --> $DIR/closure-arg-count.rs:35:53 | -34 | let bar = |i, x, y| i; +LL | let bar = |i, x, y| i; | --------- takes 3 distinct arguments -35 | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar); | ^^^ expected closure that takes a single 2-tuple as argument error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:37:53 | -37 | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux); +LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux); | ^^^ expected function that takes a single 2-tuple as argument ... -45 | fn qux(x: usize, y: usize) {} +LL | fn qux(x: usize, y: usize) {} | -------------------------- takes 2 distinct arguments error[E0593]: function is expected to take 1 argument, but it takes 2 arguments --> $DIR/closure-arg-count.rs:40:41 | -40 | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); +LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); | ^^^ expected function that takes 1 argument error: aborting due to 12 previous errors diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr index 673993e5265..b37779dd093 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:13:14 | -13 | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u32, u32)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -9,7 +9,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:14:14 | -14 | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -17,7 +17,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:15:14 | -15 | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -25,7 +25,7 @@ error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in function arguments --> $DIR/closure-arg-type-mismatch.rs:20:5 | -20 | baz(f); //~ ERROR type mismatch +LL | baz(f); //~ ERROR type mismatch | ^^^ | | | expected signature of `for<'r> fn(*mut &'r u32) -> _` @@ -34,19 +34,19 @@ error[E0631]: type mismatch in function arguments note: required by `baz` --> $DIR/closure-arg-type-mismatch.rs:18:1 | -18 | fn baz(_: F) {} +LL | fn baz(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0271]: type mismatch resolving `for<'r> >::Output == ()` --> $DIR/closure-arg-type-mismatch.rs:20:5 | -20 | baz(f); //~ ERROR type mismatch +LL | baz(f); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime | note: required by `baz` --> $DIR/closure-arg-type-mismatch.rs:18:1 | -18 | fn baz(_: F) {} +LL | fn baz(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index ba004625e99..3950242e27b 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -1,20 +1,20 @@ error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:18:9: 18:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` --> $DIR/closure-mismatch.rs:18:5 | -18 | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime | = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]` note: required by `baz` --> $DIR/closure-mismatch.rs:15:1 | -15 | fn baz(_: T) {} +LL | fn baz(_: T) {} | ^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments --> $DIR/closure-mismatch.rs:18:5 | -18 | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ ------ found signature of `fn(_) -> _` | | | expected signature of `for<'r> fn(&'r ()) -> _` @@ -23,7 +23,7 @@ error[E0631]: type mismatch in closure arguments note: required by `baz` --> $DIR/closure-mismatch.rs:15:1 | -15 | fn baz(_: T) {} +LL | fn baz(_: T) {} | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/const-fn-in-trait.stderr b/src/test/ui/mismatched_types/const-fn-in-trait.stderr index efb99e30aad..453f1d9e614 100644 --- a/src/test/ui/mismatched_types/const-fn-in-trait.stderr +++ b/src/test/ui/mismatched_types/const-fn-in-trait.stderr @@ -1,13 +1,13 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:17:5 | -17 | const fn g(); //~ ERROR cannot be declared const +LL | const fn g(); //~ ERROR cannot be declared const | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:21:5 | -21 | const fn f() -> u32 { 22 } //~ ERROR cannot be declared const +LL | const fn f() -> u32 { 22 } //~ ERROR cannot be declared const | ^^^^^ trait fns cannot be const error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/src/test/ui/mismatched_types/fn-variance-1.stderr index 1dcbd28169c..d62026f7520 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/src/test/ui/mismatched_types/fn-variance-1.stderr @@ -1,31 +1,31 @@ error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:21:5 | -13 | fn takes_mut(x: &mut isize) { } +LL | fn takes_mut(x: &mut isize) { } | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` ... -21 | apply(&3, takes_mut); +LL | apply(&3, takes_mut); | ^^^^^ expected signature of `fn(&{integer}) -> _` | note: required by `apply` --> $DIR/fn-variance-1.rs:15:1 | -15 | fn apply(t: T, f: F) where F: FnOnce(T) { +LL | fn apply(t: T, f: F) where F: FnOnce(T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:25:5 | -11 | fn takes_imm(x: &isize) { } +LL | fn takes_imm(x: &isize) { } | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` ... -25 | apply(&mut 3, takes_imm); +LL | apply(&mut 3, takes_imm); | ^^^^^ expected signature of `fn(&mut {integer}) -> _` | note: required by `apply` --> $DIR/fn-variance-1.rs:15:1 | -15 | fn apply(t: T, f: F) where F: FnOnce(T) { +LL | fn apply(t: T, f: F) where F: FnOnce(T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr index b84909f6484..e28e3f12bf7 100644 --- a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr +++ b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/for-loop-has-unit-body.rs:13:9 | -13 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected (), found integral variable | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr index 0f3ee720683..c52048919b3 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/src/test/ui/mismatched_types/issue-19109.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/issue-19109.rs:14:5 | -13 | fn function(t: &mut Trait) { +LL | fn function(t: &mut Trait) { | - help: try adding a return type: `-> *mut Trait` -14 | t as *mut Trait +LL | t as *mut Trait | ^^^^^^^^^^^^^^^ expected (), found *-ptr | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index eaef2603a20..f07cb2f7314 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -1,19 +1,19 @@ error[E0308]: mismatched types --> $DIR/issue-26480.rs:26:19 | -26 | $arr.len() * size_of($arr[0])); //~ ERROR mismatched types +LL | $arr.len() * size_of($arr[0])); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize ... -37 | write!(hello); +LL | write!(hello); | -------------- in this macro invocation error[E0605]: non-primitive cast: `{integer}` as `()` --> $DIR/issue-26480.rs:32:19 | -32 | ($x:expr) => ($x as ()) //~ ERROR non-primitive cast +LL | ($x:expr) => ($x as ()) //~ ERROR non-primitive cast | ^^^^^^^^ ... -38 | cast!(2); +LL | cast!(2); | --------- in this macro invocation | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr index 54e348223e5..df573df67d4 100644 --- a/src/test/ui/mismatched_types/issue-35030.stderr +++ b/src/test/ui/mismatched_types/issue-35030.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35030.rs:19:14 | -19 | Some(true) //~ ERROR mismatched types +LL | Some(true) //~ ERROR mismatched types | ^^^^ expected type parameter, found bool | = note: expected type `bool` (type parameter) diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index 45c93ae3944..bd1a930baa9 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `count` found for type `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]>` in the current scope --> $DIR/issue-36053-2.rs:17:55 | -17 | once::<&str>("str").fuse().filter(|a: &str| true).count(); +LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^ | = note: the method `count` exists but the following trait bounds were not satisfied: @@ -11,7 +11,7 @@ error[E0599]: no method named `count` found for type `std::iter::Filter $DIR/issue-36053-2.rs:17:32 | -17 | once::<&str>("str").fuse().filter(|a: &str| true).count(); +LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _` | | | expected signature of `for<'r> fn(&'r &str) -> _` diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr index a796d768a87..bba216b1e8c 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-38371.rs:16:8 | -16 | fn foo(&foo: Foo) { //~ ERROR mismatched types +LL | fn foo(&foo: Foo) { //~ ERROR mismatched types | ^^^^ expected struct `Foo`, found reference | = note: expected type `Foo` @@ -11,7 +11,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:30:9 | -30 | fn agh(&&bar: &u32) { //~ ERROR mismatched types +LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types | ^^^^ expected u32, found reference | = note: expected type `u32` @@ -21,7 +21,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:33:8 | -33 | fn bgh(&&bar: u32) { //~ ERROR mismatched types +LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types | ^^^^^ expected u32, found reference | = note: expected type `u32` @@ -30,7 +30,7 @@ error[E0308]: mismatched types error[E0529]: expected an array or slice, found `u32` --> $DIR/issue-38371.rs:36:9 | -36 | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice +LL | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice | ^^^^^ pattern cannot match with input type `u32` error: aborting due to 4 previous errors diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr index 310dae195ea..7793a38b38e 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/src/test/ui/mismatched_types/main.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/main.rs:12:18 | -12 | let x: u32 = ( //~ ERROR mismatched types +LL | let x: u32 = ( //~ ERROR mismatched types | __________________^ -13 | | ); +LL | | ); | |_____^ expected u32, found () | = note: expected type `u32` diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr index 22765e8fc6c..d84b8474ded 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `unwrap` found for type `std::result::Result<(), Foo>` in the current scope --> $DIR/method-help-unsatisfied-bound.rs:15:7 | -15 | a.unwrap(); +LL | a.unwrap(); | ^^^^^^ | = note: the method `unwrap` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 3ec71e03a8c..830eec48d11 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/overloaded-calls-bad.rs:38:17 | -38 | let ans = s("what"); //~ ERROR mismatched types +LL | let ans = s("what"); //~ ERROR mismatched types | ^^^^^^ expected isize, found reference | = note: expected type `isize` @@ -10,13 +10,13 @@ error[E0308]: mismatched types error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/overloaded-calls-bad.rs:39:15 | -39 | let ans = s(); +LL | let ans = s(); | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/overloaded-calls-bad.rs:41:15 | -41 | let ans = s("burma", "shave"); +LL | let ans = s("burma", "shave"); | ^^^^^^^^^^^^^^^^^^^ expected 1 parameter 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 23c1a5b8c24..75fb7b28a6e 100644 --- a/src/test/ui/mismatched_types/recovered-block.stderr +++ b/src/test/ui/mismatched_types/recovered-block.stderr @@ -1,17 +1,17 @@ error: missing `struct` for struct definition --> $DIR/recovered-block.rs:23:8 | -23 | pub Foo { text } +LL | pub Foo { text } | ^ help: add `struct` here to parse `Foo` as a public struct | -23 | pub struct Foo { text } +LL | pub struct Foo { text } | ^^^^^^ error: expected one of `(` or `<`, found `{` --> $DIR/recovered-block.rs:29:9 | -29 | Foo { text: "".to_string() } +LL | Foo { text: "".to_string() } | ^ expected one of `(` or `<` here error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr index 8f8b7aa459f..e922b203adf 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-cant-coerce.rs:24:7 | -24 | a(x); //~ ERROR mismatched types [E0308] +LL | a(x); //~ ERROR mismatched types [E0308] | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` | = note: expected type `std::boxed::Box` diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index e45ca366f64..0460ec3194a 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -1,10 +1,10 @@ error[E0053]: method `foo` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:21:15 | -14 | fn foo(x: u16); +LL | fn foo(x: u16); | --- type in trait ... -21 | fn foo(x: i16) { } //~ ERROR incompatible type +LL | fn foo(x: i16) { } //~ ERROR incompatible type | ^^^ expected u16, found i16 | = note: expected type `fn(u16)` @@ -13,10 +13,10 @@ error[E0053]: method `foo` has an incompatible type for trait error[E0053]: method `bar` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:22:28 | -15 | fn bar(&mut self, bar: &mut Bar); +LL | fn bar(&mut self, bar: &mut Bar); | -------- type in trait ... -22 | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type +LL | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type | ^^^^ types differ in mutability | = note: expected type `fn(&mut Bar, &mut Bar)` diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index 9f9082309f3..cac85e7fbac 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -1,16 +1,16 @@ error[E0631]: type mismatch in closure arguments --> $DIR/unboxed-closures-vtable-mismatch.rs:25:13 | -23 | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); +LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); | ----------------------------- found signature of `fn(usize, isize) -> _` -24 | //~^ NOTE found signature of `fn(usize, isize) -> _` -25 | let z = call_it(3, f); +LL | //~^ NOTE found signature of `fn(usize, isize) -> _` +LL | let z = call_it(3, f); | ^^^^^^^ expected signature of `fn(isize, isize) -> _` | note: required by `call_it` --> $DIR/unboxed-closures-vtable-mismatch.rs:17:1 | -17 | fn call_itisize>(y: isize, mut f: F) -> isize { +LL | fn call_itisize>(y: isize, mut f: F) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/missing-block-hint.stderr b/src/test/ui/missing-block-hint.stderr index 3f50fdd4613..54f394a4220 100644 --- a/src/test/ui/missing-block-hint.stderr +++ b/src/test/ui/missing-block-hint.stderr @@ -1,13 +1,13 @@ error: expected `{`, found `=>` --> $DIR/missing-block-hint.rs:13:18 | -13 | if (foo) => {} //~ ERROR expected `{`, found `=>` +LL | if (foo) => {} //~ ERROR expected `{`, found `=>` | ^^ error: expected `{`, found `bar` --> $DIR/missing-block-hint.rs:17:13 | -17 | bar; //~ ERROR expected `{`, found `bar` +LL | bar; //~ ERROR expected `{`, found `bar` | ^^^- | | | help: try placing this code inside a block: `{ bar; }` diff --git a/src/test/ui/missing-items/issue-40221.stderr b/src/test/ui/missing-items/issue-40221.stderr index 584625ff2da..cb30805ce2f 100644 --- a/src/test/ui/missing-items/issue-40221.stderr +++ b/src/test/ui/missing-items/issue-40221.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `C(QA)` not covered --> $DIR/issue-40221.rs:21:11 | -21 | match proto { //~ ERROR non-exhaustive patterns +LL | match proto { //~ ERROR non-exhaustive patterns | ^^^^^ pattern `C(QA)` not covered error: aborting due to previous error diff --git a/src/test/ui/missing-items/m2.stderr b/src/test/ui/missing-items/m2.stderr index 6c2bbf376eb..aebe25ab492 100644 --- a/src/test/ui/missing-items/m2.stderr +++ b/src/test/ui/missing-items/m2.stderr @@ -3,7 +3,7 @@ error[E0601]: main function not found error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method` --> $DIR/m2.rs:19:1 | -19 | impl m1::X for X { //~ ERROR not all trait items implemented +LL | impl m1::X for X { //~ ERROR not all trait items implemented | ^^^^^^^^^^^^^^^^ missing `CONSTANT`, `Type`, `method` in implementation | = note: `CONSTANT` from trait: `const CONSTANT: u32;` diff --git a/src/test/ui/missing-items/missing-type-parameter.stderr b/src/test/ui/missing-items/missing-type-parameter.stderr index e91af3b2ea9..c2798af66f2 100644 --- a/src/test/ui/missing-items/missing-type-parameter.stderr +++ b/src/test/ui/missing-items/missing-type-parameter.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/missing-type-parameter.rs:14:5 | -14 | foo(); //~ ERROR type annotations needed +LL | foo(); //~ ERROR type annotations needed | ^^^ cannot infer type for `X` error: aborting due to previous error diff --git a/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr b/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr index 84fe36560f5..1df422730ec 100644 --- a/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr +++ b/src/test/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `missing` --> $DIR/foo.rs:13:5 | -13 | mod missing; +LL | mod missing; | ^^^^^^^ | = help: name the file either foo/missing.rs or foo/missing/mod.rs inside the directory "$DIR" diff --git a/src/test/ui/moves-based-on-type-block-bad.stderr b/src/test/ui/moves-based-on-type-block-bad.stderr index d893c6a1155..fd83309274d 100644 --- a/src/test/ui/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves-based-on-type-block-bad.stderr @@ -1,10 +1,10 @@ error[E0507]: cannot move out of borrowed content --> $DIR/moves-based-on-type-block-bad.rs:34:19 | -34 | match hellothere.x { //~ ERROR cannot move out +LL | match hellothere.x { //~ ERROR cannot move out | ^^^^^^^^^^ cannot move out of borrowed content ... -37 | box E::Bar(x) => println!("{}", x.to_string()), +LL | box E::Bar(x) => println!("{}", x.to_string()), | - hint: to prevent move, use `ref x` or `ref mut x` error: aborting due to previous error diff --git a/src/test/ui/moves-based-on-type-match-bindings.stderr b/src/test/ui/moves-based-on-type-match-bindings.stderr index cd2ad697c8b..1c33004d8f6 100644 --- a/src/test/ui/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves-based-on-type-match-bindings.stderr @@ -1,10 +1,10 @@ error[E0382]: use of partially moved value: `x` --> $DIR/moves-based-on-type-match-bindings.rs:26:12 | -23 | Foo {f} => {} +LL | Foo {f} => {} | - value moved here ... -26 | touch(&x); //~ ERROR use of partially moved value: `x` +LL | touch(&x); //~ ERROR use of partially moved value: `x` | ^ value used here after move | = note: move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves-based-on-type-tuple.stderr b/src/test/ui/moves-based-on-type-tuple.stderr index 95929eb9dbc..a614b33c63e 100644 --- a/src/test/ui/moves-based-on-type-tuple.stderr +++ b/src/test/ui/moves-based-on-type-tuple.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `x` (Ast) --> $DIR/moves-based-on-type-tuple.rs:16:13 | -16 | box (x, x) +LL | box (x, x) | - ^ value used here after move | | | value moved here @@ -11,7 +11,7 @@ error[E0382]: use of moved value: `x` (Ast) error[E0382]: use of moved value: `x` (Mir) --> $DIR/moves-based-on-type-tuple.rs:16:13 | -16 | box (x, x) +LL | box (x, x) | - ^ value used here after move | | | value moved here diff --git a/src/test/ui/mut-ref.stderr b/src/test/ui/mut-ref.stderr index aaab243e22f..d2df58881a2 100644 --- a/src/test/ui/mut-ref.stderr +++ b/src/test/ui/mut-ref.stderr @@ -1,7 +1,7 @@ error: the order of `mut` and `ref` is incorrect --> $DIR/mut-ref.rs:14:9 | -14 | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect +LL | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect | ^^^^^^^ help: try switching the order: `ref mut` error: aborting due to previous error diff --git a/src/test/ui/nested_impl_trait.stderr b/src/test/ui/nested_impl_trait.stderr index 6849a8e08e2..b3e61e74bbb 100644 --- a/src/test/ui/nested_impl_trait.stderr +++ b/src/test/ui/nested_impl_trait.stderr @@ -1,7 +1,7 @@ error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:16:56 | -16 | fn bad_in_ret_position(x: impl Into) -> impl Into { x } +LL | fn bad_in_ret_position(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -10,7 +10,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:19:42 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -19,7 +19,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:23:37 | -23 | fn bad_in_arg_position(_: impl Into) { } +LL | fn bad_in_arg_position(_: impl Into) { } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -28,7 +28,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:28:44 | -28 | fn bad(x: impl Into) -> impl Into { x } +LL | fn bad(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -37,13 +37,13 @@ error[E0666]: nested `impl Trait` is not allowed error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:19:32 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:36:42 | -36 | fn allowed_in_ret_type() -> impl Fn() -> impl Into { +LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into { | ^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/nll/borrowed-match-issue-45045.stderr b/src/test/ui/nll/borrowed-match-issue-45045.stderr index 5dada7a4895..144eba8cb76 100644 --- a/src/test/ui/nll/borrowed-match-issue-45045.stderr +++ b/src/test/ui/nll/borrowed-match-issue-45045.stderr @@ -1,23 +1,23 @@ error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:24:5 | -22 | let f = &mut e; +LL | let f = &mut e; | ------ borrow of `e` occurs here -23 | let g = f; -24 | / match e { //~ cannot use `e` because it was mutably borrowed [E0503] -25 | | Xyz::A => println!("a"), -26 | | //~^ cannot use `e` because it was mutably borrowed [E0503] -27 | | Xyz::B => println!("b"), -28 | | }; +LL | let g = f; +LL | / match e { //~ cannot use `e` because it was mutably borrowed [E0503] +LL | | Xyz::A => println!("a"), +LL | | //~^ cannot use `e` because it was mutably borrowed [E0503] +LL | | Xyz::B => println!("b"), +LL | | }; | |_____^ use of borrowed `e` error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:25:9 | -22 | let f = &mut e; +LL | let f = &mut e; | ------ borrow of `e` occurs here ... -25 | Xyz::A => println!("a"), +LL | Xyz::A => println!("a"), | ^^^^^^ use of borrowed `e` error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/src/test/ui/nll/borrowed-referent-issue-38899.stderr index 8115057f255..91f81783297 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr +++ b/src/test/ui/nll/borrowed-referent-issue-38899.stderr @@ -1,10 +1,10 @@ error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable --> $DIR/borrowed-referent-issue-38899.rs:24:21 | -22 | let x = &mut block; +LL | let x = &mut block; | ---------- mutable borrow occurs here -23 | println!("{}", x.current); -24 | let p: &'a u8 = &*block.current; +LL | println!("{}", x.current); +LL | let p: &'a u8 = &*block.current; | ^^^^^^^^^^^^^^^ immutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/src/test/ui/nll/capture-ref-in-struct.stderr index a1fc2de318a..316a918e4ee 100644 --- a/src/test/ui/nll/capture-ref-in-struct.stderr +++ b/src/test/ui/nll/capture-ref-in-struct.stderr @@ -1,13 +1,13 @@ error[E0597]: `y` does not live long enough --> $DIR/capture-ref-in-struct.rs:33:16 | -33 | y: &y, +LL | y: &y, | ^^ borrowed value does not live long enough ... -38 | } +LL | } | - borrowed value only lives until here -39 | -40 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#5r... diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr index 3bd02f308c8..5f84001a8fb 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/escape-argument-callee.rs:36:50 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^ error: free region `ReFree(DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]), BrAnon(3))` does not outlive free region `ReFree(DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/escape-argument-callee.rs:36:45 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^ note: No external requirements --> $DIR/escape-argument-callee.rs:36:38 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -24,13 +24,13 @@ note: No external requirements note: No external requirements --> $DIR/escape-argument-callee.rs:30:1 | -30 | / fn test() { -31 | | let x = 44; -32 | | let mut p = &x; -33 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -42 | | deref(p); -43 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index 2feaa82ea5a..93a7bab3386 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -1,7 +1,7 @@ note: No external requirements --> $DIR/escape-argument.rs:36:38 | -36 | let mut closure = expect_sig(|p, y| *p = y); +LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -12,13 +12,13 @@ note: No external requirements note: No external requirements --> $DIR/escape-argument.rs:30:1 | -30 | / fn test() { -31 | | let x = 44; -32 | | let mut p = &x; -33 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -41 | | deref(p); -42 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_argument[317d]::test[0]) with substs [] @@ -26,13 +26,13 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-argument.rs:37:25 | -37 | closure(&mut p, &y); +LL | closure(&mut p, &y); | ^^ borrowed value does not live long enough -38 | //~^ ERROR `y` does not live long enough [E0597] -39 | } +LL | //~^ ERROR `y` does not live long enough [E0597] +LL | } | - borrowed value only lives until here -40 | -41 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#6r... diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr index bfd1f286b39..b6c1d808ff5 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -1,7 +1,7 @@ note: External requirements --> $DIR/escape-upvar-nested.rs:31:32 | -31 | let mut closure1 = || p = &y; +LL | let mut closure1 = || p = &y; | ^^^^^^^^^ | = note: defining type: DefId(0/1:10 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [ @@ -16,11 +16,11 @@ note: External requirements note: External requirements --> $DIR/escape-upvar-nested.rs:30:27 | -30 | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ -31 | | let mut closure1 = || p = &y; -32 | | closure1(); -33 | | }; +LL | | let mut closure1 = || p = &y; +LL | | closure1(); +LL | | }; | |_________^ | = note: defining type: DefId(0/1:9 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -35,13 +35,13 @@ note: External requirements note: No external requirements --> $DIR/escape-upvar-nested.rs:23:1 | -23 | / fn test() { -24 | | let x = 44; -25 | | let mut p = &x; -26 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -38 | | deref(p); -39 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_upvar_nested[317d]::test[0]) with substs [] @@ -49,17 +49,17 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-nested.rs:30:27 | -30 | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ -31 | | let mut closure1 = || p = &y; -32 | | closure1(); -33 | | }; +LL | | let mut closure1 = || p = &y; +LL | | closure1(); +LL | | }; | |_________^ borrowed value does not live long enough ... -36 | } +LL | } | - borrowed value only lives until here -37 | -38 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#4r... diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr index 5e85ced7d9a..3cb6524f3b4 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr @@ -1,7 +1,7 @@ note: External requirements --> $DIR/escape-upvar-ref.rs:33:27 | -33 | let mut closure = || p = &y; +LL | let mut closure = || p = &y; | ^^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -16,13 +16,13 @@ note: External requirements note: No external requirements --> $DIR/escape-upvar-ref.rs:27:1 | -27 | / fn test() { -28 | | let x = 44; -29 | | let mut p = &x; -30 | | +LL | / fn test() { +LL | | let x = 44; +LL | | let mut p = &x; +LL | | ... | -38 | | deref(p); -39 | | } +LL | | deref(p); +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ escape_upvar_ref[317d]::test[0]) with substs [] @@ -30,13 +30,13 @@ note: No external requirements error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-ref.rs:33:27 | -33 | let mut closure = || p = &y; +LL | let mut closure = || p = &y; | ^^^^^^^^^ borrowed value does not live long enough ... -36 | } +LL | } | - borrowed value only lives until here -37 | -38 | deref(p); +LL | +LL | deref(p); | - borrow later used here | = note: borrowed value must be valid for lifetime '_#4r... diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 7e48c0fc584..0c058e40a50 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-fail-no-postdom.rs:55:21 | -55 | let p = x.get(); +LL | let p = x.get(); | ^^^^^^^ error: free region `ReFree(DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `ReFree(DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/propagate-approximated-fail-no-postdom.rs:55:17 | -55 | let p = x.get(); +LL | let p = x.get(); | ^ note: No external requirements --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9 | -53 | / |_outlives1, _outlives2, _outlives3, x, y| { -54 | | // Only works if 'x: 'y: -55 | | let p = x.get(); -56 | | //~^ WARN not reporting region error due to -Znll -57 | | //~| ERROR does not outlive free region -58 | | demand_y(x, y, p) -59 | | }, +LL | / |_outlives1, _outlives2, _outlives3, x, y| { +LL | | // Only works if 'x: 'y: +LL | | let p = x.get(); +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | demand_y(x, y, p) +LL | | }, | |_________^ | = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-approximated-fail-no-postdom.rs:48:1 | -48 | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) { -49 | | establish_relationships( -50 | | cell_a, -51 | | cell_b, +LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) { +LL | | establish_relationships( +LL | | cell_a, +LL | | cell_b, ... | -60 | | ); -61 | | } +LL | | ); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index b83fd8bebb4..798f222c136 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-ref.rs:57:9 | -57 | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-ref.rs:53:47 | -53 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -54 | | //~^ ERROR lifetime mismatch -55 | | -56 | | // Only works if 'x: 'y: -57 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -58 | | }); +LL | | //~^ ERROR lifetime mismatch +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,23 +26,23 @@ note: External requirements error[E0623]: lifetime mismatch --> $DIR/propagate-approximated-ref.rs:53:29 | -52 | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- | | | these two types are declared with different lifetimes... -53 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | ^^^^^^^ ...but data from `cell_a` flows into `cell_b` here note: No external requirements --> $DIR/propagate-approximated-ref.rs:52:1 | -52 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -53 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -54 | | //~^ ERROR lifetime mismatch -55 | | +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | //~^ ERROR lifetime mismatch +LL | | ... | -58 | | }); -59 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index d7fd67afcf7..eb4d264bf82 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -1,24 +1,24 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5 | -31 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | ^^^ error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r` --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9 | -33 | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure +LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure | ^^^^^^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15 | -31 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | _______________^ -32 | | //~^ WARNING not reporting region error due to -Znll -33 | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure -34 | | //~^ ERROR does not outlive free region -35 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure +LL | | //~^ ERROR does not outlive free region +LL | | }) | |_____^ | = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [ @@ -29,13 +29,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1 | -28 | / fn case1() { -29 | | let a = 0; -30 | | let cell = Cell::new(&a); -31 | | foo(cell, |cell_a, cell_x| { +LL | / fn case1() { +LL | | let a = 0; +LL | | let cell = Cell::new(&a); +LL | | foo(cell, |cell_a, cell_x| { ... | -35 | | }) -36 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] @@ -43,10 +43,10 @@ note: No external requirements note: External requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15 | -46 | foo(cell, |cell_a, cell_x| { +LL | foo(cell, |cell_a, cell_x| { | _______________^ -47 | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error -48 | | }) +LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error +LL | | }) | |_____^ | = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [ @@ -59,13 +59,13 @@ note: External requirements note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:39:1 | -39 | / fn case2() { -40 | | let a = 0; -41 | | let cell = Cell::new(&a); -42 | | //~^ ERROR `a` does not live long enough +LL | / fn case2() { +LL | | let a = 0; +LL | | let cell = Cell::new(&a); +LL | | //~^ ERROR `a` does not live long enough ... | -48 | | }) -49 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] @@ -73,10 +73,10 @@ note: No external requirements error[E0597]: `a` does not live long enough --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26 | -41 | let cell = Cell::new(&a); +LL | let cell = Cell::new(&a); | ^^ borrowed value does not live long enough ... -49 | } +LL | } | - borrowed value only lives until here | = note: borrowed value must be valid for lifetime '_#2r... diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index 13aedc408cf..3131142ec73 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:49:9 | -49 | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | //~^ ERROR does not outlive free region -47 | | -48 | | // Only works if 'x: 'y: -49 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -50 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,25 +26,25 @@ note: External requirements error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | //~^ ERROR does not outlive free region -47 | | -48 | | // Only works if 'x: 'y: -49 | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll -50 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1 | -44 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -45 | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -46 | | //~^ ERROR does not outlive free region -47 | | +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | | //~^ ERROR does not outlive free region +LL | | ... | -50 | | }); -51 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index 947ed650e6b..5b038653b60 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 | -48 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARNING not reporting region error due to -Znll -53 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -26,25 +26,25 @@ note: External requirements error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 | -48 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARNING not reporting region error due to -Znll -53 | | }); +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1 | -47 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -48 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -49 | | //~^ ERROR does not outlive free region -50 | | // Only works if 'x: 'y: +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | //~^ ERROR does not outlive free region +LL | | // Only works if 'x: 'y: ... | -53 | | }); -54 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index 370bc50e800..6eb0926b1c8 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-approximated-val.rs:50:9 | -50 | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll +LL | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/propagate-approximated-val.rs:46:45 | -46 | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { | _____________________________________________^ -47 | | //~^ ERROR lifetime mismatch -48 | | -49 | | // Only works if 'x: 'y: -50 | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll -51 | | }); +LL | | //~^ ERROR lifetime mismatch +LL | | +LL | | // Only works if 'x: 'y: +LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -26,23 +26,23 @@ note: External requirements error[E0623]: lifetime mismatch --> $DIR/propagate-approximated-val.rs:46:29 | -45 | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- | | | these two types are declared with different lifetimes... -46 | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { | ^^^^^^ ...but data from `cell_a` flows into `cell_b` here note: No external requirements --> $DIR/propagate-approximated-val.rs:45:1 | -45 | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -46 | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { -47 | | //~^ ERROR lifetime mismatch -48 | | +LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { +LL | | //~^ ERROR lifetime mismatch +LL | | ... | -51 | | }); -52 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr index d93124963eb..ab4faaca756 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-despite-same-free-region.rs:54:21 | -54 | let p = x.get(); +LL | let p = x.get(); | ^^^^^^^ note: External requirements --> $DIR/propagate-despite-same-free-region.rs:52:9 | -52 | / |_outlives1, _outlives2, x, y| { -53 | | // Only works if 'x: 'y: -54 | | let p = x.get(); -55 | | demand_y(x, y, p) -56 | | }, +LL | / |_outlives1, _outlives2, x, y| { +LL | | // Only works if 'x: 'y: +LL | | let p = x.get(); +LL | | demand_y(x, y, p) +LL | | }, | |_________^ | = note: defining type: DefId(0/1:16 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -24,13 +24,13 @@ note: External requirements note: No external requirements --> $DIR/propagate-despite-same-free-region.rs:49:1 | -49 | / fn supply<'a>(cell_a: Cell<&'a u32>) { -50 | | establish_relationships( -51 | | cell_a, -52 | | |_outlives1, _outlives2, x, y| { +LL | / fn supply<'a>(cell_a: Cell<&'a u32>) { +LL | | establish_relationships( +LL | | cell_a, +LL | | |_outlives1, _outlives2, x, y| { ... | -57 | | ); -58 | | } +LL | | ); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index 08dcfb042b5..ce808f56b42 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9 | -47 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:18 | -47 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^ note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47 | -45 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -46 | | // Only works if 'x: 'y: -47 | | demand_y(x, y, x.get()) -48 | | //~^ WARN not reporting region error due to -Znll -49 | | //~| ERROR does not outlive free region -50 | | }); +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:44:1 | -44 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -45 | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -46 | | // Only works if 'x: 'y: -47 | | demand_y(x, y, x.get()) +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) ... | -50 | | }); -51 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index 502f5650249..547ff75bac6 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:18 | -51 | demand_y(x, y, x.get()) +LL | demand_y(x, y, x.get()) | ^ note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47 | -49 | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) -52 | | //~^ WARN not reporting region error due to -Znll -53 | | //~| ERROR does not outlive free region -54 | | }); +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | }); | |_____^ | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -30,13 +30,13 @@ note: No external requirements note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:48:1 | -48 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { -49 | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -50 | | // Only works if 'x: 'y: -51 | | demand_y(x, y, x.get()) +LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { +LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | // Only works if 'x: 'y: +LL | | demand_y(x, y, x.get()) ... | -54 | | }); -55 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index 0579ac624ca..dfe4e5f844e 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -1,20 +1,20 @@ warning: not reporting region error due to -Znll --> $DIR/propagate-from-trait-match.rs:55:9 | -55 | require(value); +LL | require(value); | ^^^^^^^ note: External requirements --> $DIR/propagate-from-trait-match.rs:42:36 | -42 | establish_relationships(value, |value| { +LL | establish_relationships(value, |value| { | ____________________________________^ -43 | | //~^ ERROR the parameter type `T` may not live long enough -44 | | -45 | | // This function call requires that +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | +LL | | // This function call requires that ... | -56 | | //~^ WARNING not reporting region error due to -Znll -57 | | }); +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [ @@ -29,14 +29,14 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/propagate-from-trait-match.rs:42:36 | -42 | establish_relationships(value, |value| { +LL | establish_relationships(value, |value| { | ____________________________________^ -43 | | //~^ ERROR the parameter type `T` may not live long enough -44 | | -45 | | // This function call requires that +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | +LL | | // This function call requires that ... | -56 | | //~^ WARNING not reporting region error due to -Znll -57 | | }); +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }); | |_____^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -44,13 +44,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/propagate-from-trait-match.rs:38:1 | -38 | / fn supply<'a, T>(value: T) -39 | | where -40 | | T: Trait<'a>, -41 | | { +LL | / fn supply<'a, T>(value: T) +LL | | where +LL | | T: Trait<'a>, +LL | | { ... | -57 | | }); -58 | | } +LL | | }); +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [ diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr index bbb63fe5066..a162d754def 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr @@ -1,15 +1,15 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 | -18 | fn foo(x: &u32) -> &'static u32 { +LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&ReStatic u32` -19 | &*x +LL | &*x | ^^^ lifetime `ReStatic` required error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr index 1edceba7b09..ac3bf4b459f 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error: free region `ReFree(DefId(0/0:3 ~ region_lbr_named_does_not_outlive_static[317d]::foo[0]), BrNamed(crate0:DefIndex(1:9), 'a))` does not outlive free region `ReStatic` --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr index 96ac719bd5e..f8bf188e789 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to -Znll --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 | -19 | &*x +LL | &*x | ^^^ error[E0623]: lifetime mismatch --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 | -18 | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { +LL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { | ------- ------- | | | this parameter and the return type are declared with different lifetimes... -19 | &*x +LL | &*x | ^^^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index 58a26e61e57..b34f4c470df 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/return-wrong-bound-region.rs:21:23 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^ error: free region `ReFree(DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]), BrAnon(2))` does not outlive free region `ReFree(DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]), BrAnon(1))` --> $DIR/return-wrong-bound-region.rs:21:23 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^ note: No external requirements --> $DIR/return-wrong-bound-region.rs:21:16 | -21 | expect_sig(|a, b| b); // ought to return `a` +LL | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^ | = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ @@ -24,11 +24,11 @@ note: No external requirements note: No external requirements --> $DIR/return-wrong-bound-region.rs:20:1 | -20 | / fn test() { -21 | | expect_sig(|a, b| b); // ought to return `a` -22 | | //~^ WARN not reporting region error due to -Znll -23 | | //~| ERROR does not outlive free region -24 | | } +LL | / fn test() { +LL | | expect_sig(|a, b| b); // ought to return `a` +LL | | //~^ WARN not reporting region error due to -Znll +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs [] diff --git a/src/test/ui/nll/drop-no-may-dangle.stderr b/src/test/ui/nll/drop-no-may-dangle.stderr index f6a06835e5b..bbb9c0051bc 100644 --- a/src/test/ui/nll/drop-no-may-dangle.stderr +++ b/src/test/ui/nll/drop-no-may-dangle.stderr @@ -1,24 +1,24 @@ error[E0506]: cannot assign to `v[..]` because it is borrowed --> $DIR/drop-no-may-dangle.rs:31:9 | -26 | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; +LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here ... -31 | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed +LL | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed | ^^^^^^^^^ assignment to borrowed `v[..]` occurs here ... -35 | } +LL | } | - borrow later used here, when `p` is dropped error[E0506]: cannot assign to `v[..]` because it is borrowed --> $DIR/drop-no-may-dangle.rs:34:5 | -26 | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; +LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here ... -34 | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed +LL | v[0] += 1; //~ ERROR cannot assign to `v[..]` because it is borrowed | ^^^^^^^^^ assignment to borrowed `v[..]` occurs here -35 | } +LL | } | - borrow later used here, when `p` is dropped error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/get_default.stderr b/src/test/ui/nll/get_default.stderr index a47a1a58daa..37c9a10cf92 100644 --- a/src/test/ui/nll/get_default.stderr +++ b/src/test/ui/nll/get_default.stderr @@ -1,49 +1,49 @@ error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:33:17 | -28 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here ... -33 | map.set(String::new()); // Just AST errors here +LL | map.set(String::new()); // Just AST errors here | ^^^ mutable borrow occurs here ... -38 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:44:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here -43 | Some(v) => { -44 | map.set(String::new()); // Both AST and MIR error here +LL | Some(v) => { +LL | map.set(String::new()); // Both AST and MIR error here | ^^^ mutable borrow occurs here ... -55 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) --> $DIR/get_default.rs:50:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here ... -50 | map.set(String::new()); // Just AST errors here +LL | map.set(String::new()); // Just AST errors here | ^^^ mutable borrow occurs here ... -55 | } +LL | } | - immutable borrow ends here error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir) --> $DIR/get_default.rs:44:17 | -42 | match map.get() { +LL | match map.get() { | --- immutable borrow occurs here -43 | Some(v) => { -44 | map.set(String::new()); // Both AST and MIR error here +LL | Some(v) => { +LL | map.set(String::new()); // Both AST and MIR error here | ^^^ mutable borrow occurs here ... -47 | return v; +LL | return v; | - borrow later used here error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index 7e40a3ac118..4bcbb596e5c 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -1,19 +1,19 @@ error[E0506]: cannot assign to `*s` because it is borrowed --> $DIR/guarantor-issue-46974.rs:19:5 | -17 | let t = &mut *s; // this borrow should last for the entire function +LL | let t = &mut *s; // this borrow should last for the entire function | ------- borrow of `*s` occurs here -18 | let x = &t.0; -19 | *s = (2,); //~ ERROR cannot assign to `*s` +LL | let x = &t.0; +LL | *s = (2,); //~ ERROR cannot assign to `*s` | ^^^^^^^^^ assignment to borrowed `*s` occurs here error[E0621]: explicit lifetime required in the type of `s` --> $DIR/guarantor-issue-46974.rs:25:5 | -23 | fn bar(s: &Box<(i32,)>) -> &'static i32 { +LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { | - consider changing the type of `s` to `&'static std::boxed::Box<(i32,)>` -24 | // FIXME(#46983): error message should be better -25 | &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621] +LL | // FIXME(#46983): error message should be better +LL | &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621] | ^^^^ lifetime `'static` required error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr index b503208b555..d34b8184e6d 100644 --- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr @@ -1,13 +1,13 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:32:5 | -28 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -32 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -33 | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones -34 | } +LL | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr index a093a57ff39..ed81aa6006a 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr @@ -1,12 +1,12 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-with-fragment.rs:31:5 | -27 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -31 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -32 | } +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr index 165d9afaef6..96eb2afd5b1 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr @@ -1,13 +1,13 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop-with-uninitialized-fragments.rs:32:5 | -27 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -32 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -33 | // FIXME ^ This currently errors and it should not. -34 | } +LL | // FIXME ^ This currently errors and it should not. +LL | } | - borrow later used here, when `foo` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/maybe-initialized-drop.stderr b/src/test/ui/nll/maybe-initialized-drop.stderr index e2f5c049a55..1e4851d10da 100644 --- a/src/test/ui/nll/maybe-initialized-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/maybe-initialized-drop.rs:26:5 | -25 | let wrap = Wrap { p: &mut x }; +LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here -26 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] | ^^^^^ assignment to borrowed `x` occurs here -27 | } +LL | } | - borrow later used here, when `wrap` is dropped error: aborting due to previous error diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/src/test/ui/nll/return-ref-mut-issue-46557.stderr index bd42bf8e43c..f7e85e4277b 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -1,10 +1,10 @@ error[E0597]: borrowed value does not live long enough --> $DIR/return-ref-mut-issue-46557.rs:17:21 | -17 | let ref mut x = 1234543; //~ ERROR borrowed value does not live long enough [E0597] +LL | let ref mut x = 1234543; //~ ERROR borrowed value does not live long enough [E0597] | ^^^^^^^ temporary value does not live long enough -18 | x -19 | } +LL | x +LL | } | - temporary value only lives until here | = note: borrowed value must be valid for lifetime '_#2r... diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/src/test/ui/nll/trait-associated-constant.stderr index 38dc09debd0..990b5faf347 100644 --- a/src/test/ui/nll/trait-associated-constant.stderr +++ b/src/test/ui/nll/trait-associated-constant.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-associated-constant.rs:31:5 | -31 | const AC: Option<&'c str> = None; +LL | const AC: Option<&'c str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `std::option::Option<&'b str>` @@ -9,18 +9,18 @@ error[E0308]: mismatched types note: the lifetime 'c as defined on the impl at 30:1... --> $DIR/trait-associated-constant.rs:30:1 | -30 | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { +LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 30:1 --> $DIR/trait-associated-constant.rs:30:1 | -30 | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { +LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/trait-associated-constant.rs:38:5 | -38 | const AC: Option<&'a str> = None; +LL | const AC: Option<&'a str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `std::option::Option<&'b str>` @@ -28,12 +28,12 @@ error[E0308]: mismatched types note: the lifetime 'a as defined on the impl at 37:1... --> $DIR/trait-associated-constant.rs:37:1 | -37 | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { +LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 37:1 --> $DIR/trait-associated-constant.rs:37:1 | -37 | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { +LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 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 c3dd8a148df..3b75b8d7027 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr @@ -1,15 +1,15 @@ warning: not reporting region error due to -Znll --> $DIR/impl-trait-captures.rs:22:5 | -22 | x +LL | x | ^ error[E0621]: explicit lifetime required in the type of `x` --> $DIR/impl-trait-captures.rs:22:5 | -21 | fn foo<'a, T>(x: &T) -> impl Foo<'a> { +LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> { | - consider changing the type of `x` to `&ReEarlyBound(0, 'a) T` -22 | x +LL | x | ^ lifetime `ReEarlyBound(0, 'a)` required error: aborting due to previous error diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr index f5ec12a0956..33abfb5c3a1 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/impl-trait-outlives.rs:18:35 | -18 | fn no_region<'a, T>(x: Box) -> impl Debug + 'a +LL | fn no_region<'a, T>(x: Box) -> impl Debug + 'a | ^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/impl-trait-outlives.rs:34:42 | -34 | fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a +LL | fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/impl-trait-outlives.rs:23:5 | -23 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -21,7 +21,7 @@ error[E0309]: the parameter type `T` may not live long enough error[E0309]: the parameter type `T` may not live long enough --> $DIR/impl-trait-outlives.rs:39:5 | -39 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr index 93405867c01..2ad715e0c5b 100644 --- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr +++ b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/projection-implied-bounds.rs:45:36 | -45 | twice(value, |value_ref, item| invoke2(value_ref, item)); +LL | twice(value, |value_ref, item| invoke2(value_ref, item)); | ^^^^^^^ error[E0310]: the parameter type `T` may not live long enough --> $DIR/projection-implied-bounds.rs:45:18 | -45 | twice(value, |value_ref, item| invoke2(value_ref, item)); +LL | twice(value, |value_ref, item| invoke2(value_ref, item)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'static`... diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index dd767db3146..a580502f175 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-closure.rs:36:31 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-closure.rs:54:31 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ note: External requirements --> $DIR/projection-no-regions-closure.rs:36:23 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:15 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -28,7 +28,7 @@ note: External requirements error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:36:23 | -36 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -36,13 +36,13 @@ error[E0309]: the associated type `::Item` may not liv note: No external requirements --> $DIR/projection-no-regions-closure.rs:32:1 | -32 | / fn no_region<'a, T>(x: Box) -> Box -33 | | where -34 | | T: Iterator, -35 | | { +LL | / fn no_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: Iterator, +LL | | { ... | -38 | | //~| ERROR the associated type `::Item` may not live long enough -39 | | } +LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [ @@ -53,7 +53,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:46:23 | -46 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -68,12 +68,12 @@ note: External requirements note: No external requirements --> $DIR/projection-no-regions-closure.rs:42:1 | -42 | / fn correct_region<'a, T>(x: Box) -> Box -43 | | where -44 | | T: 'a + Iterator, -45 | | { -46 | | with_signature(x, |mut y| Box::new(y.next())) -47 | | } +LL | / fn correct_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: 'a + Iterator, +LL | | { +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | } | |_^ | = note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [ @@ -84,7 +84,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:54:23 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -100,7 +100,7 @@ note: External requirements error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:54:23 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -108,13 +108,13 @@ error[E0309]: the associated type `::Item` may not liv note: No external requirements --> $DIR/projection-no-regions-closure.rs:50:1 | -50 | / fn wrong_region<'a, 'b, T>(x: Box) -> Box -51 | | where -52 | | T: 'b + Iterator, -53 | | { +LL | / fn wrong_region<'a, 'b, T>(x: Box) -> Box +LL | | where +LL | | T: 'b + Iterator, +LL | | { ... | -56 | | //~| ERROR the associated type `::Item` may not live long enough -57 | | } +LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [ @@ -126,7 +126,7 @@ note: No external requirements note: External requirements --> $DIR/projection-no-regions-closure.rs:65:23 | -65 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ @@ -142,13 +142,13 @@ note: External requirements note: No external requirements --> $DIR/projection-no-regions-closure.rs:60:1 | -60 | / fn outlives_region<'a, 'b, T>(x: Box) -> Box -61 | | where -62 | | T: 'b + Iterator, -63 | | 'b: 'a, -64 | | { -65 | | with_signature(x, |mut y| Box::new(y.next())) -66 | | } +LL | / fn outlives_region<'a, 'b, T>(x: Box) -> Box +LL | | where +LL | | T: 'b + Iterator, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr index 988ce6ddbe7..05385c16bdc 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-fn.rs:24:5 | -24 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-no-regions-fn.rs:40:5 | -40 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:24:5 | -24 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... @@ -21,7 +21,7 @@ error[E0309]: the associated type `::Item` may not liv error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:40:5 | -40 | Box::new(x.next()) +LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index 9b961a73e73..f557b448cec 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:56:39 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:68:39 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-closure.rs:90:39 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements --> $DIR/projection-one-region-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -35,7 +35,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`... @@ -43,19 +43,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` --> $DIR/projection-one-region-closure.rs:56:20 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:52:1 | -52 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -53 | | where -54 | | T: Anything<'b>, -55 | | { +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { ... | -59 | | //~| ERROR does not outlive free region -60 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [ @@ -66,7 +66,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-closure.rs:68:29 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -83,7 +83,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:68:29 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -91,19 +91,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-closure.rs:68:20 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:63:1 | -63 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -64 | | where -65 | | T: Anything<'b>, -66 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, ... | -71 | | //~| ERROR does not outlive free region -72 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [ @@ -115,7 +115,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-closure.rs:90:29 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -132,7 +132,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-one-region-closure.rs:90:29 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -140,19 +140,19 @@ error[E0309]: the parameter type `T` may not live long enough error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-closure.rs:90:20 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:75:1 | -75 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -76 | | where -77 | | T: Anything<'b>, -78 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -93 | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` -94 | | } +LL | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [ @@ -162,39 +162,39 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-one-region-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where T: '_#3r - = note: where '_#2r: '_#3r + --> $DIR/projection-one-region-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where T: '_#3r + = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:97:1 - | -97 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -98 | | where -99 | | T: Anything<'b>, -100 | | T: 'a, -... | -103 | | with_signature(cell, t, |cell, t| require(cell, t)); -104 | | } - | |_^ - | - = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ - '_#1r, - '_#2r, - T - ] + --> $DIR/projection-one-region-closure.rs:97:1 + | +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T: 'a, +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ + '_#1r, + '_#2r, + T + ] error: aborting due to 6 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index b26fa96fe63..7a8010ad8e0 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:48:39 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:59:39 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-one-region-trait-bound-closure.rs:80:39 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:48:29 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -34,19 +34,19 @@ note: External requirements error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` --> $DIR/projection-one-region-trait-bound-closure.rs:48:20 | -48 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:44:1 | -44 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -45 | | where -46 | | T: Anything<'b>, -47 | | { +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { ... | -50 | | //~| ERROR does not outlive free region -51 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ @@ -57,7 +57,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:59:29 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -73,19 +73,19 @@ note: External requirements error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-trait-bound-closure.rs:59:20 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:54:1 | -54 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -55 | | where -56 | | T: Anything<'b>, -57 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, ... | -61 | | //~| ERROR does not outlive free region -62 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ @@ -97,7 +97,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:80:29 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -113,19 +113,19 @@ note: External requirements error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` --> $DIR/projection-one-region-trait-bound-closure.rs:80:20 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:65:1 | -65 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -66 | | where -67 | | T: Anything<'b>, -68 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -82 | | //~| ERROR does not outlive free region -83 | | } +LL | | //~| ERROR does not outlive free region +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ @@ -137,7 +137,7 @@ note: No external requirements note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:91:29 | -91 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -153,13 +153,13 @@ note: External requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:86:1 | -86 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -87 | | where -88 | | T: Anything<'b>, -89 | | 'b: 'a, -90 | | { -91 | | with_signature(cell, t, |cell, t| require(cell, t)); -92 | | } +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [ @@ -169,36 +169,36 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where '_#1r: '_#2r + --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where '_#1r: '_#2r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 - | -95 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -96 | | where -97 | | T: Anything<'a>, -98 | | { -... | -103 | | with_signature(cell, t, |cell, t| require(cell, t)); -104 | | } - | |_^ - | - = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 + | +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a>, +LL | | { +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ + '_#1r, + T + ] error: aborting due to 3 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr index 98b033b6a06..875907e6b39 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr @@ -1,7 +1,7 @@ note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:47:29 | -47 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -14,12 +14,12 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:43:1 | -43 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -44 | | where -45 | | T: Anything<'b>, -46 | | { -47 | | with_signature(cell, t, |cell, t| require(cell, t)); -48 | | } +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ @@ -30,7 +30,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -44,13 +44,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:51:1 | -51 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -52 | | where -53 | | T: Anything<'b>, -54 | | 'a: 'a, -55 | | { -56 | | with_signature(cell, t, |cell, t| require(cell, t)); -57 | | } +LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'a: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [ @@ -62,7 +62,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:75:29 | -75 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -76,13 +76,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:60:1 | -60 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -61 | | where -62 | | T: Anything<'b>, -63 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | T::AssocType: 'a, ... | -75 | | with_signature(cell, t, |cell, t| require(cell, t)); -76 | | } +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [ @@ -94,7 +94,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:84:29 | -84 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -108,13 +108,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:79:1 | -79 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -80 | | where -81 | | T: Anything<'b>, -82 | | 'b: 'a, -83 | | { -84 | | with_signature(cell, t, |cell, t| require(cell, t)); -85 | | } +LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [ @@ -126,7 +126,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:96:29 | -96 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ @@ -139,13 +139,13 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:88:1 | -88 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -89 | | where -90 | | T: Anything<'a>, -91 | | { +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a>, +LL | | { ... | -96 | | with_signature(cell, t, |cell, t| require(cell, t)); -97 | | } +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index aa7c5866ff1..4fc0dffa675 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -1,31 +1,31 @@ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:49:39 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:60:39 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/projection-two-region-trait-bound-closure.rs:81:39 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to -Znll - --> $DIR/projection-two-region-trait-bound-closure.rs:109:39 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ + --> $DIR/projection-two-region-trait-bound-closure.rs:109:39 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^ note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ @@ -41,7 +41,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 | -49 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`... @@ -49,13 +49,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:45:1 | -45 | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -46 | | where -47 | | T: Anything<'b, 'c>, -48 | | { +LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | { ... | -51 | | //~| ERROR associated type `>::AssocType` may not live long enough -52 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ @@ -67,7 +67,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -84,7 +84,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... @@ -92,13 +92,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:55:1 | -55 | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -56 | | where -57 | | T: Anything<'b, 'c>, -58 | | 'a: 'a, +LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'a: 'a, ... | -62 | | //~| ERROR associated type `>::AssocType` may not live long enough -63 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ @@ -111,7 +111,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -128,7 +128,7 @@ note: External requirements error[E0309]: the associated type `>::AssocType` may not live long enough --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... @@ -136,13 +136,13 @@ error[E0309]: the associated type `>::AssocType` may note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:66:1 | -66 | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -67 | | where -68 | | T: Anything<'b, 'c>, -69 | | T::AssocType: 'a, +LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | T::AssocType: 'a, ... | -83 | | //~| ERROR associated type `>::AssocType` may not live long enough -84 | | } +LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ @@ -155,7 +155,7 @@ note: No external requirements note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:92:29 | -92 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [ @@ -172,13 +172,13 @@ note: External requirements note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:87:1 | -87 | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -88 | | where -89 | | T: Anything<'b, 'c>, -90 | | 'b: 'a, -91 | | { -92 | | with_signature(cell, t, |cell, t| require(cell, t)); -93 | | } +LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [ @@ -189,144 +189,144 @@ note: No external requirements ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 - | -101 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - '_#3r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) - ] - = note: number of external vids: 5 - = note: where >::AssocType: '_#4r + --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + '_#3r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + ] + = note: number of external vids: 5 + = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 - | -96 | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) -97 | | where -98 | | T: Anything<'b, 'c>, -99 | | 'c: 'a, -100 | | { -101 | | with_signature(cell, t, |cell, t| require(cell, t)); -102 | | } - | |_^ - | - = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ - '_#1r, - '_#2r, - '_#3r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 + | +LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'c>, +LL | | 'c: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ + '_#1r, + '_#2r, + '_#3r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` - --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^ note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:105:1 - | -105 | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -106 | | where -107 | | T: Anything<'b, 'b>, -108 | | { -... | -111 | | //~| ERROR does not outlive free region -112 | | } - | |_^ - | - = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:105:1 + | +LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'b>, +LL | | { +... | +LL | | //~| ERROR does not outlive free region +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ + '_#1r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 - | -120 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where >::AssocType: '_#3r + --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where >::AssocType: '_#3r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 - | -115 | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -116 | | where -117 | | T: Anything<'b, 'b>, -118 | | 'b: 'a, -119 | | { -120 | | with_signature(cell, t, |cell, t| require(cell, t)); -121 | | } - | |_^ - | - = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ - '_#1r, - '_#2r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 + | +LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b, 'b>, +LL | | 'b: 'a, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ + '_#1r, + '_#2r, + T + ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 - | -132 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 - | -124 | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) -125 | | where -126 | | T: Anything<'a, 'a>, -127 | | { -... | -132 | | with_signature(cell, t, |cell, t| require(cell, t)); -133 | | } - | |_^ - | - = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ - '_#1r, - T - ] + --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 + | +LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'a, 'a>, +LL | | { +... | +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } + | |_^ + | + = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ + '_#1r, + T + ] error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index a0e7e7720cf..ab3c4006459 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -1,25 +1,25 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:31 | -35 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:24 | -35 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [ @@ -33,13 +33,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:33:1 | -33 | / fn generic(value: T) { -34 | | let cell = Cell::new(&()); -35 | | twice(cell, value, |a, b| invoke(a, b)); -36 | | //~^ WARNING not reporting region error -37 | | // -38 | | // This error from the old region solver looks bogus. -39 | | } +LL | / fn generic(value: T) { +LL | | let cell = Cell::new(&()); +LL | | twice(cell, value, |a, b| invoke(a, b)); +LL | | //~^ WARNING not reporting region error +LL | | // +LL | | // This error from the old region solver looks bogus. +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [ @@ -49,7 +49,7 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ @@ -63,7 +63,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`... @@ -71,12 +71,12 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:1 | -42 | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { -43 | | twice(cell, value, |a, b| invoke(a, b)); -44 | | //~^ WARNING not reporting region error -45 | | //~| WARNING not reporting region error -46 | | //~| ERROR the parameter type `T` may not live long enough -47 | | } +LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { +LL | | twice(cell, value, |a, b| invoke(a, b)); +LL | | //~^ WARNING not reporting region error +LL | | //~| WARNING not reporting region error +LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index 3113046ef5e..76ccb13e53e 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:27 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 | -53 | x +LL | x | ^ note: External requirements --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^^^^^ | = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -28,7 +28,7 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 | -37 | with_signature(x, |y| y) +LL | with_signature(x, |y| y) | ^^^^^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... @@ -36,13 +36,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:1 | -26 | / fn no_region<'a, T>(x: Box) -> Box -27 | | where -28 | | T: Debug, -29 | | { +LL | / fn no_region<'a, T>(x: Box) -> Box +LL | | where +LL | | T: Debug, +LL | | { ... | -39 | | //~| ERROR the parameter type `T` may not live long enough -40 | | } +LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [ @@ -53,7 +53,7 @@ note: No external requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 | -53 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 95a86ccae31..83d2b959c80 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -1,26 +1,26 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-where-clause.rs:45:9 | -45 | require(&x, &y) +LL | require(&x, &y) | ^^^^^^^ warning: not reporting region error due to -Znll --> $DIR/ty-param-closure-outlives-from-where-clause.rs:79:9 | -79 | require(&x, &y) +LL | require(&x, &y) | ^^^^^^^ note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 | -38 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // -41 | | // See `correct_region`, which explains the point of this +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // +LL | | // See `correct_region`, which explains the point of this ... | -46 | | //~^ WARNING not reporting region error due to -Znll -47 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [ @@ -34,14 +34,14 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 | -38 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // -41 | | // See `correct_region`, which explains the point of this +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // +LL | | // See `correct_region`, which explains the point of this ... | -46 | | //~^ WARNING not reporting region error due to -Znll -47 | | }) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`... @@ -49,13 +49,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:1 | -37 | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { -38 | | with_signature(a, b, |x, y| { -39 | | //~^ ERROR the parameter type `T` may not live long enough -40 | | // +LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { +LL | | with_signature(a, b, |x, y| { +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // ... | -47 | | }) -48 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [ @@ -65,14 +65,14 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26 | -55 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -56 | | // Key point of this test: -57 | | // -58 | | // The *closure* is being type-checked with all of its free +LL | | // Key point of this test: +LL | | // +LL | | // The *closure* is being type-checked with all of its free ... | -67 | | require(&x, &y) -68 | | }) +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -87,13 +87,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:51:1 | -51 | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) -52 | | where -53 | | T: 'a, -54 | | { +LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'a, +LL | | { ... | -68 | | }) -69 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [ @@ -104,13 +104,13 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 | -76 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -77 | | //~^ ERROR the parameter type `T` may not live long enough -78 | | // See `correct_region` -79 | | require(&x, &y) -80 | | //~^ WARNING not reporting region error due to -Znll -81 | | }) +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -125,13 +125,13 @@ note: External requirements error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 | -76 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -77 | | //~^ ERROR the parameter type `T` may not live long enough -78 | | // See `correct_region` -79 | | require(&x, &y) -80 | | //~^ WARNING not reporting region error due to -Znll -81 | | }) +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`... @@ -139,13 +139,13 @@ error[E0309]: the parameter type `T` may not live long enough note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1 | -72 | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) -73 | | where -74 | | T: 'b, -75 | | { +LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'b, +LL | | { ... | -81 | | }) -82 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [ @@ -156,11 +156,11 @@ note: No external requirements note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26 | -90 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -91 | | // See `correct_region` -92 | | require(&x, &y) -93 | | }) +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ @@ -176,13 +176,13 @@ note: External requirements note: No external requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:85:1 | -85 | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) -86 | | where -87 | | T: 'b, -88 | | 'b: 'a, +LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) +LL | | where +LL | | T: 'b, +LL | | 'b: 'a, ... | -93 | | }) -94 | | } +LL | | }) +LL | | } | |_^ | = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [ diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr index 3e2cab84b62..bdbde6c4ac0 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr @@ -1,7 +1,7 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn-body-nll-feature.rs:31:5 | -31 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr index cbfd2d412ef..21ca9e38103 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr @@ -1,13 +1,13 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn-body.rs:30:5 | -30 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn-body.rs:30:5 | -30 | outlives(cell, t) +LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr index cf97c835013..9fe074a299d 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr @@ -1,19 +1,19 @@ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn.rs:22:5 | -22 | x +LL | x | ^ warning: not reporting region error due to -Znll --> $DIR/ty-param-fn.rs:38:5 | -38 | x +LL | x | ^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn.rs:22:5 | -22 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: 'a`... @@ -21,7 +21,7 @@ error[E0309]: the parameter type `T` may not live long enough error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn.rs:38:5 | -38 | x +LL | x | ^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/no-patterns-in-args.stderr b/src/test/ui/no-patterns-in-args.stderr index bbf8e3b8a47..e0e5ed07ef2 100644 --- a/src/test/ui/no-patterns-in-args.stderr +++ b/src/test/ui/no-patterns-in-args.stderr @@ -1,31 +1,31 @@ error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:12:11 | -12 | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:13:11 | -13 | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:14:11 | -14 | fn f3(arg @ _: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f3(arg @ _: u8); //~ ERROR patterns aren't allowed in foreign function declarations | ^^^^^^^ pattern not allowed in foreign function error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:20:14 | -20 | type A1 = fn(mut arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A1 = fn(mut arg: u8); //~ ERROR patterns aren't allowed in function pointer types | ^^^^^^^ error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:21:14 | -21 | type A2 = fn(&arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A2 = fn(&arg: u8); //~ ERROR patterns aren't allowed in function pointer types | ^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/non-constant-expr-for-arr-len.stderr b/src/test/ui/non-constant-expr-for-arr-len.stderr index a3c3be65406..6e9bafa5a4c 100644 --- a/src/test/ui/non-constant-expr-for-arr-len.stderr +++ b/src/test/ui/non-constant-expr-for-arr-len.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/non-constant-expr-for-arr-len.rs:15:22 | -15 | let _x = [0; n]; +LL | let _x = [0; n]; | ^ non-constant value error: aborting due to previous error diff --git a/src/test/ui/non-exhaustive-pattern-witness.stderr b/src/test/ui/non-exhaustive-pattern-witness.stderr index f2d8737b5c0..74bf0e256e3 100644 --- a/src/test/ui/non-exhaustive-pattern-witness.stderr +++ b/src/test/ui/non-exhaustive-pattern-witness.stderr @@ -1,43 +1,43 @@ error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered --> $DIR/non-exhaustive-pattern-witness.rs:20:11 | -20 | match (Foo { first: true, second: None }) { +LL | match (Foo { first: true, second: None }) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered error[E0004]: non-exhaustive patterns: `Red` not covered --> $DIR/non-exhaustive-pattern-witness.rs:36:11 | -36 | match Color::Red { +LL | match Color::Red { | ^^^^^^^^^^ pattern `Red` not covered error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered --> $DIR/non-exhaustive-pattern-witness.rs:48:11 | -48 | match Direction::North { +LL | match Direction::North { | ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered --> $DIR/non-exhaustive-pattern-witness.rs:59:11 | -59 | match ExcessiveEnum::First { +LL | match ExcessiveEnum::First { | ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered --> $DIR/non-exhaustive-pattern-witness.rs:67:11 | -67 | match Color::Red { +LL | match Color::Red { | ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered --> $DIR/non-exhaustive-pattern-witness.rs:83:11 | -83 | match *x { +LL | match *x { | ^^ pattern `[Second(true), Second(false)]` not covered error[E0004]: non-exhaustive patterns: `((), false)` not covered --> $DIR/non-exhaustive-pattern-witness.rs:96:11 | -96 | match ((), false) { +LL | match ((), false) { | ^^^^^^^^^^^ pattern `((), false)` not covered error: aborting due to 7 previous errors diff --git a/src/test/ui/non_modrs_mods/non_modrs_mods.stderr b/src/test/ui/non_modrs_mods/non_modrs_mods.stderr index 5ea7e9806d1..d4ca6f53feb 100644 --- a/src/test/ui/non_modrs_mods/non_modrs_mods.stderr +++ b/src/test/ui/non_modrs_mods/non_modrs_mods.stderr @@ -1,7 +1,7 @@ error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/modrs_mod/inner_foors_mod.rs:11:9 | -11 | pub mod innest; +LL | pub mod innest; | ^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -10,7 +10,7 @@ error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod.rs:13:9 | -13 | pub mod inner_modrs_mod; +LL | pub mod inner_modrs_mod; | ^^^^^^^^^^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -19,7 +19,7 @@ error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod.rs:14:9 | -14 | pub mod inner_foors_mod; +LL | pub mod inner_foors_mod; | ^^^^^^^^^^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable @@ -28,7 +28,7 @@ error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) error[E0658]: mod statements in non-mod.rs files are unstable (see issue #44660) --> $DIR/foors_mod/inner_foors_mod.rs:11:9 | -11 | pub mod innest; +LL | pub mod innest; | ^^^^^^ | = help: add #![feature(non_modrs_mods)] to the crate attributes to enable diff --git a/src/test/ui/not-enough-arguments.stderr b/src/test/ui/not-enough-arguments.stderr index 03be5762228..a39070cef1f 100644 --- a/src/test/ui/not-enough-arguments.stderr +++ b/src/test/ui/not-enough-arguments.stderr @@ -1,10 +1,10 @@ error[E0061]: this function takes 4 parameters but 3 parameters were supplied --> $DIR/not-enough-arguments.rs:20:3 | -15 | fn foo(a: isize, b: isize, c: isize, d:isize) { +LL | fn foo(a: isize, b: isize, c: isize, d:isize) { | --------------------------------------------- defined here ... -20 | foo(1, 2, 3); +LL | foo(1, 2, 3); | ^^^^^^^^^^^^ expected 4 parameters error: aborting due to previous error diff --git a/src/test/ui/numeric-fields.stderr b/src/test/ui/numeric-fields.stderr index 5cb2c0d7427..bed94e8f09a 100644 --- a/src/test/ui/numeric-fields.stderr +++ b/src/test/ui/numeric-fields.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `S` has no field named `0b1` --> $DIR/numeric-fields.rs:14:15 | -14 | let s = S{0b1: 10, 0: 11}; +LL | let s = S{0b1: 10, 0: 11}; | ^^^ `S` does not have this field | = note: available fields are: `0`, `1` @@ -9,7 +9,7 @@ error[E0560]: struct `S` has no field named `0b1` error[E0026]: struct `S` does not have a field named `0x1` --> $DIR/numeric-fields.rs:17:17 | -17 | S{0: a, 0x1: b, ..} => {} +LL | S{0: a, 0x1: b, ..} => {} | ^^^^^^ struct `S` does not have field `0x1` error: aborting due to 2 previous errors diff --git a/src/test/ui/object-safety-associated-consts.stderr b/src/test/ui/object-safety-associated-consts.stderr index ef1ba758eec..71a2a499267 100644 --- a/src/test/ui/object-safety-associated-consts.stderr +++ b/src/test/ui/object-safety-associated-consts.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-associated-consts.rs:19:1 | -19 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: the trait cannot contain associated consts like `X` diff --git a/src/test/ui/object-safety-generics.stderr b/src/test/ui/object-safety-generics.stderr index 168ba2c0887..e10a2c6b124 100644 --- a/src/test/ui/object-safety-generics.stderr +++ b/src/test/ui/object-safety-generics.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-generics.rs:24:1 | -24 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` has generic type parameters @@ -9,7 +9,7 @@ error[E0038]: the trait `Bar` cannot be made into an object error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-generics.rs:29:1 | -29 | fn make_bar_explicit(t: &T) -> &Bar { +LL | fn make_bar_explicit(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` has generic type parameters diff --git a/src/test/ui/object-safety-mentions-Self.stderr b/src/test/ui/object-safety-mentions-Self.stderr index 9f90ce2e377..a1690d60ff2 100644 --- a/src/test/ui/object-safety-mentions-Self.stderr +++ b/src/test/ui/object-safety-mentions-Self.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-mentions-Self.rs:27:1 | -27 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: method `bar` references the `Self` type in its arguments or return type @@ -9,7 +9,7 @@ error[E0038]: the trait `Bar` cannot be made into an object error[E0038]: the trait `Baz` cannot be made into an object --> $DIR/object-safety-mentions-Self.rs:32:1 | -32 | fn make_baz(t: &T) -> &Baz { +LL | fn make_baz(t: &T) -> &Baz { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Baz` cannot be made into an object | = note: method `bar` references the `Self` type in its arguments or return type diff --git a/src/test/ui/object-safety-sized.stderr b/src/test/ui/object-safety-sized.stderr index e6d78e1c043..994dd943c76 100644 --- a/src/test/ui/object-safety-sized.stderr +++ b/src/test/ui/object-safety-sized.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/object-safety-sized.rs:18:1 | -18 | fn make_bar(t: &T) -> &Bar { +LL | fn make_bar(t: &T) -> &Bar { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/object-safety-supertrait-mentions-Self.stderr b/src/test/ui/object-safety-supertrait-mentions-Self.stderr index e67da8a3f88..d2ca35ced9d 100644 --- a/src/test/ui/object-safety-supertrait-mentions-Self.stderr +++ b/src/test/ui/object-safety-supertrait-mentions-Self.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Baz` cannot be made into an object --> $DIR/object-safety-supertrait-mentions-Self.rs:25:31 | -25 | fn make_baz(t: &T) -> &Baz { +LL | fn make_baz(t: &T) -> &Baz { | ^^^ the trait `Baz` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses diff --git a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr index aa0af840d1a..4a312d745f6 100644 --- a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr +++ b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr @@ -1,7 +1,7 @@ error: `impl Trait for .. {}` is an obsolete syntax --> $DIR/obsolete-syntax-impl-for-dotdot.rs:17:1 | -17 | impl Trait2 for .. {} //~ ERROR `impl Trait for .. {}` is an obsolete syntax +LL | impl Trait2 for .. {} //~ ERROR `impl Trait for .. {}` is an obsolete syntax | ^^^^^^^^^^^^^^^^^^^^^ | = help: use `auto trait Trait {}` instead diff --git a/src/test/ui/on-unimplemented/bad-annotation.stderr b/src/test/ui/on-unimplemented/bad-annotation.stderr index 449fd408dd7..ce4dcfb906d 100644 --- a/src/test/ui/on-unimplemented/bad-annotation.stderr +++ b/src/test/ui/on-unimplemented/bad-annotation.stderr @@ -1,7 +1,7 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value --> $DIR/bad-annotation.rs:26:1 | -26 | #[rustc_on_unimplemented] //~ ERROR `#[rustc_on_unimplemented]` requires a value +LL | #[rustc_on_unimplemented] //~ ERROR `#[rustc_on_unimplemented]` requires a value | ^^^^^^^^^^^^^^^^^^^^^^^^^ value required here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -9,19 +9,19 @@ error[E0232]: `#[rustc_on_unimplemented]` requires a value error[E0230]: there is no type parameter C on trait BadAnnotation2 --> $DIR/bad-annotation.rs:30:1 | -30 | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"] +LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0231]: only named substitution parameters are allowed --> $DIR/bad-annotation.rs:35:1 | -35 | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"] +LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:40:26 | -40 | #[rustc_on_unimplemented(lorem="")] +LL | #[rustc_on_unimplemented(lorem="")] | ^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -29,7 +29,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:44:26 | -44 | #[rustc_on_unimplemented(lorem(ipsum(dolor)))] +LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))] | ^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -37,7 +37,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:48:39 | -48 | #[rustc_on_unimplemented(message="x", message="y")] +LL | #[rustc_on_unimplemented(message="x", message="y")] | ^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -45,7 +45,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:52:39 | -52 | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))] +LL | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -53,13 +53,13 @@ error[E0232]: this attribute must have a valid value error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]` --> $DIR/bad-annotation.rs:56:26 | -56 | #[rustc_on_unimplemented(on(), message="y")] +LL | #[rustc_on_unimplemented(on(), message="y")] | ^^^^ empty on-clause here error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:60:26 | -60 | #[rustc_on_unimplemented(on="x", message="y")] +LL | #[rustc_on_unimplemented(on="x", message="y")] | ^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` @@ -67,7 +67,7 @@ error[E0232]: this attribute must have a valid value error[E0232]: this attribute must have a valid value --> $DIR/bad-annotation.rs:67:40 | -67 | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")] +LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here | = note: eg `#[rustc_on_unimplemented = "foo"]` diff --git a/src/test/ui/on-unimplemented/multiple-impls.stderr b/src/test/ui/on-unimplemented/multiple-impls.stderr index efe73dc3b76..ca072387588 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.stderr +++ b/src/test/ui/on-unimplemented/multiple-impls.stderr @@ -1,20 +1,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/multiple-impls.rs:43:5 | -43 | Index::index(&[] as &[i32], 2u32); +LL | Index::index(&[] as &[i32], 2u32); | ^^^^^^^^^^^^ trait message | = help: the trait `Index` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/multiple-impls.rs:43:5 | -43 | Index::index(&[] as &[i32], 2u32); +LL | Index::index(&[] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait message | = help: the trait `Index` is not implemented for `[i32]` @@ -22,20 +22,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:46:5 | -46 | Index::index(&[] as &[i32], Foo(2u32)); +LL | Index::index(&[] as &[i32], Foo(2u32)); | ^^^^^^^^^^^^ on impl for Foo | = help: the trait `Index>` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:46:5 | -46 | Index::index(&[] as &[i32], Foo(2u32)); +LL | Index::index(&[] as &[i32], Foo(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Foo | = help: the trait `Index>` is not implemented for `[i32]` @@ -43,20 +43,20 @@ error[E0277]: the trait bound `[i32]: Index>` is not satisfied error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:49:5 | -49 | Index::index(&[] as &[i32], Bar(2u32)); +LL | Index::index(&[] as &[i32], Bar(2u32)); | ^^^^^^^^^^^^ on impl for Bar | = help: the trait `Index>` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/multiple-impls.rs:22:5 | -22 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied --> $DIR/multiple-impls.rs:49:5 | -49 | Index::index(&[] as &[i32], Bar(2u32)); +LL | Index::index(&[] as &[i32], Bar(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Bar | = help: the trait `Index>` is not implemented for `[i32]` diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr index 44b80b2c93b..dfb7b576c5a 100644 --- a/src/test/ui/on-unimplemented/no-debug.stderr +++ b/src/test/ui/on-unimplemented/no-debug.stderr @@ -1,7 +1,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Debug` --> $DIR/no-debug.rs:20:27 | -20 | println!("{:?} {:?}", Foo, Bar); +LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `Foo` cannot be formatted using `:?`; add `#[derive(Debug)]` or manually implement `std::fmt::Debug` | = help: the trait `std::fmt::Debug` is not implemented for `Foo` @@ -10,7 +10,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Debug` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` --> $DIR/no-debug.rs:20:32 | -20 | println!("{:?} {:?}", Foo, Bar); +LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted using `:?` because it doesn't implement `std::fmt::Debug` | = help: the trait `std::fmt::Debug` is not implemented for `no_debug::Bar` @@ -19,7 +19,7 @@ error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` error[E0277]: `Foo` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:21:23 | -21 | println!("{} {}", Foo, Bar); +LL | println!("{} {}", Foo, Bar); | ^^^ `Foo` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string | = help: the trait `std::fmt::Display` is not implemented for `Foo` @@ -28,7 +28,7 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Display` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:21:28 | -21 | println!("{} {}", Foo, Bar); +LL | println!("{} {}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string | = help: the trait `std::fmt::Display` is not implemented for `no_debug::Bar` diff --git a/src/test/ui/on-unimplemented/on-impl.stderr b/src/test/ui/on-unimplemented/on-impl.stderr index 8925dc5d064..6f9868d4cda 100644 --- a/src/test/ui/on-unimplemented/on-impl.stderr +++ b/src/test/ui/on-unimplemented/on-impl.stderr @@ -1,20 +1,20 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/on-impl.rs:32:5 | -32 | Index::::index(&[1, 2, 3] as &[i32], 2u32); +LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice | = help: the trait `Index` is not implemented for `[i32]` note: required by `Index::index` --> $DIR/on-impl.rs:19:5 | -19 | fn index(&self, index: Idx) -> &Self::Output; +LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied --> $DIR/on-impl.rs:32:5 | -32 | Index::::index(&[1, 2, 3] as &[i32], 2u32); +LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice | = help: the trait `Index` is not implemented for `[i32]` diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index d55b2b592c2..8708f146186 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -1,27 +1,27 @@ error[E0277]: the trait bound `std::option::Option>: MyFromIterator<&u8>` is not satisfied --> $DIR/on-trait.rs:37:30 | -37 | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() +LL | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() | ^^^^^^^ a collection of type `std::option::Option>` cannot be built from an iterator over elements of type `&u8` | = help: the trait `MyFromIterator<&u8>` is not implemented for `std::option::Option>` note: required by `collect` --> $DIR/on-trait.rs:31:1 | -31 | fn collect, B: MyFromIterator>(it: I) -> B { +LL | fn collect, B: MyFromIterator>(it: I) -> B { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::string::String: Bar::Foo` is not satisfied --> $DIR/on-trait.rs:40:21 | -40 | let x: String = foobar(); //~ ERROR +LL | let x: String = foobar(); //~ ERROR | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` | = help: the trait `Bar::Foo` is not implemented for `std::string::String` note: required by `foobar` --> $DIR/on-trait.rs:21:1 | -21 | fn foobar>() -> T { +LL | fn foobar>() -> T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index 5d0d3c380d9..5e507b3aa9c 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[i32]>` is not satisfied --> $DIR/slice-index.rs:21:5 | -21 | x[1i32]; //~ ERROR E0277 +LL | x[1i32]; //~ ERROR E0277 | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[i32]>` is not satisf error[E0277]: the trait bound `std::ops::RangeTo: std::slice::SliceIndex<[i32]>` is not satisfied --> $DIR/slice-index.rs:22:5 | -22 | x[..1i32]; //~ ERROR E0277 +LL | x[..1i32]; //~ ERROR E0277 | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo` diff --git a/src/test/ui/param-bounds-ignored.stderr b/src/test/ui/param-bounds-ignored.stderr index 19aa9c5d6e5..fe5986448fa 100644 --- a/src/test/ui/param-bounds-ignored.stderr +++ b/src/test/ui/param-bounds-ignored.stderr @@ -1,18 +1,18 @@ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:15:1 | -15 | type SVec = Vec; +LL | type SVec = Vec; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:16:1 | -16 | type VVec<'b, 'a: 'b> = Vec<&'a i32>; +LL | type VVec<'b, 'a: 'b> = Vec<&'a i32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning[E0122]: generic bounds are ignored in type aliases --> $DIR/param-bounds-ignored.rs:17:1 | -17 | type WVec<'b, T: 'b> = Vec; +LL | type WVec<'b, T: 'b> = Vec; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index 36165269f86..ff03c7efa50 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `&T: std::cmp::PartialEq` is not satisfied --> $DIR/partialeq_help.rs:12:7 | -12 | a == b; //~ ERROR E0277 +LL | a == b; //~ ERROR E0277 | ^^ can't compare `&T` with `T` | = help: the trait `std::cmp::PartialEq` is not implemented for `&T` diff --git a/src/test/ui/pat-slice-old-style.stderr b/src/test/ui/pat-slice-old-style.stderr index cfc0aa3da75..0fbd9b8e209 100644 --- a/src/test/ui/pat-slice-old-style.stderr +++ b/src/test/ui/pat-slice-old-style.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/pat-slice-old-style.rs:19:9 | -19 | [a, b..] => {}, +LL | [a, b..] => {}, | ^^^^^^^^ help: consider using a reference: `&[a, b..]` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/path-lookahead.stderr b/src/test/ui/path-lookahead.stderr index 059312b2851..89df5e894aa 100644 --- a/src/test/ui/path-lookahead.stderr +++ b/src/test/ui/path-lookahead.stderr @@ -1,32 +1,32 @@ warning: unnecessary parentheses around `return` value --> $DIR/path-lookahead.rs:18:10 | -18 | return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value +LL | return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses | note: lint level defined here --> $DIR/path-lookahead.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_parens)] implied by #[warn(unused)] warning: function is never used: `with_parens` --> $DIR/path-lookahead.rs:17:1 | -17 | fn with_parens(arg: T) -> String { //~WARN function is never used: `with_parens` +LL | fn with_parens(arg: T) -> String { //~WARN function is never used: `with_parens` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/path-lookahead.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] warning: function is never used: `no_parens` --> $DIR/path-lookahead.rs:21:1 | -21 | fn no_parens(arg: T) -> String { //~WARN function is never used: `no_parens` +LL | fn no_parens(arg: T) -> String { //~WARN function is never used: `no_parens` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/pub/pub-restricted-error-fn.stderr b/src/test/ui/pub/pub-restricted-error-fn.stderr index 9cfc3968ab1..aa8b0eaf79f 100644 --- a/src/test/ui/pub/pub-restricted-error-fn.stderr +++ b/src/test/ui/pub/pub-restricted-error-fn.stderr @@ -1,7 +1,7 @@ error: unmatched visibility `pub` --> $DIR/pub-restricted-error-fn.rs:13:10 | -13 | pub(crate) () fn foo() {} //~ unmatched visibility +LL | pub(crate) () fn foo() {} //~ unmatched visibility | ^ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-error.stderr b/src/test/ui/pub/pub-restricted-error.stderr index 1bdb47d97d2..e40cd58f87a 100644 --- a/src/test/ui/pub/pub-restricted-error.stderr +++ b/src/test/ui/pub/pub-restricted-error.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `(` --> $DIR/pub-restricted-error.rs:16:16 | -16 | pub(crate) () foo: usize, //~ ERROR expected identifier +LL | pub(crate) () foo: usize, //~ ERROR expected identifier | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-non-path.stderr b/src/test/ui/pub/pub-restricted-non-path.stderr index e5b13218de1..fc3ca7e93df 100644 --- a/src/test/ui/pub/pub-restricted-non-path.stderr +++ b/src/test/ui/pub/pub-restricted-non-path.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `.` --> $DIR/pub-restricted-non-path.rs:13:6 | -13 | pub (.) fn afn() {} //~ ERROR expected identifier +LL | pub (.) fn afn() {} //~ ERROR expected identifier | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted.stderr b/src/test/ui/pub/pub-restricted.stderr index 0bedcddc0b4..7005088965d 100644 --- a/src/test/ui/pub/pub-restricted.stderr +++ b/src/test/ui/pub/pub-restricted.stderr @@ -1,7 +1,7 @@ error: incorrect visibility restriction --> $DIR/pub-restricted.rs:15:6 | -15 | pub (a) fn afn() {} //~ incorrect visibility restriction +LL | pub (a) fn afn() {} //~ incorrect visibility restriction | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -12,7 +12,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:16:6 | -16 | pub (b) fn bfn() {} //~ incorrect visibility restriction +LL | pub (b) fn bfn() {} //~ incorrect visibility restriction | ^ help: make this visible only to module `b` with `in`: `in b` | = help: some possible visibility restrictions are: @@ -23,7 +23,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:32:14 | -32 | pub (a) invalid: usize, //~ incorrect visibility restriction +LL | pub (a) invalid: usize, //~ incorrect visibility restriction | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -34,7 +34,7 @@ error: incorrect visibility restriction error: incorrect visibility restriction --> $DIR/pub-restricted.rs:41:6 | -41 | pub (xyz) fn xyz() {} //~ incorrect visibility restriction +LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction | ^^^ help: make this visible only to module `xyz` with `in`: `in xyz` | = help: some possible visibility restrictions are: @@ -45,7 +45,7 @@ error: incorrect visibility restriction error: visibilities can only be restricted to ancestor modules --> $DIR/pub-restricted.rs:33:17 | -33 | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted +LL | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/qualified-path-params-2.stderr b/src/test/ui/qualified-path-params-2.stderr index 96c5f151346..471e6f4fa5d 100644 --- a/src/test/ui/qualified-path-params-2.stderr +++ b/src/test/ui/qualified-path-params-2.stderr @@ -1,13 +1,13 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/qualified-path-params-2.rs:28:26 | -28 | type A = ::A::f; +LL | type A = ::A::f; | ^^ type parameter not allowed error[E0223]: ambiguous associated type --> $DIR/qualified-path-params-2.rs:28:10 | -28 | type A = ::A::f; +LL | type A = ::A::f; | ^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `<::A as Trait>::f` diff --git a/src/test/ui/reachable/expr_add.stderr b/src/test/ui/reachable/expr_add.stderr index 4ae286d2fff..d3e1da0e718 100644 --- a/src/test/ui/reachable/expr_add.stderr +++ b/src/test/ui/reachable/expr_add.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_add.rs:27:13 | -27 | let x = Foo + return; //~ ERROR unreachable +LL | let x = Foo + return; //~ ERROR unreachable | ^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_add.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_again.stderr b/src/test/ui/reachable/expr_again.stderr index 152c96e52b6..65c0c588329 100644 --- a/src/test/ui/reachable/expr_again.stderr +++ b/src/test/ui/reachable/expr_again.stderr @@ -1,13 +1,13 @@ error: unreachable statement --> $DIR/expr_again.rs:18:9 | -18 | println!("hi"); +LL | println!("hi"); | ^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_again.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_array.stderr b/src/test/ui/reachable/expr_array.stderr index 0f64d158503..3257514ea50 100644 --- a/src/test/ui/reachable/expr_array.stderr +++ b/src/test/ui/reachable/expr_array.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_array.rs:20:34 | -20 | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_array.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_array.rs:25:25 | -25 | let x: [usize; 2] = [22, return]; //~ ERROR unreachable +LL | let x: [usize; 2] = [22, return]; //~ ERROR unreachable | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_assign.stderr b/src/test/ui/reachable/expr_assign.stderr index 42c00d5a8b7..15dcf2c2401 100644 --- a/src/test/ui/reachable/expr_assign.stderr +++ b/src/test/ui/reachable/expr_assign.stderr @@ -1,25 +1,25 @@ error: unreachable expression --> $DIR/expr_assign.rs:20:5 | -20 | x = return; //~ ERROR unreachable +LL | x = return; //~ ERROR unreachable | ^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_assign.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_assign.rs:30:14 | -30 | *p = return; //~ ERROR unreachable +LL | *p = return; //~ ERROR unreachable | ^^^^^^ error: unreachable expression --> $DIR/expr_assign.rs:36:15 | -36 | *{return; &mut i} = 22; //~ ERROR unreachable +LL | *{return; &mut i} = 22; //~ ERROR unreachable | ^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index 4c08be524f2..a0cef6449f7 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_block.rs:21:9 | -21 | 22 //~ ERROR unreachable +LL | 22 //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_block.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement --> $DIR/expr_block.rs:36:9 | -36 | println!("foo"); +LL | println!("foo"); | ^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_box.stderr b/src/test/ui/reachable/expr_box.stderr index d8b5d9f8d76..08b916030dd 100644 --- a/src/test/ui/reachable/expr_box.stderr +++ b/src/test/ui/reachable/expr_box.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_box.rs:16:13 | -16 | let x = box return; //~ ERROR unreachable +LL | let x = box return; //~ ERROR unreachable | ^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_box.rs:13:9 | -13 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_call.stderr b/src/test/ui/reachable/expr_call.stderr index eaafe8dc5d5..455e5ab3653 100644 --- a/src/test/ui/reachable/expr_call.stderr +++ b/src/test/ui/reachable/expr_call.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_call.rs:23:17 | -23 | foo(return, 22); //~ ERROR unreachable +LL | foo(return, 22); //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_call.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_call.rs:28:5 | -28 | bar(return); //~ ERROR unreachable +LL | bar(return); //~ ERROR unreachable | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_cast.stderr b/src/test/ui/reachable/expr_cast.stderr index d6fb37768c5..8c37759aa46 100644 --- a/src/test/ui/reachable/expr_cast.stderr +++ b/src/test/ui/reachable/expr_cast.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_cast.rs:20:13 | -20 | let x = {return} as !; //~ ERROR unreachable +LL | let x = {return} as !; //~ ERROR unreachable | ^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_cast.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index b8f3f494c5c..c14cdbfc2bc 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -1,13 +1,13 @@ error: unreachable statement --> $DIR/expr_if.rs:38:5 | -38 | println!("But I am."); +LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_if.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_loop.stderr b/src/test/ui/reachable/expr_loop.stderr index ce4b30c7984..7f834567de3 100644 --- a/src/test/ui/reachable/expr_loop.stderr +++ b/src/test/ui/reachable/expr_loop.stderr @@ -1,20 +1,20 @@ error: unreachable statement --> $DIR/expr_loop.rs:19:5 | -19 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_loop.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:31:5 | -31 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -22,7 +22,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_loop.rs:41:5 | -41 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_match.stderr b/src/test/ui/reachable/expr_match.stderr index 499beac644c..d4cf21cef28 100644 --- a/src/test/ui/reachable/expr_match.stderr +++ b/src/test/ui/reachable/expr_match.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_match.rs:20:5 | -20 | match {return} { } //~ ERROR unreachable +LL | match {return} { } //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_match.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement --> $DIR/expr_match.rs:25:5 | -25 | println!("I am dead"); +LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -21,7 +21,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_match.rs:35:5 | -35 | println!("I am dead"); +LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/reachable/expr_method.stderr b/src/test/ui/reachable/expr_method.stderr index db9d5c3d22c..b9348b5d481 100644 --- a/src/test/ui/reachable/expr_method.stderr +++ b/src/test/ui/reachable/expr_method.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_method.rs:26:21 | -26 | Foo.foo(return, 22); //~ ERROR unreachable +LL | Foo.foo(return, 22); //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_method.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_method.rs:31:5 | -31 | Foo.bar(return); //~ ERROR unreachable +LL | Foo.bar(return); //~ ERROR unreachable | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_repeat.stderr b/src/test/ui/reachable/expr_repeat.stderr index 54b29b616f3..90cc3183c72 100644 --- a/src/test/ui/reachable/expr_repeat.stderr +++ b/src/test/ui/reachable/expr_repeat.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_repeat.rs:20:25 | -20 | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_repeat.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_return.stderr b/src/test/ui/reachable/expr_return.stderr index a96def6011e..3876da6541d 100644 --- a/src/test/ui/reachable/expr_return.stderr +++ b/src/test/ui/reachable/expr_return.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_return.rs:21:22 | -21 | let x = {return {return {return;}}}; //~ ERROR unreachable +LL | let x = {return {return {return;}}}; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_return.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_struct.stderr b/src/test/ui/reachable/expr_struct.stderr index b2cb1ef19cf..43985bbbb5c 100644 --- a/src/test/ui/reachable/expr_struct.stderr +++ b/src/test/ui/reachable/expr_struct.stderr @@ -1,31 +1,31 @@ error: unreachable expression --> $DIR/expr_struct.rs:25:13 | -25 | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_struct.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_struct.rs:30:33 | -30 | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable | ^^ error: unreachable expression --> $DIR/expr_struct.rs:35:39 | -35 | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable | ^^^^^^ error: unreachable expression --> $DIR/expr_struct.rs:40:13 | -40 | let x = Foo { a: 22, b: return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/reachable/expr_tup.stderr b/src/test/ui/reachable/expr_tup.stderr index af43162a984..ff9aa666d8e 100644 --- a/src/test/ui/reachable/expr_tup.stderr +++ b/src/test/ui/reachable/expr_tup.stderr @@ -1,19 +1,19 @@ error: unreachable expression --> $DIR/expr_tup.rs:20:38 | -20 | let x: (usize, usize) = (return, 2); //~ ERROR unreachable +LL | let x: (usize, usize) = (return, 2); //~ ERROR unreachable | ^ | note: lint level defined here --> $DIR/expr_tup.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression --> $DIR/expr_tup.rs:25:29 | -25 | let x: (usize, usize) = (2, return); //~ ERROR unreachable +LL | let x: (usize, usize) = (2, return); //~ ERROR unreachable | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_type.stderr b/src/test/ui/reachable/expr_type.stderr index d6bcb4ec80f..d6b9f75edf1 100644 --- a/src/test/ui/reachable/expr_type.stderr +++ b/src/test/ui/reachable/expr_type.stderr @@ -1,13 +1,13 @@ error: unreachable expression --> $DIR/expr_type.rs:20:13 | -20 | let x = {return}: !; //~ ERROR unreachable +LL | let x = {return}: !; //~ ERROR unreachable | ^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_type.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_unary.stderr b/src/test/ui/reachable/expr_unary.stderr index a8e90d6e645..beb0f556292 100644 --- a/src/test/ui/reachable/expr_unary.stderr +++ b/src/test/ui/reachable/expr_unary.stderr @@ -1,25 +1,25 @@ error: unreachable expression --> $DIR/expr_unary.rs:19:28 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_unary.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: cannot coerce `{integer}` to ! --> $DIR/expr_unary.rs:19:28 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^ | note: lint level defined here --> $DIR/expr_unary.rs:15:9 | -15 | #![deny(coerce_never)] +LL | #![deny(coerce_never)] | ^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46325 @@ -27,7 +27,7 @@ note: lint level defined here error[E0600]: cannot apply unary operator `!` to type `!` --> $DIR/expr_unary.rs:19:16 | -19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable +LL | let x: ! = ! { return; 22 }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_while.stderr b/src/test/ui/reachable/expr_while.stderr index 36109826983..cd093906615 100644 --- a/src/test/ui/reachable/expr_while.stderr +++ b/src/test/ui/reachable/expr_while.stderr @@ -1,20 +1,20 @@ error: unreachable statement --> $DIR/expr_while.rs:19:9 | -19 | println!("Hello, world!"); +LL | println!("Hello, world!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/expr_while.rs:14:9 | -14 | #![deny(unreachable_code)] +LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: unreachable statement --> $DIR/expr_while.rs:33:9 | -33 | println!("I am dead."); +LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -22,7 +22,7 @@ error: unreachable statement error: unreachable statement --> $DIR/expr_while.rs:35:5 | -35 | println!("I am, too."); +LL | println!("I am, too."); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/recursive-requirements.stderr b/src/test/ui/recursive-requirements.stderr index 3846915fb7a..2f5945d9fe4 100644 --- a/src/test/ui/recursive-requirements.stderr +++ b/src/test/ui/recursive-requirements.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `Foo: std::marker::Sync` --> $DIR/recursive-requirements.rs:26:12 | -26 | let _: AssertSync = unimplemented!(); //~ ERROR E0275 +LL | let _: AssertSync = unimplemented!(); //~ ERROR E0275 | ^^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate diff --git a/src/test/ui/region-borrow-params-issue-29793-small.stderr b/src/test/ui/region-borrow-params-issue-29793-small.stderr index af68b0a026b..a342f51e257 100644 --- a/src/test/ui/region-borrow-params-issue-29793-small.stderr +++ b/src/test/ui/region-borrow-params-issue-29793-small.stderr @@ -1,12 +1,12 @@ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:34 | -19 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -23 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -14,12 +14,12 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:45 | -19 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -23 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -27,12 +27,12 @@ error[E0597]: `y` does not live long enough error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:34 | -34 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -38 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -40,12 +40,12 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:45 | -34 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough | | | capture occurs here ... -38 | }; +LL | }; | - borrowed value dropped before borrower | = note: values in a scope are dropped in the opposite order they are created @@ -53,194 +53,194 @@ error[E0597]: `y` does not live long enough 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:65:17 | -65 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | -65 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +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:65:17 | -65 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -65 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +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:76:17 | -76 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | -76 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +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:76:17 | -76 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -76 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) +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:100:21 - | -100 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -100 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:100:21 - | -100 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -100 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:114:21 - | -114 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -114 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:114:21 - | -114 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -114 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:142:21 - | -142 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -142 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:142:21 - | -142 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -142 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:157:21 - | -157 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -157 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:157:21 - | -157 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -157 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:185:21 - | -185 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -185 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:185:21 - | -185 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -185 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:199:21 - | -199 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `x` is borrowed here + | | + | may outlive borrowed value `x` help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -199 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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:199:21 - | -199 | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 + | +LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^ - `y` is borrowed here + | | + | may outlive borrowed value `y` help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -199 | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ + | +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-fn-subtyping-return-static.stderr b/src/test/ui/regions-fn-subtyping-return-static.stderr index ac7763744c6..6a7cd6f0236 100644 --- a/src/test/ui/regions-fn-subtyping-return-static.stderr +++ b/src/test/ui/regions-fn-subtyping-return-static.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static.rs:51:12 | -51 | want_F(bar); //~ ERROR E0308 +LL | want_F(bar); //~ ERROR E0308 | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` diff --git a/src/test/ui/regions-nested-fns-2.stderr b/src/test/ui/regions-nested-fns-2.stderr index 244338dbb46..16bec5ee218 100644 --- a/src/test/ui/regions-nested-fns-2.stderr +++ b/src/test/ui/regions-nested-fns-2.stderr @@ -1,14 +1,14 @@ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function --> $DIR/regions-nested-fns-2.rs:16:9 | -16 | |z| { +LL | |z| { | ^^^ may outlive borrowed value `y` -17 | //~^ ERROR E0373 -18 | if false { &y } else { z } +LL | //~^ ERROR E0373 +LL | if false { &y } else { z } | - `y` is borrowed here help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | -16 | move |z| { +LL | move |z| { | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/resolve-conflict-item-vs-import.stderr b/src/test/ui/resolve-conflict-item-vs-import.stderr index 35d31abc5c5..73e3e961137 100644 --- a/src/test/ui/resolve-conflict-item-vs-import.stderr +++ b/src/test/ui/resolve-conflict-item-vs-import.stderr @@ -1,16 +1,16 @@ error[E0255]: the name `transmute` is defined multiple times --> $DIR/resolve-conflict-item-vs-import.rs:13:1 | -11 | use std::mem::transmute; +LL | use std::mem::transmute; | ------------------- previous import of the value `transmute` here -12 | -13 | fn transmute() {} +LL | +LL | fn transmute() {} | ^^^^^^^^^^^^^^ `transmute` redefined here | = note: `transmute` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::mem::transmute as other_transmute; +LL | use std::mem::transmute as other_transmute; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/resolve-inconsistent-names.stderr b/src/test/ui/resolve-inconsistent-names.stderr index 606234e00b6..c136b79de00 100644 --- a/src/test/ui/resolve-inconsistent-names.stderr +++ b/src/test/ui/resolve-inconsistent-names.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:14:12 | -14 | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns | - ^ pattern doesn't bind `a` | | | variable not in all patterns @@ -9,7 +9,7 @@ error[E0408]: variable `a` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:14:8 | -14 | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns | ^ - variable not in all patterns | | | pattern doesn't bind `b` diff --git a/src/test/ui/resolve/enums-are-namespaced-xc.stderr b/src/test/ui/resolve/enums-are-namespaced-xc.stderr index ee6d22103e1..df65f5ddded 100644 --- a/src/test/ui/resolve/enums-are-namespaced-xc.stderr +++ b/src/test/ui/resolve/enums-are-namespaced-xc.stderr @@ -1,31 +1,31 @@ error[E0425]: cannot find value `A` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:15:31 | -15 | let _ = namespaced_enums::A; +LL | let _ = namespaced_enums::A; | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::A; +LL | use namespaced_enums::Foo::A; | error[E0425]: cannot find function `B` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:17:31 | -17 | let _ = namespaced_enums::B(10); +LL | let _ = namespaced_enums::B(10); | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::B; +LL | use namespaced_enums::Foo::B; | error[E0422]: cannot find struct, variant or union type `C` in module `namespaced_enums` --> $DIR/enums-are-namespaced-xc.rs:19:31 | -19 | let _ = namespaced_enums::C { a: 10 }; +LL | let _ = namespaced_enums::C { a: 10 }; | ^ not found in `namespaced_enums` help: possible candidate is found in another module, you can import it into scope | -14 | use namespaced_enums::Foo::C; +LL | use namespaced_enums::Foo::C; | error: aborting due to 3 previous errors diff --git a/src/test/ui/resolve/issue-14254.stderr b/src/test/ui/resolve/issue-14254.stderr index 1a1cb8b0dd9..226fe36dba3 100644 --- a/src/test/ui/resolve/issue-14254.stderr +++ b/src/test/ui/resolve/issue-14254.stderr @@ -1,146 +1,146 @@ error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:29:9 | -29 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:31:9 | -31 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:38:9 | -38 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:40:9 | -40 | x; +LL | x; | ^ help: try: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:42:9 | -42 | y; +LL | y; | ^ help: try: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:44:9 | -44 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:46:9 | -46 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find value `b` in this scope --> $DIR/issue-14254.rs:48:9 | -48 | b; +LL | b; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:55:9 | -55 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:57:9 | -57 | x; +LL | x; | ^ help: try: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:59:9 | -59 | y; +LL | y; | ^ help: try: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:61:9 | -61 | a; +LL | a; | ^ not found in this scope error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:63:9 | -63 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find value `b` in this scope --> $DIR/issue-14254.rs:65:9 | -65 | b; +LL | b; | ^ not found in this scope error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:72:9 | -72 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:74:9 | -74 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:81:9 | -81 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:83:9 | -83 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:90:9 | -90 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope --> $DIR/issue-14254.rs:92:9 | -92 | bah; +LL | bah; | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope --> $DIR/issue-14254.rs:99:9 | -99 | baz(); +LL | baz(); | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope - --> $DIR/issue-14254.rs:101:9 - | -101 | bah; - | ^^^ help: try: `Self::bah` + --> $DIR/issue-14254.rs:101:9 + | +LL | bah; + | ^^^ help: try: `Self::bah` error[E0425]: cannot find function `baz` in this scope - --> $DIR/issue-14254.rs:108:9 - | -108 | baz(); - | ^^^ help: try: `self.baz` + --> $DIR/issue-14254.rs:108:9 + | +LL | baz(); + | ^^^ help: try: `self.baz` error[E0425]: cannot find value `bah` in this scope - --> $DIR/issue-14254.rs:110:9 - | -110 | bah; - | ^^^ help: try: `Self::bah` + --> $DIR/issue-14254.rs:110:9 + | +LL | bah; + | ^^^ help: try: `Self::bah` error[E0601]: main function not found diff --git a/src/test/ui/resolve/issue-16058.stderr b/src/test/ui/resolve/issue-16058.stderr index a0ccc2a11cf..36c62408de7 100644 --- a/src/test/ui/resolve/issue-16058.stderr +++ b/src/test/ui/resolve/issue-16058.stderr @@ -1,15 +1,15 @@ error[E0574]: expected struct, variant or union type, found enum `Result` --> $DIR/issue-16058.rs:19:9 | -19 | Result { +LL | Result { | ^^^^^^ not a struct, variant or union type help: possible better candidates are found in other modules, you can import them into scope | -12 | use std::fmt::Result; +LL | use std::fmt::Result; | -12 | use std::io::Result; +LL | use std::io::Result; | -12 | use std::thread::Result; +LL | use std::thread::Result; | error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-17518.stderr b/src/test/ui/resolve/issue-17518.stderr index 10e7c9815cc..c5d8f457ec7 100644 --- a/src/test/ui/resolve/issue-17518.stderr +++ b/src/test/ui/resolve/issue-17518.stderr @@ -1,11 +1,11 @@ error[E0422]: cannot find struct, variant or union type `E` in this scope --> $DIR/issue-17518.rs:16:5 | -16 | E { name: "foobar" }; //~ ERROR cannot find struct, variant or union type `E` +LL | E { name: "foobar" }; //~ ERROR cannot find struct, variant or union type `E` | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use SomeEnum::E; +LL | use SomeEnum::E; | error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-18252.stderr b/src/test/ui/resolve/issue-18252.stderr index c26bc052ee1..4ac907b23ec 100644 --- a/src/test/ui/resolve/issue-18252.stderr +++ b/src/test/ui/resolve/issue-18252.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct variant `Foo::Variant` --> $DIR/issue-18252.rs:16:13 | -16 | let f = Foo::Variant(42); +LL | let f = Foo::Variant(42); | ^^^^^^^^^^^^ did you mean `Foo::Variant { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-19452.stderr b/src/test/ui/resolve/issue-19452.stderr index b80d4faefa9..50845755866 100644 --- a/src/test/ui/resolve/issue-19452.stderr +++ b/src/test/ui/resolve/issue-19452.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found struct variant `Homura::Madoka` --> $DIR/issue-19452.rs:19:18 | -19 | let homura = Homura::Madoka; +LL | let homura = Homura::Madoka; | ^^^^^^^^^^^^^^ did you mean `Homura::Madoka { /* fields */ }`? error[E0423]: expected value, found struct variant `issue_19452_aux::Homura::Madoka` --> $DIR/issue-19452.rs:22:18 | -22 | let homura = issue_19452_aux::Homura::Madoka; +LL | let homura = issue_19452_aux::Homura::Madoka; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `issue_19452_aux::Homura::Madoka { /* fields */ }`? error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/issue-21221-1.stderr b/src/test/ui/resolve/issue-21221-1.stderr index cbf924d91b3..8056a47b464 100644 --- a/src/test/ui/resolve/issue-21221-1.stderr +++ b/src/test/ui/resolve/issue-21221-1.stderr @@ -1,48 +1,48 @@ error[E0405]: cannot find trait `Mul` in this scope --> $DIR/issue-21221-1.rs:53:6 | -53 | impl Mul for Foo { +LL | impl Mul for Foo { | ^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -11 | use mul1::Mul; +LL | use mul1::Mul; | -11 | use mul2::Mul; +LL | use mul2::Mul; | -11 | use std::ops::Mul; +LL | use std::ops::Mul; | error[E0412]: cannot find type `Mul` in this scope --> $DIR/issue-21221-1.rs:68:16 | -68 | fn getMul() -> Mul { +LL | fn getMul() -> Mul { | ^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -11 | use mul1::Mul; +LL | use mul1::Mul; | -11 | use mul2::Mul; +LL | use mul2::Mul; | -11 | use mul3::Mul; +LL | use mul3::Mul; | -11 | use mul4::Mul; +LL | use mul4::Mul; | and 2 other candidates error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope --> $DIR/issue-21221-1.rs:73:6 | -73 | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo { +LL | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `Div` in this scope --> $DIR/issue-21221-1.rs:78:6 | -78 | impl Div for Foo { +LL | impl Div for Foo { | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use std::ops::Div; +LL | use std::ops::Div; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-21221-2.stderr b/src/test/ui/resolve/issue-21221-2.stderr index 8a45bd58107..398c85920fd 100644 --- a/src/test/ui/resolve/issue-21221-2.stderr +++ b/src/test/ui/resolve/issue-21221-2.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `T` in this scope --> $DIR/issue-21221-2.rs:28:6 | -28 | impl T for Foo { } +LL | impl T for Foo { } | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -11 | use foo::bar::T; +LL | use foo::bar::T; | error[E0601]: main function not found diff --git a/src/test/ui/resolve/issue-21221-3.stderr b/src/test/ui/resolve/issue-21221-3.stderr index 731d7bcd655..75601e932df 100644 --- a/src/test/ui/resolve/issue-21221-3.stderr +++ b/src/test/ui/resolve/issue-21221-3.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `OuterTrait` in this scope --> $DIR/issue-21221-3.rs:25:6 | -25 | impl OuterTrait for Foo {} +LL | impl OuterTrait for Foo {} | ^^^^^^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -18 | use issue_21221_3::outer::OuterTrait; +LL | use issue_21221_3::outer::OuterTrait; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-21221-4.stderr b/src/test/ui/resolve/issue-21221-4.stderr index 446bd0e258d..10dcf0aa3b9 100644 --- a/src/test/ui/resolve/issue-21221-4.stderr +++ b/src/test/ui/resolve/issue-21221-4.stderr @@ -1,11 +1,11 @@ error[E0405]: cannot find trait `T` in this scope --> $DIR/issue-21221-4.rs:20:6 | -20 | impl T for Foo {} +LL | impl T for Foo {} | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -18 | use issue_21221_4::T; +LL | use issue_21221_4::T; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-23305.stderr b/src/test/ui/resolve/issue-23305.stderr index 2da2044ca95..a9d43aeb742 100644 --- a/src/test/ui/resolve/issue-23305.stderr +++ b/src/test/ui/resolve/issue-23305.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23305.rs:15:12 | -15 | impl ToNbt {} +LL | impl ToNbt {} | ^^^^ cyclic reference | note: the cycle begins when processing ``... --> $DIR/issue-23305.rs:15:1 | -15 | impl ToNbt {} +LL | impl ToNbt {} | ^^^^^^^^^^^^^^^^ = note: ...which then again requires processing ``, completing the cycle. diff --git a/src/test/ui/resolve/issue-2356.stderr b/src/test/ui/resolve/issue-2356.stderr index 5238af220b3..6cf5fdeeb0d 100644 --- a/src/test/ui/resolve/issue-2356.stderr +++ b/src/test/ui/resolve/issue-2356.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:27:5 | -27 | shave(); +LL | shave(); | ^^^^^ not found in this scope error[E0425]: cannot find function `clone` in this scope --> $DIR/issue-2356.rs:34:5 | -34 | clone(); +LL | clone(); | ^^^^^ help: try: `self.clone` error[E0425]: cannot find function `default` in this scope --> $DIR/issue-2356.rs:41:5 | -41 | default(); +LL | default(); | ^^^^^^^ help: try: `Self::default` error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:49:5 | -49 | whiskers -= other; +LL | whiskers -= other; | ^^^^^^^^ | | | `self` value is only available in methods with `self` parameter @@ -28,67 +28,67 @@ error[E0425]: cannot find value `whiskers` in this scope error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:51:5 | -51 | shave(4); +LL | shave(4); | ^^^^^ help: try: `Self::shave` error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:53:5 | -53 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `static_method` in this scope --> $DIR/issue-2356.rs:62:9 | -62 | static_method(); +LL | static_method(); | ^^^^^^^^^^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:64:9 | -64 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:66:9 | -66 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0425]: cannot find function `purr` in this scope --> $DIR/issue-2356.rs:68:9 | -68 | purr(); +LL | purr(); | ^^^^ not found in this scope error[E0424]: expected value, found module `self` --> $DIR/issue-2356.rs:75:8 | -75 | if self.whiskers > 3 { +LL | if self.whiskers > 3 { | ^^^^ `self` value is only available in methods with `self` parameter error[E0425]: cannot find function `grow_older` in this scope --> $DIR/issue-2356.rs:82:5 | -82 | grow_older(); +LL | grow_older(); | ^^^^^^^^^^ not found in this scope error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:84:5 | -84 | shave(); +LL | shave(); | ^^^^^ not found in this scope error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:89:5 | -89 | whiskers = 0; +LL | whiskers = 0; | ^^^^^^^^ help: try: `self.whiskers` error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:94:5 | -94 | whiskers = 4; +LL | whiskers = 4; | ^^^^^^^^ | | | `self` value is only available in methods with `self` parameter @@ -97,14 +97,14 @@ error[E0425]: cannot find value `whiskers` in this scope error[E0425]: cannot find function `purr_louder` in this scope --> $DIR/issue-2356.rs:96:5 | -96 | purr_louder(); +LL | purr_louder(); | ^^^^^^^^^^^ not found in this scope error[E0424]: expected value, found module `self` - --> $DIR/issue-2356.rs:102:5 - | -102 | self += 1; - | ^^^^ `self` value is only available in methods with `self` parameter + --> $DIR/issue-2356.rs:102:5 + | +LL | self += 1; + | ^^^^ `self` value is only available in methods with `self` parameter error: aborting due to 17 previous errors diff --git a/src/test/ui/resolve/issue-24968.stderr b/src/test/ui/resolve/issue-24968.stderr index 2a61cee830b..8aa84f2ed87 100644 --- a/src/test/ui/resolve/issue-24968.stderr +++ b/src/test/ui/resolve/issue-24968.stderr @@ -1,7 +1,7 @@ error[E0411]: cannot find type `Self` in this scope --> $DIR/issue-24968.rs:11:11 | -11 | fn foo(_: Self) { +LL | fn foo(_: Self) { | ^^^^ `Self` is only available in traits and impls error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-33876.stderr b/src/test/ui/resolve/issue-33876.stderr index f47c3fe574e..2742d4af712 100644 --- a/src/test/ui/resolve/issue-33876.stderr +++ b/src/test/ui/resolve/issue-33876.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found trait `Bar` --> $DIR/issue-33876.rs:20:22 | -20 | let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar` +LL | let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar` | ^^^ not a value error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-3907-2.stderr b/src/test/ui/resolve/issue-3907-2.stderr index 796b90dc3fa..7d01cd739e0 100644 --- a/src/test/ui/resolve/issue-3907-2.stderr +++ b/src/test/ui/resolve/issue-3907-2.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `issue_3907::Foo` cannot be made into an object --> $DIR/issue-3907-2.rs:20:1 | -20 | fn bar(_x: Foo) {} +LL | fn bar(_x: Foo) {} | ^^^^^^^^^^^^^^^ the trait `issue_3907::Foo` cannot be made into an object | = note: method `bar` has no receiver diff --git a/src/test/ui/resolve/issue-3907.stderr b/src/test/ui/resolve/issue-3907.stderr index 59134fe714d..80ee2e028eb 100644 --- a/src/test/ui/resolve/issue-3907.stderr +++ b/src/test/ui/resolve/issue-3907.stderr @@ -1,11 +1,11 @@ error[E0404]: expected trait, found type alias `Foo` --> $DIR/issue-3907.rs:20:6 | -20 | impl Foo for S { //~ ERROR expected trait, found type alias `Foo` +LL | impl Foo for S { //~ ERROR expected trait, found type alias `Foo` | ^^^ type aliases cannot be used for traits help: possible better candidate is found in another module, you can import it into scope | -14 | use issue_3907::Foo; +LL | use issue_3907::Foo; | error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/issue-39226.stderr b/src/test/ui/resolve/issue-39226.stderr index f07b6221dfc..4d1e3ae9b10 100644 --- a/src/test/ui/resolve/issue-39226.stderr +++ b/src/test/ui/resolve/issue-39226.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found struct `Handle` --> $DIR/issue-39226.rs:20:17 | -20 | handle: Handle +LL | handle: Handle | ^^^^^^ | | | did you mean `handle`? diff --git a/src/test/ui/resolve/issue-5035-2.stderr b/src/test/ui/resolve/issue-5035-2.stderr index 465b93f47f9..fedb8b607fc 100644 --- a/src/test/ui/resolve/issue-5035-2.stderr +++ b/src/test/ui/resolve/issue-5035-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `I + 'static: std::marker::Sized` is not satisfied --> $DIR/issue-5035-2.rs:14:8 | -14 | fn foo(_x: K) {} //~ ERROR: `I + 'static: std::marker::Sized` is not satisfied +LL | fn foo(_x: K) {} //~ ERROR: `I + 'static: std::marker::Sized` is not satisfied | ^^ `I + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `I + 'static` diff --git a/src/test/ui/resolve/issue-5035.stderr b/src/test/ui/resolve/issue-5035.stderr index fbdc7095ad8..9b3d69d90c0 100644 --- a/src/test/ui/resolve/issue-5035.stderr +++ b/src/test/ui/resolve/issue-5035.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `ImportError` --> $DIR/issue-5035.rs:15:5 | -15 | use ImportError; //~ ERROR unresolved import `ImportError` [E0432] +LL | use ImportError; //~ ERROR unresolved import `ImportError` [E0432] | ^^^^^^^^^^^ no `ImportError` in the root error[E0404]: expected trait, found type alias `K` --> $DIR/issue-5035.rs:13:6 | -13 | impl K for isize {} //~ ERROR expected trait, found type alias `K` +LL | impl K for isize {} //~ ERROR expected trait, found type alias `K` | ^ | | | did you mean `I`? diff --git a/src/test/ui/resolve/issue-6702.stderr b/src/test/ui/resolve/issue-6702.stderr index bdc45734d65..708ff2e5001 100644 --- a/src/test/ui/resolve/issue-6702.stderr +++ b/src/test/ui/resolve/issue-6702.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct `Monster` --> $DIR/issue-6702.rs:17:14 | -17 | let _m = Monster(); //~ ERROR expected function, found struct `Monster` +LL | let _m = Monster(); //~ ERROR expected function, found struct `Monster` | ^^^^^^^ did you mean `Monster { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/resolve/levenshtein.stderr b/src/test/ui/resolve/levenshtein.stderr index 2707c94bc65..1a00395f2de 100644 --- a/src/test/ui/resolve/levenshtein.stderr +++ b/src/test/ui/resolve/levenshtein.stderr @@ -1,49 +1,49 @@ error[E0412]: cannot find type `esize` in this scope --> $DIR/levenshtein.rs:15:11 | -15 | fn foo(c: esize) {} // Misspelled primitive type name. +LL | fn foo(c: esize) {} // Misspelled primitive type name. | ^^^^^ did you mean `isize`? error[E0412]: cannot find type `Baz` in this scope --> $DIR/levenshtein.rs:20:10 | -20 | type A = Baz; // Misspelled type name. +LL | type A = Baz; // Misspelled type name. | ^^^ did you mean `Bar`? error[E0412]: cannot find type `Opiton` in this scope --> $DIR/levenshtein.rs:22:10 | -22 | type B = Opiton; // Misspelled type name from the prelude. +LL | type B = Opiton; // Misspelled type name from the prelude. | ^^^^^^ did you mean `Option`? error[E0412]: cannot find type `Baz` in this scope --> $DIR/levenshtein.rs:26:14 | -26 | type A = Baz; // No suggestion here, Bar is not visible +LL | type A = Baz; // No suggestion here, Bar is not visible | ^^^ not found in this scope error[E0425]: cannot find value `MAXITEM` in this scope --> $DIR/levenshtein.rs:34:20 | -34 | let v = [0u32; MAXITEM]; // Misspelled constant name. +LL | let v = [0u32; MAXITEM]; // Misspelled constant name. | ^^^^^^^ did you mean `MAX_ITEM`? error[E0425]: cannot find function `foobar` in this scope --> $DIR/levenshtein.rs:36:5 | -36 | foobar(); // Misspelled function name. +LL | foobar(); // Misspelled function name. | ^^^^^^ did you mean `foo_bar`? error[E0412]: cannot find type `first` in module `m` --> $DIR/levenshtein.rs:38:15 | -38 | let b: m::first = m::second; // Misspelled item in module. +LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^ did you mean `First`? error[E0425]: cannot find value `second` in module `m` --> $DIR/levenshtein.rs:38:26 | -38 | let b: m::first = m::second; // Misspelled item in module. +LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^^ did you mean `Second`? error: aborting due to 8 previous errors diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 6fd2de502a8..aefdc9b9fe1 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/name-clash-nullary.rs:12:7 | -12 | let None: isize = 42; //~ ERROR mismatched types +LL | let None: isize = 42; //~ ERROR mismatched types | ^^^^ expected isize, found enum `std::option::Option` | = note: expected type `isize` diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index 8a02a0e85f1..7af2f5931dc 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found enum `n::Z` --> $DIR/privacy-enum-ctor.rs:33:9 | -33 | n::Z; +LL | n::Z; | ^^^^ | = note: did you mean to use one of the following variants? @@ -12,7 +12,7 @@ error[E0423]: expected value, found enum `n::Z` error[E0423]: expected value, found enum `Z` --> $DIR/privacy-enum-ctor.rs:35:9 | -35 | Z; +LL | Z; | ^ did you mean `f`? | = note: did you mean to use one of the following variants? @@ -23,13 +23,13 @@ error[E0423]: expected value, found enum `Z` error[E0423]: expected value, found struct variant `Z::Struct` --> $DIR/privacy-enum-ctor.rs:39:20 | -39 | let _: Z = Z::Struct; +LL | let _: Z = Z::Struct; | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`? error[E0423]: expected value, found enum `m::E` --> $DIR/privacy-enum-ctor.rs:51:16 | -51 | let _: E = m::E; +LL | let _: E = m::E; | ^^^- | | | did you mean `f`? @@ -40,21 +40,21 @@ error[E0423]: expected value, found enum `m::E` - `E::Unit` help: possible better candidates are found in other modules, you can import them into scope | -48 | use std::f32::consts::E; +LL | use std::f32::consts::E; | -48 | use std::f64::consts::E; +LL | use std::f64::consts::E; | error[E0423]: expected value, found struct variant `m::E::Struct` --> $DIR/privacy-enum-ctor.rs:55:16 | -55 | let _: E = m::E::Struct; +LL | let _: E = m::E::Struct; | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`? error[E0423]: expected value, found enum `E` --> $DIR/privacy-enum-ctor.rs:59:16 | -59 | let _: E = E; +LL | let _: E = E; | ^ | = note: did you mean to use one of the following variants? @@ -63,31 +63,31 @@ error[E0423]: expected value, found enum `E` - `E::Unit` help: possible better candidates are found in other modules, you can import them into scope | -48 | use std::f32::consts::E; +LL | use std::f32::consts::E; | -48 | use std::f64::consts::E; +LL | use std::f64::consts::E; | error[E0423]: expected value, found struct variant `E::Struct` --> $DIR/privacy-enum-ctor.rs:63:16 | -63 | let _: E = E::Struct; +LL | let _: E = E::Struct; | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`? error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:67:12 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found enum `m::n::Z` --> $DIR/privacy-enum-ctor.rs:67:16 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^^^^^^^ | = note: did you mean to use one of the following variants? @@ -98,67 +98,67 @@ error[E0423]: expected value, found enum `m::n::Z` error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:71:12 | -71 | let _: Z = m::n::Z::Fn; +LL | let _: Z = m::n::Z::Fn; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:74:12 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found struct variant `m::n::Z::Struct` --> $DIR/privacy-enum-ctor.rs:74:16 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`? error[E0412]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:78:12 | -78 | let _: Z = m::n::Z::Unit {}; +LL | let _: Z = m::n::Z::Unit {}; | ^ did you mean `E`? help: possible candidate is found in another module, you can import it into scope | -48 | use m::n::Z; +LL | use m::n::Z; | error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:67:16 | -67 | let _: Z = m::n::Z; +LL | let _: Z = m::n::Z; | ^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:71:16 | -71 | let _: Z = m::n::Z::Fn; +LL | let _: Z = m::n::Z::Fn; | ^^^^^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:74:16 | -74 | let _: Z = m::n::Z::Struct; +LL | let _: Z = m::n::Z::Struct; | ^^^^^^^^^^^^^^^ error[E0603]: enum `Z` is private --> $DIR/privacy-enum-ctor.rs:78:16 | -78 | let _: Z = m::n::Z::Unit {}; +LL | let _: Z = m::n::Z::Unit {}; | ^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:37:20 | -37 | let _: Z = Z::Fn; +LL | let _: Z = Z::Fn; | ^^^^^ expected enum `m::n::Z`, found fn item | = note: expected type `m::n::Z` @@ -167,20 +167,20 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `Z::Unit` --> $DIR/privacy-enum-ctor.rs:41:17 | -26 | Unit, +LL | Unit, | ---- `Z::Unit` defined here ... -41 | let _ = Z::Unit(); +LL | let _ = Z::Unit(); | ^^^^^^^^^ not a function help: `Z::Unit` is a unit variant, you need to write it without the parenthesis | -41 | let _ = Z::Unit; +LL | let _ = Z::Unit; | ^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:53:16 | -53 | let _: E = m::E::Fn; +LL | let _: E = m::E::Fn; | ^^^^^^^^ expected enum `m::E`, found fn item | = note: expected type `m::E` @@ -189,20 +189,20 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `m::E::Unit` --> $DIR/privacy-enum-ctor.rs:57:16 | -17 | Unit, +LL | Unit, | ---- `m::E::Unit` defined here ... -57 | let _: E = m::E::Unit(); +LL | let _: E = m::E::Unit(); | ^^^^^^^^^^^^ not a function help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis | -57 | let _: E = m::E::Unit; +LL | let _: E = m::E::Unit; | ^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:61:16 | -61 | let _: E = E::Fn; +LL | let _: E = E::Fn; | ^^^^^ expected enum `m::E`, found fn item | = note: expected type `m::E` @@ -211,14 +211,14 @@ error[E0308]: mismatched types error[E0618]: expected function, found enum variant `E::Unit` --> $DIR/privacy-enum-ctor.rs:65:16 | -17 | Unit, +LL | Unit, | ---- `E::Unit` defined here ... -65 | let _: E = E::Unit(); +LL | let _: E = E::Unit(); | ^^^^^^^^^ not a function help: `E::Unit` is a unit variant, you need to write it without the parenthesis | -65 | let _: E = E::Unit; +LL | let _: E = E::Unit; | ^^^^^^^ error: aborting due to 23 previous errors diff --git a/src/test/ui/resolve/privacy-struct-ctor.stderr b/src/test/ui/resolve/privacy-struct-ctor.stderr index d7c19a5a468..ddd8f238e87 100644 --- a/src/test/ui/resolve/privacy-struct-ctor.stderr +++ b/src/test/ui/resolve/privacy-struct-ctor.stderr @@ -1,76 +1,76 @@ error[E0423]: expected value, found struct `Z` --> $DIR/privacy-struct-ctor.rs:30:9 | -30 | Z; +LL | Z; | ^ | | | did you mean `S`? | constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -25 | use m::n::Z; +LL | use m::n::Z; | error[E0423]: expected value, found struct `S` --> $DIR/privacy-struct-ctor.rs:43:5 | -43 | S; +LL | S; | ^ constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -35 | use m::S; +LL | use m::S; | error[E0423]: expected value, found struct `S2` --> $DIR/privacy-struct-ctor.rs:48:5 | -48 | S2; +LL | S2; | ^^ did you mean `S2 { /* fields */ }`? error[E0423]: expected value, found struct `xcrate::S` --> $DIR/privacy-struct-ctor.rs:53:5 | -53 | xcrate::S; +LL | xcrate::S; | ^^^^^^^^^ constructor is not visible here due to private fields help: possible better candidate is found in another module, you can import it into scope | -35 | use m::S; +LL | use m::S; | error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:28:9 | -28 | n::Z; +LL | n::Z; | ^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:39:5 | -39 | m::S; +LL | m::S; | ^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:41:16 | -41 | let _: S = m::S(2); +LL | let _: S = m::S(2); | ^^^^ error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:45:5 | -45 | m::n::Z; +LL | m::n::Z; | ^^^^^^^ error[E0603]: tuple struct `S` is private --> $DIR/privacy-struct-ctor.rs:51:5 | -51 | xcrate::m::S; +LL | xcrate::m::S; | ^^^^^^^^^^^^ error[E0603]: tuple struct `Z` is private --> $DIR/privacy-struct-ctor.rs:55:5 | -55 | xcrate::m::n::Z; +LL | xcrate::m::n::Z; | ^^^^^^^^^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/resolve/resolve-assoc-suggestions.stderr b/src/test/ui/resolve/resolve-assoc-suggestions.stderr index 93e23bdef7f..e03a9052e4b 100644 --- a/src/test/ui/resolve/resolve-assoc-suggestions.stderr +++ b/src/test/ui/resolve/resolve-assoc-suggestions.stderr @@ -1,55 +1,55 @@ error[E0412]: cannot find type `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:26:16 | -26 | let _: field; +LL | let _: field; | ^^^^^ not found in this scope error[E0531]: cannot find tuple struct/variant `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:28:13 | -28 | let field(..); +LL | let field(..); | ^^^^^ not found in this scope error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:30:9 | -30 | field; +LL | field; | ^^^^^ help: try: `self.field` error[E0412]: cannot find type `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:33:16 | -33 | let _: Type; +LL | let _: Type; | ^^^^ help: try: `Self::Type` error[E0531]: cannot find tuple struct/variant `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:35:13 | -35 | let Type(..); +LL | let Type(..); | ^^^^ not found in this scope error[E0425]: cannot find value `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:37:9 | -37 | Type; +LL | Type; | ^^^^ not found in this scope error[E0412]: cannot find type `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:40:16 | -40 | let _: method; +LL | let _: method; | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct/variant `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:42:13 | -42 | let method(..); +LL | let method(..); | ^^^^^^ not found in this scope error[E0425]: cannot find value `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:44:9 | -44 | method; +LL | method; | ^^^^^^ help: try: `self.method` error: aborting due to 9 previous errors diff --git a/src/test/ui/resolve/resolve-hint-macro.stderr b/src/test/ui/resolve/resolve-hint-macro.stderr index 65acbda8c97..82279b7b2df 100644 --- a/src/test/ui/resolve/resolve-hint-macro.stderr +++ b/src/test/ui/resolve/resolve-hint-macro.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found macro `assert` --> $DIR/resolve-hint-macro.rs:12:5 | -12 | assert(true); +LL | assert(true); | ^^^^^^ did you mean `assert!(...)`? error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-speculative-adjustment.stderr b/src/test/ui/resolve/resolve-speculative-adjustment.stderr index b6bd4c5460d..0e3eb95f9c4 100644 --- a/src/test/ui/resolve/resolve-speculative-adjustment.stderr +++ b/src/test/ui/resolve/resolve-speculative-adjustment.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-speculative-adjustment.rs:27:13 | -27 | field; +LL | field; | ^^^^^ not found in this scope error[E0425]: cannot find function `method` in this scope --> $DIR/resolve-speculative-adjustment.rs:29:13 | -29 | method(); +LL | method(); | ^^^^^^ not found in this scope error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-speculative-adjustment.rs:33:9 | -33 | field; +LL | field; | ^^^^^ help: try: `self.field` error[E0425]: cannot find function `method` in this scope --> $DIR/resolve-speculative-adjustment.rs:35:9 | -35 | method(); +LL | method(); | ^^^^^^ help: try: `self.method` error: aborting due to 4 previous errors 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 5cdeb0d52d9..c6058c7af03 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 @@ -1,7 +1,7 @@ error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:27:5 | -27 | a.I +LL | a.I | ^-- | | | did you mean `a::I`? @@ -9,7 +9,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:32:5 | -32 | a.g() +LL | a.g() | ^---- | | | did you mean `a::g(...)`? @@ -17,7 +17,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:37:5 | -37 | a.b.J +LL | a.b.J | ^-- | | | did you mean `a::b`? @@ -25,7 +25,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:42:5 | -42 | a::b.J +LL | a::b.J | ^^^--- | | | | | did you mean `I`? @@ -34,7 +34,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:47:5 | -47 | a.b.f(); +LL | a.b.f(); | ^-- | | | did you mean `a::b`? @@ -42,7 +42,7 @@ error[E0423]: expected value, found module `a` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:50:12 | -50 | v.push(a::b); +LL | v.push(a::b); | ^^^- | | | did you mean `I`? @@ -50,7 +50,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:55:5 | -55 | a::b.f() +LL | a::b.f() | ^^^----- | | | | | did you mean `I`? @@ -59,7 +59,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected value, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:60:5 | -60 | a::b +LL | a::b | ^^^- | | | did you mean `I`? @@ -67,7 +67,7 @@ error[E0423]: expected value, found module `a::b` error[E0423]: expected function, found module `a::b` --> $DIR/suggest-path-instead-of-mod-dot-item.rs:65:5 | -65 | a::b() +LL | a::b() | ^^^- | | | did you mean `I`? diff --git a/src/test/ui/resolve/token-error-correct-2.stderr b/src/test/ui/resolve/token-error-correct-2.stderr index 9295bb27040..41d77bf16b9 100644 --- a/src/test/ui/resolve/token-error-correct-2.stderr +++ b/src/test/ui/resolve/token-error-correct-2.stderr @@ -1,19 +1,19 @@ error: incorrect close delimiter: `)` --> $DIR/token-error-correct-2.rs:16:5 | -16 | ) //~ ERROR: incorrect close delimiter: `)` +LL | ) //~ ERROR: incorrect close delimiter: `)` | ^ | note: unclosed delimiter --> $DIR/token-error-correct-2.rs:14:12 | -14 | if foo { +LL | if foo { | ^ error[E0425]: cannot find value `foo` in this scope --> $DIR/token-error-correct-2.rs:14:8 | -14 | if foo { +LL | if foo { | ^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index 1c9867476a2..98989f99dd4 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -1,40 +1,40 @@ error: incorrect close delimiter: `}` --> $DIR/token-error-correct-3.rs:30:9 | -30 | } else { //~ ERROR: incorrect close delimiter: `}` +LL | } else { //~ ERROR: incorrect close delimiter: `}` | ^ | note: unclosed delimiter --> $DIR/token-error-correct-3.rs:24:21 | -24 | callback(path.as_ref(); //~ ERROR expected one of +LL | callback(path.as_ref(); //~ ERROR expected one of | ^ error: expected one of `,`, `.`, `?`, or an operator, found `;` --> $DIR/token-error-correct-3.rs:24:35 | -24 | callback(path.as_ref(); //~ ERROR expected one of +LL | callback(path.as_ref(); //~ ERROR expected one of | ^ expected one of `,`, `.`, `?`, or an operator here error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:30:9 | -25 | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types +LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | - expected one of `.`, `;`, `?`, `}`, or an operator here ... -30 | } else { //~ ERROR: incorrect close delimiter: `}` +LL | } else { //~ ERROR: incorrect close delimiter: `}` | ^ unexpected token error[E0425]: cannot find function `is_directory` in this scope --> $DIR/token-error-correct-3.rs:23:13 | -23 | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` +LL | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory` | ^^^^^^^^^^^^ not found in this scope error[E0308]: mismatched types --> $DIR/token-error-correct-3.rs:25:13 | -25 | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types +LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found enum `std::result::Result` diff --git a/src/test/ui/resolve/token-error-correct.stderr b/src/test/ui/resolve/token-error-correct.stderr index e26f0e85aa6..344c288b596 100644 --- a/src/test/ui/resolve/token-error-correct.stderr +++ b/src/test/ui/resolve/token-error-correct.stderr @@ -1,31 +1,31 @@ error: incorrect close delimiter: `}` --> $DIR/token-error-correct.rs:16:1 | -16 | } +LL | } | ^ | note: unclosed delimiter --> $DIR/token-error-correct.rs:14:12 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: incorrect close delimiter: `}` --> $DIR/token-error-correct.rs:16:1 | -16 | } +LL | } | ^ | note: unclosed delimiter --> $DIR/token-error-correct.rs:14:8 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: expected expression, found `;` --> $DIR/token-error-correct.rs:14:13 | -14 | foo(bar(; +LL | foo(bar(; | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/resolve/tuple-struct-alias.stderr b/src/test/ui/resolve/tuple-struct-alias.stderr index 144eb7966e0..50d997e01da 100644 --- a/src/test/ui/resolve/tuple-struct-alias.stderr +++ b/src/test/ui/resolve/tuple-struct-alias.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found self type `Self` --> $DIR/tuple-struct-alias.rs:16:17 | -16 | let s = Self(0, 1); //~ ERROR expected function +LL | let s = Self(0, 1); //~ ERROR expected function | ^^^^ not a function | = note: can't use `Self` as a constructor, you must use the implemented struct @@ -9,7 +9,7 @@ error[E0423]: expected function, found self type `Self` error[E0532]: expected tuple struct/variant, found self type `Self` --> $DIR/tuple-struct-alias.rs:18:13 | -18 | Self(..) => {} //~ ERROR expected tuple struct/variant +LL | Self(..) => {} //~ ERROR expected tuple struct/variant | ^^^^ not a tuple struct/variant | = note: can't use `Self` as a constructor, you must use the implemented struct @@ -17,7 +17,7 @@ error[E0532]: expected tuple struct/variant, found self type `Self` error[E0423]: expected function, found type alias `A` --> $DIR/tuple-struct-alias.rs:24:13 | -24 | let s = A(0, 1); //~ ERROR expected function +LL | let s = A(0, 1); //~ ERROR expected function | ^ did you mean `S`? | = note: can't use a type alias as a constructor @@ -25,7 +25,7 @@ error[E0423]: expected function, found type alias `A` error[E0532]: expected tuple struct/variant, found type alias `A` --> $DIR/tuple-struct-alias.rs:26:9 | -26 | A(..) => {} //~ ERROR expected tuple struct/variant +LL | A(..) => {} //~ ERROR expected tuple struct/variant | ^ did you mean `S`? | = note: can't use a type alias as a constructor diff --git a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr index 028a0931c71..c225563b754 100644 --- a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr +++ b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr @@ -1,13 +1,13 @@ error[E0405]: cannot find trait `Nonexist` in this scope --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:11:8 | -11 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^^^^ not found in this scope error[E0404]: expected trait, found type alias `Typedef` --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:16:8 | -16 | fn g isize>(x: F) {} +LL | fn g isize>(x: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^ type aliases cannot be used for traits error: cannot continue compilation due to previous error diff --git a/src/test/ui/resolve/unresolved_static_type_field.stderr b/src/test/ui/resolve/unresolved_static_type_field.stderr index ea58281a331..7012419d94c 100644 --- a/src/test/ui/resolve/unresolved_static_type_field.stderr +++ b/src/test/ui/resolve/unresolved_static_type_field.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `cx` in this scope --> $DIR/unresolved_static_type_field.rs:19:11 | -19 | f(cx); +LL | f(cx); | ^^ | | | `self` value is only available in methods with `self` parameter diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr index c46a1d5bfc8..da2ea67ad08 100644 --- a/src/test/ui/resolve/use_suggestion_placement.stderr +++ b/src/test/ui/resolve/use_suggestion_placement.stderr @@ -1,33 +1,33 @@ error[E0412]: cannot find type `Path` in this scope --> $DIR/use_suggestion_placement.rs:27:16 | -27 | type Bar = Path; //~ ERROR cannot find +LL | type Bar = Path; //~ ERROR cannot find | ^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -23 | use std::path::Path; +LL | use std::path::Path; | error[E0425]: cannot find value `A` in this scope --> $DIR/use_suggestion_placement.rs:32:13 | -32 | let _ = A; //~ ERROR cannot find +LL | let _ = A; //~ ERROR cannot find | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | -13 | use m::A; +LL | use m::A; | error[E0412]: cannot find type `HashMap` in this scope --> $DIR/use_suggestion_placement.rs:37:23 | -37 | type Dict = HashMap; //~ ERROR cannot find +LL | type Dict = HashMap; //~ ERROR cannot find | ^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | -13 | use std::collections::HashMap; +LL | use std::collections::HashMap; | -13 | use std::collections::hash_map::HashMap; +LL | use std::collections::hash_map::HashMap; | error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/const.stderr b/src/test/ui/rfc-2005-default-binding-mode/const.stderr index 9dd3a6d62d3..b91e64b42bf 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const.rs:26:9 | -26 | FOO => {}, //~ ERROR mismatched types +LL | FOO => {}, //~ ERROR mismatched types | ^^^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr index 50d713f43a3..59c857110a9 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr @@ -1,25 +1,25 @@ error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:21:5 | -20 | let Wrap(x) = &Wrap(3); +LL | let Wrap(x) = &Wrap(3); | - consider changing this to `x` -21 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:25:9 | -24 | if let Some(x) = &Some(3) { +LL | if let Some(x) = &Some(3) { | - consider changing this to `x` -25 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:31:9 | -30 | while let Some(x) = &Some(3) { +LL | while let Some(x) = &Some(3) { | - consider changing this to `x` -31 | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr index 360a4555c7b..72e5c1fce1e 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr @@ -1,25 +1,25 @@ error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:19:13 | -18 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -19 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:27:13 | -26 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -27 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:35:13 | -34 | Some(n) => { +LL | Some(n) => { | - consider changing this to `n` -35 | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/for.stderr b/src/test/ui/rfc-2005-default-binding-mode/for.stderr index 5a52cb9c519..cdf6a1667aa 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/for.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/for.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/for.rs:18:13 | -18 | for (n, mut m) in &tups { +LL | for (n, mut m) in &tups { | - ^^^^^ by-move pattern here | | | both by-ref and by-move used diff --git a/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr b/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr index 87a1eb53100..e304ae14065 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/issue-44912-or.stderr @@ -1,7 +1,7 @@ error[E0409]: variable `x` is bound in inconsistent ways within the same match arm --> $DIR/issue-44912-or.rs:18:35 | -18 | Some((x, 3)) | &Some((ref x, 5)) => x, +LL | Some((x, 3)) | &Some((ref x, 5)) => x, | - first binding ^ bound in different ways error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr index 33d1e5def12..1d8f544dbad 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/lit.rs:19:13 | -19 | "abc" => true, //~ ERROR mismatched types +LL | "abc" => true, //~ ERROR mismatched types | ^^^^^ expected &str, found str | = note: expected type `&&str` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/lit.rs:28:9 | -28 | b"abc" => true, //~ ERROR mismatched types +LL | b"abc" => true, //~ ERROR mismatched types | ^^^^^^ expected &[u8], found array of 3 elements | = note: expected type `&&[u8]` diff --git a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr index 69225240521..b92f9662613 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current scope --> $DIR/no-double-error.rs:18:9 | -18 | u32::XXX => { } //~ ERROR no associated item named +LL | u32::XXX => { } //~ ERROR no associated item named | ^^^^^^^^ associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr index 898c1fe16ee..f10d0f83f0c 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&[]` not covered --> $DIR/slice.rs:17:11 | -17 | match sl { //~ ERROR non-exhaustive patterns +LL | match sl { //~ ERROR non-exhaustive patterns | ^^ pattern `&[]` not covered error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr b/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr index 92e915864f5..1d713be96d7 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/suggestion.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/suggestion.rs:12:12 | -12 | if let Some(y) = &Some(22) { //~ ERROR non-reference pattern +LL | if let Some(y) = &Some(22) { //~ ERROR non-reference pattern | ^^^^^^^ help: consider using a reference: `&Some(y)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr index a51ced75444..67e50346ace 100644 --- a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr @@ -1,7 +1,7 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/construct_with_other_type.rs:25:37 | -25 | type Quux<'a> = ::Bar<'a, 'static>; +LL | type Quux<'a> = ::Bar<'a, 'static>; | ^^ lifetime parameter not allowed on this type error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr index de0c1e310bc..aff3044e9a1 100644 --- a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr @@ -1,7 +1,7 @@ error: expected one of `>`, identifier, or lifetime, found `,` --> $DIR/empty_generics.rs:14:14 | -14 | type Bar<,>; +LL | type Bar<,>; | ^ expected one of `>`, identifier, or lifetime here error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr index 63620971132..bc342119e59 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr @@ -1,31 +1,31 @@ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37 | -22 | + Deref>; +LL | + Deref>; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'undeclared` --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41 | -26 | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ undeclared lifetime error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:20:47 | -20 | type Iter<'a>: Iterator> +LL | type Iter<'a>: Iterator> | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37 | -22 | + Deref>; +LL | + Deref>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41 | -26 | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ lifetime parameter not allowed on this type error: aborting due to 5 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr index 8148a961553..0c126236d0e 100644 --- a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr @@ -1,19 +1,19 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:20:47 | -20 | type Iter<'a>: Iterator>; +LL | type Iter<'a>: Iterator>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:25:48 | -25 | type Iter2<'a>: Deref as Iterator>::Item>; +LL | type Iter2<'a>: Deref as Iterator>::Item>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/iterable.rs:28:41 | -28 | fn iter<'a>(&'a self) -> Self::Iter<'a>; +LL | fn iter<'a>(&'a self) -> Self::Iter<'a>; | ^^ lifetime parameter not allowed on this type error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr index 933a6245f98..6df4ceed66d 100644 --- a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr @@ -1,25 +1,25 @@ error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:46:21 | -46 | bar: P::Pointer, +LL | bar: P::Pointer, | ^^^^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:21:42 | -21 | fn new(value: T) -> Self::Pointer; +LL | fn new(value: T) -> Self::Pointer; | ^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:29:42 | -29 | fn new(value: T) -> Self::Pointer { +LL | fn new(value: T) -> Self::Pointer { | ^ type parameter not allowed error[E0109]: type parameters are not allowed on this type --> $DIR/pointer_family.rs:39:42 | -39 | fn new(value: T) -> Self::Pointer { +LL | fn new(value: T) -> Self::Pointer { | ^ type parameter not allowed error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr index 25d1f5903bf..df03c15aaa7 100644 --- a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr @@ -1,19 +1,19 @@ error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:27:41 | -27 | bar: ::Item<'static>, +LL | bar: ::Item<'static>, | ^^^^^^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:35:64 | -35 | fn foo(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ } +LL | fn foo(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ } | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type --> $DIR/streaming_iterator.rs:21:48 | -21 | fn next<'a>(&'a self) -> Option>; +LL | fn next<'a>(&'a self) -> Option>; | ^^ lifetime parameter not allowed on this type error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr b/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr index 92d1eeaf155..d0a8bb525b6 100644 --- a/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr +++ b/src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.stderr @@ -1,48 +1,48 @@ warning: unused return value of `need_to_use_this_value` which must be used: it's important --> $DIR/fn_must_use.rs:61:5 | -61 | need_to_use_this_value(); //~ WARN unused return value +LL | need_to_use_this_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/fn_must_use.rs:14:9 | -14 | #![warn(unused_must_use)] +LL | #![warn(unused_must_use)] | ^^^^^^^^^^^^^^^ warning: unused return value of `MyStruct::need_to_use_this_method_value` which must be used --> $DIR/fn_must_use.rs:66:5 | -66 | m.need_to_use_this_method_value(); //~ WARN unused return value +LL | m.need_to_use_this_method_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused return value of `EvenNature::is_even` which must be used: no side effects --> $DIR/fn_must_use.rs:67:5 | -67 | m.is_even(); // trait method! +LL | m.is_even(); // trait method! | ^^^^^^^^^^^^ warning: unused return value of `std::cmp::PartialEq::eq` which must be used --> $DIR/fn_must_use.rs:73:5 | -73 | 2.eq(&3); //~ WARN unused return value +LL | 2.eq(&3); //~ WARN unused return value | ^^^^^^^^^ warning: unused return value of `std::cmp::PartialEq::eq` which must be used --> $DIR/fn_must_use.rs:74:5 | -74 | m.eq(&n); //~ WARN unused return value +LL | m.eq(&n); //~ WARN unused return value | ^^^^^^^^^ warning: unused comparison which must be used --> $DIR/fn_must_use.rs:77:5 | -77 | 2 == 3; //~ WARN unused comparison +LL | 2 == 3; //~ WARN unused comparison | ^^^^^^ warning: unused comparison which must be used --> $DIR/fn_must_use.rs:78:5 | -78 | m == n; //~ WARN unused comparison +LL | m == n; //~ WARN unused comparison | ^^^^^^ diff --git a/src/test/ui/self-impl.stderr b/src/test/ui/self-impl.stderr index a662b2a0645..e17c2b6e792 100644 --- a/src/test/ui/self-impl.stderr +++ b/src/test/ui/self-impl.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/self-impl.rs:33:16 | -33 | let _: ::Baz = true; +LL | let _: ::Baz = true; | ^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Baz` @@ -9,7 +9,7 @@ error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type --> $DIR/self-impl.rs:35:16 | -35 | let _: Self::Baz = true; +LL | let _: Self::Baz = true; | ^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Baz` diff --git a/src/test/ui/shadowed-lifetime.stderr b/src/test/ui/shadowed-lifetime.stderr index 54a241d17de..efb9faa0963 100644 --- a/src/test/ui/shadowed-lifetime.stderr +++ b/src/test/ui/shadowed-lifetime.stderr @@ -1,17 +1,17 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope --> $DIR/shadowed-lifetime.rs:16:25 | -15 | impl<'a> Foo<'a> { +LL | impl<'a> Foo<'a> { | -- first declared here -16 | fn shadow_in_method<'a>(&'a self) -> &'a isize { +LL | fn shadow_in_method<'a>(&'a self) -> &'a isize { | ^^ lifetime 'a already in scope error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope --> $DIR/shadowed-lifetime.rs:22:20 | -21 | fn shadow_in_type<'b>(&'b self) -> &'b isize { +LL | fn shadow_in_type<'b>(&'b self) -> &'b isize { | -- first declared here -22 | let x: for<'b> fn(&'b isize) = panic!(); +LL | let x: for<'b> fn(&'b isize) = panic!(); | ^^ lifetime 'b already in scope error: aborting due to 2 previous errors diff --git a/src/test/ui/shadowed-type-parameter.stderr b/src/test/ui/shadowed-type-parameter.stderr index c5759ef04d0..d13c75b25c3 100644 --- a/src/test/ui/shadowed-type-parameter.stderr +++ b/src/test/ui/shadowed-type-parameter.stderr @@ -1,27 +1,27 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:30:27 | -27 | trait Bar { +LL | trait Bar { | - first `T` declared here ... -30 | fn shadow_in_required(&self); +LL | fn shadow_in_required(&self); | ^ shadows another type parameter error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:33:27 | -27 | trait Bar { +LL | trait Bar { | - first `T` declared here ... -33 | fn shadow_in_provided(&self) {} +LL | fn shadow_in_provided(&self) {} | ^ shadows another type parameter error[E0194]: type parameter `T` shadows another type parameter of the same name --> $DIR/shadowed-type-parameter.rs:18:25 | -17 | impl Foo { +LL | impl Foo { | - first `T` declared here -18 | fn shadow_in_method(&self) {} +LL | fn shadow_in_method(&self) {} | ^ shadows another type parameter error: aborting due to 3 previous errors diff --git a/src/test/ui/similar-tokens.stderr b/src/test/ui/similar-tokens.stderr index b4968b1018f..fe157b99e65 100644 --- a/src/test/ui/similar-tokens.stderr +++ b/src/test/ui/similar-tokens.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `::`, or `as`, found `.` --> $DIR/similar-tokens.rs:17:10 | -17 | use x::{A. B}; //~ ERROR expected one of `,`, `::`, or `as`, found `.` +LL | use x::{A. B}; //~ ERROR expected one of `,`, `::`, or `as`, found `.` | ^ expected one of `,`, `::`, or `as` here error: aborting due to previous error diff --git a/src/test/ui/span/E0046.stderr b/src/test/ui/span/E0046.stderr index 02f2a8cfc6c..047a9115caf 100644 --- a/src/test/ui/span/E0046.stderr +++ b/src/test/ui/span/E0046.stderr @@ -1,10 +1,10 @@ error[E0046]: not all trait items implemented, missing: `foo` --> $DIR/E0046.rs:17:1 | -12 | fn foo(); +LL | fn foo(); | --------- `foo` from trait ... -17 | impl Foo for Bar {} +LL | impl Foo for Bar {} | ^^^^^^^^^^^^^^^^ missing `foo` in implementation error: aborting due to previous error diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr index f0c40578ddb..0d6cd77de07 100644 --- a/src/test/ui/span/E0057.stderr +++ b/src/test/ui/span/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:13:13 | -13 | let a = f(); //~ ERROR E0057 +LL | let a = f(); //~ ERROR E0057 | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:15:13 | -15 | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index 22319e6552e..1c03cfe0e9e 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/E0072.rs:11:1 | -11 | struct ListNode { //~ ERROR has infinite size +LL | struct ListNode { //~ ERROR has infinite size | ^^^^^^^^^^^^^^^ recursive type has infinite size -12 | head: u8, -13 | tail: Option, +LL | head: u8, +LL | tail: Option, | ---------------------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index 0c0d431f38f..aa21c6762e7 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -1,37 +1,37 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:15:6 | -12 | foo: Vec, +LL | foo: Vec, | ------------- this field does not implement `Copy` ... -15 | impl Copy for Foo { } //~ ERROR may not be implemented for this type +LL | impl Copy for Foo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:17:10 | -17 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -18 | struct Foo2<'a> { -19 | ty: &'a mut bool, +LL | struct Foo2<'a> { +LL | ty: &'a mut bool, | ---------------- this field does not implement `Copy` error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:27:6 | -23 | Bar { x: Vec }, +LL | Bar { x: Vec }, | ----------- this field does not implement `Copy` ... -27 | impl Copy for EFoo { } //~ ERROR may not be implemented for this type +LL | impl Copy for EFoo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:29:10 | -29 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -30 | enum EFoo2<'a> { -31 | Bar(&'a mut bool), +LL | enum EFoo2<'a> { +LL | Bar(&'a mut bool), | ------------- this field does not implement `Copy` error: aborting due to 4 previous errors diff --git a/src/test/ui/span/E0493.stderr b/src/test/ui/span/E0493.stderr index c8bdd04394e..74a85c0164e 100644 --- a/src/test/ui/span/E0493.stderr +++ b/src/test/ui/span/E0493.stderr @@ -1,7 +1,7 @@ error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/E0493.rs:27:17 | -27 | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; +LL | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors error: aborting due to previous error diff --git a/src/test/ui/span/E0535.stderr b/src/test/ui/span/E0535.stderr index e271a8018bc..309696eebc4 100644 --- a/src/test/ui/span/E0535.stderr +++ b/src/test/ui/span/E0535.stderr @@ -1,7 +1,7 @@ error[E0535]: invalid argument --> $DIR/E0535.rs:11:10 | -11 | #[inline(unknown)] //~ ERROR E0535 +LL | #[inline(unknown)] //~ ERROR E0535 | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0536.stderr b/src/test/ui/span/E0536.stderr index 9903896fd77..ff8f4543874 100644 --- a/src/test/ui/span/E0536.stderr +++ b/src/test/ui/span/E0536.stderr @@ -1,7 +1,7 @@ error[E0536]: expected 1 cfg-pattern --> $DIR/E0536.rs:11:7 | -11 | #[cfg(not())] //~ ERROR E0536 +LL | #[cfg(not())] //~ ERROR E0536 | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0537.stderr b/src/test/ui/span/E0537.stderr index f08e7a7357b..88e74b1cce5 100644 --- a/src/test/ui/span/E0537.stderr +++ b/src/test/ui/span/E0537.stderr @@ -1,7 +1,7 @@ error[E0537]: invalid predicate `unknown` --> $DIR/E0537.rs:11:7 | -11 | #[cfg(unknown())] //~ ERROR E0537 +LL | #[cfg(unknown())] //~ ERROR E0537 | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr index 3230766af8a..901a1af94bc 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr @@ -1,86 +1,86 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24 | -62 | fn deref_mut_field1(x: Own) { +LL | fn deref_mut_field1(x: Own) { | - consider changing this to `mut x` -63 | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:75:10 | -74 | fn deref_extend_mut_field1(x: &Own) -> &mut isize { +LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable -75 | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:19 | -87 | let _x = &mut x.x; +LL | let _x = &mut x.x; | - first mutable borrow occurs here -88 | let _y = &mut x.y; //~ ERROR cannot borrow +LL | let _y = &mut x.y; //~ ERROR cannot borrow | ^ second mutable borrow occurs here -89 | } +LL | } | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5 | -97 | fn assign_field1<'a>(x: Own) { +LL | fn assign_field1<'a>(x: Own) { | - consider changing this to `mut x` -98 | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 - | -101 | fn assign_field2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable -102 | x.y = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 + | +LL | fn assign_field2<'a>(x: &'a Own) { + | -------------- use `&'a mut Own` here to make mutable +LL | x.y = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 - | -110 | let _p: &mut Point = &mut **x; - | -- first mutable borrow occurs here -111 | x.y = 3; //~ ERROR cannot borrow - | ^ second mutable borrow occurs here -112 | } - | - first borrow ends here + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 + | +LL | let _p: &mut Point = &mut **x; + | -- first mutable borrow occurs here +LL | x.y = 3; //~ ERROR cannot borrow + | ^ second mutable borrow occurs here +LL | } + | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 - | -118 | fn deref_mut_method1(x: Own) { - | - consider changing this to `mut x` -119 | x.set(0, 0); //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 + | +LL | fn deref_mut_method1(x: Own) { + | - consider changing this to `mut x` +LL | x.set(0, 0); //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 - | -130 | fn deref_extend_mut_method1(x: &Own) -> &mut isize { - | ----------- use `&mut Own` here to make mutable -131 | x.y_mut() //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 + | +LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { + | ----------- use `&mut Own` here to make mutable +LL | x.y_mut() //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 - | -138 | fn assign_method1<'a>(x: Own) { - | - consider changing this to `mut x` -139 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 + | +LL | fn assign_method1<'a>(x: Own) { + | - consider changing this to `mut x` +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 - | -142 | fn assign_method2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable -143 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 + | +LL | fn assign_method2<'a>(x: &'a Own) { + | -------------- use `&'a mut Own` here to make mutable +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error: aborting due to 10 previous errors diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr index 031d0e1e92d..948d6d175de 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -1,33 +1,33 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:39:25 | -38 | fn deref_mut1(x: Own) { +LL | fn deref_mut1(x: Own) { | - consider changing this to `mut x` -39 | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:51:11 | -50 | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { +LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { | -------------- use `&'a mut Own` here to make mutable -51 | &mut **x //~ ERROR cannot borrow +LL | &mut **x //~ ERROR cannot borrow | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:59:6 | -58 | fn assign1<'a>(x: Own) { +LL | fn assign1<'a>(x: Own) { | - consider changing this to `mut x` -59 | *x = 3; //~ ERROR cannot borrow +LL | *x = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:63:6 | -62 | fn assign2<'a>(x: &'a Own) { +LL | fn assign2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable -63 | **x = 3; //~ ERROR cannot borrow +LL | **x = 3; //~ ERROR cannot borrow | ^^ cannot borrow as mutable error: aborting due to 4 previous errors diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr index adbe560f633..a06b7097ee3 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -1,47 +1,47 @@ error[E0499]: cannot borrow `f` as mutable more than once at a time --> $DIR/borrowck-call-is-borrow-issue-12224.rs:22:16 | -22 | f(Box::new(|| { +LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here -23 | //~^ ERROR: cannot borrow `f` as mutable more than once -24 | f((Box::new(|| {}))) +LL | //~^ ERROR: cannot borrow `f` as mutable more than once +LL | f((Box::new(|| {}))) | - borrow occurs due to use of `f` in closure -25 | })); +LL | })); | - first borrow ends here error[E0596]: cannot borrow immutable borrowed content `*f` as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:35:5 | -34 | fn test2(f: &F) where F: FnMut() { +LL | fn test2(f: &F) where F: FnMut() { | -- use `&mut F` here to make mutable -35 | (*f)(); +LL | (*f)(); | ^^^^ cannot borrow as mutable error[E0596]: cannot borrow `Box` content `*f.f` of immutable binding as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:44:5 | -43 | fn test4(f: &Test) { +LL | fn test4(f: &Test) { | ----- use `&mut Test` here to make mutable -44 | f.f.call_mut(()) +LL | f.f.call_mut(()) | ^^^ cannot borrow as mutable error[E0504]: cannot move `f` into closure because it is borrowed --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -62 | f(Box::new(|a| { +LL | f(Box::new(|a| { | - borrow of `f` occurs here -63 | foo(f); +LL | foo(f); | ^ move into closure occurs here error[E0507]: cannot move out of captured outer variable in an `FnMut` closure --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -61 | let mut f = |g: Box, b: isize| {}; +LL | let mut f = |g: Box, b: isize| {}; | ----- captured outer variable -62 | f(Box::new(|a| { -63 | foo(f); +LL | f(Box::new(|a| { +LL | foo(f); | ^ cannot move out of captured outer variable in an `FnMut` closure error: aborting due to 5 previous errors diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr index 6a4e030bc39..8111f80690a 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-call-method-from-mut-aliasable.rs:27:5 | -25 | fn b(x: &Foo) { +LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable -26 | x.f(); -27 | x.h(); //~ ERROR cannot borrow +LL | x.f(); +LL | x.h(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-fn-in-const-b.stderr b/src/test/ui/span/borrowck-fn-in-const-b.stderr index 749725bee56..1d4af884b23 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -1,9 +1,9 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-fn-in-const-b.rs:17:9 | -16 | fn broken(x: &Vec) { +LL | fn broken(x: &Vec) { | ------------ use `&mut Vec` here to make mutable -17 | x.push(format!("this is broken")); +LL | x.push(format!("this is broken")); | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr index fa33899816c..6de2eecb61b 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr @@ -1,10 +1,10 @@ error[E0597]: `young[..]` does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:21:14 | -21 | v2.push(&young[0]); // statement 4 +LL | v2.push(&young[0]); // statement 4 | ^^^^^^^^ borrowed value does not live long enough ... -56 | } +LL | } | - `young[..]` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,12 +12,12 @@ error[E0597]: `young[..]` does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:28:14 | -28 | v3.push(&id('x')); // statement 6 +LL | v3.push(&id('x')); // statement 6 | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -25,12 +25,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:38:18 | -38 | v4.push(&id('y')); +LL | v4.push(&id('y')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -44 | } // (statement 7) +LL | } // (statement 7) | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -38,12 +38,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:49:14 | -49 | v5.push(&id('z')); +LL | v5.push(&id('z')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 1a510a5defc..2f1a6c63141 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:19:5 | -17 | fn borrowed_receiver(x: &Foo) { +LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable -18 | x.borrowed(); -19 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed(); +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable `Box` content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:29:5 | -27 | fn owned_receiver(x: Box) { +LL | fn owned_receiver(x: Box) { | - consider changing this to `mut x` -28 | x.borrowed(); -29 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed(); +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index a91cb2def15..cf423c278e1 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -1,13 +1,13 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-ref-into-rvalue.rs:14:14 | -14 | Some(ref m) => { +LL | Some(ref m) => { | ^^^^^ borrowed value does not live long enough ... -19 | } +LL | } | - borrowed value dropped here while still borrowed -20 | println!("{}", *msg); -21 | } +LL | println!("{}", *msg); +LL | } | - borrowed value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 396bbe4793c..251f33b63fe 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:17:20 | -17 | let x: usize = String::new(); +LL | let x: usize = String::new(); | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` | = note: expected type `usize` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:19:19 | -19 | let x: &str = String::new(); +LL | let x: &str = String::new(); | ^^^^^^^^^^^^^ | | | expected &str, found struct `std::string::String` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:22:10 | -22 | test(&y); +LL | test(&y); | ^^ types differ in mutability | = note: expected type `&mut std::string::String` @@ -31,7 +31,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:24:11 | -24 | test2(&y); +LL | test2(&y); | ^^ types differ in mutability | = note: expected type `&mut i32` @@ -40,7 +40,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:27:9 | -27 | f = box f; +LL | f = box f; | ^^^^^ | | | cyclic type of infinite size @@ -49,7 +49,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:31:9 | -31 | s = format!("foo"); +LL | s = format!("foo"); | ^^^^^^^^^^^^^^ | | | expected mutable reference, found struct `std::string::String` diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index e9fede39b91..15ddfb35240 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -1,9 +1,9 @@ error[E0597]: `*a` does not live long enough --> $DIR/destructor-restrictions.rs:18:10 | -18 | *a.borrow() + 1 +LL | *a.borrow() + 1 | ^ borrowed value does not live long enough -19 | }; //~^ ERROR `*a` does not live long enough +LL | }; //~^ ERROR `*a` does not live long enough | -- borrowed value needs to live until here | | | `*a` dropped here while still borrowed diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index 39f8bd9f9e2..2a426ca3a29 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -1,10 +1,10 @@ error[E0597]: `*m` does not live long enough --> $DIR/dropck-object-cycle.rs:37:32 | -37 | assert_eq!(object_invoke1(&*m), (4,5)); +LL | assert_eq!(object_invoke1(&*m), (4,5)); | ^^ borrowed value does not live long enough ... -57 | } +LL | } | - `*m` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index 412cc6f35f0..5e6512c06bf 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:103:25 - | -103 | b1.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:103:25 + | +LL | b1.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:105:25 - | -105 | b1.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:105:25 + | +LL | b1.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:107:25 - | -107 | b2.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:107:25 + | +LL | b2.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:109:25 - | -109 | b2.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:109:25 + | +LL | b2.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b1` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:111:25 - | -111 | b3.a[0].v.set(Some(&b1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:111:25 + | +LL | b3.a[0].v.set(Some(&b1)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:113:25 - | -113 | b3.a[1].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough -114 | //~^ ERROR `b2` does not live long enough -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_arr_cycle_checked.rs:113:25 + | +LL | b3.a[1].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `b2` does not live long enough +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr index e6ea657b2e9..cf507df4e81 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -1,10 +1,10 @@ error[E0597]: `d2` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:46:20 | -46 | d1.p.set(Some(&d2)); +LL | d1.p.set(Some(&d2)); | ^^ borrowed value does not live long enough ... -50 | } +LL | } | - `d2` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `d2` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:48:20 | -48 | d2.p.set(Some(&d1)); +LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough -49 | //~^ ERROR `d1` does not live long enough -50 | } +LL | //~^ ERROR `d1` does not live long enough +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_misc_variants.stderr b/src/test/ui/span/dropck_misc_variants.stderr index d1c91430cf8..42469018e94 100644 --- a/src/test/ui/span/dropck_misc_variants.stderr +++ b/src/test/ui/span/dropck_misc_variants.stderr @@ -1,9 +1,9 @@ error[E0597]: `bomb` does not live long enough --> $DIR/dropck_misc_variants.rs:33:37 | -33 | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); +LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); | ^^^^ borrowed value does not live long enough -34 | } +LL | } | - `bomb` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,10 +11,10 @@ error[E0597]: `bomb` does not live long enough error[E0597]: `v` does not live long enough --> $DIR/dropck_misc_variants.rs:41:28 | -41 | let u = NoisyDrop(&v); +LL | let u = NoisyDrop(&v); | ^ borrowed value does not live long enough ... -45 | } +LL | } | - `v` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 1171d3972bf..f4ab3293543 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:110:25 - | -110 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:110:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:112:25 - | -112 | c1.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:112:25 + | +LL | c1.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:114:25 - | -114 | c2.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:114:25 + | +LL | c2.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:116:25 - | -116 | c2.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:116:25 + | +LL | c2.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:118:25 - | -118 | c3.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:118:25 + | +LL | c3.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:120:25 - | -120 | c3.v[1].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough -121 | //~^ ERROR `c2` does not live long enough -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_vec_cycle_checked.rs:120:25 + | +LL | c3.v[1].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `c2` does not live long enough +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index f99dafed27a..87ad9312fa4 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/gated-features-attr-spans.rs:20:1 | -20 | #[repr(simd)] //~ ERROR are experimental +LL | #[repr(simd)] //~ ERROR are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) warning: `#[must_use]` on methods is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:27:5 | -27 | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } +LL | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -17,7 +17,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) warning: `#[must_use]` on functions is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:31:1 | -31 | #[must_use] //~ WARN is experimental +LL | #[must_use] //~ WARN is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable diff --git a/src/test/ui/span/impl-parsing.stderr b/src/test/ui/span/impl-parsing.stderr index 912638446b9..3cfcf7b7683 100644 --- a/src/test/ui/span/impl-parsing.stderr +++ b/src/test/ui/span/impl-parsing.stderr @@ -1,31 +1,31 @@ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:16:11 | -16 | impl Trait Type {} //~ ERROR missing `for` in a trait impl +LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl | ^ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:17:11 | -17 | impl Trait .. {} //~ ERROR missing `for` in a trait impl +LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl | ^ error: expected a trait, found type --> $DIR/impl-parsing.rs:18:6 | -18 | impl ?Sized for Type {} //~ ERROR expected a trait, found type +LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected a trait, found type --> $DIR/impl-parsing.rs:19:6 | -19 | impl ?Sized for .. {} //~ ERROR expected a trait, found type +LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected `impl`, found `FAIL` --> $DIR/impl-parsing.rs:21:16 | -21 | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` +LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` | ^^^^ expected `impl` here error: aborting due to 5 previous errors diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index 95114577dc3..ec5cfebedf9 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -1,67 +1,67 @@ error[E0437]: type `bar` is not a member of trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ not a member of trait `Foo` error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:23:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -23 | const bar: u64 = 1; +LL | const bar: u64 = 1; | ^^^^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:21:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -21 | impl Foo for FooConstForMethod { +LL | impl Foo for FooConstForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:33:5 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- item in trait ... -33 | fn MY_CONST() {} +LL | fn MY_CONST() {} | ^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `MY_CONST` --> $DIR/impl-wrong-item-for-trait.rs:30:1 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- `MY_CONST` from trait ... -30 | impl Foo for FooMethodForConst { +LL | impl Foo for FooMethodForConst { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:39:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -39 | impl Foo for FooTypeForMethod { +LL | impl Foo for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/impl-wrong-item-for-trait.rs:47:1 | -47 | impl Debug for FooTypeForMethod { +LL | impl Debug for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/span/import-ty-params.stderr b/src/test/ui/span/import-ty-params.stderr index e2c3e34c471..7e2c2d382fd 100644 --- a/src/test/ui/span/import-ty-params.stderr +++ b/src/test/ui/span/import-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:24:15 | -24 | import! { a::b::c::S } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^^^ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:27:15 | -27 | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index 9e5d5acb862..1185dc6a0cc 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,13 +1,13 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-11925.rs:18:36 | -18 | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough +LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough | ^ | | | borrowed value does not live long enough | `x` dropped here while still borrowed ... -23 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/issue-15480.stderr b/src/test/ui/span/issue-15480.stderr index 35a7390cf5c..c3298a4a0b5 100644 --- a/src/test/ui/span/issue-15480.stderr +++ b/src/test/ui/span/issue-15480.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-15480.rs:15:10 | -15 | &id(3) +LL | &id(3) | ^^^^^ temporary value does not live long enough -16 | ]; +LL | ]; | - temporary value dropped here while still borrowed ... -22 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime 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 71a83fe3cc9..ec5c7e637f4 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 @@ -1,9 +1,9 @@ error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5 | -20 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -21 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `y` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9 | -27 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -28 | }; +LL | }; | -- borrowed value needs to live until here | | | `y` dropped here while still borrowed diff --git a/src/test/ui/span/issue-23729.stderr b/src/test/ui/span/issue-23729.stderr index 6d112864b03..d80e3352ee4 100644 --- a/src/test/ui/span/issue-23729.stderr +++ b/src/test/ui/span/issue-23729.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Item` --> $DIR/issue-23729.rs:20:9 | -20 | impl Iterator for Recurrence { +LL | impl Iterator for Recurrence { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation | = note: `Item` from trait: `type Item;` diff --git a/src/test/ui/span/issue-23827.stderr b/src/test/ui/span/issue-23827.stderr index 7f58fe45e62..a94debd575c 100644 --- a/src/test/ui/span/issue-23827.stderr +++ b/src/test/ui/span/issue-23827.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Output` --> $DIR/issue-23827.rs:36:1 | -36 | impl FnOnce<(C,)> for Prototype { +LL | impl FnOnce<(C,)> for Prototype { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation | = note: `Output` from trait: `type Output;` diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index c529b258cb4..17a25821fd4 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Target` --> $DIR/issue-24356.rs:30:9 | -30 | impl Deref for Thing { +LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation | = note: `Target` from trait: `type Target;` diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 31728dbf08d..6a4ec73b27a 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -1,20 +1,20 @@ warning: unused variable: `theOtherTwo` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ help: consider using `_theOtherTwo` instead | note: lint level defined here --> $DIR/issue-24690.rs:18:9 | -18 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: variable `theTwo` should have a snake case name such as `the_two` --> $DIR/issue-24690.rs:22:9 | -22 | let theTwo = 2; //~ WARN should have a snake case name +LL | let theTwo = 2; //~ WARN should have a snake case name | ^^^^^^ | = note: #[warn(non_snake_case)] on by default @@ -22,17 +22,17 @@ warning: variable `theTwo` should have a snake case name such as `the_two` warning: variable `theOtherTwo` should have a snake case name such as `the_other_two` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ error: compilation successful --> $DIR/issue-24690.rs:21:1 | -21 | / fn main() { //~ ERROR compilation successful -22 | | let theTwo = 2; //~ WARN should have a snake case name -23 | | let theOtherTwo = 2; //~ WARN should have a snake case name -24 | | //~^ WARN unused variable -25 | | println!("{}", theTwo); -26 | | } +LL | / fn main() { //~ ERROR compilation successful +LL | | let theTwo = 2; //~ WARN should have a snake case name +LL | | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | | //~^ WARN unused variable +LL | | println!("{}", theTwo); +LL | | } | |_^ diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr index 3c6371aa968..284c07edf03 100644 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr +++ b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr @@ -1,10 +1,10 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:38:19 | -38 | _d = D_Child(&d1); +LL | _d = D_Child(&d1); | ^^ borrowed value does not live long enough ... -43 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr index fcec340a70e..e0e10ff672a 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:47:27 | -47 | _d = D_HasSelfMethod(&d1); +LL | _d = D_HasSelfMethod(&d1); | ^^ borrowed value does not live long enough -48 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:53:34 | -53 | _d = D_HasMethodWithSelfArg(&d1); +LL | _d = D_HasMethodWithSelfArg(&d1); | ^^ borrowed value does not live long enough -54 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -21,9 +21,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:59:21 | -59 | _d = D_HasType(&d1); +LL | _d = D_HasType(&d1); | ^^ borrowed value does not live long enough -60 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr index b10f5d7da1f..31ad51400a2 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24895-copy-clone-dropck.rs:37:15 | -37 | d2 = D(S(&d1, "inner"), "d2"); +LL | d2 = D(S(&d1, "inner"), "d2"); | ^^ borrowed value does not live long enough -38 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index 0a768468c51..fe2df9ce711 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -1,10 +1,10 @@ error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:80:28 | -80 | let test = Test{test: &container}; +LL | let test = Test{test: &container}; | ^^^^^^^^^ borrowed value does not live long enough ... -85 | } +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `container` does not live long enough error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:83:5 | -83 | container.store(test); +LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough -84 | //~^ ERROR `container` does not live long enough -85 | } +LL | //~^ ERROR `container` does not live long enough +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-26656.stderr b/src/test/ui/span/issue-26656.stderr index a1124e6e8ed..e15af193bec 100644 --- a/src/test/ui/span/issue-26656.stderr +++ b/src/test/ui/span/issue-26656.stderr @@ -1,9 +1,9 @@ error[E0597]: `ticking` does not live long enough --> $DIR/issue-26656.rs:50:36 | -50 | zook.button = B::BigRedButton(&ticking); +LL | zook.button = B::BigRedButton(&ticking); | ^^^^^^^ borrowed value does not live long enough -51 | } +LL | } | - `ticking` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index 4c816e047de..b171fde0f0f 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -1,7 +1,7 @@ error[E0307]: invalid `self` type: &SomeType --> $DIR/issue-27522.rs:16:22 | -16 | fn handler(self: &SomeType); //~ ERROR invalid `self` type +LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type | ^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it` diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index 3d3aab1166c..3d7bd2232e4 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -1,9 +1,9 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:26:27 | -26 | y = Arc::new(Foo(&x)); +LL | y = Arc::new(Foo(&x)); | ^ borrowed value does not live long enough -27 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `x` does not live long enough error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:33:26 | -33 | y = Rc::new(Foo(&x)); +LL | y = Rc::new(Foo(&x)); | ^ borrowed value does not live long enough -34 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-29595.stderr b/src/test/ui/span/issue-29595.stderr index 61c46f1a4b9..026d2ba41c7 100644 --- a/src/test/ui/span/issue-29595.stderr +++ b/src/test/ui/span/issue-29595.stderr @@ -1,13 +1,13 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied --> $DIR/issue-29595.rs:17:17 | -17 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied +LL | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied | ^^^^^ the trait `Tr` is not implemented for `u8` | note: required by `Tr::C` --> $DIR/issue-29595.rs:13:5 | -13 | const C: Self; +LL | const C: Self; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 48d697e7731..fc79b79877a 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-33884.rs:18:22 | -18 | stream.write_fmt(format!("message received")) +LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | = note: expected type `std::fmt::Arguments<'_>` diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index eb2b1b84201..bf2de0f1125 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -1,34 +1,34 @@ error: expected one of `:` or `@`, found `<` --> $DIR/issue-34264.rs:11:14 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `)` --> $DIR/issue-34264.rs:11:27 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `,` --> $DIR/issue-34264.rs:13:9 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:17:5 | -11 | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} //~ ERROR expected one of | --------------------------- defined here ... -17 | foo(Some(42), 2, ""); //~ ERROR this function takes +LL | foo(Some(42), 2, ""); //~ ERROR this function takes | ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters error[E0308]: mismatched types --> $DIR/issue-34264.rs:18:13 | -18 | bar("", ""); //~ ERROR mismatched types +LL | bar("", ""); //~ ERROR mismatched types | ^^ expected usize, found reference | = note: expected type `usize` @@ -37,10 +37,10 @@ error[E0308]: mismatched types error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:20:5 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ------------------- defined here ... -20 | bar(1, 2, 3); //~ ERROR this function takes +LL | bar(1, 2, 3); //~ ERROR this function takes | ^^^^^^^^^^^^ expected 2 parameters error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index 5b09342456e..596f2d76da6 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -1,11 +1,11 @@ error[E0404]: expected trait, found type parameter `Add` --> $DIR/issue-35987.rs:15:21 | -15 | impl Add for Foo { +LL | impl Add for Foo { | ^^^ not a trait help: possible better candidate is found in another module, you can import it into scope | -13 | use std::ops::Add; +LL | use std::ops::Add; | error[E0601]: main function not found diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 8a9375a32e5..69dd330838d 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:11:1 | -11 | #[foo] //~ ERROR is currently unknown to the compiler +LL | #[foo] //~ ERROR is currently unknown to the compiler | ^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may h error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:13:5 | -13 | #![foo] //~ ERROR is currently unknown to the compiler +LL | #![foo] //~ ERROR is currently unknown to the compiler | ^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index 24cabe55d0d..058e83ba4fd 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -1,10 +1,10 @@ error[E0597]: `a` does not live long enough --> $DIR/issue-36537.rs:14:10 | -14 | p = &a; +LL | p = &a; | ^ borrowed value does not live long enough -15 | //~^ ERROR `a` does not live long enough -16 | } +LL | //~^ ERROR `a` does not live long enough +LL | } | - `a` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index eab278d607b..ad72a064971 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -1,57 +1,57 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:20:7 | -20 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `A` --> $DIR/issue-37767.rs:12:5 | -12 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `A::foo(&a)` instead note: candidate #2 is defined in the trait `B` --> $DIR/issue-37767.rs:16:5 | -16 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `B::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:32:7 | -32 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `C` --> $DIR/issue-37767.rs:24:5 | -24 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `C::foo(&a)` instead note: candidate #2 is defined in the trait `D` --> $DIR/issue-37767.rs:28:5 | -28 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `D::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:44:7 | -44 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `E` --> $DIR/issue-37767.rs:36:5 | -36 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `E::foo(a)` instead note: candidate #2 is defined in the trait `F` --> $DIR/issue-37767.rs:40:5 | -40 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `F::foo(a)` instead diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index e841dfc5840..d300357fa0b 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -1,17 +1,17 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:12:13 | -12 | let x = "Hello " + "World!"; +LL | let x = "Hello " + "World!"; | ^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings 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 | -12 | let x = "Hello ".to_owned() + "World!"; +LL | let x = "Hello ".to_owned() + "World!"; | ^^^^^^^^^^^^^^^^^^^ error[E0369]: binary operation `+` cannot be applied to type `World` --> $DIR/issue-39018.rs:18:13 | -18 | let y = World::Hello + World::Goodbye; +LL | let y = World::Hello + World::Goodbye; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `World` @@ -19,15 +19,15 @@ error[E0369]: binary operation `+` cannot be applied to type `World` error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:21:13 | -21 | let x = "Hello " + "World!".to_owned(); +LL | let x = "Hello " + "World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate a `&str` with a `String` 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 | -21 | let x = "Hello ".to_owned() + "World!".to_owned(); +LL | let x = "Hello ".to_owned() + "World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^ help: you also need to borrow the `String` on the right to get a `&str` | -21 | let x = "Hello " + &"World!".to_owned(); +LL | let x = "Hello " + &"World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-39698.stderr b/src/test/ui/span/issue-39698.stderr index 888eb405a64..4222d40a12b 100644 --- a/src/test/ui/span/issue-39698.stderr +++ b/src/test/ui/span/issue-39698.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/issue-39698.rs:20:23 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - ^^^^^^^^^^^ ^^^^^^^^ - variable not in all patterns | | | | | | | pattern doesn't bind `a` @@ -11,7 +11,7 @@ error[E0408]: variable `a` is not bound in all patterns error[E0408]: variable `d` is not bound in all patterns --> $DIR/issue-39698.rs:20:37 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `d` | | | | | | | pattern doesn't bind `d` @@ -21,7 +21,7 @@ error[E0408]: variable `d` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `b` | | | | | | | pattern doesn't bind `b` @@ -31,7 +31,7 @@ error[E0408]: variable `b` is not bound in all patterns error[E0408]: variable `c` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ ^^^^^^^^^^^ - ^^^^^^^^ pattern doesn't bind `c` | | | | | | | variable not in all patterns diff --git a/src/test/ui/span/issue-40157.stderr b/src/test/ui/span/issue-40157.stderr index fa5036ae5a4..cc029ae84b6 100644 --- a/src/test/ui/span/issue-40157.stderr +++ b/src/test/ui/span/issue-40157.stderr @@ -1,7 +1,7 @@ error[E0597]: `foo` does not live long enough --> $DIR/issue-40157.rs:12:53 | -12 | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} +LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} | -----------------------------------------------^^^---------------------- | | | | | | | `foo` dropped here while still borrowed diff --git a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr index 567d8f33ed6..508608bd202 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -1,16 +1,16 @@ error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:17:5 | -16 | let x: Option<_> = None; +LL | let x: Option<_> = None; | - consider giving `x` a type -17 | x.unwrap().method_that_could_exist_on_some_type(); +LL | x.unwrap().method_that_could_exist_on_some_type(); | ^^^^^^^^^^ cannot infer type for `T` error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:22:5 | -22 | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed -23 | | .sum::<_>() +LL | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed +LL | | .sum::<_>() | |___________________^ cannot infer type for `_` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.stderr b/src/test/ui/span/issue-43927-non-ADT-derive.stderr index a0485bed2f4..e3575c03ff2 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.stderr +++ b/src/test/ui/span/issue-43927-non-ADT-derive.stderr @@ -1,7 +1,7 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43927-non-ADT-derive.rs:13:1 | -13 | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! +LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug, PartialEq, Eq)]` error: aborting due to previous error diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index df078c1330c..37e8200a308 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope --> $DIR/issue-7575.rs:74:18 | -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -9,19 +9,19 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope note: candidate #1 is defined in the trait `CtxtFn` --> $DIR/issue-7575.rs:16:5 | -16 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `CtxtFn::f9(u, 342)` instead note: candidate #2 is defined in the trait `OtherTrait` --> $DIR/issue-7575.rs:20:5 | -20 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `OtherTrait::f9(u, 342)` instead note: candidate #3 is defined in the trait `UnusedTrait` --> $DIR/issue-7575.rs:29:5 | -29 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `UnusedTrait::f9(u, 342)` instead = help: items from traits can only be used if the trait is implemented and in scope @@ -33,10 +33,10 @@ note: candidate #3 is defined in the trait `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope --> $DIR/issue-7575.rs:74:30 | -48 | struct Myisize(isize); +LL | struct Myisize(isize); | ---------------------- method `fff` not found for this ... -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -44,13 +44,13 @@ error[E0599]: no method named `fff` found for type `Myisize` in the current scop note: candidate #1 is defined in an impl for the type `Myisize` --> $DIR/issue-7575.rs:51:5 | -51 | fn fff(i: isize) -> isize { +LL | fn fff(i: isize) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `is_str` found for type `T` in the current scope --> $DIR/issue-7575.rs:82:7 | -82 | t.is_str() +LL | t.is_str() | ^^^^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -58,7 +58,7 @@ error[E0599]: no method named `is_str` found for type `T` in the current scope note: candidate #1 is defined in the trait `ManyImplTrait` --> $DIR/issue-7575.rs:57:5 | -57 | fn is_str() -> bool { +LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `ManyImplTrait::is_str(t)` instead = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 3504adc1602..adbbd676615 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -1,10 +1,10 @@ error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:44:29 | -44 | foo.data[0].1.set(Some(&foo.data[1])); +LL | foo.data[0].1.set(Some(&foo.data[1])); | ^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `foo.data` does not live long enough error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:46:29 | -46 | foo.data[1].1.set(Some(&foo.data[0])); +LL | foo.data[1].1.set(Some(&foo.data[0])); | ^^^^^^^^ borrowed value does not live long enough -47 | //~^ ERROR `foo.data` does not live long enough -48 | } +LL | //~^ ERROR `foo.data` does not live long enough +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.stderr index 5b4a1129d79..a701ff6eb3e 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:42:20 | -42 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:44:20 | -44 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr index a7497a1de01..934863fa4da 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped, Box::new(callback)); +LL | foo0 = Foo(0, &last_dropped, Box::new(callback)); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped, Box::new(callback)); +LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-trait-bound.stderr b/src/test/ui/span/issue28498-reject-trait-bound.stderr index 18512847238..4630022e9c4 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index 8a8b104098e..f85ca4ef00f 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -1,25 +1,25 @@ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:26:13 | -26 | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/lint-unused-unsafe.rs:14:9 | -14 | #![deny(unused_unsafe)] +LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:27:13 | -27 | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:28:20 | -28 | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -27,13 +27,13 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:29:13 | -29 | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:30:20 | -30 | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -41,26 +41,26 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:33:9 | -32 | unsafe { // don't put the warning here +LL | unsafe { // don't put the warning here | ------ because it's nested under this `unsafe` block -33 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:39:5 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:40:9 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block -40 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: aborting due to 8 previous errors diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index 728cd12e2c6..bb59fa206df 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -1,16 +1,16 @@ warning: struct is never used: `S` --> $DIR/macro-span-replacement.rs:17:14 | -17 | $b $a; //~ WARN struct is never used +LL | $b $a; //~ WARN struct is never used | ^ ... -22 | m!(S struct); +LL | m!(S struct); | ------------- in this macro invocation | note: lint level defined here --> $DIR/macro-span-replacement.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr index 2ac132f708c..3988dec88d5 100644 --- a/src/test/ui/span/macro-ty-params.stderr +++ b/src/test/ui/span/macro-ty-params.stderr @@ -1,25 +1,25 @@ error: unexpected generic arguments in path --> $DIR/macro-ty-params.rs:20:8 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^^^^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:18:8 | -18 | foo::!(); //~ ERROR generic arguments in macro path +LL | foo::!(); //~ ERROR generic arguments in macro path | ^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:19:8 | -19 | foo::<>!(); //~ ERROR generic arguments in macro path +LL | foo::<>!(); //~ ERROR generic arguments in macro path | ^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:20:15 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index 752087ffb92..a7417b006ad 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -1,68 +1,68 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:21:33 | -21 | let _: Result<(), String> = Ok(); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes | ^^^^ help: expected the unit value `()`; create it with empty parentheses | -21 | let _: Result<(), String> = Ok(()); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 2 parameters but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:22:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -22 | foo(); //~ ERROR this function takes +LL | foo(); //~ ERROR this function takes | ^^^^^ expected 2 parameters error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/missing-unit-argument.rs:23:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -23 | foo(()); //~ ERROR this function takes +LL | foo(()); //~ ERROR this function takes | ^^^^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:24:5 | -12 | fn bar(():()) {} +LL | fn bar(():()) {} | ------------- defined here ... -24 | bar(); //~ ERROR this function takes +LL | bar(); //~ ERROR this function takes | ^^^^^ help: expected the unit value `()`; create it with empty parentheses | -24 | bar(()); //~ ERROR this function takes +LL | bar(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:25:7 | -16 | fn baz(self, (): ()) { } +LL | fn baz(self, (): ()) { } | -------------------- defined here ... -25 | S.baz(); //~ ERROR this function takes +LL | S.baz(); //~ ERROR this function takes | ^^^ help: expected the unit value `()`; create it with empty parentheses | -25 | S.baz(()); //~ ERROR this function takes +LL | S.baz(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:26:7 | -17 | fn generic(self, _: T) { } +LL | fn generic(self, _: T) { } | ------------------------- defined here ... -26 | S.generic::<()>(); //~ ERROR this function takes +LL | S.generic::<()>(); //~ ERROR this function takes | ^^^^^^^ help: expected the unit value `()`; create it with empty parentheses | -26 | S.generic::<()>(()); //~ ERROR this function takes +LL | S.generic::<()>(()); //~ ERROR this function takes | ^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index f8f17404cf2..497224b7b53 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/move-closure.rs:15:17 | -15 | let x: () = move || (); //~ ERROR mismatched types +LL | let x: () = move || (); //~ ERROR mismatched types | ^^^^^^^^^^ expected (), found closure | = note: expected type `()` diff --git a/src/test/ui/span/multiline-span-E0072.stderr b/src/test/ui/span/multiline-span-E0072.stderr index 314c52e59d3..42ec3764fff 100644 --- a/src/test/ui/span/multiline-span-E0072.stderr +++ b/src/test/ui/span/multiline-span-E0072.stderr @@ -1,13 +1,13 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/multiline-span-E0072.rs:12:1 | -12 | / struct //~ ERROR has infinite size -13 | | ListNode -14 | | { -15 | | head: u8, -16 | | tail: Option, +LL | / struct //~ ERROR has infinite size +LL | | ListNode +LL | | { +LL | | head: u8, +LL | | tail: Option, | | ---------------------- recursive without indirection -17 | | } +LL | | } | |_^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index b1e48069fed..e3bb8349f8a 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `()` to `u32` --> $DIR/multiline-span-simple.rs:23:18 | -23 | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` +LL | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` | ^ no implementation for `u32 + ()` | = help: the trait `std::ops::Add<()>` is not implemented for `u32` diff --git a/src/test/ui/span/multispan-import-lint.stderr b/src/test/ui/span/multispan-import-lint.stderr index e2c1d9cdc79..da22b217b82 100644 --- a/src/test/ui/span/multispan-import-lint.stderr +++ b/src/test/ui/span/multispan-import-lint.stderr @@ -1,13 +1,13 @@ warning: unused imports: `Eq`, `Ord`, `PartialEq`, `PartialOrd` --> $DIR/multispan-import-lint.rs:15:16 | -15 | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; +LL | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; | ^^ ^^^ ^^^^^^^^^ ^^^^^^^^^^ | note: lint level defined here --> $DIR/multispan-import-lint.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_imports)] implied by #[warn(unused)] diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index e79ca70f3d2..73a63aabe67 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,25 +1,25 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:13:9 | -12 | fn foo(mut a: &String) { +LL | fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -13 | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:18:5 | -17 | pub fn foo<'a>(mut a: &'a String) { +LL | pub fn foo<'a>(mut a: &'a String) { | ---------- use `&'a mut String` here to make mutable -18 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:25:9 | -24 | pub fn foo(mut a: &String) { +LL | pub fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -25 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr index c08d15cd570..15694106fe8 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -1,12 +1,12 @@ error[E0597]: `b` does not live long enough --> $DIR/mut-ptr-cant-outlive-ref.rs:18:15 | -18 | p = &*b; +LL | p = &*b; | ^ borrowed value does not live long enough -19 | } +LL | } | - `b` dropped here while still borrowed -20 | //~^^ ERROR `b` does not live long enough -21 | } +LL | //~^^ ERROR `b` does not live long enough +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/non-existing-module-import.stderr b/src/test/ui/span/non-existing-module-import.stderr index 2b45d92724c..ed9ae1f21b4 100644 --- a/src/test/ui/span/non-existing-module-import.stderr +++ b/src/test/ui/span/non-existing-module-import.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `std::bar` --> $DIR/non-existing-module-import.rs:11:10 | -11 | use std::bar::{foo1, foo2}; //~ ERROR unresolved import +LL | use std::bar::{foo1, foo2}; //~ ERROR unresolved import | ^^^ Could not find `bar` in `std` error: aborting due to previous error diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index fe19259a140..40819e2e8ba 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -1,18 +1,18 @@ error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:16:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^ field already declared error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:17:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared -17 | pub(crate) bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared +LL | pub(crate) bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^^^^^^^^ field already declared error: aborting due to 2 previous errors diff --git a/src/test/ui/span/range-2.stderr b/src/test/ui/span/range-2.stderr index e580022dfcb..6378e55f803 100644 --- a/src/test/ui/span/range-2.stderr +++ b/src/test/ui/span/range-2.stderr @@ -1,23 +1,23 @@ error[E0597]: `a` does not live long enough --> $DIR/range-2.rs:17:10 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `a` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error[E0597]: `b` does not live long enough --> $DIR/range-2.rs:17:14 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `b` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index 6b8f6530233..7ac63d3ca6e 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -1,9 +1,9 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/recursive-type-field.rs:13:1 | -13 | struct Foo<'a> { //~ ERROR recursive type +LL | struct Foo<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -14 | bar: Bar<'a>, +LL | bar: Bar<'a>, | ------------ recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable @@ -11,18 +11,18 @@ error[E0072]: recursive type `Foo` has infinite size error[E0072]: recursive type `Bar` has infinite size --> $DIR/recursive-type-field.rs:18:1 | -18 | struct Bar<'a> { //~ ERROR recursive type +LL | struct Bar<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -19 | y: (Foo<'a>, Foo<'a>), +LL | y: (Foo<'a>, Foo<'a>), | --------------------- recursive without indirection -20 | z: Option>, +LL | z: Option>, | ------------------ recursive without indirection ... -23 | d: [Bar<'a>; 1], +LL | d: [Bar<'a>; 1], | --------------- recursive without indirection -24 | e: Foo<'a>, +LL | e: Foo<'a>, | ---------- recursive without indirection -25 | x: Bar<'a>, +LL | x: Bar<'a>, | ---------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr index c437fd1b48a..c9e8a6d8f56 100644 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr +++ b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr @@ -1,12 +1,12 @@ error[E0597]: `c` does not live long enough --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22 | -17 | let c_ref = &c; +LL | let c_ref = &c; | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `c` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr index 19290139efc..785a4718253 100644 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr +++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27 | -22 | let ss: &isize = &id(1); +LL | let ss: &isize = &id(1); | ^^^^^ temporary value does not live long enough ... -25 | } +LL | } | - temporary value dropped here while still borrowed -26 | } +LL | } | - temporary value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.stderr b/src/test/ui/span/regions-close-over-type-parameter-2.stderr index f4a7ed61928..9e8c4000d06 100644 --- a/src/test/ui/span/regions-close-over-type-parameter-2.stderr +++ b/src/test/ui/span/regions-close-over-type-parameter-2.stderr @@ -1,10 +1,10 @@ error[E0597]: `tmp0` does not live long enough --> $DIR/regions-close-over-type-parameter-2.rs:33:21 | -33 | let tmp1 = &tmp0; +LL | let tmp1 = &tmp0; | ^^^^ borrowed value does not live long enough -34 | repeater3(tmp1) -35 | }; +LL | repeater3(tmp1) +LL | }; | -- borrowed value needs to live until here | | | `tmp0` dropped here while still borrowed diff --git a/src/test/ui/span/regions-escape-loop-via-variable.stderr b/src/test/ui/span/regions-escape-loop-via-variable.stderr index 780276d770e..1bc8e996d01 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -1,12 +1,12 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-escape-loop-via-variable.rs:21:14 | -21 | p = &x; +LL | p = &x; | ^ borrowed value does not live long enough -22 | } +LL | } | - `x` dropped here while still borrowed -23 | //~^^ ERROR `x` does not live long enough -24 | } +LL | //~^^ ERROR `x` does not live long enough +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-vec.stderr b/src/test/ui/span/regions-escape-loop-via-vec.stderr index 71fc4c24ebd..2cb8df235b4 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -1,38 +1,38 @@ error[E0597]: `z` does not live long enough --> $DIR/regions-escape-loop-via-vec.rs:17:22 | -17 | _y.push(&mut z); +LL | _y.push(&mut z); | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `z` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:15:11 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed | ^ use of borrowed `x` error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:16:13 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed -16 | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed | ^^^^^ use of borrowed `x` error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/regions-escape-loop-via-vec.rs:19:9 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here ... -19 | x += 1; //~ ERROR cannot assign +LL | x += 1; //~ ERROR cannot assign | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr index 10b6c05b5f4..42240509a9e 100644 --- a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr +++ b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr @@ -1,13 +1,13 @@ error[E0597]: `*x` does not live long enough --> $DIR/regions-infer-borrow-scope-within-loop.rs:24:21 | -24 | y = borrow(&*x); +LL | y = borrow(&*x); | ^^ borrowed value does not live long enough ... -29 | } +LL | } | - `*x` dropped here while still borrowed -30 | assert!(*y != 0); -31 | } +LL | assert!(*y != 0); +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr index 5d8e4ff86ee..462c01d849b 100644 --- a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr +++ b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr @@ -1,27 +1,27 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:26:18 | -26 | let y = &x; +LL | let y = &x; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - `x` dropped here while still borrowed ... -36 | } +LL | } | - borrowed value needs to live until here error[E0597]: `y` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:30:22 | -29 | scoped(|| { +LL | scoped(|| { | -- capture occurs here -30 | let _z = y; +LL | let _z = y; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - borrowed value only lives until here ... -36 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync-2.stderr b/src/test/ui/span/send-is-not-static-std-sync-2.stderr index 2d7e4667a40..ed6363a2e33 100644 --- a/src/test/ui/span/send-is-not-static-std-sync-2.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync-2.stderr @@ -1,35 +1,35 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:21:21 | -21 | Mutex::new(&x) +LL | Mutex::new(&x) | ^ borrowed value does not live long enough -22 | }; +LL | }; | - `x` dropped here while still borrowed ... -26 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:31:22 | -31 | RwLock::new(&x) +LL | RwLock::new(&x) | ^ borrowed value does not live long enough -32 | }; +LL | }; | - `x` dropped here while still borrowed ... -35 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:41:26 | -41 | let _ = tx.send(&x); +LL | let _ = tx.send(&x); | ^ borrowed value does not live long enough -42 | (tx, rx) -43 | }; +LL | (tx, rx) +LL | }; | - `x` dropped here while still borrowed ... -47 | } +LL | } | - borrowed value needs to live until here error: aborting due to 3 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync.stderr b/src/test/ui/span/send-is-not-static-std-sync.stderr index 66e2abba710..ffaccf010a9 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.stderr @@ -1,58 +1,58 @@ error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:26:34 | -26 | *lock.lock().unwrap() = &z; +LL | *lock.lock().unwrap() = &z; | ^ borrowed value does not live long enough -27 | } +LL | } | - `z` dropped here while still borrowed -28 | //~^^ ERROR `z` does not live long enough -29 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:23:10 | -22 | *lock.lock().unwrap() = &*y; +LL | *lock.lock().unwrap() = &*y; | -- borrow of `*y` occurs here -23 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:39:35 | -39 | *lock.write().unwrap() = &z; +LL | *lock.write().unwrap() = &z; | ^ borrowed value does not live long enough -40 | } +LL | } | - `z` dropped here while still borrowed -41 | //~^^ ERROR `z` does not live long enough -42 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:36:10 | -35 | *lock.write().unwrap() = &*y; +LL | *lock.write().unwrap() = &*y; | -- borrow of `*y` occurs here -36 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:54:18 | -54 | tx.send(&z).unwrap(); +LL | tx.send(&z).unwrap(); | ^ borrowed value does not live long enough -55 | } +LL | } | - `z` dropped here while still borrowed -56 | //~^^ ERROR `z` does not live long enough -57 | } +LL | //~^^ ERROR `z` does not live long enough +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:51:10 | -50 | tx.send(&*y); +LL | tx.send(&*y); | -- borrow of `*y` occurs here -51 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error: aborting due to 6 previous errors diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 6f6a187a075..3cc791a0580 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/slice-borrow.rs:16:28 | -16 | let x: &[isize] = &vec![1, 2, 3, 4, 5]; +LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -17 | y = &x[1..]; -18 | } +LL | y = &x[1..]; +LL | } | - temporary value dropped here while still borrowed -19 | } +LL | } | - temporary value needs to live until here | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/span/suggestion-non-ascii.stderr b/src/test/ui/span/suggestion-non-ascii.stderr index 02c0b73c0c7..331d18fad54 100644 --- a/src/test/ui/span/suggestion-non-ascii.stderr +++ b/src/test/ui/span/suggestion-non-ascii.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `({integer},)` --> $DIR/suggestion-non-ascii.rs:14:21 | -14 | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type +LL | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type | ^^^^^^ help: to access tuple elements, use: `tup.0` error: aborting due to previous error diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr index 984504071ac..407897bfcfe 100644 --- a/src/test/ui/span/type-binding.stderr +++ b/src/test/ui/span/type-binding.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Trget` not found for `std::ops::Deref` --> $DIR/type-binding.rs:16:20 | -16 | fn homura>(_: T) {} +LL | fn homura>(_: T) {} | ^^^^^^^^^^^ associated type `Trget` not found error: aborting due to previous error diff --git a/src/test/ui/span/typo-suggestion.stderr b/src/test/ui/span/typo-suggestion.stderr index 31247bddbc8..01056597013 100644 --- a/src/test/ui/span/typo-suggestion.stderr +++ b/src/test/ui/span/typo-suggestion.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/typo-suggestion.rs:15:26 | -15 | println!("Hello {}", bar); //~ ERROR cannot find value +LL | println!("Hello {}", bar); //~ ERROR cannot find value | ^^^ not found in this scope error[E0425]: cannot find value `fob` in this scope --> $DIR/typo-suggestion.rs:18:26 | -18 | println!("Hello {}", fob); //~ ERROR cannot find value +LL | println!("Hello {}", fob); //~ ERROR cannot find value | ^^^ did you mean `foo`? error: aborting due to 2 previous errors diff --git a/src/test/ui/span/unused-warning-point-at-signature.stderr b/src/test/ui/span/unused-warning-point-at-signature.stderr index ed36bd17801..de234344d84 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -1,36 +1,36 @@ warning: enum is never used: `Enum` --> $DIR/unused-warning-point-at-signature.rs:15:1 | -15 | enum Enum { //~ WARN enum is never used +LL | enum Enum { //~ WARN enum is never used | ^^^^^^^^^ | note: lint level defined here --> $DIR/unused-warning-point-at-signature.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] warning: struct is never used: `Struct` --> $DIR/unused-warning-point-at-signature.rs:22:1 | -22 | struct Struct { //~ WARN struct is never used +LL | struct Struct { //~ WARN struct is never used | ^^^^^^^^^^^^^ warning: function is never used: `func` --> $DIR/unused-warning-point-at-signature.rs:29:1 | -29 | fn func() -> usize { //~ WARN function is never used +LL | fn func() -> usize { //~ WARN function is never used | ^^^^^^^^^^^^^^^^^^ warning: function is never used: `func_complete_span` --> $DIR/unused-warning-point-at-signature.rs:33:1 | -33 | / fn //~ WARN function is never used -34 | | func_complete_span() -35 | | -> usize -36 | | { -37 | | 3 -38 | | } +LL | / fn //~ WARN function is never used +LL | | func_complete_span() +LL | | -> usize +LL | | { +LL | | 3 +LL | | } | |_^ diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr index 26417e94b8b..f9a94290603 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr @@ -1,24 +1,24 @@ error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 - | -127 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -131 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 - | -129 | c2.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough -130 | //~^ ERROR `c1` does not live long enough -131 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 + | +LL | c2.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough +LL | //~^ ERROR `c1` does not live long enough +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 2 previous errors diff --git a/src/test/ui/span/vec_refs_data_with_early_death.stderr b/src/test/ui/span/vec_refs_data_with_early_death.stderr index 8402826a0bc..cdf0cd6de5c 100644 --- a/src/test/ui/span/vec_refs_data_with_early_death.stderr +++ b/src/test/ui/span/vec_refs_data_with_early_death.stderr @@ -1,10 +1,10 @@ error[E0597]: `x` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:27:13 | -27 | v.push(&x); +LL | v.push(&x); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:29:13 | -29 | v.push(&y); +LL | v.push(&y); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/visibility-ty-params.stderr b/src/test/ui/span/visibility-ty-params.stderr index 8460f81af83..7719bd48c85 100644 --- a/src/test/ui/span/visibility-ty-params.stderr +++ b/src/test/ui/span/visibility-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:16:5 | -16 | m!{ S } //~ ERROR unexpected generic arguments in path +LL | m!{ S } //~ ERROR unexpected generic arguments in path | ^^^^^ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:19:9 | -19 | m!{ m<> } //~ ERROR unexpected generic arguments in path +LL | m!{ m<> } //~ ERROR unexpected generic arguments in path | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/wf-method-late-bound-regions.stderr b/src/test/ui/span/wf-method-late-bound-regions.stderr index a0fe9d1ae18..30b1086bbd7 100644 --- a/src/test/ui/span/wf-method-late-bound-regions.stderr +++ b/src/test/ui/span/wf-method-late-bound-regions.stderr @@ -1,12 +1,12 @@ error[E0597]: `pointer` does not live long enough --> $DIR/wf-method-late-bound-regions.rs:30:19 | -30 | f2.xmute(&pointer) +LL | f2.xmute(&pointer) | ^^^^^^^ borrowed value does not live long enough -31 | }; +LL | }; | - `pointer` dropped here while still borrowed ... -34 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/specialization-feature-gate-default.stderr b/src/test/ui/specialization-feature-gate-default.stderr index c1fdb8aea13..0ce10ec8184 100644 --- a/src/test/ui/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization-feature-gate-default.stderr @@ -1,7 +1,7 @@ error[E0658]: specialization is unstable (see issue #31844) --> $DIR/specialization-feature-gate-default.rs:20:5 | -20 | default fn foo(&self) {} //~ ERROR specialization is unstable +LL | default fn foo(&self) {} //~ ERROR specialization is unstable | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(specialization)] to the crate attributes to enable diff --git a/src/test/ui/specialization-feature-gate-overlap.stderr b/src/test/ui/specialization-feature-gate-overlap.stderr index 77554531f98..00b495dbacd 100644 --- a/src/test/ui/specialization-feature-gate-overlap.stderr +++ b/src/test/ui/specialization-feature-gate-overlap.stderr @@ -1,10 +1,10 @@ error[E0119]: conflicting implementations of trait `Foo` for type `u8`: --> $DIR/specialization-feature-gate-overlap.rs:23:1 | -19 | impl Foo for T { +LL | impl Foo for T { | ----------------- first implementation here ... -23 | impl Foo for u8 { //~ ERROR E0119 +LL | impl Foo for u8 { //~ ERROR E0119 | ^^^^^^^^^^^^^^^ conflicting implementation for `u8` error: aborting due to previous error diff --git a/src/test/ui/static-lifetime.stderr b/src/test/ui/static-lifetime.stderr index fea70e922f8..abd82cd78ae 100644 --- a/src/test/ui/static-lifetime.stderr +++ b/src/test/ui/static-lifetime.stderr @@ -1,13 +1,13 @@ error[E0478]: lifetime bound not satisfied --> $DIR/static-lifetime.rs:13:20 | -13 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound | ^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'a as defined on the impl at 13:1 --> $DIR/static-lifetime.rs:13:1 | -13 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: but lifetime parameter must outlive the static lifetime diff --git a/src/test/ui/str-concat-on-double-ref.stderr b/src/test/ui/str-concat-on-double-ref.stderr index cc0dcb177af..8216455ece4 100644 --- a/src/test/ui/str-concat-on-double-ref.stderr +++ b/src/test/ui/str-concat-on-double-ref.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` --> $DIR/str-concat-on-double-ref.rs:14:13 | -14 | let c = a + b; +LL | let c = a + b; | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `&std::string::String` diff --git a/src/test/ui/str-lit-type-mismatch.stderr b/src/test/ui/str-lit-type-mismatch.stderr index 448f5b5aa14..52be4e80393 100644 --- a/src/test/ui/str-lit-type-mismatch.stderr +++ b/src/test/ui/str-lit-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:13:20 | -13 | let x: &[u8] = "foo"; //~ ERROR mismatched types +LL | let x: &[u8] = "foo"; //~ ERROR mismatched types | ^^^^^ | | | expected slice, found str @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:14:23 | -14 | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types +LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types | ^^^^^^ | | | expected array of 4 elements, found str @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:15:19 | -15 | let z: &str = b"foo"; //~ ERROR mismatched types +LL | let z: &str = b"foo"; //~ ERROR mismatched types | ^^^^^^ | | | expected str, found array of 3 elements diff --git a/src/test/ui/struct-field-init-syntax.stderr b/src/test/ui/struct-field-init-syntax.stderr index 0bca3f83eb1..2c4ae0e472b 100644 --- a/src/test/ui/struct-field-init-syntax.stderr +++ b/src/test/ui/struct-field-init-syntax.stderr @@ -1,7 +1,7 @@ error: cannot use a comma after the base struct --> $DIR/struct-field-init-syntax.rs:18:9 | -18 | ..Foo::default(), +LL | ..Foo::default(), | ^^^^^^^^^^^^^^^^- help: remove this comma | = note: the base struct must always be the last field @@ -9,7 +9,7 @@ error: cannot use a comma after the base struct error: cannot use a comma after the base struct --> $DIR/struct-field-init-syntax.rs:23:9 | -23 | ..Foo::default(), +LL | ..Foo::default(), | ^^^^^^^^^^^^^^^^- help: remove this comma | = note: the base struct must always be the last field diff --git a/src/test/ui/struct-fields-decl-dupe.stderr b/src/test/ui/struct-fields-decl-dupe.stderr index dae761fcb05..272ce6b1607 100644 --- a/src/test/ui/struct-fields-decl-dupe.stderr +++ b/src/test/ui/struct-fields-decl-dupe.stderr @@ -1,9 +1,9 @@ error[E0124]: field `foo` is already declared --> $DIR/struct-fields-decl-dupe.rs:13:5 | -12 | foo: isize, +LL | foo: isize, | ---------- `foo` first declared here -13 | foo: isize, +LL | foo: isize, | ^^^^^^^^^^ field already declared error: aborting due to previous error diff --git a/src/test/ui/struct-fields-hints-no-dupe.stderr b/src/test/ui/struct-fields-hints-no-dupe.stderr index 5a08a5c4841..7c276098feb 100644 --- a/src/test/ui/struct-fields-hints-no-dupe.stderr +++ b/src/test/ui/struct-fields-hints-no-dupe.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints-no-dupe.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^ field does not exist - did you mean `barr`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-hints.stderr b/src/test/ui/struct-fields-hints.stderr index 1f0995f1dc0..6e4d3008660 100644 --- a/src/test/ui/struct-fields-hints.stderr +++ b/src/test/ui/struct-fields-hints.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^ field does not exist - did you mean `car`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-too-many.stderr b/src/test/ui/struct-fields-too-many.stderr index 6818a737ce0..8132cf687a3 100644 --- a/src/test/ui/struct-fields-too-many.stderr +++ b/src/test/ui/struct-fields-too-many.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `BuildData` has no field named `bar` --> $DIR/struct-fields-too-many.rs:18:9 | -18 | bar: 0 +LL | bar: 0 | ^^^ `BuildData` does not have this field | = note: available fields are: `foo` diff --git a/src/test/ui/struct-path-self-type-mismatch.stderr b/src/test/ui/struct-path-self-type-mismatch.stderr index 9b51b13873c..a038a723402 100644 --- a/src/test/ui/struct-path-self-type-mismatch.stderr +++ b/src/test/ui/struct-path-self-type-mismatch.stderr @@ -1,13 +1,13 @@ error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:17:23 | -17 | Self { inner: 1.5f32 }; //~ ERROR mismatched types +LL | Self { inner: 1.5f32 }; //~ ERROR mismatched types | ^^^^^^ expected i32, found f32 error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:25:20 | -25 | inner: u +LL | inner: u | ^ expected type parameter, found a different type parameter | = note: expected type `T` @@ -16,13 +16,13 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:23:9 | -22 | fn new(u: U) -> Foo { +LL | fn new(u: U) -> Foo { | ------ expected `Foo` because of return type -23 | / Self { -24 | | //~^ ERROR mismatched types -25 | | inner: u -26 | | //~^ ERROR mismatched types -27 | | } +LL | / Self { +LL | | //~^ ERROR mismatched types +LL | | inner: u +LL | | //~^ ERROR mismatched types +LL | | } | |_________^ expected type parameter, found a different type parameter | = note: expected type `Foo` diff --git a/src/test/ui/suggest-private-fields.stderr b/src/test/ui/suggest-private-fields.stderr index d5dda75bfce..fb3d8a67569 100644 --- a/src/test/ui/suggest-private-fields.stderr +++ b/src/test/ui/suggest-private-fields.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `xc::B` has no field named `aa` --> $DIR/suggest-private-fields.rs:25:9 | -25 | aa: 20, +LL | aa: 20, | ^^ field does not exist - did you mean `a`? error[E0560]: struct `xc::B` has no field named `bb` --> $DIR/suggest-private-fields.rs:27:9 | -27 | bb: 20, +LL | bb: 20, | ^^ `xc::B` does not have this field | = note: available fields are: `a` @@ -15,13 +15,13 @@ error[E0560]: struct `xc::B` has no field named `bb` error[E0560]: struct `A` has no field named `aa` --> $DIR/suggest-private-fields.rs:32:9 | -32 | aa: 20, +LL | aa: 20, | ^^ field does not exist - did you mean `a`? error[E0560]: struct `A` has no field named `bb` --> $DIR/suggest-private-fields.rs:34:9 | -34 | bb: 20, +LL | bb: 20, | ^^ field does not exist - did you mean `b`? error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr index da51bda60ce..a6fda3d7987 100644 --- a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr +++ b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr @@ -1,9 +1,9 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure --> $DIR/closure-immutable-outer-variable.rs:19:26 | -18 | let y = true; +LL | let y = true; | - help: consider making `y` mutable: `mut y` -19 | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable +LL | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr index 81b6378df51..69b2ab0eadd 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-18343.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-18343.rs:16:28: 16:33]>` in the current scope --> $DIR/issue-18343.rs:17:7 | -11 | struct Obj where F: FnMut() -> u32 { +LL | struct Obj where F: FnMut() -> u32 { | ------------------------------------- method `closure` not found for this ... -17 | o.closure(); +LL | o.closure(); | ^^^^^^^ field, not a method | = help: use `(o.closure)(...)` if you meant to call the function stored in the `closure` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr index 7de446b3f14..29138441a91 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:49:36: 49:41]>` in the current scope --> $DIR/issue-2392.rs:50:15 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -50 | o_closure.closure(); //~ ERROR no method named `closure` found +LL | o_closure.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field @@ -12,10 +12,10 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue- error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:49:36: 49:41]>` in the current scope --> $DIR/issue-2392.rs:52:15 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... -52 | o_closure.not_closure(); +LL | o_closure.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `o_closure.not_closure` instead of `o_closure.not_closure(...)`? @@ -23,10 +23,10 @@ error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/is error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:56:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -56 | o_func.closure(); //~ ERROR no method named `closure` found +LL | o_func.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field @@ -34,10 +34,10 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:59:14 | -30 | struct BoxedObj { +LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -59 | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -45,10 +45,10 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:62:19 | -30 | struct BoxedObj { +LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -62 | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -56,10 +56,10 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:67:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -67 | w.wrap.closure();//~ ERROR no method named `closure` found +LL | w.wrap.closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field @@ -67,10 +67,10 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` error[E0599]: no method named `not_closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:69:12 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... -69 | w.wrap.not_closure(); +LL | w.wrap.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `w.wrap.not_closure` instead of `w.wrap.not_closure(...)`? @@ -78,10 +78,10 @@ error[E0599]: no method named `not_closure` found for type `Obj u32 {fun error[E0599]: no method named `closure` found for type `Obj + 'static>>` in the current scope --> $DIR/issue-2392.rs:72:24 | -25 | struct Obj where F: FnOnce() -> u32 { +LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -72 | check_expression().closure();//~ ERROR no method named `closure` found +LL | check_expression().closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field @@ -89,10 +89,10 @@ error[E0599]: no method named `closure` found for type `Obj $DIR/issue-2392.rs:78:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f1` not found for this ... -78 | (*self.container).f1(1); //~ ERROR no method named `f1` found +LL | (*self.container).f1(1); //~ ERROR no method named `f1` found | ^^ field, not a method | = help: use `((*self.container).f1)(...)` if you meant to call the function stored in the `f1` field @@ -100,10 +100,10 @@ error[E0599]: no method named `f1` found for type `FuncContainer` in the current error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:79:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f2` not found for this ... -79 | (*self.container).f2(1); //~ ERROR no method named `f2` found +LL | (*self.container).f2(1); //~ ERROR no method named `f2` found | ^^ field, not a method | = help: use `((*self.container).f2)(...)` if you meant to call the function stored in the `f2` field @@ -111,10 +111,10 @@ error[E0599]: no method named `f2` found for type `FuncContainer` in the current error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:80:31 | -15 | struct FuncContainer { +LL | struct FuncContainer { | -------------------- method `f3` not found for this ... -80 | (*self.container).f3(1); //~ ERROR no method named `f3` found +LL | (*self.container).f3(1); //~ ERROR no method named `f3` found | ^^ field, not a method | = help: use `((*self.container).f3)(...)` if you meant to call the function stored in the `f3` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr index 98f8f86d846..e405300b136 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-32128.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `example` found for type `Example` in the current scope --> $DIR/issue-32128.rs:22:10 | -11 | struct Example { +LL | struct Example { | -------------- method `example` not found for this ... -22 | demo.example(1); +LL | demo.example(1); | ^^^^^^^ field, not a method | = help: use `(demo.example)(...)` if you meant to call the function stored in the `example` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr b/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr index 1b606672437..a58ea05221c 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/issue-33784.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:35:43: 35:48]>` in the current scope --> $DIR/issue-33784.rs:37:7 | -37 | p.closure(); //~ ERROR no method named `closure` found +LL | p.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(p.closure)(...)` if you meant to call the function stored in the `closure` field @@ -9,7 +9,7 @@ error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue-33784.rs:35:43: 35:48]>` in the current scope --> $DIR/issue-33784.rs:39:7 | -39 | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found +LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found | ^^^^^^ field, not a method | = help: use `(q.fn_ptr)(...)` if you meant to call the function stored in the `fn_ptr` field @@ -17,7 +17,7 @@ error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope --> $DIR/issue-33784.rs:42:7 | -42 | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found +LL | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found | ^^^^^^^^ field, not a method | = help: use `(s.c_fn_ptr)(...)` if you meant to call the function stored in the `c_fn_ptr` field diff --git a/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr b/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr index 7e3d66fd6da..3e934ca391a 100644 --- a/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr +++ b/src/test/ui/suggestions/confuse-field-and-method/private-field.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `dog_age` found for type `animal::Dog` in the current scope --> $DIR/private-field.rs:26:23 | -12 | pub struct Dog { +LL | pub struct Dog { | -------------- method `dog_age` not found for this ... -26 | let dog_age = dog.dog_age(); //~ ERROR no method +LL | let dog_age = dog.dog_age(); //~ ERROR no method | ^^^^^^^ private field, not a method error: aborting due to previous error diff --git a/src/test/ui/suggestions/conversion-methods.stderr b/src/test/ui/suggestions/conversion-methods.stderr index 8271b841913..b8d1c89ec37 100644 --- a/src/test/ui/suggestions/conversion-methods.stderr +++ b/src/test/ui/suggestions/conversion-methods.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/conversion-methods.rs:15:41 | -15 | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types +LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found reference @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:16:40 | -16 | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); +LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::path::PathBuf`, found reference @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:19:40 | -19 | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here +LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here | ^ | | | expected struct `std::string::String`, found integral variable @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/conversion-methods.rs:22:47 | -22 | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types +LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types | ^^^^^^^^^^ | | | expected struct `std::vec::Vec`, found reference diff --git a/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr b/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr index 6cfbce39019..9a9f64b94a7 100644 --- a/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr +++ b/src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr @@ -1,7 +1,7 @@ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> $DIR/dont-suggest-dereference-on-arg.rs:16:18 | -16 | .filter(|&(ref a, _)| foo(a)) +LL | .filter(|&(ref a, _)| foo(a)) | ^^^^^^^^^^^ help: consider using a reference: `&&(ref a, _)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable diff --git a/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr b/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr index 7a387a4cd9e..2dfedac8be2 100644 --- a/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr +++ b/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr @@ -1,10 +1,10 @@ error[E0599]: no function or associated item named `new` found for type `T` in the current scope --> $DIR/dont-suggest-private-trait-method.rs:14:5 | -11 | struct T; +LL | struct T; | --------- function or associated item `new` not found for this ... -14 | T::new(); +LL | T::new(); | ^^^^^^ function or associated item not found in `T` error: aborting due to previous error diff --git a/src/test/ui/suggestions/extern-crate-rename.stderr b/src/test/ui/suggestions/extern-crate-rename.stderr index b35d92100ab..aefbbc79ba9 100644 --- a/src/test/ui/suggestions/extern-crate-rename.stderr +++ b/src/test/ui/suggestions/extern-crate-rename.stderr @@ -1,9 +1,9 @@ error[E0259]: the name `m1` is defined multiple times --> $DIR/extern-crate-rename.rs:16:1 | -15 | extern crate m1; +LL | extern crate m1; | ---------------- previous import of the extern crate `m1` here -16 | extern crate m2 as m1; //~ ERROR is defined multiple times +LL | extern crate m2 as m1; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^ | | | `m1` reimported here diff --git a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr index 5a7b8194733..e46900ba49d 100644 --- a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr +++ b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr @@ -1,14 +1,14 @@ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/fn-closure-mutable-capture.rs:15:17 | -15 | bar(move || x = 1); +LL | bar(move || x = 1); | ^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications help: consider changing this closure to take self by mutable reference --> $DIR/fn-closure-mutable-capture.rs:15:9 | -15 | bar(move || x = 1); +LL | bar(move || x = 1); | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/for-c-in-str.stderr b/src/test/ui/suggestions/for-c-in-str.stderr index edc30706d3a..f3130d0587c 100644 --- a/src/test/ui/suggestions/for-c-in-str.stderr +++ b/src/test/ui/suggestions/for-c-in-str.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `&str: std::iter::Iterator` is not satisfied --> $DIR/for-c-in-str.rs:14:14 | -14 | for c in "asdf" { +LL | for c in "asdf" { | ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` | = help: the trait `std::iter::Iterator` is not implemented for `&str` diff --git a/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr b/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr index dea67758893..c9babb6a6d9 100644 --- a/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr +++ b/src/test/ui/suggestions/issue-32354-suggest-import-rename.stderr @@ -1,15 +1,15 @@ error[E0252]: the name `ConstructorExtension` is defined multiple times --> $DIR/issue-32354-suggest-import-rename.rs:20:5 | -19 | use extension1::ConstructorExtension; +LL | use extension1::ConstructorExtension; | -------------------------------- previous import of the trait `ConstructorExtension` here -20 | use extension2::ConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConstructorExtension` reimported here | = note: `ConstructorExtension` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -20 | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr b/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr index 08c098e82cf..387b9cfcf32 100644 --- a/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-43420-no-over-suggest.rs:18:9 | -18 | foo(&a); //~ ERROR mismatched types +LL | foo(&a); //~ ERROR mismatched types | ^^ expected slice, found struct `std::vec::Vec` | = note: expected type `&[u16]` diff --git a/src/test/ui/suggestions/issue-45562.stderr b/src/test/ui/suggestions/issue-45562.stderr index 2f8c4cd3f2e..d6960dca054 100644 --- a/src/test/ui/suggestions/issue-45562.stderr +++ b/src/test/ui/suggestions/issue-45562.stderr @@ -1,7 +1,7 @@ error: const items should never be #[no_mangle] --> $DIR/issue-45562.rs:11:14 | -11 | #[no_mangle] pub const RAH: usize = 5; +LL | #[no_mangle] pub const RAH: usize = 5; | ---------^^^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` diff --git a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr index d44b1af385d..22c82be100c 100644 --- a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr +++ b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr @@ -1,13 +1,13 @@ error[E0259]: the name `std` is defined multiple times --> $DIR/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs:11:1 | -11 | extern crate std; +LL | extern crate std; | ^^^^^^^^^^^^^^^^^ `std` reimported here | = note: `std` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | extern crate std as other_std; +LL | extern crate std as other_std; | error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr b/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr index ae0204ae0d5..4d75ee0284c 100644 --- a/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr +++ b/src/test/ui/suggestions/issue-46756-consider-borrowing-cast-or-binexpr.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:20:42 | -20 | light_flows_our_war_of_mocking_words(behold as usize); +LL | light_flows_our_war_of_mocking_words(behold as usize); | ^^^^^^^^^^^^^^^ | | | expected &usize, found usize @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:22:42 | -22 | light_flows_our_war_of_mocking_words(with_tears + 4); +LL | light_flows_our_war_of_mocking_words(with_tears + 4); | ^^^^^^^^^^^^^^ | | | expected &usize, found usize diff --git a/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr b/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr index 287835f2136..ddd38ca5c3c 100644 --- a/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr @@ -1,21 +1,21 @@ error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/method-on-ambiguous-numeric-type.rs:12:17 | -12 | let x = 2.0.powi(2); +LL | let x = 2.0.powi(2); | ^^^^ help: you must specify a concrete type for this numeric value, like `f32` | -12 | let x = 2.0_f32.powi(2); +LL | let x = 2.0_f32.powi(2); | ^^^^^^^ error[E0689]: can't call method `powi` on ambiguous numeric type `{float}` --> $DIR/method-on-ambiguous-numeric-type.rs:15:15 | -15 | let x = y.powi(2); +LL | let x = y.powi(2); | ^^^^ help: you must specify a type for this binding, like `f32` | -14 | let y: f32 = 2.0; +LL | let y: f32 = 2.0; | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/numeric-cast-2.stderr b/src/test/ui/suggestions/numeric-cast-2.stderr index 402a99f6643..84f01309bd0 100644 --- a/src/test/ui/suggestions/numeric-cast-2.stderr +++ b/src/test/ui/suggestions/numeric-cast-2.stderr @@ -1,19 +1,19 @@ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:15:18 | -15 | let x: u16 = foo(); +LL | let x: u16 = foo(); | ^^^^^ expected u16, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:17:18 | -17 | let y: i64 = x + x; +LL | let y: i64 = x + x; | ^^^^^ expected i64, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:19:18 | -19 | let z: i32 = x + x; +LL | let z: i32 = x + x; | ^^^^^ expected i32, found u16 error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/numeric-cast.stderr b/src/test/ui/suggestions/numeric-cast.stderr index 3e2da79ae08..a19ca7de4b0 100644 --- a/src/test/ui/suggestions/numeric-cast.stderr +++ b/src/test/ui/suggestions/numeric-cast.stderr @@ -1,906 +1,906 @@ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:29:18 | -29 | foo::(x_u64); +LL | foo::(x_u64); | ^^^^^ expected usize, found u64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:31:18 | -31 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected usize, found u32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:33:18 | -33 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected usize, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:35:18 | -35 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected usize, found u8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:37:18 | -37 | foo::(x_isize); +LL | foo::(x_isize); | ^^^^^^^ expected usize, found isize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:39:18 | -39 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected usize, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:41:18 | -41 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected usize, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:43:18 | -43 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected usize, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:45:18 | -45 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected usize, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:47:18 | -47 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected usize, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:49:18 | -49 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected usize, found f32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:52:18 | -52 | foo::(x_usize); +LL | foo::(x_usize); | ^^^^^^^ expected isize, found usize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:54:18 | -54 | foo::(x_u64); +LL | foo::(x_u64); | ^^^^^ expected isize, found u64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:56:18 | -56 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected isize, found u32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:58:18 | -58 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected isize, found u16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:60:18 | -60 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected isize, found u8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:63:18 | -63 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected isize, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:65:18 | -65 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected isize, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:67:18 | -67 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected isize, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:69:18 | -69 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected isize, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:71:18 | -71 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected isize, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:73:18 | -73 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected isize, found f32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:76:16 | -76 | foo::(x_usize); +LL | foo::(x_usize); | ^^^^^^^ expected u64, found usize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:79:16 | -79 | foo::(x_u32); +LL | foo::(x_u32); | ^^^^^ expected u64, found u32 help: you can cast an `u32` to `u64`, which will zero-extend the source value | -79 | foo::(x_u32.into()); +LL | foo::(x_u32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:81:16 | -81 | foo::(x_u16); +LL | foo::(x_u16); | ^^^^^ expected u64, found u16 help: you can cast an `u16` to `u64`, which will zero-extend the source value | -81 | foo::(x_u16.into()); +LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:83:16 | -83 | foo::(x_u8); +LL | foo::(x_u8); | ^^^^ expected u64, found u8 help: you can cast an `u8` to `u64`, which will zero-extend the source value | -83 | foo::(x_u8.into()); +LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:85:16 | -85 | foo::(x_isize); +LL | foo::(x_isize); | ^^^^^^^ expected u64, found isize error[E0308]: mismatched types --> $DIR/numeric-cast.rs:87:16 | -87 | foo::(x_i64); +LL | foo::(x_i64); | ^^^^^ expected u64, found i64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:89:16 | -89 | foo::(x_i32); +LL | foo::(x_i32); | ^^^^^ expected u64, found i32 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:91:16 | -91 | foo::(x_i16); +LL | foo::(x_i16); | ^^^^^ expected u64, found i16 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:93:16 | -93 | foo::(x_i8); +LL | foo::(x_i8); | ^^^^ expected u64, found i8 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:95:16 | -95 | foo::(x_f64); +LL | foo::(x_f64); | ^^^^^ expected u64, found f64 error[E0308]: mismatched types --> $DIR/numeric-cast.rs:97:16 | -97 | foo::(x_f32); +LL | foo::(x_f32); | ^^^^^ expected u64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:100:16 - | -100 | foo::(x_usize); - | ^^^^^^^ expected i64, found usize + --> $DIR/numeric-cast.rs:100:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:102:16 - | -102 | foo::(x_u64); - | ^^^^^ expected i64, found u64 + --> $DIR/numeric-cast.rs:102:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:104:16 - | -104 | foo::(x_u32); - | ^^^^^ expected i64, found u32 + --> $DIR/numeric-cast.rs:104:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i64, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:106:16 - | -106 | foo::(x_u16); - | ^^^^^ expected i64, found u16 + --> $DIR/numeric-cast.rs:106:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i64, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:108:16 - | -108 | foo::(x_u8); - | ^^^^ expected i64, found u8 + --> $DIR/numeric-cast.rs:108:16 + | +LL | foo::(x_u8); + | ^^^^ expected i64, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:110:16 - | -110 | foo::(x_isize); - | ^^^^^^^ expected i64, found isize + --> $DIR/numeric-cast.rs:110:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:113:16 - | -113 | foo::(x_i32); - | ^^^^^ expected i64, found i32 + --> $DIR/numeric-cast.rs:113:16 + | +LL | foo::(x_i32); + | ^^^^^ expected i64, found i32 help: you can cast an `i32` to `i64`, which will sign-extend the source value - | -113 | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:115:16 - | -115 | foo::(x_i16); - | ^^^^^ expected i64, found i16 + --> $DIR/numeric-cast.rs:115:16 + | +LL | foo::(x_i16); + | ^^^^^ expected i64, found i16 help: you can cast an `i16` to `i64`, which will sign-extend the source value - | -115 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:117:16 - | -117 | foo::(x_i8); - | ^^^^ expected i64, found i8 + --> $DIR/numeric-cast.rs:117:16 + | +LL | foo::(x_i8); + | ^^^^ expected i64, found i8 help: you can cast an `i8` to `i64`, which will sign-extend the source value - | -117 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:119:16 - | -119 | foo::(x_f64); - | ^^^^^ expected i64, found f64 + --> $DIR/numeric-cast.rs:119:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i64, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:121:16 - | -121 | foo::(x_f32); - | ^^^^^ expected i64, found f32 + --> $DIR/numeric-cast.rs:121:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:124:16 - | -124 | foo::(x_usize); - | ^^^^^^^ expected u32, found usize + --> $DIR/numeric-cast.rs:124:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:126:16 - | -126 | foo::(x_u64); - | ^^^^^ expected u32, found u64 + --> $DIR/numeric-cast.rs:126:16 + | +LL | foo::(x_u64); + | ^^^^^ expected u32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:129:16 - | -129 | foo::(x_u16); - | ^^^^^ expected u32, found u16 + --> $DIR/numeric-cast.rs:129:16 + | +LL | foo::(x_u16); + | ^^^^^ expected u32, found u16 help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -129 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:131:16 - | -131 | foo::(x_u8); - | ^^^^ expected u32, found u8 + --> $DIR/numeric-cast.rs:131:16 + | +LL | foo::(x_u8); + | ^^^^ expected u32, found u8 help: you can cast an `u8` to `u32`, which will zero-extend the source value - | -131 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:133:16 - | -133 | foo::(x_isize); - | ^^^^^^^ expected u32, found isize + --> $DIR/numeric-cast.rs:133:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:135:16 - | -135 | foo::(x_i64); - | ^^^^^ expected u32, found i64 + --> $DIR/numeric-cast.rs:135:16 + | +LL | foo::(x_i64); + | ^^^^^ expected u32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:137:16 - | -137 | foo::(x_i32); - | ^^^^^ expected u32, found i32 + --> $DIR/numeric-cast.rs:137:16 + | +LL | foo::(x_i32); + | ^^^^^ expected u32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:139:16 - | -139 | foo::(x_i16); - | ^^^^^ expected u32, found i16 + --> $DIR/numeric-cast.rs:139:16 + | +LL | foo::(x_i16); + | ^^^^^ expected u32, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:141:16 - | -141 | foo::(x_i8); - | ^^^^ expected u32, found i8 + --> $DIR/numeric-cast.rs:141:16 + | +LL | foo::(x_i8); + | ^^^^ expected u32, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:143:16 - | -143 | foo::(x_f64); - | ^^^^^ expected u32, found f64 + --> $DIR/numeric-cast.rs:143:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:145:16 - | -145 | foo::(x_f32); - | ^^^^^ expected u32, found f32 + --> $DIR/numeric-cast.rs:145:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:148:16 - | -148 | foo::(x_usize); - | ^^^^^^^ expected i32, found usize + --> $DIR/numeric-cast.rs:148:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:150:16 - | -150 | foo::(x_u64); - | ^^^^^ expected i32, found u64 + --> $DIR/numeric-cast.rs:150:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:152:16 - | -152 | foo::(x_u32); - | ^^^^^ expected i32, found u32 + --> $DIR/numeric-cast.rs:152:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:154:16 - | -154 | foo::(x_u16); - | ^^^^^ expected i32, found u16 + --> $DIR/numeric-cast.rs:154:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i32, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:156:16 - | -156 | foo::(x_u8); - | ^^^^ expected i32, found u8 + --> $DIR/numeric-cast.rs:156:16 + | +LL | foo::(x_u8); + | ^^^^ expected i32, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:158:16 - | -158 | foo::(x_isize); - | ^^^^^^^ expected i32, found isize + --> $DIR/numeric-cast.rs:158:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:160:16 - | -160 | foo::(x_i64); - | ^^^^^ expected i32, found i64 + --> $DIR/numeric-cast.rs:160:16 + | +LL | foo::(x_i64); + | ^^^^^ expected i32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:163:16 - | -163 | foo::(x_i16); - | ^^^^^ expected i32, found i16 + --> $DIR/numeric-cast.rs:163:16 + | +LL | foo::(x_i16); + | ^^^^^ expected i32, found i16 help: you can cast an `i16` to `i32`, which will sign-extend the source value - | -163 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:165:16 - | -165 | foo::(x_i8); - | ^^^^ expected i32, found i8 + --> $DIR/numeric-cast.rs:165:16 + | +LL | foo::(x_i8); + | ^^^^ expected i32, found i8 help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -165 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:167:16 - | -167 | foo::(x_f64); - | ^^^^^ expected i32, found f64 + --> $DIR/numeric-cast.rs:167:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:169:16 - | -169 | foo::(x_f32); - | ^^^^^ expected i32, found f32 + --> $DIR/numeric-cast.rs:169:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:172:16 - | -172 | foo::(x_usize); - | ^^^^^^^ expected u16, found usize + --> $DIR/numeric-cast.rs:172:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:174:16 - | -174 | foo::(x_u64); - | ^^^^^ expected u16, found u64 + --> $DIR/numeric-cast.rs:174:16 + | +LL | foo::(x_u64); + | ^^^^^ expected u16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:176:16 - | -176 | foo::(x_u32); - | ^^^^^ expected u16, found u32 + --> $DIR/numeric-cast.rs:176:16 + | +LL | foo::(x_u32); + | ^^^^^ expected u16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:179:16 - | -179 | foo::(x_u8); - | ^^^^ expected u16, found u8 + --> $DIR/numeric-cast.rs:179:16 + | +LL | foo::(x_u8); + | ^^^^ expected u16, found u8 help: you can cast an `u8` to `u16`, which will zero-extend the source value - | -179 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:181:16 - | -181 | foo::(x_isize); - | ^^^^^^^ expected u16, found isize + --> $DIR/numeric-cast.rs:181:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:183:16 - | -183 | foo::(x_i64); - | ^^^^^ expected u16, found i64 + --> $DIR/numeric-cast.rs:183:16 + | +LL | foo::(x_i64); + | ^^^^^ expected u16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:185:16 - | -185 | foo::(x_i32); - | ^^^^^ expected u16, found i32 + --> $DIR/numeric-cast.rs:185:16 + | +LL | foo::(x_i32); + | ^^^^^ expected u16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:187:16 - | -187 | foo::(x_i16); - | ^^^^^ expected u16, found i16 + --> $DIR/numeric-cast.rs:187:16 + | +LL | foo::(x_i16); + | ^^^^^ expected u16, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:189:16 - | -189 | foo::(x_i8); - | ^^^^ expected u16, found i8 + --> $DIR/numeric-cast.rs:189:16 + | +LL | foo::(x_i8); + | ^^^^ expected u16, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:191:16 - | -191 | foo::(x_f64); - | ^^^^^ expected u16, found f64 + --> $DIR/numeric-cast.rs:191:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:193:16 - | -193 | foo::(x_f32); - | ^^^^^ expected u16, found f32 + --> $DIR/numeric-cast.rs:193:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:196:16 - | -196 | foo::(x_usize); - | ^^^^^^^ expected i16, found usize + --> $DIR/numeric-cast.rs:196:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:198:16 - | -198 | foo::(x_u64); - | ^^^^^ expected i16, found u64 + --> $DIR/numeric-cast.rs:198:16 + | +LL | foo::(x_u64); + | ^^^^^ expected i16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:200:16 - | -200 | foo::(x_u32); - | ^^^^^ expected i16, found u32 + --> $DIR/numeric-cast.rs:200:16 + | +LL | foo::(x_u32); + | ^^^^^ expected i16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:202:16 - | -202 | foo::(x_u16); - | ^^^^^ expected i16, found u16 + --> $DIR/numeric-cast.rs:202:16 + | +LL | foo::(x_u16); + | ^^^^^ expected i16, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:204:16 - | -204 | foo::(x_u8); - | ^^^^ expected i16, found u8 + --> $DIR/numeric-cast.rs:204:16 + | +LL | foo::(x_u8); + | ^^^^ expected i16, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:206:16 - | -206 | foo::(x_isize); - | ^^^^^^^ expected i16, found isize + --> $DIR/numeric-cast.rs:206:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:208:16 - | -208 | foo::(x_i64); - | ^^^^^ expected i16, found i64 + --> $DIR/numeric-cast.rs:208:16 + | +LL | foo::(x_i64); + | ^^^^^ expected i16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:210:16 - | -210 | foo::(x_i32); - | ^^^^^ expected i16, found i32 + --> $DIR/numeric-cast.rs:210:16 + | +LL | foo::(x_i32); + | ^^^^^ expected i16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:213:16 - | -213 | foo::(x_i8); - | ^^^^ expected i16, found i8 + --> $DIR/numeric-cast.rs:213:16 + | +LL | foo::(x_i8); + | ^^^^ expected i16, found i8 help: you can cast an `i8` to `i16`, which will sign-extend the source value - | -213 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:215:16 - | -215 | foo::(x_f64); - | ^^^^^ expected i16, found f64 + --> $DIR/numeric-cast.rs:215:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:217:16 - | -217 | foo::(x_f32); - | ^^^^^ expected i16, found f32 + --> $DIR/numeric-cast.rs:217:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:220:15 - | -220 | foo::(x_usize); - | ^^^^^^^ expected u8, found usize + --> $DIR/numeric-cast.rs:220:15 + | +LL | foo::(x_usize); + | ^^^^^^^ expected u8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:222:15 - | -222 | foo::(x_u64); - | ^^^^^ expected u8, found u64 + --> $DIR/numeric-cast.rs:222:15 + | +LL | foo::(x_u64); + | ^^^^^ expected u8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:224:15 - | -224 | foo::(x_u32); - | ^^^^^ expected u8, found u32 + --> $DIR/numeric-cast.rs:224:15 + | +LL | foo::(x_u32); + | ^^^^^ expected u8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:226:15 - | -226 | foo::(x_u16); - | ^^^^^ expected u8, found u16 + --> $DIR/numeric-cast.rs:226:15 + | +LL | foo::(x_u16); + | ^^^^^ expected u8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:229:15 - | -229 | foo::(x_isize); - | ^^^^^^^ expected u8, found isize + --> $DIR/numeric-cast.rs:229:15 + | +LL | foo::(x_isize); + | ^^^^^^^ expected u8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:231:15 - | -231 | foo::(x_i64); - | ^^^^^ expected u8, found i64 + --> $DIR/numeric-cast.rs:231:15 + | +LL | foo::(x_i64); + | ^^^^^ expected u8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:233:15 - | -233 | foo::(x_i32); - | ^^^^^ expected u8, found i32 + --> $DIR/numeric-cast.rs:233:15 + | +LL | foo::(x_i32); + | ^^^^^ expected u8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:235:15 - | -235 | foo::(x_i16); - | ^^^^^ expected u8, found i16 + --> $DIR/numeric-cast.rs:235:15 + | +LL | foo::(x_i16); + | ^^^^^ expected u8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:237:15 - | -237 | foo::(x_i8); - | ^^^^ expected u8, found i8 + --> $DIR/numeric-cast.rs:237:15 + | +LL | foo::(x_i8); + | ^^^^ expected u8, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:239:15 - | -239 | foo::(x_f64); - | ^^^^^ expected u8, found f64 + --> $DIR/numeric-cast.rs:239:15 + | +LL | foo::(x_f64); + | ^^^^^ expected u8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:241:15 - | -241 | foo::(x_f32); - | ^^^^^ expected u8, found f32 + --> $DIR/numeric-cast.rs:241:15 + | +LL | foo::(x_f32); + | ^^^^^ expected u8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:244:15 - | -244 | foo::(x_usize); - | ^^^^^^^ expected i8, found usize + --> $DIR/numeric-cast.rs:244:15 + | +LL | foo::(x_usize); + | ^^^^^^^ expected i8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:246:15 - | -246 | foo::(x_u64); - | ^^^^^ expected i8, found u64 + --> $DIR/numeric-cast.rs:246:15 + | +LL | foo::(x_u64); + | ^^^^^ expected i8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:248:15 - | -248 | foo::(x_u32); - | ^^^^^ expected i8, found u32 + --> $DIR/numeric-cast.rs:248:15 + | +LL | foo::(x_u32); + | ^^^^^ expected i8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:250:15 - | -250 | foo::(x_u16); - | ^^^^^ expected i8, found u16 + --> $DIR/numeric-cast.rs:250:15 + | +LL | foo::(x_u16); + | ^^^^^ expected i8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:252:15 - | -252 | foo::(x_u8); - | ^^^^ expected i8, found u8 + --> $DIR/numeric-cast.rs:252:15 + | +LL | foo::(x_u8); + | ^^^^ expected i8, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:254:15 - | -254 | foo::(x_isize); - | ^^^^^^^ expected i8, found isize + --> $DIR/numeric-cast.rs:254:15 + | +LL | foo::(x_isize); + | ^^^^^^^ expected i8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:256:15 - | -256 | foo::(x_i64); - | ^^^^^ expected i8, found i64 + --> $DIR/numeric-cast.rs:256:15 + | +LL | foo::(x_i64); + | ^^^^^ expected i8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:258:15 - | -258 | foo::(x_i32); - | ^^^^^ expected i8, found i32 + --> $DIR/numeric-cast.rs:258:15 + | +LL | foo::(x_i32); + | ^^^^^ expected i8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:260:15 - | -260 | foo::(x_i16); - | ^^^^^ expected i8, found i16 + --> $DIR/numeric-cast.rs:260:15 + | +LL | foo::(x_i16); + | ^^^^^ expected i8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:263:15 - | -263 | foo::(x_f64); - | ^^^^^ expected i8, found f64 + --> $DIR/numeric-cast.rs:263:15 + | +LL | foo::(x_f64); + | ^^^^^ expected i8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:265:15 - | -265 | foo::(x_f32); - | ^^^^^ expected i8, found f32 + --> $DIR/numeric-cast.rs:265:15 + | +LL | foo::(x_f32); + | ^^^^^ expected i8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:268:16 - | -268 | foo::(x_usize); - | ^^^^^^^ expected f64, found usize + --> $DIR/numeric-cast.rs:268:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected f64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:270:16 - | -270 | foo::(x_u64); - | ^^^^^ expected f64, found u64 + --> $DIR/numeric-cast.rs:270:16 + | +LL | foo::(x_u64); + | ^^^^^ expected f64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:272:16 - | -272 | foo::(x_u32); - | ^^^^^ expected f64, found u32 + --> $DIR/numeric-cast.rs:272:16 + | +LL | foo::(x_u32); + | ^^^^^ expected f64, found u32 help: you can cast an `u32` to `f64`, producing the floating point representation of the integer - | -272 | foo::(x_u32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:274:16 - | -274 | foo::(x_u16); - | ^^^^^ expected f64, found u16 + --> $DIR/numeric-cast.rs:274:16 + | +LL | foo::(x_u16); + | ^^^^^ expected f64, found u16 help: you can cast an `u16` to `f64`, producing the floating point representation of the integer - | -274 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:276:16 - | -276 | foo::(x_u8); - | ^^^^ expected f64, found u8 + --> $DIR/numeric-cast.rs:276:16 + | +LL | foo::(x_u8); + | ^^^^ expected f64, found u8 help: you can cast an `u8` to `f64`, producing the floating point representation of the integer - | -276 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:278:16 - | -278 | foo::(x_isize); - | ^^^^^^^ expected f64, found isize + --> $DIR/numeric-cast.rs:278:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected f64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:280:16 - | -280 | foo::(x_i64); - | ^^^^^ expected f64, found i64 + --> $DIR/numeric-cast.rs:280:16 + | +LL | foo::(x_i64); + | ^^^^^ expected f64, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:282:16 - | -282 | foo::(x_i32); - | ^^^^^ expected f64, found i32 + --> $DIR/numeric-cast.rs:282:16 + | +LL | foo::(x_i32); + | ^^^^^ expected f64, found i32 help: you can cast an `i32` to `f64`, producing the floating point representation of the integer - | -282 | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:284:16 - | -284 | foo::(x_i16); - | ^^^^^ expected f64, found i16 + --> $DIR/numeric-cast.rs:284:16 + | +LL | foo::(x_i16); + | ^^^^^ expected f64, found i16 help: you can cast an `i16` to `f64`, producing the floating point representation of the integer - | -284 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:286:16 - | -286 | foo::(x_i8); - | ^^^^ expected f64, found i8 + --> $DIR/numeric-cast.rs:286:16 + | +LL | foo::(x_i8); + | ^^^^ expected f64, found i8 help: you can cast an `i8` to `f64`, producing the floating point representation of the integer - | -286 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:289:16 - | -289 | foo::(x_f32); - | ^^^^^ expected f64, found f32 + --> $DIR/numeric-cast.rs:289:16 + | +LL | foo::(x_f32); + | ^^^^^ expected f64, found f32 help: you can cast an `f32` to `f64` in a lossless way - | -289 | foo::(x_f32.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_f32.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:292:16 - | -292 | foo::(x_usize); - | ^^^^^^^ expected f32, found usize + --> $DIR/numeric-cast.rs:292:16 + | +LL | foo::(x_usize); + | ^^^^^^^ expected f32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:294:16 - | -294 | foo::(x_u64); - | ^^^^^ expected f32, found u64 + --> $DIR/numeric-cast.rs:294:16 + | +LL | foo::(x_u64); + | ^^^^^ expected f32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:296:16 - | -296 | foo::(x_u32); - | ^^^^^ expected f32, found u32 + --> $DIR/numeric-cast.rs:296:16 + | +LL | foo::(x_u32); + | ^^^^^ expected f32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:298:16 - | -298 | foo::(x_u16); - | ^^^^^ expected f32, found u16 + --> $DIR/numeric-cast.rs:298:16 + | +LL | foo::(x_u16); + | ^^^^^ expected f32, found u16 help: you can cast an `u16` to `f32`, producing the floating point representation of the integer - | -298 | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_u16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:300:16 - | -300 | foo::(x_u8); - | ^^^^ expected f32, found u8 + --> $DIR/numeric-cast.rs:300:16 + | +LL | foo::(x_u8); + | ^^^^ expected f32, found u8 help: you can cast an `u8` to `f32`, producing the floating point representation of the integer - | -300 | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_u8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:302:16 - | -302 | foo::(x_isize); - | ^^^^^^^ expected f32, found isize + --> $DIR/numeric-cast.rs:302:16 + | +LL | foo::(x_isize); + | ^^^^^^^ expected f32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:304:16 - | -304 | foo::(x_i64); - | ^^^^^ expected f32, found i64 + --> $DIR/numeric-cast.rs:304:16 + | +LL | foo::(x_i64); + | ^^^^^ expected f32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:306:16 - | -306 | foo::(x_i32); - | ^^^^^ expected f32, found i32 + --> $DIR/numeric-cast.rs:306:16 + | +LL | foo::(x_i32); + | ^^^^^ expected f32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:308:16 - | -308 | foo::(x_i16); - | ^^^^^ expected f32, found i16 + --> $DIR/numeric-cast.rs:308:16 + | +LL | foo::(x_i16); + | ^^^^^ expected f32, found i16 help: you can cast an `i16` to `f32`, producing the floating point representation of the integer - | -308 | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | +LL | foo::(x_i16.into()); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:310:16 - | -310 | foo::(x_i8); - | ^^^^ expected f32, found i8 + --> $DIR/numeric-cast.rs:310:16 + | +LL | foo::(x_i8); + | ^^^^ expected f32, found i8 help: you can cast an `i8` to `f32`, producing the floating point representation of the integer - | -310 | foo::(x_i8.into()); - | ^^^^^^^^^^^ + | +LL | foo::(x_i8.into()); + | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:312:16 - | -312 | foo::(x_f64); - | ^^^^^ expected f32, found f64 + --> $DIR/numeric-cast.rs:312:16 + | +LL | foo::(x_f64); + | ^^^^^ expected f32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:316:16 - | -316 | foo::(x_u8 as u16); - | ^^^^^^^^^^^ expected u32, found u16 + --> $DIR/numeric-cast.rs:316:16 + | +LL | foo::(x_u8 as u16); + | ^^^^^^^^^^^ expected u32, found u16 help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -316 | foo::((x_u8 as u16).into()); - | ^^^^^^^^^^^^^^^^^^^^ + | +LL | foo::((x_u8 as u16).into()); + | ^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:318:16 - | -318 | foo::(-x_i8); - | ^^^^^ expected i32, found i8 + --> $DIR/numeric-cast.rs:318:16 + | +LL | foo::(-x_i8); + | ^^^^^ expected i32, found i8 help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -318 | foo::((-x_i8).into()); - | ^^^^^^^^^^^^^^ + | +LL | foo::((-x_i8).into()); + | ^^^^^^^^^^^^^^ error: aborting due to 134 previous errors diff --git a/src/test/ui/suggestions/pub-ident-fn-2.stderr b/src/test/ui/suggestions/pub-ident-fn-2.stderr index 7d3abceb11b..bbbb3df8769 100644 --- a/src/test/ui/suggestions/pub-ident-fn-2.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-2.stderr @@ -1,11 +1,11 @@ error: missing `fn` for method definition --> $DIR/pub-ident-fn-2.rs:11:4 | -11 | pub foo(s: usize) { bar() } +LL | pub foo(s: usize) { bar() } | ^ help: add `fn` here to parse `foo` as a public method | -11 | pub fn foo(s: usize) { bar() } +LL | pub fn foo(s: usize) { bar() } | ^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr index 68dea2aec3a..c945033ad74 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.stderr @@ -1,7 +1,7 @@ error: missing `fn` or `struct` for method or struct definition --> $DIR/pub-ident-fn-or-struct-2.rs:11:4 | -11 | pub S(); +LL | pub S(); | ---^- help: if you meant to call a macro, write instead: `S!` error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr b/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr index 0c19f776bd1..9528c15dfa1 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct.stderr @@ -1,7 +1,7 @@ error: missing `fn` or `struct` for method or struct definition --> $DIR/pub-ident-fn-or-struct.rs:11:4 | -11 | pub S (foo) bar +LL | pub S (foo) bar | ---^- help: if you meant to call a macro, write instead: `S!` error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-fn.stderr b/src/test/ui/suggestions/pub-ident-fn.stderr index d36b9b127e0..de7ee71d1b4 100644 --- a/src/test/ui/suggestions/pub-ident-fn.stderr +++ b/src/test/ui/suggestions/pub-ident-fn.stderr @@ -1,11 +1,11 @@ error: missing `fn` for method definition --> $DIR/pub-ident-fn.rs:11:4 | -11 | pub foo(s: usize) -> bool { true } +LL | pub foo(s: usize) -> bool { true } | ^^^ help: add `fn` here to parse `foo` as a public method | -11 | pub fn foo(s: usize) -> bool { true } +LL | pub fn foo(s: usize) -> bool { true } | ^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/pub-ident-struct.stderr b/src/test/ui/suggestions/pub-ident-struct.stderr index 36ef3072722..cd53cea7212 100644 --- a/src/test/ui/suggestions/pub-ident-struct.stderr +++ b/src/test/ui/suggestions/pub-ident-struct.stderr @@ -1,11 +1,11 @@ error: missing `struct` for struct definition --> $DIR/pub-ident-struct.rs:11:4 | -11 | pub S { +LL | pub S { | ^ help: add `struct` here to parse `S` as a public struct | -11 | pub struct S { +LL | pub struct S { | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/return-type.stderr b/src/test/ui/suggestions/return-type.stderr index f0b5e5e0530..b09615a2fa6 100644 --- a/src/test/ui/suggestions/return-type.stderr +++ b/src/test/ui/suggestions/return-type.stderr @@ -1,18 +1,18 @@ error[E0308]: mismatched types --> $DIR/return-type.rs:20:5 | -20 | foo(4 as usize) +LL | foo(4 as usize) | ^^^^^^^^^^^^^^^ expected (), found struct `S` | = note: expected type `()` found type `S` help: try adding a semicolon | -20 | foo(4 as usize); +LL | foo(4 as usize); | ^ help: try adding a return type | -19 | fn bar() -> S { +LL | fn bar() -> S { | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/str-array-assignment.stderr b/src/test/ui/suggestions/str-array-assignment.stderr index 084ddfd1e2e..352954597b1 100644 --- a/src/test/ui/suggestions/str-array-assignment.stderr +++ b/src/test/ui/suggestions/str-array-assignment.stderr @@ -1,7 +1,7 @@ error[E0308]: if and else have incompatible types --> $DIR/str-array-assignment.rs:13:11 | -13 | let t = if true { s[..2] } else { s }; +LL | let t = if true { s[..2] } else { s }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found &str | = note: expected type `str` @@ -10,10 +10,10 @@ error[E0308]: if and else have incompatible types error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:15:27 | -11 | fn main() { +LL | fn main() { | - expected `()` because of default return type ... -15 | let u: &str = if true { s[..2] } else { s }; +LL | let u: &str = if true { s[..2] } else { s }; | ^^^^^^ expected &str, found str | = note: expected type `&str` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/str-array-assignment.rs:17:7 | -17 | let v = s[..2]; +LL | let v = s[..2]; | ^ ------ help: consider borrowing here: `&s[..2]` | | | `str` does not have a constant size known at compile-time @@ -33,7 +33,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:19:17 | -19 | let w: &str = s[..2]; +LL | let w: &str = s[..2]; | ^^^^^^ | | | expected &str, found str diff --git a/src/test/ui/suggestions/str-as-char.stderr b/src/test/ui/suggestions/str-as-char.stderr index bf975053ffa..d881becf00c 100644 --- a/src/test/ui/suggestions/str-as-char.stderr +++ b/src/test/ui/suggestions/str-as-char.stderr @@ -1,11 +1,11 @@ error: character literal may only contain one codepoint --> $DIR/str-as-char.rs:12:14 | -12 | println!('●●'); +LL | println!('●●'); | ^^^^ help: if you meant to write a `str` literal, use double quotes | -12 | println!("●●"); +LL | println!("●●"); | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-labels.stderr b/src/test/ui/suggestions/suggest-labels.stderr index f4773fc5bdd..1943e8c6561 100644 --- a/src/test/ui/suggestions/suggest-labels.stderr +++ b/src/test/ui/suggestions/suggest-labels.stderr @@ -1,19 +1,19 @@ error[E0426]: use of undeclared label `'fo` --> $DIR/suggest-labels.rs:14:15 | -14 | break 'fo; //~ ERROR use of undeclared label +LL | break 'fo; //~ ERROR use of undeclared label | ^^^ did you mean `'foo`? error[E0426]: use of undeclared label `'bor` --> $DIR/suggest-labels.rs:18:18 | -18 | continue 'bor; //~ ERROR use of undeclared label +LL | continue 'bor; //~ ERROR use of undeclared label | ^^^^ did you mean `'bar`? error[E0426]: use of undeclared label `'longlable` --> $DIR/suggest-labels.rs:23:19 | -23 | break 'longlable; //~ ERROR use of undeclared label +LL | break 'longlable; //~ ERROR use of undeclared label | ^^^^^^^^^^ did you mean `'longlabel1`? error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index a12c3b1a2dc..fbbd6247d56 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope --> $DIR/suggest-methods.rs:28:7 | -11 | struct Foo; +LL | struct Foo; | ----------- method `bat` not found for this ... -28 | f.bat(1.0); //~ ERROR no method named +LL | f.bat(1.0); //~ ERROR no method named | ^^^ | = help: did you mean `bar`? @@ -12,7 +12,7 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope --> $DIR/suggest-methods.rs:31:15 | -31 | let _ = s.is_emtpy(); //~ ERROR no method named +LL | let _ = s.is_emtpy(); //~ ERROR no method named | ^^^^^^^^ | = help: did you mean `is_empty`? @@ -20,7 +20,7 @@ error[E0599]: no method named `is_emtpy` found for type `std::string::String` in error[E0599]: no method named `count_eos` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:35:19 | -35 | let _ = 63u32.count_eos(); //~ ERROR no method named +LL | let _ = 63u32.count_eos(); //~ ERROR no method named | ^^^^^^^^^ | = help: did you mean `count_zeros`? @@ -28,7 +28,7 @@ error[E0599]: no method named `count_eos` found for type `u32` in the current sc error[E0599]: no method named `count_o` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:38:19 | -38 | let _ = 63u32.count_o(); //~ ERROR no method named +LL | let _ = 63u32.count_o(); //~ ERROR no method named | ^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/try-on-option.stderr b/src/test/ui/suggestions/try-on-option.stderr index b9ca5b69c7c..da7f07a8b16 100644 --- a/src/test/ui/suggestions/try-on-option.stderr +++ b/src/test/ui/suggestions/try-on-option.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): std::convert::From` is not satisfied --> $DIR/try-on-option.rs:17:5 | -17 | x?; //~ the trait bound +LL | x?; //~ the trait bound | ^^ the trait `std::convert::From` is not implemented for `()` | = note: required by `std::convert::From::from` @@ -9,7 +9,7 @@ error[E0277]: the trait bound `(): std::convert::From` i error[E0277]: the `?` operator can only be used in a function that returns `Result` (or another type that implements `std::ops::Try`) --> $DIR/try-on-option.rs:23:5 | -23 | x?; //~ the `?` operator +LL | x?; //~ the `?` operator | ^^ cannot use the `?` operator in a function that returns `u32` | = help: the trait `std::ops::Try` is not implemented for `u32` diff --git a/src/test/ui/suggestions/try-operator-on-main.stderr b/src/test/ui/suggestions/try-operator-on-main.stderr index 503e55a83ff..2fa97d770af 100644 --- a/src/test/ui/suggestions/try-operator-on-main.stderr +++ b/src/test/ui/suggestions/try-operator-on-main.stderr @@ -1,7 +1,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Result` (or another type that implements `std::ops::Try`) --> $DIR/try-operator-on-main.rs:19:5 | -19 | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only +LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -10,7 +10,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:22:5 | -22 | ()?; //~ ERROR the `?` operator can only +LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -19,19 +19,19 @@ error[E0277]: the `?` operator can only be applied to values that implement `std error[E0277]: the trait bound `(): std::ops::Try` is not satisfied --> $DIR/try-operator-on-main.rs:25:5 | -25 | try_trait_generic::<()>(); //~ ERROR the trait bound +LL | try_trait_generic::<()>(); //~ ERROR the trait bound | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()` | note: required by `try_trait_generic` --> $DIR/try-operator-on-main.rs:30:1 | -30 | fn try_trait_generic() -> T { +LL | fn try_trait_generic() -> T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:32:5 | -32 | ()?; //~ ERROR the `?` operator can only +LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` diff --git a/src/test/ui/suggestions/tuple-float-index.stderr b/src/test/ui/suggestions/tuple-float-index.stderr index 7d133f11cbb..4a1e34890f4 100644 --- a/src/test/ui/suggestions/tuple-float-index.stderr +++ b/src/test/ui/suggestions/tuple-float-index.stderr @@ -1,7 +1,7 @@ error: unexpected token: `1.1` --> $DIR/tuple-float-index.rs:14:17 | -14 | (1, (2, 3)).1.1; //~ ERROR unexpected token: `1.1` +LL | (1, (2, 3)).1.1; //~ ERROR unexpected token: `1.1` | ------------^^^ | | | | | unexpected token diff --git a/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr b/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr index 58f5ea39b26..80d1569bf1c 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr @@ -1,7 +1,7 @@ error: expected type, found `10` --> $DIR/type-ascription-instead-of-initializer.rs:12:31 | -12 | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | -- ^^ | || | |help: use `=` if you meant to assign @@ -10,7 +10,7 @@ error: expected type, found `10` error[E0061]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/type-ascription-instead-of-initializer.rs:12:12 | -12 | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr b/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr index 9d26d004674..02a80d86c84 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-statement-end.stderr @@ -1,15 +1,15 @@ error: expected type, found `0` --> $DIR/type-ascription-instead-of-statement-end.rs:15:5 | -14 | println!("test"): +LL | println!("test"): | - help: did you mean to use `;` here? -15 | 0; //~ ERROR expected type, found `0` +LL | 0; //~ ERROR expected type, found `0` | ^ expecting a type here because of type ascription error: expected type, found `0` --> $DIR/type-ascription-instead-of-statement-end.rs:19:23 | -19 | println!("test"): 0; //~ ERROR expected type, found `0` +LL | println!("test"): 0; //~ ERROR expected type, found `0` | ^ expecting a type here because of type ascription error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/type-ascription-with-fn-call.stderr b/src/test/ui/suggestions/type-ascription-with-fn-call.stderr index ac000584fdc..4d36449d26a 100644 --- a/src/test/ui/suggestions/type-ascription-with-fn-call.stderr +++ b/src/test/ui/suggestions/type-ascription-with-fn-call.stderr @@ -1,9 +1,9 @@ error[E0573]: expected type, found function `f` --> $DIR/type-ascription-with-fn-call.rs:15:5 | -14 | f() : +LL | f() : | - help: did you mean to use `;` here instead? -15 | f(); //~ ERROR expected type, found function +LL | f(); //~ ERROR expected type, found function | ^^^ | | | not a type diff --git a/src/test/ui/svh-change-lit.stderr b/src/test/ui/svh-change-lit.stderr index 3659dc091e1..588e293b255 100644 --- a/src/test/ui/svh-change-lit.stderr +++ b/src/test/ui/svh-change-lit.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-lit.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-significant-cfg.stderr b/src/test/ui/svh-change-significant-cfg.stderr index 57bed3ffff2..a57a5e7a5dd 100644 --- a/src/test/ui/svh-change-significant-cfg.stderr +++ b/src/test/ui/svh-change-significant-cfg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-significant-cfg.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-trait-bound.stderr b/src/test/ui/svh-change-trait-bound.stderr index eecab2b4e83..f0e433ea894 100644 --- a/src/test/ui/svh-change-trait-bound.stderr +++ b/src/test/ui/svh-change-trait-bound.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-trait-bound.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-arg.stderr b/src/test/ui/svh-change-type-arg.stderr index eff1ca49c06..bc08c8cf579 100644 --- a/src/test/ui/svh-change-type-arg.stderr +++ b/src/test/ui/svh-change-type-arg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-arg.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-ret.stderr b/src/test/ui/svh-change-type-ret.stderr index c9f57ae2d85..187ebda21ef 100644 --- a/src/test/ui/svh-change-type-ret.stderr +++ b/src/test/ui/svh-change-type-ret.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-ret.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-change-type-static.stderr b/src/test/ui/svh-change-type-static.stderr index 0f278d8bb6e..c0ca2e94cea 100644 --- a/src/test/ui/svh-change-type-static.stderr +++ b/src/test/ui/svh-change-type-static.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-static.rs:20:1 | -20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh-use-trait.stderr b/src/test/ui/svh-use-trait.stderr index b93c2d4a382..fd57ecf6c3f 100644 --- a/src/test/ui/svh-use-trait.stderr +++ b/src/test/ui/svh-use-trait.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `uta` which `utb` depends on --> $DIR/svh-use-trait.rs:25:1 | -25 | extern crate utb; //~ ERROR: found possibly newer version of crate `uta` which `utb` depends +LL | extern crate utb; //~ ERROR: found possibly newer version of crate `uta` which `utb` depends | ^^^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index 2d2c94f6d57..0020d14f5cb 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/switched-expectations.rs:13:30 | -13 | let ref string: String = var; //~ ERROR mismatched types [E0308] +LL | let ref string: String = var; //~ ERROR mismatched types [E0308] | ^^^ expected struct `std::string::String`, found i32 | = note: expected type `std::string::String` diff --git a/src/test/ui/target-feature-wrong.stderr b/src/test/ui/target-feature-wrong.stderr index c5534bf147d..07bad482591 100644 --- a/src/test/ui/target-feature-wrong.stderr +++ b/src/test/ui/target-feature-wrong.stderr @@ -1,31 +1,31 @@ warning: #[target_feature = ".."] is deprecated and will eventually be removed, use #[target_feature(enable = "..")] instead --> $DIR/target-feature-wrong.rs:18:1 | -18 | #[target_feature = "+sse2"] +LL | #[target_feature = "+sse2"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the feature named `foo` is not valid for this target --> $DIR/target-feature-wrong.rs:20:18 | -20 | #[target_feature(enable = "foo")] +LL | #[target_feature(enable = "foo")] | ^^^^^^^^^^^^^^ error: #[target_feature(..)] only accepts sub-keys of `enable` currently --> $DIR/target-feature-wrong.rs:22:18 | -22 | #[target_feature(bar)] +LL | #[target_feature(bar)] | ^^^ error: #[target_feature(..)] only accepts sub-keys of `enable` currently --> $DIR/target-feature-wrong.rs:24:18 | -24 | #[target_feature(disable = "baz")] +LL | #[target_feature(disable = "baz")] | ^^^^^^^^^^^^^^^ error: #[target_feature(..)] can only be applied to `unsafe` function --> $DIR/target-feature-wrong.rs:28:1 | -28 | #[target_feature(enable = "sse2")] +LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/test-should-panic-attr.stderr b/src/test/ui/test-should-panic-attr.stderr index 6f143b6cbee..09bd5469808 100644 --- a/src/test/ui/test-should-panic-attr.stderr +++ b/src/test/ui/test-should-panic-attr.stderr @@ -1,7 +1,7 @@ warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(expected = "error message")]` --> $DIR/test-should-panic-attr.rs:15:1 | -15 | #[should_panic = "foo"] +LL | #[should_panic = "foo"] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -9,7 +9,7 @@ warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(exp warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:22:1 | -22 | #[should_panic(expected)] +LL | #[should_panic(expected)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -17,7 +17,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:29:1 | -29 | #[should_panic(expect)] +LL | #[should_panic(expect)] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -25,7 +25,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:36:1 | -36 | #[should_panic(expected(foo, bar))] +LL | #[should_panic(expected(foo, bar))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. @@ -33,7 +33,7 @@ warning: argument must be of the form: `expected = "error message"` warning: argument must be of the form: `expected = "error message"` --> $DIR/test-should-panic-attr.rs:43:1 | -43 | #[should_panic(expected = "foo", bar)] +LL | #[should_panic(expected = "foo", bar)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. diff --git a/src/test/ui/token/bounds-obj-parens.stderr b/src/test/ui/token/bounds-obj-parens.stderr index 4d60be15eca..67dcbc45419 100644 --- a/src/test/ui/token/bounds-obj-parens.stderr +++ b/src/test/ui/token/bounds-obj-parens.stderr @@ -1,7 +1,7 @@ error: expected one of `!` or `::`, found `` --> $DIR/bounds-obj-parens.rs:15:1 | -15 | FAIL +LL | FAIL | ^^^^ expected one of `!` or `::` here error: aborting due to previous error diff --git a/src/test/ui/token/issue-10636-2.stderr b/src/test/ui/token/issue-10636-2.stderr index d661702f29e..fcd2c10594a 100644 --- a/src/test/ui/token/issue-10636-2.stderr +++ b/src/test/ui/token/issue-10636-2.stderr @@ -1,25 +1,25 @@ error: incorrect close delimiter: `}` --> $DIR/issue-10636-2.rs:18:1 | -18 | } //~ ERROR: incorrect close delimiter +LL | } //~ ERROR: incorrect close delimiter | ^ | note: unclosed delimiter --> $DIR/issue-10636-2.rs:15:15 | -15 | option.map(|some| 42; +LL | option.map(|some| 42; | ^ error: expected one of `,`, `.`, `?`, or an operator, found `;` --> $DIR/issue-10636-2.rs:15:25 | -15 | option.map(|some| 42; +LL | option.map(|some| 42; | ^ expected one of `,`, `.`, `?`, or an operator here error: expected expression, found `)` --> $DIR/issue-10636-2.rs:18:1 | -18 | } //~ ERROR: incorrect close delimiter +LL | } //~ ERROR: incorrect close delimiter | ^ error[E0601]: main function not found diff --git a/src/test/ui/token/issue-15980.stderr b/src/test/ui/token/issue-15980.stderr index d971b3f110a..4078797474e 100644 --- a/src/test/ui/token/issue-15980.stderr +++ b/src/test/ui/token/issue-15980.stderr @@ -1,25 +1,25 @@ error: expected identifier, found keyword `return` --> $DIR/issue-15980.rs:20:13 | -18 | Err(ref e) if e.kind == io::EndOfFile { +LL | Err(ref e) if e.kind == io::EndOfFile { | ------------- while parsing this struct -19 | //~^ NOTE while parsing this struct -20 | return +LL | //~^ NOTE while parsing this struct +LL | return | ^^^^^^ expected identifier, found keyword error: expected one of `.`, `=>`, `?`, or an operator, found `_` --> $DIR/issue-15980.rs:25:9 | -23 | } +LL | } | - expected one of `.`, `=>`, `?`, or an operator here -24 | //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here -25 | _ => {} +LL | //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here +LL | _ => {} | ^ unexpected token error[E0412]: cannot find type `IoResult` in module `io` --> $DIR/issue-15980.rs:14:16 | -14 | let x: io::IoResult<()> = Ok(()); +LL | let x: io::IoResult<()> = Ok(()); | ^^^^^^^^ did you mean `Result`? error: aborting due to 3 previous errors diff --git a/src/test/ui/token/issue-41155.stderr b/src/test/ui/token/issue-41155.stderr index 1189abcd78b..ece803b75dc 100644 --- a/src/test/ui/token/issue-41155.stderr +++ b/src/test/ui/token/issue-41155.stderr @@ -1,15 +1,15 @@ error: expected one of `(`, `const`, `default`, `extern`, `fn`, `type`, or `unsafe`, found `}` --> $DIR/issue-41155.rs:13:1 | -12 | pub +LL | pub | - expected one of 7 possible tokens here -13 | } //~ ERROR expected one of +LL | } //~ ERROR expected one of | ^ unexpected token error[E0412]: cannot find type `S` in this scope --> $DIR/issue-41155.rs:11:6 | -11 | impl S { //~ ERROR cannot find type +LL | impl S { //~ ERROR cannot find type | ^ not found in this scope error[E0601]: main function not found diff --git a/src/test/ui/token/macro-incomplete-parse.stderr b/src/test/ui/token/macro-incomplete-parse.stderr index 28ba6cc37c3..198730dc07a 100644 --- a/src/test/ui/token/macro-incomplete-parse.stderr +++ b/src/test/ui/token/macro-incomplete-parse.stderr @@ -1,34 +1,34 @@ error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:17:9 | -17 | , //~ ERROR macro expansion ignores token `,` +LL | , //~ ERROR macro expansion ignores token `,` | ^ | note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context --> $DIR/macro-incomplete-parse.rs:31:1 | -31 | ignored_item!(); +LL | ignored_item!(); | ^^^^^^^^^^^^^^^^ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` --> $DIR/macro-incomplete-parse.rs:22:14 | -22 | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` +LL | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` | ^ expected one of `.`, `;`, `?`, `}`, or an operator here ... -34 | ignored_expr!(); +LL | ignored_expr!(); | ---------------- in this macro invocation error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:28:14 | -28 | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` +LL | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` | ^ | note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context --> $DIR/macro-incomplete-parse.rs:36:9 | -36 | ignored_pat!() => (), +LL | ignored_pat!() => (), | ^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/token/trailing-plus-in-bounds.stderr b/src/test/ui/token/trailing-plus-in-bounds.stderr index c765a434b8a..1719b1d5e08 100644 --- a/src/test/ui/token/trailing-plus-in-bounds.stderr +++ b/src/test/ui/token/trailing-plus-in-bounds.stderr @@ -1,7 +1,7 @@ error: expected one of `!` or `::`, found `` --> $DIR/trailing-plus-in-bounds.rs:19:1 | -19 | FAIL +LL | FAIL | ^^^^ expected one of `!` or `::` here error: aborting due to previous error diff --git a/src/test/ui/trait-alias.stderr b/src/test/ui/trait-alias.stderr index 273b42b660e..731ea8b8c4c 100644 --- a/src/test/ui/trait-alias.stderr +++ b/src/test/ui/trait-alias.stderr @@ -1,37 +1,37 @@ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:13:1 | -13 | trait SimpleAlias = Default; //~ERROR E0645 +LL | trait SimpleAlias = Default; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:14:1 | -14 | trait GenericAlias = Iterator; //~ERROR E0645 +LL | trait GenericAlias = Iterator; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:15:1 | -15 | trait Partial = IntoIterator; //~ERROR E0645 +LL | trait Partial = IntoIterator; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:24:1 | -24 | trait WithWhere = Romeo + Romeo where Fore<(Art, Thou)>: Romeo; //~ERROR E0645 +LL | trait WithWhere = Romeo + Romeo where Fore<(Art, Thou)>: Romeo; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:25:1 | -25 | trait BareWhere = where The: Things; //~ERROR E0645 +LL | trait BareWhere = where The: Things; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0645]: trait aliases are not yet implemented (see issue #41517) --> $DIR/trait-alias.rs:27:1 | -27 | trait CD = Clone + Default; //~ERROR E0645 +LL | trait CD = Clone + Default; //~ERROR E0645 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/trait-duplicate-methods.stderr b/src/test/ui/trait-duplicate-methods.stderr index be743e9663b..2aec3f3377d 100644 --- a/src/test/ui/trait-duplicate-methods.stderr +++ b/src/test/ui/trait-duplicate-methods.stderr @@ -1,9 +1,9 @@ error[E0428]: the name `orange` is defined multiple times --> $DIR/trait-duplicate-methods.rs:13:5 | -12 | fn orange(&self); +LL | fn orange(&self); | ----------------- previous definition of the value `orange` here -13 | fn orange(&self); //~ ERROR the name `orange` is defined multiple times +LL | fn orange(&self); //~ ERROR the name `orange` is defined multiple times | ^^^^^^^^^^^^^^^^^ `orange` redefined here | = note: `orange` must be defined only once in the value namespace of this trait diff --git a/src/test/ui/trait-method-private.stderr b/src/test/ui/trait-method-private.stderr index 5e54743ce90..f89da4d4bf2 100644 --- a/src/test/ui/trait-method-private.stderr +++ b/src/test/ui/trait-method-private.stderr @@ -1,13 +1,13 @@ error[E0624]: method `method` is private --> $DIR/trait-method-private.rs:29:9 | -29 | foo.method(); //~ ERROR is private +LL | foo.method(); //~ ERROR is private | ^^^^^^ | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: | -11 | use inner::Bar; +LL | use inner::Bar; | error: aborting due to previous error diff --git a/src/test/ui/trait-safety-fn-body.stderr b/src/test/ui/trait-safety-fn-body.stderr index da294b57d1e..894d0c8c3f7 100644 --- a/src/test/ui/trait-safety-fn-body.stderr +++ b/src/test/ui/trait-safety-fn-body.stderr @@ -1,7 +1,7 @@ error[E0133]: dereference of raw pointer requires unsafe function or block --> $DIR/trait-safety-fn-body.rs:21:9 | -21 | *self += 1; +LL | *self += 1; | ^^^^^^^^^^ dereference of raw pointer error: aborting due to previous error diff --git a/src/test/ui/trait-suggest-where-clause.stderr b/src/test/ui/trait-suggest-where-clause.stderr index 9c2ee6476cc..71fa93d5e0c 100644 --- a/src/test/ui/trait-suggest-where-clause.stderr +++ b/src/test/ui/trait-suggest-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:17:5 | -17 | mem::size_of::(); +LL | mem::size_of::(); | ^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `U` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied in `Misc` --> $DIR/trait-suggest-where-clause.rs:20:5 | -20 | mem::size_of::>(); +LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time | = help: within `Misc`, the trait `std::marker::Sized` is not implemented for `U` @@ -22,7 +22,7 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied in `Misc< error[E0277]: the trait bound `u64: std::convert::From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:25:5 | -25 | >::from; +LL | >::from; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `u64` | = help: consider adding a `where u64: std::convert::From` bound @@ -31,7 +31,7 @@ error[E0277]: the trait bound `u64: std::convert::From` is not satisfied error[E0277]: the trait bound `u64: std::convert::From<::Item>` is not satisfied --> $DIR/trait-suggest-where-clause.rs:28:5 | -28 | ::Item>>::from; +LL | ::Item>>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<::Item>` is not implemented for `u64` | = help: consider adding a `where u64: std::convert::From<::Item>` bound @@ -40,7 +40,7 @@ error[E0277]: the trait bound `u64: std::convert::From<: std::convert::From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:33:5 | -33 | as From>::from; +LL | as From>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `Misc<_>` | = note: required by `std::convert::From::from` @@ -48,7 +48,7 @@ error[E0277]: the trait bound `Misc<_>: std::convert::From` is not satisfied error[E0277]: the trait bound `[T]: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:38:5 | -38 | mem::size_of::<[T]>(); +LL | mem::size_of::<[T]>(); | ^^^^^^^^^^^^^^^^^^^ `[T]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[T]` @@ -57,7 +57,7 @@ error[E0277]: the trait bound `[T]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[&U]: std::marker::Sized` is not satisfied --> $DIR/trait-suggest-where-clause.rs:41:5 | -41 | mem::size_of::<[&U]>(); +LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ `[&U]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[&U]` diff --git a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr index ad387282d71..65f2de8bad5 100644 --- a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr +++ b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/traits-multidispatch-convert-ambig-dest.rs:36:5 | -36 | test(22, std::default::Default::default()); +LL | test(22, std::default::Default::default()); | ^^^^ cannot infer type for `U` error: aborting due to previous error diff --git a/src/test/ui/transmute/main.stderr b/src/test/ui/transmute/main.stderr index 716cdd4b241..d412788af5d 100644 --- a/src/test/ui/transmute/main.stderr +++ b/src/test/ui/transmute/main.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:26:5 | -26 | transmute(x) //~ ERROR transmute called with types of different sizes +LL | transmute(x) //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: >::T (size can vary because of ::T) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:30:17 | -30 | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of different sizes +LL | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: u16 (16 bits) @@ -19,7 +19,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:34:17 | -34 | let x: u8 = transmute("test"); //~ ERROR transmute called with types of different sizes +LL | let x: u8 = transmute("test"); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: &str ($STR bits) @@ -28,7 +28,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/main.rs:39:18 | -39 | let x: Foo = transmute(10); //~ ERROR transmute called with types of different sizes +LL | let x: Foo = transmute(10); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ | = note: source type: i32 (32 bits) diff --git a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr index 6a8c486d438..00723060307 100644 --- a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr +++ b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/transmute-from-fn-item-types-error.rs:14:13 | -14 | let i = mem::transmute(bar); +LL | let i = mem::transmute(bar); | ^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} (0 bits) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:18:13 | -18 | let p = mem::transmute(foo); +LL | let p = mem::transmute(foo); | ^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -20,7 +20,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:22:14 | -22 | let of = mem::transmute(main); +LL | let of = mem::transmute(main); | ^^^^^^^^^^^^^^ | = note: source type: fn() {main} @@ -30,7 +30,7 @@ error[E0591]: can't transmute zero-sized type error[E0512]: transmute called with types of different sizes --> $DIR/transmute-from-fn-item-types-error.rs:31:5 | -31 | mem::transmute::<_, u8>(main); +LL | mem::transmute::<_, u8>(main); | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: fn() {main} (0 bits) @@ -39,7 +39,7 @@ error[E0512]: transmute called with types of different sizes error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:35:5 | -35 | mem::transmute::<_, *mut ()>(foo); +LL | mem::transmute::<_, *mut ()>(foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -49,7 +49,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:39:5 | -39 | mem::transmute::<_, fn()>(bar); +LL | mem::transmute::<_, fn()>(bar); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} @@ -59,7 +59,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:48:5 | -48 | mem::transmute::<_, *mut ()>(Some(foo)); +LL | mem::transmute::<_, *mut ()>(Some(foo)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} @@ -69,7 +69,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:52:5 | -52 | mem::transmute::<_, fn()>(Some(bar)); +LL | mem::transmute::<_, fn()>(Some(bar)); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {bar} @@ -79,7 +79,7 @@ error[E0591]: can't transmute zero-sized type error[E0591]: can't transmute zero-sized type --> $DIR/transmute-from-fn-item-types-error.rs:56:5 | -56 | mem::transmute::<_, Option>(Some(baz)); +LL | mem::transmute::<_, Option>(Some(baz)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {baz} diff --git a/src/test/ui/transmute/transmute-type-parameters.stderr b/src/test/ui/transmute/transmute-type-parameters.stderr index a52c43fbbad..fd9c132383c 100644 --- a/src/test/ui/transmute/transmute-type-parameters.stderr +++ b/src/test/ui/transmute/transmute-type-parameters.stderr @@ -1,7 +1,7 @@ error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:21:18 | -21 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: T (this type's size can vary) @@ -10,7 +10,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:26:18 | -26 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: (T, i32) (size can vary because of T) @@ -19,7 +19,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:31:18 | -31 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: [T; 10] (size can vary because of T) @@ -28,7 +28,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:40:18 | -40 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: Bad (size can vary because of T) @@ -37,7 +37,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:50:18 | -50 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: Worse (size can vary because of T) @@ -46,7 +46,7 @@ error[E0512]: transmute called with types of different sizes error[E0512]: transmute called with types of different sizes --> $DIR/transmute-type-parameters.rs:55:18 | -55 | let _: i32 = transmute(x); +LL | let _: i32 = transmute(x); | ^^^^^^^^^ | = note: source type: std::option::Option (size can vary because of T) diff --git a/src/test/ui/type-annotation-needed.stderr b/src/test/ui/type-annotation-needed.stderr index 11d4b6b7d4d..67c0698a6c2 100644 --- a/src/test/ui/type-annotation-needed.stderr +++ b/src/test/ui/type-annotation-needed.stderr @@ -1,13 +1,13 @@ error[E0283]: type annotations required: cannot resolve `_: std::convert::Into` --> $DIR/type-annotation-needed.rs:15:5 | -15 | foo(42); +LL | foo(42); | ^^^ | note: required by `foo` --> $DIR/type-annotation-needed.rs:11:1 | -11 | fn foo>(x: i32) {} +LL | fn foo>(x: i32) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/type-check/assignment-in-if.stderr b/src/test/ui/type-check/assignment-in-if.stderr index f2f29d31c11..32b4315bb83 100644 --- a/src/test/ui/type-check/assignment-in-if.stderr +++ b/src/test/ui/type-check/assignment-in-if.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:25:8 | -25 | if x = x { +LL | if x = x { | ^^^^^ | | | expected bool, found () @@ -13,7 +13,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:30:8 | -30 | if (x = x) { +LL | if (x = x) { | ^^^^^^^ | | | expected bool, found () @@ -25,7 +25,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:35:8 | -35 | if y = (Foo { foo: x }) { +LL | if y = (Foo { foo: x }) { | ^^^^^^^^^^^^^^^^^^^^ | | | expected bool, found () @@ -37,7 +37,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:40:8 | -40 | if 3 = x { +LL | if 3 = x { | ^^^^^ | | | expected bool, found () @@ -49,7 +49,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/assignment-in-if.rs:44:8 | -44 | if (if true { x = 4 } else { x = 5 }) { +LL | if (if true { x = 4 } else { x = 5 }) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found () | = note: expected type `bool` diff --git a/src/test/ui/type-check/cannot_infer_local_or_array.stderr b/src/test/ui/type-check/cannot_infer_local_or_array.stderr index 6cda5ed1242..27679e16537 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_array.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_array.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_array.rs:12:13 | -12 | let x = []; //~ ERROR type annotations needed +LL | let x = []; //~ ERROR type annotations needed | - ^^ cannot infer type for `_` | | | consider giving `x` a type diff --git a/src/test/ui/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type-check/cannot_infer_local_or_vec.stderr index 439310367c5..5c024437b77 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_vec.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_vec.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_vec.rs:12:13 | -12 | let x = vec![]; +LL | let x = vec![]; | - ^^^^^^ cannot infer type for `T` | | | consider giving `x` a type diff --git a/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr index 9e21fc2be10..3a1b2879593 100644 --- a/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr +++ b/src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:12:18 | -12 | let (x, ) = (vec![], ); +LL | let (x, ) = (vec![], ); | ----- ^^^^^^ cannot infer type for `T` | | | consider giving the pattern a type diff --git a/src/test/ui/type-check/issue-22897.stderr b/src/test/ui/type-check/issue-22897.stderr index 8500c53b97b..1e6830601b6 100644 --- a/src/test/ui/type-check/issue-22897.stderr +++ b/src/test/ui/type-check/issue-22897.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-22897.rs:14:5 | -14 | []; //~ ERROR type annotations needed +LL | []; //~ ERROR type annotations needed | ^^ cannot infer type for `[_; 0]` error: aborting due to previous error diff --git a/src/test/ui/type-check/issue-40294.stderr b/src/test/ui/type-check/issue-40294.stderr index a1e6ab09d21..1eb1f8effbb 100644 --- a/src/test/ui/type-check/issue-40294.stderr +++ b/src/test/ui/type-check/issue-40294.stderr @@ -1,19 +1,19 @@ error[E0283]: type annotations required: cannot resolve `&'a T: Foo` --> $DIR/issue-40294.rs:15:1 | -15 | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required -16 | | where &'a T : Foo, -17 | | &'b T : Foo -18 | | { -19 | | x.foo(); -20 | | y.foo(); -21 | | } +LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required +LL | | where &'a T : Foo, +LL | | &'b T : Foo +LL | | { +LL | | x.foo(); +LL | | y.foo(); +LL | | } | |_^ | note: required by `Foo` --> $DIR/issue-40294.rs:11:1 | -11 | trait Foo: Sized { +LL | trait Foo: Sized { | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/type-check/issue-41314.stderr b/src/test/ui/type-check/issue-41314.stderr index 97fcc6f1cd9..95b046bf184 100644 --- a/src/test/ui/type-check/issue-41314.stderr +++ b/src/test/ui/type-check/issue-41314.stderr @@ -1,13 +1,13 @@ error[E0026]: variant `X::Y` does not have a field named `number` --> $DIR/issue-41314.rs:17:16 | -17 | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^ variant `X::Y` does not have field `number` error[E0027]: pattern does not mention field `0` --> $DIR/issue-41314.rs:17:9 | -17 | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^^^^^^^^^^ missing field `0` | = note: trying to match a tuple variant with a struct variant pattern diff --git a/src/test/ui/type-check/missing_trait_impl.stderr b/src/test/ui/type-check/missing_trait_impl.stderr index 87add3efe09..ef02708fe53 100644 --- a/src/test/ui/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type-check/missing_trait_impl.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `T` --> $DIR/missing_trait_impl.rs:15:13 | -15 | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` +LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` | ^^^^^ | = note: `T` might need a bound for `std::ops::Add` diff --git a/src/test/ui/type-check/unknown_type_for_closure.stderr b/src/test/ui/type-check/unknown_type_for_closure.stderr index 01d13ceb060..ce9c0dc4e40 100644 --- a/src/test/ui/type-check/unknown_type_for_closure.stderr +++ b/src/test/ui/type-check/unknown_type_for_closure.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unknown_type_for_closure.rs:12:14 | -12 | let x = |_| { }; //~ ERROR type annotations needed +LL | let x = |_| { }; //~ ERROR type annotations needed | ^ consider giving this closure parameter a type error: aborting due to previous error diff --git a/src/test/ui/type-recursive.stderr b/src/test/ui/type-recursive.stderr index e76dd9badb5..ea90feee324 100644 --- a/src/test/ui/type-recursive.stderr +++ b/src/test/ui/type-recursive.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `t1` has infinite size --> $DIR/type-recursive.rs:11:1 | -11 | struct t1 { //~ ERROR E0072 +LL | struct t1 { //~ ERROR E0072 | ^^^^^^^^^ recursive type has infinite size -12 | foo: isize, -13 | foolish: t1 +LL | foo: isize, +LL | foolish: t1 | ----------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `t1` representable diff --git a/src/test/ui/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck-builtin-bound-type-parameters.stderr index 42bda14e341..cf4011f5dbe 100644 --- a/src/test/ui/typeck-builtin-bound-type-parameters.stderr +++ b/src/test/ui/typeck-builtin-bound-type-parameters.stderr @@ -1,37 +1,37 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:11:11 | -11 | fn foo1, U>(x: T) {} +LL | fn foo1, U>(x: T) {} | ^^^^^^^ expected no type arguments error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:14:14 | -14 | trait Trait: Copy {} +LL | trait Trait: Copy {} | ^^^^^^^^^^ expected no type arguments error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:17:21 | -17 | struct MyStruct1>; +LL | struct MyStruct1>; | ^^^^^^^ expected no type arguments error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:20:25 | -20 | struct MyStruct2<'a, T: Copy<'a>>; +LL | struct MyStruct2<'a, T: Copy<'a>>; | ^^^^^^^^ unexpected lifetime parameter error[E0107]: wrong number of lifetime parameters: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15 | -24 | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^^^^^^^^ unexpected lifetime parameter error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15 | -24 | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} +LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^^^^^^^^ expected no type arguments error: aborting due to 6 previous errors diff --git a/src/test/ui/typeck_type_placeholder_item.stderr b/src/test/ui/typeck_type_placeholder_item.stderr index 98fe6ee1c96..b00fbafcd69 100644 --- a/src/test/ui/typeck_type_placeholder_item.stderr +++ b/src/test/ui/typeck_type_placeholder_item.stderr @@ -1,206 +1,206 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:14:14 | -14 | fn test() -> _ { 5 } +LL | fn test() -> _ { 5 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:17:16 | -17 | fn test2() -> (_, _) { (5, 5) } +LL | fn test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:17:19 | -17 | fn test2() -> (_, _) { (5, 5) } +LL | fn test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:21:15 | -21 | static TEST3: _ = "test"; +LL | static TEST3: _ = "test"; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:24:15 | -24 | static TEST4: _ = 145; +LL | static TEST4: _ = 145; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:27:16 | -27 | static TEST5: (_, _) = (1, 2); +LL | static TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:27:19 | -27 | static TEST5: (_, _) = (1, 2); +LL | static TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:31:13 | -31 | fn test6(_: _) { } +LL | fn test6(_: _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:34:13 | -34 | fn test7(x: _) { let _x: usize = x; } +LL | fn test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:37:22 | -37 | fn test8(_f: fn() -> _) { } +LL | fn test8(_f: fn() -> _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:59:8 | -59 | a: _, +LL | a: _, | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:61:9 | -61 | b: (_, _), +LL | b: (_, _), | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:61:12 | -61 | b: (_, _), +LL | b: (_, _), | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:67:21 | -67 | fn fn_test() -> _ { 5 } +LL | fn fn_test() -> _ { 5 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:70:23 | -70 | fn fn_test2() -> (_, _) { (5, 5) } +LL | fn fn_test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:70:26 | -70 | fn fn_test2() -> (_, _) { (5, 5) } +LL | fn fn_test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:74:22 | -74 | static FN_TEST3: _ = "test"; +LL | static FN_TEST3: _ = "test"; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:77:22 | -77 | static FN_TEST4: _ = 145; +LL | static FN_TEST4: _ = 145; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:80:23 | -80 | static FN_TEST5: (_, _) = (1, 2); +LL | static FN_TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:80:26 | -80 | static FN_TEST5: (_, _) = (1, 2); +LL | static FN_TEST5: (_, _) = (1, 2); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:84:20 | -84 | fn fn_test6(_: _) { } +LL | fn fn_test6(_: _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:87:20 | -87 | fn fn_test7(x: _) { let _x: usize = x; } +LL | fn fn_test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:90:29 | -90 | fn fn_test8(_f: fn() -> _) { } +LL | fn fn_test8(_f: fn() -> _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:112:12 - | -112 | a: _, - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:112:12 + | +LL | a: _, + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:114:13 - | -114 | b: (_, _), - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:114:13 + | +LL | b: (_, _), + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:114:16 - | -114 | b: (_, _), - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:114:16 + | +LL | b: (_, _), + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:43:24 | -43 | fn test9(&self) -> _ { () } +LL | fn test9(&self) -> _ { () } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:46:27 | -46 | fn test10(&self, _x : _) { } +LL | fn test10(&self, _x : _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:51:24 | -51 | fn clone(&self) -> _ { Test9 } +LL | fn clone(&self) -> _ { Test9 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:54:37 | -54 | fn clone_from(&mut self, other: _) { *self = Test9; } +LL | fn clone_from(&mut self, other: _) { *self = Test9; } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:96:31 | -96 | fn fn_test9(&self) -> _ { () } +LL | fn fn_test9(&self) -> _ { () } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:99:34 | -99 | fn fn_test10(&self, _x : _) { } +LL | fn fn_test10(&self, _x : _) { } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:104:28 - | -104 | fn clone(&self) -> _ { FnTest9 } - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:104:28 + | +LL | fn clone(&self) -> _ { FnTest9 } + | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:107:41 - | -107 | fn clone_from(&mut self, other: _) { *self = FnTest9; } - | ^ not allowed in type signatures + --> $DIR/typeck_type_placeholder_item.rs:107:41 + | +LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } + | ^ not allowed in type signatures error: aborting due to 34 previous errors diff --git a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr index 1227da4b0de..19b308f3334 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 --> $DIR/typeck_type_placeholder_lifetime_1.rs:19:12 | -19 | let c: Foo<_, _> = Foo { r: &5 }; +LL | let c: Foo<_, _> = Foo { r: &5 }; | ^^^^^^^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr index 9352ee9e018..12712e1e88c 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr @@ -1,7 +1,7 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:12 | -19 | let c: Foo<_, usize> = Foo { r: &5 }; +LL | let c: Foo<_, usize> = Foo { r: &5 }; | ^^^^^^^^^^^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/ui-testing-optout.rs b/src/test/ui/ui-testing-optout.rs new file mode 100644 index 00000000000..3072bd64a2c --- /dev/null +++ b/src/test/ui/ui-testing-optout.rs @@ -0,0 +1,104 @@ +// disable-ui-testing-normalization + +// Line number < 10 +type A = B; //~ ERROR + +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Line number >=10, <100 +type C = D; //~ ERROR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// Line num >=100 +type E = F; //~ ERROR + +fn main() {} diff --git a/src/test/ui/ui-testing-optout.stderr b/src/test/ui/ui-testing-optout.stderr new file mode 100644 index 00000000000..1c13da57b0d --- /dev/null +++ b/src/test/ui/ui-testing-optout.stderr @@ -0,0 +1,21 @@ +error[E0412]: cannot find type `B` in this scope + --> $DIR/ui-testing-optout.rs:4:10 + | +4 | type A = B; //~ ERROR + | ^ did you mean `A`? + +error[E0412]: cannot find type `D` in this scope + --> $DIR/ui-testing-optout.rs:17:10 + | +17 | type C = D; //~ ERROR + | ^ did you mean `A`? + +error[E0412]: cannot find type `F` in this scope + --> $DIR/ui-testing-optout.rs:102:10 + | +102 | type E = F; //~ ERROR + | ^ did you mean `A`? + +error: aborting due to 3 previous errors + +If you want more information on this error, try using "rustc --explain E0412" diff --git a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr index 0560f1de716..633ae13ca10 100644 --- a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr +++ b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr @@ -1,7 +1,7 @@ error[E0644]: closure/generator type that references itself --> $DIR/unboxed-closure-no-cyclic-sig.rs:18:7 | -18 | g(|_| { }); //~ ERROR closure/generator type that references itself +LL | g(|_| { }); //~ ERROR closure/generator type that references itself | ^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; diff --git a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr index 9bf9db2a194..8ef0828fba5 100644 --- a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr +++ b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr @@ -1,13 +1,13 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:8 | -15 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^^^^^^^^^^^^^^^^^ expected no type arguments error[E0220]: associated type `Output` not found for `Trait` --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:24 | -15 | fn f isize>(x: F) {} +LL | fn f isize>(x: F) {} | ^^^^^ associated type `Output` not found error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr b/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr index 775ea5f7703..3b78481504c 100644 --- a/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr +++ b/src/test/ui/unboxed-closures-infer-fn-once-move-from-projection.stderr @@ -1,12 +1,12 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:24:13 | -24 | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait +LL | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait | ^^^^^^^^-^^^ | | | | | closure is `FnOnce` because it moves the variable `y` out of its environment | this closure implements `FnOnce`, not `Fn` -25 | foo(c); +LL | foo(c); | --- the requirement to implement `Fn` derives from here error: aborting due to previous error diff --git a/src/test/ui/unconstrained-none.stderr b/src/test/ui/unconstrained-none.stderr index 0590a1dfb85..6fdbc8414b6 100644 --- a/src/test/ui/unconstrained-none.stderr +++ b/src/test/ui/unconstrained-none.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-none.rs:14:5 | -14 | None; //~ ERROR type annotations needed [E0282] +LL | None; //~ ERROR type annotations needed [E0282] | ^^^^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/unconstrained-ref.stderr b/src/test/ui/unconstrained-ref.stderr index ea91b01f312..7aeec39ae14 100644 --- a/src/test/ui/unconstrained-ref.stderr +++ b/src/test/ui/unconstrained-ref.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-ref.rs:16:5 | -16 | S { o: &None }; //~ ERROR type annotations needed [E0282] +LL | S { o: &None }; //~ ERROR type annotations needed [E0282] | ^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/union/union-const-eval.stderr b/src/test/ui/union/union-const-eval.stderr index cee947d73a2..afd661337c6 100644 --- a/src/test/ui/union/union-const-eval.stderr +++ b/src/test/ui/union/union-const-eval.stderr @@ -1,7 +1,7 @@ warning: constant evaluation error: nonexistent struct field --> $DIR/union-const-eval.rs:21:21 | -21 | let b: [u8; C.b]; //~ ERROR constant evaluation error +LL | let b: [u8; C.b]; //~ ERROR constant evaluation error | ^^^ | = note: #[warn(const_err)] on by default @@ -9,7 +9,7 @@ warning: constant evaluation error: nonexistent struct field error[E0080]: constant evaluation error --> $DIR/union-const-eval.rs:21:21 | -21 | let b: [u8; C.b]; //~ ERROR constant evaluation error +LL | let b: [u8; C.b]; //~ ERROR constant evaluation error | ^^^ nonexistent struct field error: aborting due to previous error diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index 8d49a1febbe..88b33c3e96e 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied --> $DIR/union-derive-eq.rs:25:5 | -25 | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied +LL | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/union/union-fields-1.stderr b/src/test/ui/union/union-fields-1.stderr index 5204a13f6f2..e337ea9d7ee 100644 --- a/src/test/ui/union/union-fields-1.stderr +++ b/src/test/ui/union/union-fields-1.stderr @@ -1,31 +1,31 @@ error: field is never used: `c` --> $DIR/union-fields-1.rs:16:5 | -16 | c: u8, //~ ERROR field is never used +LL | c: u8, //~ ERROR field is never used | ^^^^^ | note: lint level defined here --> $DIR/union-fields-1.rs:11:9 | -11 | #![deny(dead_code)] +LL | #![deny(dead_code)] | ^^^^^^^^^ error: field is never used: `a` --> $DIR/union-fields-1.rs:19:5 | -19 | a: u8, //~ ERROR field is never used +LL | a: u8, //~ ERROR field is never used | ^^^^^ error: field is never used: `a` --> $DIR/union-fields-1.rs:23:20 | -23 | union NoDropLike { a: u8 } //~ ERROR field is never used +LL | union NoDropLike { a: u8 } //~ ERROR field is never used | ^^^^^ error: field is never used: `c` --> $DIR/union-fields-1.rs:28:5 | -28 | c: u8, //~ ERROR field is never used +LL | c: u8, //~ ERROR field is never used | ^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index f5f5c4fab2b..d902ad1629c 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -1,19 +1,19 @@ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:17:13 | -17 | let u = U {}; //~ ERROR union expressions should have exactly one field +LL | let u = U {}; //~ ERROR union expressions should have exactly one field | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:19:13 | -19 | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field | ^ error[E0560]: union `U` has no field named `c` --> $DIR/union-fields-2.rs:20:29 | -20 | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^ `U` does not have this field | = note: available fields are: `a`, `b` @@ -21,61 +21,61 @@ error[E0560]: union `U` has no field named `c` error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:20:13 | -20 | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:22:13 | -22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error[E0436]: functional record update syntax requires a struct --> $DIR/union-fields-2.rs:22:19 | -22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:25:9 | -25 | let U {} = u; //~ ERROR union patterns should have exactly one field +LL | let U {} = u; //~ ERROR union patterns should have exactly one field | ^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:27:9 | -27 | let U { a, b } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^ error[E0026]: union `U` does not have a field named `c` --> $DIR/union-fields-2.rs:28:19 | -28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^ union `U` does not have field `c` error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:28:9 | -28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:30:9 | -30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:30:9 | -30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:32:9 | -32 | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns +LL | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns | ^^^^^^^^^^^ error: aborting due to 13 previous errors diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index e799d8cb518..4f2d00aaa3e 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:14:5 | -14 | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^^^^^^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:18:5 | -18 | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^^^^^^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` @@ -21,7 +21,7 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied --> $DIR/union-sized-field.rs:23:11 | -23 | Value(T), //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied +LL | Value(T), //~ ERROR the trait bound `T: std::marker::Sized` is not satisfied | ^^ `T` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index a2733a69483..f2ff38bd0c7 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -1,19 +1,19 @@ error[E0560]: union `U` has no field named `principle` --> $DIR/union-suggest-field.rs:20:17 | -20 | let u = U { principle: 0 }; +LL | let u = U { principle: 0 }; | ^^^^^^^^^ field does not exist - did you mean `principal`? error[E0609]: no field `principial` on type `U` --> $DIR/union-suggest-field.rs:22:15 | -22 | let w = u.principial; //~ ERROR no field `principial` on type `U` +LL | let w = u.principial; //~ ERROR no field `principial` on type `U` | ^^^^^^^^^^ did you mean `principal`? error[E0615]: attempted to take value of method `calculate` on type `U` --> $DIR/union-suggest-field.rs:25:15 | -25 | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` +LL | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` | ^^^^^^^^^ | = help: maybe a `()` to call it is missing? diff --git a/src/test/ui/unknown-language-item.stderr b/src/test/ui/unknown-language-item.stderr index 1b7828ea11c..b97971c29dc 100644 --- a/src/test/ui/unknown-language-item.stderr +++ b/src/test/ui/unknown-language-item.stderr @@ -1,7 +1,7 @@ error[E0522]: definition of an unknown language item: `foo` --> $DIR/unknown-language-item.rs:14:1 | -14 | #[lang = "foo"] +LL | #[lang = "foo"] | ^^^^^^^^^^^^^^^ definition of unknown language item `foo` error: aborting due to previous error diff --git a/src/test/ui/unsafe-block-without-braces.stderr b/src/test/ui/unsafe-block-without-braces.stderr index fc6ddba3823..e6d2403ac4c 100644 --- a/src/test/ui/unsafe-block-without-braces.stderr +++ b/src/test/ui/unsafe-block-without-braces.stderr @@ -1,9 +1,9 @@ error: expected one of `extern`, `fn`, or `{`, found `std` --> $DIR/unsafe-block-without-braces.rs:13:9 | -12 | unsafe //{ +LL | unsafe //{ | - expected one of `extern`, `fn`, or `{` here -13 | std::mem::transmute::(1.0); +LL | std::mem::transmute::(1.0); | ^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/unsafe-const-fn.stderr b/src/test/ui/unsafe-const-fn.stderr index b9236007e76..43b8e36baf2 100644 --- a/src/test/ui/unsafe-const-fn.stderr +++ b/src/test/ui/unsafe-const-fn.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function requires unsafe function or block --> $DIR/unsafe-const-fn.rs:19:18 | -19 | const VAL: u32 = dummy(0xFFFF); +LL | const VAL: u32 = dummy(0xFFFF); | ^^^^^^^^^^^^^ call to unsafe function error: aborting due to previous error diff --git a/src/test/ui/unsized-enum2.stderr b/src/test/ui/unsized-enum2.stderr index c85ed45a9be..f2bfa6b8214 100644 --- a/src/test/ui/unsized-enum2.stderr +++ b/src/test/ui/unsized-enum2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `W: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:33:8 | -33 | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied +LL | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied | ^^ `W` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `W` @@ -11,7 +11,7 @@ error[E0277]: the trait bound `W: std::marker::Sized` is not satisfied error[E0277]: the trait bound `X: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:34:8 | -34 | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied +LL | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied | ^^^^ `X` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `X` @@ -21,7 +21,7 @@ error[E0277]: the trait bound `X: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Y: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:35:15 | -35 | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied +LL | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied | ^^ `Y` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Y` @@ -31,7 +31,7 @@ error[E0277]: the trait bound `Y: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Z: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:36:18 | -36 | VD{u: isize, x: Z}, //~ ERROR `Z: std::marker::Sized` is not satisfied +LL | VD{u: isize, x: Z}, //~ ERROR `Z: std::marker::Sized` is not satisfied | ^^^^ `Z` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Z` @@ -41,7 +41,7 @@ error[E0277]: the trait bound `Z: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:39:8 | -39 | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied +LL | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied | ^^^^^ `[u8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` @@ -50,7 +50,7 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:40:8 | -40 | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied +LL | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -59,7 +59,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[f32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:41:15 | -41 | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfied +LL | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfied | ^^^^^^ `[f32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[f32]` @@ -68,7 +68,7 @@ error[E0277]: the trait bound `[f32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[u32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:42:18 | -42 | VH{u: isize, x: [u32]}, //~ ERROR `[u32]: std::marker::Sized` is not satisfied +LL | VH{u: isize, x: [u32]}, //~ ERROR `[u32]: std::marker::Sized` is not satisfied | ^^^^^^^^ `[u32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u32]` @@ -77,7 +77,7 @@ error[E0277]: the trait bound `[u32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `Foo + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:51:8 | -51 | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfied +LL | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfied | ^^^^ `Foo + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Foo + 'static` @@ -86,7 +86,7 @@ error[E0277]: the trait bound `Foo + 'static: std::marker::Sized` is not satisfi error[E0277]: the trait bound `Bar + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:52:8 | -52 | VN{x: Bar}, //~ ERROR `Bar + 'static: std::marker::Sized` is not satisfied +LL | VN{x: Bar}, //~ ERROR `Bar + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `Bar + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Bar + 'static` @@ -95,7 +95,7 @@ error[E0277]: the trait bound `Bar + 'static: std::marker::Sized` is not satisfi error[E0277]: the trait bound `FooBar + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:53:15 | -53 | VO(isize, FooBar), //~ ERROR `FooBar + 'static: std::marker::Sized` is not satisfied +LL | VO(isize, FooBar), //~ ERROR `FooBar + 'static: std::marker::Sized` is not satisfied | ^^^^^^^ `FooBar + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `FooBar + 'static` @@ -104,7 +104,7 @@ error[E0277]: the trait bound `FooBar + 'static: std::marker::Sized` is not sati error[E0277]: the trait bound `BarFoo + 'static: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:54:18 | -54 | VP{u: isize, x: BarFoo}, //~ ERROR `BarFoo + 'static: std::marker::Sized` is not satisfied +LL | VP{u: isize, x: BarFoo}, //~ ERROR `BarFoo + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^^ `BarFoo + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `BarFoo + 'static` @@ -113,7 +113,7 @@ error[E0277]: the trait bound `BarFoo + 'static: std::marker::Sized` is not sati error[E0277]: the trait bound `[i8]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:57:8 | -57 | VQ(<&'static [i8] as Deref>::Target), //~ ERROR `[i8]: std::marker::Sized` is not satisfied +LL | VQ(<&'static [i8] as Deref>::Target), //~ ERROR `[i8]: std::marker::Sized` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[i8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[i8]` @@ -122,7 +122,7 @@ error[E0277]: the trait bound `[i8]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[char]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:58:8 | -58 | VR{x: <&'static [char] as Deref>::Target}, +LL | VR{x: <&'static [char] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[char]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[char]` @@ -131,7 +131,7 @@ error[E0277]: the trait bound `[char]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[f64]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:60:15 | -60 | VS(isize, <&'static [f64] as Deref>::Target), +LL | VS(isize, <&'static [f64] as Deref>::Target), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[f64]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[f64]` @@ -140,7 +140,7 @@ error[E0277]: the trait bound `[f64]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `[i32]: std::marker::Sized` is not satisfied --> $DIR/unsized-enum2.rs:62:18 | -62 | VT{u: isize, x: <&'static [i32] as Deref>::Target}, +LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[i32]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[i32]` @@ -149,7 +149,7 @@ error[E0277]: the trait bound `[i32]: std::marker::Sized` is not satisfied error[E0277]: the trait bound `PathHelper1 + 'static: std::marker::Sized` is not satisfied in `Path1` --> $DIR/unsized-enum2.rs:45:8 | -45 | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not satisfied +LL | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `PathHelper1 + 'static` does not have a constant size known at compile-time | = help: within `Path1`, the trait `std::marker::Sized` is not implemented for `PathHelper1 + 'static` @@ -159,7 +159,7 @@ error[E0277]: the trait bound `PathHelper1 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper2 + 'static: std::marker::Sized` is not satisfied in `Path2` --> $DIR/unsized-enum2.rs:46:8 | -46 | VJ{x: Path2}, //~ ERROR `PathHelper2 + 'static: std::marker::Sized` is not satisfied +LL | VJ{x: Path2}, //~ ERROR `PathHelper2 + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^ `PathHelper2 + 'static` does not have a constant size known at compile-time | = help: within `Path2`, the trait `std::marker::Sized` is not implemented for `PathHelper2 + 'static` @@ -169,7 +169,7 @@ error[E0277]: the trait bound `PathHelper2 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper3 + 'static: std::marker::Sized` is not satisfied in `Path3` --> $DIR/unsized-enum2.rs:47:15 | -47 | VK(isize, Path3), //~ ERROR `PathHelper3 + 'static: std::marker::Sized` is not satisfied +LL | VK(isize, Path3), //~ ERROR `PathHelper3 + 'static: std::marker::Sized` is not satisfied | ^^^^^^ `PathHelper3 + 'static` does not have a constant size known at compile-time | = help: within `Path3`, the trait `std::marker::Sized` is not implemented for `PathHelper3 + 'static` @@ -179,7 +179,7 @@ error[E0277]: the trait bound `PathHelper3 + 'static: std::marker::Sized` is not error[E0277]: the trait bound `PathHelper4 + 'static: std::marker::Sized` is not satisfied in `Path4` --> $DIR/unsized-enum2.rs:48:18 | -48 | VL{u: isize, x: Path4}, //~ ERROR `PathHelper4 + 'static: std::marker::Sized` is not satisfied +LL | VL{u: isize, x: Path4}, //~ ERROR `PathHelper4 + 'static: std::marker::Sized` is not satisfied | ^^^^^^^^ `PathHelper4 + 'static` does not have a constant size known at compile-time | = help: within `Path4`, the trait `std::marker::Sized` is not implemented for `PathHelper4 + 'static` diff --git a/src/test/ui/use-mod.stderr b/src/test/ui/use-mod.stderr index f0e8d56b17b..0a63f370d97 100644 --- a/src/test/ui/use-mod.stderr +++ b/src/test/ui/use-mod.stderr @@ -1,31 +1,31 @@ error[E0430]: `self` import can only appear once in an import list --> $DIR/use-mod.rs:12:5 | -12 | self, +LL | self, | ^^^^ can only appear once in an import list ... -15 | self +LL | self | ---- another `self` import appears here error[E0431]: `self` import can only appear in an import list with a non-empty prefix --> $DIR/use-mod.rs:19:6 | -19 | use {self}; +LL | use {self}; | ^^^^ can only appear in an import list with a non-empty prefix error[E0252]: the name `bar` is defined multiple times --> $DIR/use-mod.rs:15:5 | -12 | self, +LL | self, | ---- previous import of the module `bar` here ... -15 | self +LL | self | ^^^^ `bar` reimported here | = note: `bar` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -15 | self as other_bar +LL | self as other_bar | error: aborting due to 3 previous errors diff --git a/src/test/ui/use-nested-groups-error.stderr b/src/test/ui/use-nested-groups-error.stderr index 153b583dd4e..64bbc7b588e 100644 --- a/src/test/ui/use-nested-groups-error.stderr +++ b/src/test/ui/use-nested-groups-error.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `a::b1::C1` --> $DIR/use-nested-groups-error.rs:19:14 | -19 | use a::{b1::{C1, C2}, B2}; +LL | use a::{b1::{C1, C2}, B2}; | ^^ no `C1` in `a::b1`. Did you mean to use `C2`? error: aborting due to previous error diff --git a/src/test/ui/use-nested-groups-unused-imports.stderr b/src/test/ui/use-nested-groups-unused-imports.stderr index 0686310dbf5..e339664f374 100644 --- a/src/test/ui/use-nested-groups-unused-imports.stderr +++ b/src/test/ui/use-nested-groups-unused-imports.stderr @@ -1,25 +1,25 @@ error: unused imports: `*`, `Foo`, `baz::{}`, `foobar::*` --> $DIR/use-nested-groups-unused-imports.rs:26:11 | -26 | use foo::{Foo, bar::{baz::{}, foobar::*}, *}; +LL | use foo::{Foo, bar::{baz::{}, foobar::*}, *}; | ^^^ ^^^^^^^ ^^^^^^^^^ ^ | note: lint level defined here --> $DIR/use-nested-groups-unused-imports.rs:13:9 | -13 | #![deny(unused_imports)] +LL | #![deny(unused_imports)] | ^^^^^^^^^^^^^^ error: unused import: `*` --> $DIR/use-nested-groups-unused-imports.rs:28:24 | -28 | use foo::bar::baz::{*, *}; +LL | use foo::bar::baz::{*, *}; | ^ error: unused import: `use foo::{};` --> $DIR/use-nested-groups-unused-imports.rs:30:1 | -30 | use foo::{}; +LL | use foo::{}; | ^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/variadic-ffi-3.stderr b/src/test/ui/variadic-ffi-3.stderr index 85086b01fe4..b9a84a0cd37 100644 --- a/src/test/ui/variadic-ffi-3.stderr +++ b/src/test/ui/variadic-ffi-3.stderr @@ -1,25 +1,25 @@ error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied --> $DIR/variadic-ffi-3.rs:21:9 | -12 | fn foo(f: isize, x: u8, ...); +LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -21 | foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied +LL | foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied | ^^^^^ expected at least 2 parameters error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied --> $DIR/variadic-ffi-3.rs:22:9 | -12 | fn foo(f: isize, x: u8, ...); +LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -22 | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied +LL | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied | ^^^^^^ expected at least 2 parameters error[E0308]: mismatched types --> $DIR/variadic-ffi-3.rs:24:56 | -24 | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; +LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; | ^^^ expected non-variadic fn, found variadic function | = note: expected type `unsafe extern "C" fn(isize, u8)` @@ -28,7 +28,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/variadic-ffi-3.rs:29:54 | -29 | let y: extern "C" fn(f: isize, x: u8, ...) = bar; +LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; | ^^^ expected variadic fn, found non-variadic function | = note: expected type `extern "C" fn(isize, u8, ...)` @@ -37,37 +37,37 @@ error[E0308]: mismatched types error[E0617]: can't pass `f32` to variadic function --> $DIR/variadic-ffi-3.rs:34:19 | -34 | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function +LL | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function | ^^^^ help: cast the value to `c_double`: `3f32 as c_double` error[E0617]: can't pass `bool` to variadic function --> $DIR/variadic-ffi-3.rs:35:19 | -35 | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function +LL | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function | ^^^^ help: cast the value to `c_int`: `true as c_int` error[E0617]: can't pass `i8` to variadic function --> $DIR/variadic-ffi-3.rs:36:19 | -36 | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function +LL | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function | ^^^ help: cast the value to `c_int`: `1i8 as c_int` error[E0617]: can't pass `u8` to variadic function --> $DIR/variadic-ffi-3.rs:37:19 | -37 | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function +LL | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint` error[E0617]: can't pass `i16` to variadic function --> $DIR/variadic-ffi-3.rs:38:19 | -38 | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function +LL | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function | ^^^^ help: cast the value to `c_int`: `1i16 as c_int` error[E0617]: can't pass `u16` to variadic function --> $DIR/variadic-ffi-3.rs:39:19 | -39 | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function +LL | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` error: aborting due to 10 previous errors diff --git a/src/test/ui/variance-unused-type-param.stderr b/src/test/ui/variance-unused-type-param.stderr index 62d3b4c6670..d606c5ef6ed 100644 --- a/src/test/ui/variance-unused-type-param.stderr +++ b/src/test/ui/variance-unused-type-param.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:16:19 | -16 | struct SomeStruct { x: u32 } +LL | struct SomeStruct { x: u32 } | ^ unused type parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -9,7 +9,7 @@ error[E0392]: parameter `A` is never used error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:19:15 | -19 | enum SomeEnum { Nothing } +LL | enum SomeEnum { Nothing } | ^ unused type parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -17,7 +17,7 @@ error[E0392]: parameter `A` is never used error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:23:15 | -23 | enum ListCell { +LL | enum ListCell { | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/vector-no-ann.stderr b/src/test/ui/vector-no-ann.stderr index 3a2980f3357..c3849bb82ba 100644 --- a/src/test/ui/vector-no-ann.stderr +++ b/src/test/ui/vector-no-ann.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/vector-no-ann.rs:13:16 | -13 | let _foo = Vec::new(); +LL | let _foo = Vec::new(); | ---- ^^^^^^^^ cannot infer type for `T` | | | consider giving `_foo` a type diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index d4d3d6c6e9a..e48f42705f1 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -226,9 +226,10 @@ pub struct TestProps { pub must_compile_successfully: bool, // rustdoc will test the output of the `--test` option pub check_test_line_numbers_match: bool, - // The test must be compiled and run successfully. Only used in UI tests for - // now. + // The test must be compiled and run successfully. Only used in UI tests for now. pub run_pass: bool, + // Do not pass `-Z ui-testing` to UI tests + pub disable_ui_testing_normalization: bool, // customized normalization rules pub normalize_stdout: Vec<(String, String)>, pub normalize_stderr: Vec<(String, String)>, @@ -259,6 +260,7 @@ impl TestProps { must_compile_successfully: false, check_test_line_numbers_match: false, run_pass: false, + disable_ui_testing_normalization: false, normalize_stdout: vec![], normalize_stderr: vec![], failure_status: 101, @@ -379,6 +381,11 @@ impl TestProps { config.parse_must_compile_successfully(ln) || self.run_pass; } + if !self.disable_ui_testing_normalization { + self.disable_ui_testing_normalization = + config.parse_disable_ui_testing_normalization(ln); + } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { self.normalize_stdout.push(rule); } @@ -505,6 +512,10 @@ impl Config { self.parse_name_directive(line, "must-compile-successfully") } + fn parse_disable_ui_testing_normalization(&self, line: &str) -> bool { + self.parse_name_directive(line, "disable-ui-testing-normalization") + } + fn parse_check_test_line_numbers_match(&self, line: &str) -> bool { self.parse_name_directive(line, "check-test-line-numbers-match") } diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index e5bee56de80..d3f571dd8ae 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1627,15 +1627,14 @@ impl<'test> TestCx<'test> { rustc.args(&["--error-format", "json"]); } } - Ui => if !self.props - .compile_flags - .iter() - .any(|s| s.starts_with("--error-format")) - { + Ui => { // In case no "--error-format" has been given in the test, we'll compile // a first time to get the compiler's output then compile with // "--error-format json" to check if all expected errors are actually there // and that no new one appeared. + if !self.props.disable_ui_testing_normalization { + rustc.arg("-Zui-testing"); + } } MirOpt => { rustc.args(&[