From 19d2ee6bfec6bcb7bbc096d3c7dcd0021bbca30a Mon Sep 17 00:00:00 2001 From: Dan Aloni Date: Wed, 16 May 2018 08:27:32 +0300 Subject: [PATCH 1/2] Include scope names in diagnostics So far, rustc has only printed about filenames and line numbers for warnings and errors. I think it is rather missed, compared to `gcc` and other compiler, that useful context information such as function names and structs is not included. The changes in this pull request introduce a new line emission in diagnostics to implement this. --- src/librustc_driver/driver.rs | 11 +++- src/librustc_errors/emitter.rs | 38 +++++++++++ src/librustc_errors/lib.rs | 36 +++++++++- src/libsyntax/diagnostics/ast.rs | 109 +++++++++++++++++++++++++++++++ src/libsyntax/lib.rs | 1 + src/libsyntax_pos/lib.rs | 6 ++ 6 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 src/libsyntax/diagnostics/ast.rs diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 62b3accc46f18..9a0dab3ddcaac 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -196,6 +196,11 @@ pub fn compile_input( )? }; + // Let diagnostics access the AST for allowing to show function names in messages. + let expanded_crate = Lrc::new(expanded_crate); + sess.diagnostic().set_ast( + Box::new(syntax::diagnostics::ast::ContextResolver::new(expanded_crate.clone()))); + let output_paths = generated_output_paths(sess, &outputs, output.is_some(), &crate_name); // Ensure the source file isn't accidentally overwritten during compilation. @@ -257,7 +262,7 @@ pub fn compile_input( &hir_map, &analysis, &resolutions, - &expanded_crate, + &*expanded_crate, &hir_map.krate(), &outputs, &crate_name @@ -267,8 +272,10 @@ pub fn compile_input( } let opt_crate = if control.keep_ast { - Some(&expanded_crate) + Some(&*expanded_crate) } else { + // AST will be kept for scope naming in diagnostic, should + // depricate keep_ast? drop(expanded_crate); None }; diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 91075ddcfa422..af2175f3df891 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -26,6 +26,10 @@ use std::cmp::min; use termcolor::{StandardStream, ColorChoice, ColorSpec, BufferWriter}; use termcolor::{WriteColor, Color, Buffer}; use unicode_width; +use SpanContextResolver; +use SpanContextKind; +use SpanContext; +use std::cell::RefCell; const ANONYMIZED_LINE_NUM: &str = "LL"; @@ -81,6 +85,7 @@ impl Emitter for EmitterWriter { self.emit_messages_default(&db.level, &db.styled_message(), &db.code, + &db.handler.context_resolver, &primary_span, &children, &suggestions); @@ -958,6 +963,7 @@ impl EmitterWriter { msp: &MultiSpan, msg: &Vec<(String, Style)>, code: &Option, + cr: &RefCell>>, level: &Level, max_line_num_len: usize, is_secondary: bool) @@ -1042,6 +1048,18 @@ impl EmitterWriter { cm.doctest_offset_line(loc.line), loc.col.0 + 1), Style::LineAndColumn); + if let Some(ref primary_span) = msp.primary_span().as_ref() { + if primary_span != &&DUMMY_SP { + if let &Some(ref rc) = &*cr.borrow() { + let context = rc.span_to_context(**primary_span); + if let Some(context) = context { + repr_styled_context(buffer_msg_line_offset, + &mut buffer, context); + } + } + } + } + for _ in 0..max_line_num_len { buffer.prepend(buffer_msg_line_offset, " ", Style::NoStyle); } @@ -1282,6 +1300,7 @@ impl EmitterWriter { level: &Level, message: &Vec<(String, Style)>, code: &Option, + cr: &RefCell>>, span: &MultiSpan, children: &Vec, suggestions: &[CodeSuggestion]) { @@ -1294,6 +1313,7 @@ impl EmitterWriter { match self.emit_message_default(span, message, code, + cr, level, max_line_num_len, false) { @@ -1315,6 +1335,7 @@ impl EmitterWriter { match self.emit_message_default(&span, &child.styled_message(), &None, + cr, &child.level, max_line_num_len, true) { @@ -1396,6 +1417,23 @@ fn overlaps(a1: &Annotation, a2: &Annotation, padding: usize) -> bool { num_overlap(a1.start_col, a1.end_col + padding, a2.start_col, a2.end_col, false) } +fn repr_styled_context(line_offset: usize, buffer: &mut StyledBuffer, context: SpanContext) +{ + let kind_str = match context.kind { + SpanContextKind::Enum => "enum", + SpanContextKind::Module => "mod", + SpanContextKind::Function => "fn", + SpanContextKind::Impl => "impl", + SpanContextKind::Method => "fn", + SpanContextKind::Struct => "struct", + SpanContextKind::Trait => "trait", + SpanContextKind::Union => "union", + }; + + buffer.append(line_offset, &format!(": in {}", kind_str), Style::NoStyle); + buffer.append(line_offset, &format!(" {}", context.path), Style::HeaderMsg); +} + fn emit_to_destination(rendered_buffer: &Vec>, lvl: &Level, dst: &mut Destination, diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index fd90e1cbe0866..c0672be126710 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -38,7 +38,7 @@ use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::stable_hasher::StableHasher; use std::borrow::Cow; -use std::cell::Cell; +use std::cell::{Cell, RefCell}; use std::{error, fmt}; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::SeqCst; @@ -286,6 +286,9 @@ pub struct Handler { // this handler. These hashes is used to avoid emitting the same error // twice. emitted_diagnostics: Lock>, + + // Callback to the Span AST resolver + context_resolver: RefCell>>, } fn default_track_diagnostic(_: &Diagnostic) {} @@ -300,6 +303,32 @@ pub struct HandlerFlags { pub external_macro_backtrace: bool, } +pub enum SpanContextKind { + Enum, + Function, + Impl, + Method, + Struct, + Trait, + Union, + Module, +} + +pub struct SpanContext { + kind: SpanContextKind, + path: String, +} + +impl SpanContext { + pub fn new(kind: SpanContextKind, path: String) -> Self { + Self { kind, path } + } +} + +pub trait SpanContextResolver { + fn span_to_context(&self, sp: Span) -> Option; +} + impl Handler { pub fn with_tty_emitter(color_config: ColorConfig, can_emit_warnings: bool, @@ -347,9 +376,14 @@ impl Handler { taught_diagnostics: Lock::new(FxHashSet()), emitted_diagnostic_codes: Lock::new(FxHashSet()), emitted_diagnostics: Lock::new(FxHashSet()), + context_resolver: RefCell::new(None), } } + pub fn set_ast(&self, scr: Box) { + *self.context_resolver.borrow_mut() = Some(scr); + } + pub fn set_continue_after_error(&self, continue_after_error: bool) { self.continue_after_error.set(continue_after_error); } diff --git a/src/libsyntax/diagnostics/ast.rs b/src/libsyntax/diagnostics/ast.rs new file mode 100644 index 0000000000000..73b22e6367529 --- /dev/null +++ b/src/libsyntax/diagnostics/ast.rs @@ -0,0 +1,109 @@ +// 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. + +use ast::*; +use errors::{SpanContextResolver, SpanContextKind, SpanContext}; +use rustc_data_structures::sync::Lrc; +use syntax_pos::Span; +use visit::{self, Visitor, FnKind}; + +pub struct ContextResolver { + krate: Lrc +} + +impl ContextResolver { + pub fn new(krate: Lrc) -> Self { + Self { krate } + } +} + +struct SpanResolver { + idents: Vec, + kind: Option, + span: Span, +} + +impl<'ast> Visitor<'ast> for SpanResolver { + fn visit_trait_item(&mut self, ti: &'ast TraitItem) { + if ti.span.proper_contains(self.span) { + self.idents.push(ti.ident); + self.kind = Some(SpanContextKind::Trait); + visit::walk_trait_item(self, ti) + } + } + + fn visit_impl_item(&mut self, ii: &'ast ImplItem) { + if ii.span.proper_contains(self.span) { + self.idents.push(ii.ident); + self.kind = Some(SpanContextKind::Impl); + visit::walk_impl_item(self, ii) + } + } + + fn visit_item(&mut self, i: &'ast Item) { + if i.span.proper_contains(self.span) { + let kind = match i.node { + ItemKind::Enum(..) => Some(SpanContextKind::Enum), + ItemKind::Struct(..) => Some(SpanContextKind::Struct), + ItemKind::Union(..) => Some(SpanContextKind::Union), + ItemKind::Trait(..) => Some(SpanContextKind::Trait), + ItemKind::Mod(..) => Some(SpanContextKind::Module), + _ => None, + }; + + if kind.is_some() { + self.idents.push(i.ident); + self.kind = kind; + } + + visit::walk_item(self, i); + } + } + + fn visit_fn(&mut self, fk: FnKind<'ast>, fd: &'ast FnDecl, s: Span, _: NodeId) { + if s.proper_contains(self.span) { + match fk { + FnKind::ItemFn(ref ident, ..) => { + self.idents.push(*ident); + self.kind = Some(SpanContextKind::Function); + } + FnKind::Method(ref ident, ..) => { + self.idents.push(*ident); + self.kind = Some(SpanContextKind::Method); + } + _ => {} + } + + visit::walk_fn(self, fk, fd, s) + } + } +} + +impl SpanContextResolver for ContextResolver { + fn span_to_context(&self, sp: Span) -> Option { + let mut sr = SpanResolver { + idents: Vec::new(), + span: sp, + kind: None, + }; + visit::walk_crate(&mut sr, &*self.krate); + + let SpanResolver { kind, idents, .. } = sr; + + match kind { + None => None, + Some(kind) => { + let path = idents.iter().map( + |x| x.to_string()).collect::>().join("::"); + Some(SpanContext::new(kind, path)) + } + } + } +} diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 90af3ba51ecad..481a5c38af88c 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -106,6 +106,7 @@ pub mod diagnostics { pub mod macros; pub mod plugin; pub mod metadata; + pub mod ast; } // NB: This module needs to be declared first so diagnostics are diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index d30d3d78ca540..fc4b8afac773e 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -265,6 +265,12 @@ impl Span { span.lo <= other.lo && other.hi <= span.hi } + pub fn proper_contains(self, other: Span) -> bool { + let span = self.data(); + let other = other.data(); + span.lo < other.lo && other.hi < span.hi + } + /// Return true if the spans are equal with regards to the source text. /// /// Use this instead of `==` when either span could be generated code, From 5de482cc524e61d4c8b0c37e0fbe577969b1815c Mon Sep 17 00:00:00 2001 From: Dan Aloni Date: Thu, 17 May 2018 16:33:52 +0300 Subject: [PATCH 2/2] Update references --- .../anonymous-higher-ranked-lifetime.stderr | 22 +- ...rbitrary-self-types-not-object-safe.stderr | 4 +- src/test/ui/asm-out-assign-imm.stderr | 2 +- .../associated-const-impl-wrong-type.stderr | 2 +- ...rojection-from-multiple-supertraits.stderr | 8 +- ...ypes-ICE-when-projecting-out-of-err.stderr | 2 +- ...sociated-types-in-ambiguous-context.stderr | 4 +- src/test/ui/augmented-assignments.stderr | 4 +- src/test/ui/binary-op-on-double-ref.stderr | 2 +- .../block-must-not-have-result-do.stderr | 2 +- .../block-must-not-have-result-res.stderr | 2 +- .../block-must-not-have-result-while.stderr | 2 +- src/test/ui/block-result/issue-13624.stderr | 4 +- src/test/ui/block-result/issue-20862.stderr | 4 +- src/test/ui/block-result/issue-22645.stderr | 4 +- src/test/ui/block-result/issue-3563.stderr | 2 +- src/test/ui/block-result/issue-5500.stderr | 2 +- .../unexpected-return-on-unit.stderr | 2 +- src/test/ui/bogus-tag.stderr | 2 +- .../borrowck-box-insensitivity.stderr | 32 +- .../borrowck/borrowck-closures-two-mut.stderr | 20 +- .../borrowck-escaping-closure-error-1.stderr | 2 +- .../borrowck-escaping-closure-error-2.stderr | 2 +- .../borrowck-move-error-with-note.stderr | 6 +- .../borrowck-move-out-of-vec-tail.stderr | 2 +- src/test/ui/borrowck/borrowck-reinit.stderr | 4 +- ...rowck-report-with-custom-diagnostic.stderr | 6 +- .../borrowck-vec-pattern-nesting.stderr | 16 +- src/test/ui/borrowck/immutable-arg.stderr | 4 +- src/test/ui/borrowck/issue-41962.stderr | 10 +- src/test/ui/borrowck/issue-45983.stderr | 2 +- src/test/ui/borrowck/issue-7573.stderr | 2 +- .../ui/borrowck/mut-borrow-in-loop.stderr | 6 +- .../borrowck/mut-borrow-outside-loop.stderr | 4 +- .../borrowck/regions-escape-bound-fn-2.stderr | 2 +- .../borrowck/regions-escape-bound-fn.stderr | 2 +- .../regions-escape-unboxed-closure.stderr | 2 +- .../ui/borrowck/two-phase-multi-mut.stderr | 4 +- ...ove-upvar-from-non-once-ref-closure.stderr | 2 +- src/test/ui/cast-as-bool.stderr | 2 +- src/test/ui/cast-rfc0401-2.stderr | 2 +- ...-to-unsized-trait-object-suggestion.stderr | 4 +- src/test/ui/cast_char.stderr | 4 +- src/test/ui/casts-differing-anon.stderr | 2 +- src/test/ui/catch-block-type-error.stderr | 4 +- src/test/ui/check_match/issue-35609.stderr | 16 +- src/test/ui/check_match/issue-43253.stderr | 6 +- .../expect-region-supply-region.stderr | 14 +- src/test/ui/closure-move-sync.stderr | 4 +- .../closure_context/issue-26046-fn-mut.stderr | 2 +- .../issue-26046-fn-once.stderr | 2 +- .../ui/closure_context/issue-42065.stderr | 4 +- src/test/ui/codemap_tests/empty_span.stderr | 2 +- .../huge_multispan_highlight.stderr | 2 +- src/test/ui/codemap_tests/issue-11715.stderr | 2 +- src/test/ui/codemap_tests/issue-28308.stderr | 2 +- src/test/ui/codemap_tests/one_line.stderr | 2 +- .../ui/codemap_tests/overlapping_spans.stderr | 2 +- src/test/ui/codemap_tests/tab.stderr | 2 +- src/test/ui/codemap_tests/tab_3.stderr | 2 +- src/test/ui/codemap_tests/unicode_3.stderr | 2 +- src/test/ui/command-line-diagnostics.stderr | 2 +- .../reordered-type-param.stderr | 2 +- src/test/ui/const-deref-ptr.stderr | 2 +- src/test/ui/const-eval-overflow-2.stderr | 2 +- src/test/ui/const-eval-span.stderr | 2 +- .../conditional_array_execution.stderr | 2 +- src/test/ui/const-eval/issue-43197.stderr | 12 +- src/test/ui/const-eval/issue-44578.stderr | 4 +- src/test/ui/const-eval/promoted_errors.stderr | 16 +- src/test/ui/const-fn-error.stderr | 10 +- .../const-len-underflow-separate-spans.stderr | 2 +- src/test/ui/const-pattern-irrefutable.stderr | 6 +- src/test/ui/deref-suggestion.stderr | 8 +- src/test/ui/did_you_mean/bad-assoc-pat.stderr | 8 +- ...e-21659-show-relevant-trait-impls-1.stderr | 2 +- ...e-21659-show-relevant-trait-impls-2.stderr | 2 +- src/test/ui/did_you_mean/issue-31424.stderr | 4 +- src/test/ui/did_you_mean/issue-34126.stderr | 2 +- src/test/ui/did_you_mean/issue-34337.stderr | 2 +- src/test/ui/did_you_mean/issue-35937.stderr | 6 +- src/test/ui/did_you_mean/issue-36798.stderr | 2 +- .../issue-36798_unknown_field.stderr | 2 +- src/test/ui/did_you_mean/issue-37139.stderr | 2 +- src/test/ui/did_you_mean/issue-38147-1.stderr | 2 +- src/test/ui/did_you_mean/issue-38147-2.stderr | 2 +- src/test/ui/did_you_mean/issue-38147-3.stderr | 2 +- src/test/ui/did_you_mean/issue-38147-4.stderr | 2 +- src/test/ui/did_you_mean/issue-39544.stderr | 24 +- .../issue-39802-show-5-trait-impls.stderr | 12 +- src/test/ui/did_you_mean/issue-40823.stderr | 2 +- .../issue-42599_available_fields_note.stderr | 8 +- src/test/ui/did_you_mean/issue-42764.stderr | 2 +- .../ui/did_you_mean/recursion_limit.stderr | 2 +- .../did_you_mean/recursion_limit_deref.stderr | 4 +- ...reference-without-parens-suggestion.stderr | 2 +- src/test/ui/discrim-overflow-2.stderr | 16 +- src/test/ui/discrim-overflow.stderr | 16 +- .../dropck-eyepatch-extern-crate.stderr | 8 +- .../ui/dropck/dropck-eyepatch-reorder.stderr | 8 +- src/test/ui/dropck/dropck-eyepatch.stderr | 8 +- src/test/ui/empty-struct-unit-expr.stderr | 8 +- src/test/ui/enum-size-variance.stderr | 2 +- src/test/ui/error-codes/E0001.stderr | 2 +- src/test/ui/error-codes/E0004-2.stderr | 4 +- src/test/ui/error-codes/E0004.stderr | 2 +- src/test/ui/error-codes/E0005.stderr | 2 +- src/test/ui/error-codes/E0007.stderr | 4 +- src/test/ui/error-codes/E0008.stderr | 2 +- src/test/ui/error-codes/E0009.stderr | 2 +- src/test/ui/error-codes/E0023.stderr | 6 +- src/test/ui/error-codes/E0025.stderr | 2 +- src/test/ui/error-codes/E0026-teach.stderr | 2 +- src/test/ui/error-codes/E0026.stderr | 2 +- src/test/ui/error-codes/E0027-teach.stderr | 2 +- src/test/ui/error-codes/E0027.stderr | 2 +- src/test/ui/error-codes/E0029-teach.stderr | 2 +- src/test/ui/error-codes/E0029.stderr | 2 +- src/test/ui/error-codes/E0030-teach.stderr | 2 +- src/test/ui/error-codes/E0030.stderr | 2 +- src/test/ui/error-codes/E0033-teach.stderr | 4 +- src/test/ui/error-codes/E0033.stderr | 4 +- src/test/ui/error-codes/E0034.stderr | 2 +- src/test/ui/error-codes/E0040.stderr | 2 +- src/test/ui/error-codes/E0050.stderr | 6 +- src/test/ui/error-codes/E0054.stderr | 2 +- src/test/ui/error-codes/E0055.stderr | 2 +- src/test/ui/error-codes/E0057.stderr | 4 +- src/test/ui/error-codes/E0059.stderr | 2 +- src/test/ui/error-codes/E0060.stderr | 2 +- src/test/ui/error-codes/E0061.stderr | 4 +- src/test/ui/error-codes/E0062.stderr | 2 +- src/test/ui/error-codes/E0063.stderr | 8 +- src/test/ui/error-codes/E0067.stderr | 4 +- src/test/ui/error-codes/E0069.stderr | 2 +- src/test/ui/error-codes/E0070.stderr | 8 +- src/test/ui/error-codes/E0071.stderr | 2 +- src/test/ui/error-codes/E0080.stderr | 10 +- src/test/ui/error-codes/E0081.stderr | 2 +- src/test/ui/error-codes/E0087.stderr | 4 +- src/test/ui/error-codes/E0088.stderr | 4 +- src/test/ui/error-codes/E0089.stderr | 2 +- src/test/ui/error-codes/E0090.stderr | 2 +- src/test/ui/error-codes/E0106.stderr | 8 +- src/test/ui/error-codes/E0107.stderr | 6 +- src/test/ui/error-codes/E0121.stderr | 2 +- src/test/ui/error-codes/E0124.stderr | 2 +- src/test/ui/error-codes/E0131.stderr | 2 +- src/test/ui/error-codes/E0132.stderr | 2 +- src/test/ui/error-codes/E0133.stderr | 2 +- src/test/ui/error-codes/E0161.stderr | 4 +- src/test/ui/error-codes/E0162.stderr | 2 +- src/test/ui/error-codes/E0164.stderr | 2 +- src/test/ui/error-codes/E0165.stderr | 2 +- src/test/ui/error-codes/E0194.stderr | 2 +- src/test/ui/error-codes/E0221.stderr | 6 +- src/test/ui/error-codes/E0223.stderr | 2 +- src/test/ui/error-codes/E0225.stderr | 2 +- src/test/ui/error-codes/E0229.stderr | 2 +- src/test/ui/error-codes/E0243.stderr | 2 +- src/test/ui/error-codes/E0244.stderr | 2 +- src/test/ui/error-codes/E0261.stderr | 4 +- src/test/ui/error-codes/E0262.stderr | 2 +- src/test/ui/error-codes/E0263.stderr | 2 +- src/test/ui/error-codes/E0267.stderr | 2 +- src/test/ui/error-codes/E0268.stderr | 2 +- src/test/ui/error-codes/E0271.stderr | 2 +- src/test/ui/error-codes/E0277-2.stderr | 2 +- src/test/ui/error-codes/E0277.stderr | 4 +- src/test/ui/error-codes/E0282.stderr | 2 +- src/test/ui/error-codes/E0283.stderr | 4 +- src/test/ui/error-codes/E0297.stderr | 2 +- src/test/ui/error-codes/E0301.stderr | 2 +- src/test/ui/error-codes/E0302.stderr | 2 +- src/test/ui/error-codes/E0303.stderr | 4 +- src/test/ui/error-codes/E0308-4.stderr | 2 +- src/test/ui/error-codes/E0370.stderr | 2 +- src/test/ui/error-codes/E0389.stderr | 2 +- src/test/ui/error-codes/E0392.stderr | 2 +- src/test/ui/error-codes/E0393.stderr | 2 +- src/test/ui/error-codes/E0446.stderr | 2 +- src/test/ui/error-codes/E0451.stderr | 4 +- src/test/ui/error-codes/E0478.stderr | 2 +- src/test/ui/error-codes/E0496.stderr | 2 +- src/test/ui/error-codes/E0499.stderr | 2 +- src/test/ui/error-codes/E0502.stderr | 2 +- src/test/ui/error-codes/E0503.stderr | 2 +- src/test/ui/error-codes/E0504.stderr | 2 +- src/test/ui/error-codes/E0505.stderr | 2 +- src/test/ui/error-codes/E0507.stderr | 2 +- src/test/ui/error-codes/E0509.stderr | 2 +- src/test/ui/error-codes/E0511.stderr | 2 +- src/test/ui/error-codes/E0512.stderr | 2 +- src/test/ui/error-codes/E0516.stderr | 2 +- src/test/ui/error-codes/E0527.stderr | 2 +- src/test/ui/error-codes/E0528.stderr | 2 +- src/test/ui/error-codes/E0529.stderr | 2 +- src/test/ui/error-codes/E0559.stderr | 2 +- src/test/ui/error-codes/E0560.stderr | 2 +- src/test/ui/error-codes/E0582.stderr | 4 +- src/test/ui/error-codes/E0597.stderr | 2 +- src/test/ui/error-codes/E0599.stderr | 2 +- src/test/ui/error-codes/E0600.stderr | 2 +- src/test/ui/error-codes/E0604.stderr | 2 +- src/test/ui/error-codes/E0605.stderr | 4 +- src/test/ui/error-codes/E0606.stderr | 4 +- src/test/ui/error-codes/E0607.stderr | 2 +- src/test/ui/error-codes/E0608.stderr | 2 +- src/test/ui/error-codes/E0609.stderr | 4 +- src/test/ui/error-codes/E0610.stderr | 2 +- src/test/ui/error-codes/E0614.stderr | 2 +- src/test/ui/error-codes/E0615.stderr | 2 +- src/test/ui/error-codes/E0616.stderr | 2 +- src/test/ui/error-codes/E0617.stderr | 12 +- src/test/ui/error-codes/E0618.stderr | 4 +- src/test/ui/error-codes/E0620.stderr | 4 +- ...E0621-does-not-trigger-for-closures.stderr | 10 +- src/test/ui/error-codes/E0624.stderr | 2 +- src/test/ui/error-codes/E0637.stderr | 4 +- src/test/ui/error-codes/E0657.stderr | 4 +- src/test/ui/error-codes/ex-E0611.stderr | 2 +- src/test/ui/error-codes/ex-E0612.stderr | 2 +- src/test/ui/error-festival.stderr | 18 +- src/test/ui/fat-ptr-cast.stderr | 18 +- .../feature-gate-arbitrary-self-types.stderr | 6 +- ...te-arbitrary_self_types-raw-pointer.stderr | 6 +- ...ate-default_type_parameter_fallback.stderr | 2 +- .../feature-gate-exhaustive-patterns.stderr | 2 +- .../ui/feature-gate-in_band_lifetimes.stderr | 24 +- ...re-gate-infer_outlives_requirements.stderr | 4 +- .../ui/feature-gate-negate-unsigned.stderr | 4 +- src/test/ui/feature-gate-nll.stderr | 2 +- src/test/ui/feature-gate-try_reserve.stderr | 2 +- ...-gate-unboxed-closures-method-calls.stderr | 6 +- ...re-gate-unboxed-closures-ufcs-calls.stderr | 6 +- ...feature-gate-unsized_tuple_coercion.stderr | 2 +- ...issue-43106-gating-of-builtin-attrs.stderr | 278 +++++++++--------- .../issue-43106-gating-of-inline.stderr | 8 +- ...ue-43106-gating-of-rustc_deprecated.stderr | 10 +- .../issue-43106-gating-of-stable.stderr | 10 +- .../issue-43106-gating-of-unstable.stderr | 10 +- src/test/ui/fmt/send-sync.stderr | 4 +- src/test/ui/fn_must_use.stderr | 14 +- .../ui/generator/auto-trait-regions.stderr | 4 +- src/test/ui/generator/borrowing.stderr | 4 +- src/test/ui/generator/dropck.stderr | 4 +- .../ui/generator/generator-with-nll.stderr | 6 +- src/test/ui/generator/issue-48048.stderr | 2 +- src/test/ui/generator/not-send-sync.stderr | 8 +- src/test/ui/generator/pattern-borrow.stderr | 2 +- .../ref-escapes-but-not-over-yield.stderr | 2 +- src/test/ui/generator/sized-yield.stderr | 4 +- src/test/ui/generator/yield-in-args.stderr | 2 +- .../ui/generator/yield-in-function.stderr | 2 +- .../ui/generator/yield-while-iterating.stderr | 4 +- .../yield-while-local-borrowed.stderr | 8 +- .../yield-while-ref-reborrowed.stderr | 2 +- ...eric-type-less-params-with-defaults.stderr | 2 +- ...eric-type-more-params-with-defaults.stderr | 2 +- src/test/ui/hygiene/assoc_item_ctxt.stderr | 2 +- src/test/ui/hygiene/fields-definition.stderr | 2 +- src/test/ui/hygiene/fields-move.stderr | 4 +- .../ui/hygiene/fields-numeric-borrowck.stderr | 2 +- src/test/ui/hygiene/fields.stderr | 8 +- src/test/ui/hygiene/impl_items.stderr | 2 +- src/test/ui/hygiene/intercrate.stderr | 2 +- .../ui/hygiene/nested_macro_privacy.stderr | 2 +- .../ui/hygiene/no_implicit_prelude.stderr | 2 +- src/test/ui/hygiene/trait_items.stderr | 2 +- src/test/ui/if-let-arm-types.stderr | 4 +- src/test/ui/impl-trait/auto-trait-leak.stderr | 8 +- src/test/ui/impl-trait/equality.stderr | 12 +- ...e-21659-show-relevant-trait-impls-3.stderr | 2 +- .../method-suggestion-no-duplication.stderr | 2 +- .../no-method-suggested-traits.stderr | 48 +-- .../impl-trait/region-escape-via-bound.stderr | 2 +- src/test/ui/impl-trait/trait_type.stderr | 2 +- .../impl-trait/universal-issue-48703.stderr | 2 +- .../universal-mismatched-type.stderr | 2 +- .../universal-two-impl-traits.stderr | 2 +- src/test/ui/impl_trait_projections.stderr | 2 +- src/test/ui/in-band-lifetimes/E0687.stderr | 8 +- .../ui/in-band-lifetimes/E0687_where.stderr | 4 +- src/test/ui/in-band-lifetimes/E0688.stderr | 4 +- .../ellided-lifetimes.stderr | 2 +- .../in-band-lifetimes/impl/assoc-type.stderr | 4 +- .../in-band-lifetimes/impl/dyn-trait.stderr | 2 +- .../ui/in-band-lifetimes/mismatched.stderr | 4 +- .../in-band-lifetimes/mismatched_trait.stderr | 2 +- .../in-band-lifetimes/mut_while_borrow.stderr | 2 +- .../no_in_band_in_struct.stderr | 4 +- .../no_introducing_in_band_in_locals.stderr | 4 +- src/test/ui/in-band-lifetimes/shadow.stderr | 4 +- src/test/ui/index-help.stderr | 2 +- ...ference-variable-behind-raw-pointer.stderr | 2 +- src/test/ui/inference_unstable.stderr | 2 +- .../ui/inference_unstable_featured.stderr | 2 +- src/test/ui/inference_unstable_forced.stderr | 2 +- .../ui/infinite-recursion-const-fn.stderr | 2 +- .../interior-mutability.stderr | 2 +- src/test/ui/invalid-path-in-const.stderr | 2 +- src/test/ui/issue-10969.stderr | 4 +- src/test/ui/issue-11004.stderr | 4 +- src/test/ui/issue-11319.stderr | 2 +- src/test/ui/issue-12187-1.stderr | 2 +- src/test/ui/issue-12187-2.stderr | 2 +- src/test/ui/issue-13058.stderr | 4 +- src/test/ui/issue-14092.stderr | 2 +- src/test/ui/issue-15260.stderr | 8 +- src/test/ui/issue-15524.stderr | 6 +- src/test/ui/issue-17263.stderr | 4 +- src/test/ui/issue-17441.stderr | 14 +- src/test/ui/issue-18819.stderr | 2 +- src/test/ui/issue-19100.stderr | 4 +- src/test/ui/issue-1962.stderr | 2 +- src/test/ui/issue-19707.stderr | 2 +- src/test/ui/issue-19922.stderr | 2 +- src/test/ui/issue-20692.stderr | 4 +- src/test/ui/issue-21600.stderr | 8 +- src/test/ui/issue-21950.stderr | 4 +- src/test/ui/issue-22370.stderr | 2 +- src/test/ui/issue-22933-2.stderr | 2 +- src/test/ui/issue-23041.stderr | 2 +- src/test/ui/issue-23173.stderr | 8 +- src/test/ui/issue-23217.stderr | 2 +- src/test/ui/issue-23302-1.stderr | 4 +- src/test/ui/issue-23302-2.stderr | 4 +- src/test/ui/issue-23543.stderr | 2 +- src/test/ui/issue-23544.stderr | 2 +- src/test/ui/issue-24036.stderr | 4 +- src/test/ui/issue-25385.stderr | 2 +- src/test/ui/issue-25826.stderr | 2 +- src/test/ui/issue-26056.stderr | 2 +- src/test/ui/issue-26472.stderr | 2 +- src/test/ui/issue-26638.stderr | 6 +- src/test/ui/issue-27842.stderr | 4 +- src/test/ui/issue-27942.stderr | 8 +- src/test/ui/issue-28776.stderr | 2 +- src/test/ui/issue-28837.stderr | 30 +- src/test/ui/issue-28971.stderr | 2 +- src/test/ui/issue-29124.stderr | 4 +- src/test/ui/issue-29723.stderr | 2 +- src/test/ui/issue-30255.stderr | 6 +- src/test/ui/issue-30302.stderr | 4 +- src/test/ui/issue-3044.stderr | 2 +- src/test/ui/issue-31221.stderr | 6 +- src/test/ui/issue-33525.stderr | 4 +- src/test/ui/issue-33941.stderr | 4 +- src/test/ui/issue-34209.stderr | 2 +- src/test/ui/issue-35241.stderr | 2 +- src/test/ui/issue-35869.stderr | 8 +- src/test/ui/issue-35976.stderr | 2 +- src/test/ui/issue-36163.stderr | 4 +- src/test/ui/issue-36400.stderr | 2 +- src/test/ui/issue-36708.stderr | 2 +- .../issue-40402-1.stderr | 2 +- .../issue-40402-2.stderr | 2 +- src/test/ui/issue-41652/issue_41652.stderr | 2 +- src/test/ui/issue-42106.stderr | 2 +- src/test/ui/issue-4335.stderr | 4 +- ...45107-unnecessary-unsafe-in-closure.stderr | 6 +- src/test/ui/issue-45157.stderr | 2 +- src/test/ui/issue-45697-1.stderr | 6 +- src/test/ui/issue-45697.stderr | 6 +- src/test/ui/issue-45730.stderr | 6 +- src/test/ui/issue-46112.stderr | 2 +- src/test/ui/issue-46471-1.stderr | 4 +- src/test/ui/issue-46471.stderr | 4 +- src/test/ui/issue-46472.stderr | 4 +- src/test/ui/issue-46983.stderr | 2 +- ...73-zero-padded-tuple-struct-indices.stderr | 4 +- src/test/ui/issue-47184.stderr | 2 +- src/test/ui/issue-47377.stderr | 2 +- src/test/ui/issue-47380.stderr | 2 +- src/test/ui/issue-47511.stderr | 4 +- src/test/ui/issue-47646.stderr | 2 +- src/test/ui/issue-47706-trait.stderr | 2 +- src/test/ui/issue-47706.stderr | 4 +- src/test/ui/issue-48803.stderr | 2 +- src/test/ui/issue-49257.stderr | 2 +- src/test/ui/issue-4935.stderr | 2 +- .../compiler-builtins-error.stderr | 7 +- src/test/ui/issue-49934.stderr | 12 +- src/test/ui/issue-50480.stderr | 2 +- src/test/ui/issue-50618.stderr | 2 +- src/test/ui/issue-5239-1.stderr | 2 +- src/test/ui/issue-6458-3.stderr | 2 +- src/test/ui/issue-6458.stderr | 2 +- src/test/ui/issue-7813.stderr | 2 +- src/test/ui/label_break_value_continue.stderr | 8 +- .../label_break_value_unlabeled_break.stderr | 4 +- ...urn-type-requires-explicit-lifetime.stderr | 12 +- .../42701_one_named_and_one_anonymous.stderr | 2 +- ...existing-name-early-bound-in-struct.stderr | 2 +- ...-return-one-existing-name-if-else-2.stderr | 2 +- ...-return-one-existing-name-if-else-3.stderr | 2 +- ...-existing-name-if-else-using-impl-2.stderr | 2 +- ...-existing-name-if-else-using-impl-3.stderr | 2 +- ...ne-existing-name-if-else-using-impl.stderr | 2 +- ...x1-return-one-existing-name-if-else.stderr | 2 +- ...e-existing-name-return-type-is-anon.stderr | 2 +- ...turn-one-existing-name-self-is-anon.stderr | 2 +- .../ex1b-return-no-names-if-else.stderr | 2 +- .../ex2a-push-one-existing-name-2.stderr | 2 +- ...-push-one-existing-name-early-bound.stderr | 2 +- .../ex2a-push-one-existing-name.stderr | 2 +- .../ex2b-push-no-existing-names.stderr | 2 +- .../ex2c-push-inference-variable.stderr | 2 +- .../ex2d-push-inference-variable-2.stderr | 2 +- .../ex2e-push-inference-variable-3.stderr | 2 +- .../ex3-both-anon-regions-2.stderr | 2 +- .../ex3-both-anon-regions-3.stderr | 4 +- ...oth-anon-regions-both-are-structs-2.stderr | 2 +- ...oth-anon-regions-both-are-structs-3.stderr | 2 +- ...oth-anon-regions-both-are-structs-4.stderr | 2 +- ...both-are-structs-earlybound-regions.stderr | 2 +- ...-both-are-structs-latebound-regions.stderr | 2 +- ...-both-anon-regions-both-are-structs.stderr | 2 +- ...both-anon-regions-latebound-regions.stderr | 2 +- ...3-both-anon-regions-one-is-struct-2.stderr | 2 +- ...3-both-anon-regions-one-is-struct-3.stderr | 2 +- ...3-both-anon-regions-one-is-struct-4.stderr | 2 +- ...ex3-both-anon-regions-one-is-struct.stderr | 2 +- ...th-anon-regions-return-type-is-anon.stderr | 2 +- .../ex3-both-anon-regions-self-is-anon.stderr | 2 +- ...x3-both-anon-regions-using-fn-items.stderr | 2 +- ...-both-anon-regions-using-impl-items.stderr | 2 +- ...th-anon-regions-using-trait-objects.stderr | 2 +- .../ex3-both-anon-regions.stderr | 2 +- .../liveness-assign-imm-local-notes.stderr | 16 +- .../lifetimes/borrowck-let-suggestion.stderr | 2 +- .../lifetime-doesnt-live-long-enough.stderr | 20 +- src/test/ui/lint-output-format-2.stderr | 2 +- .../ui/lint-unconditional-recursion.stderr | 4 +- .../lint/command-line-lint-group-deny.stderr | 2 +- .../command-line-lint-group-forbid.stderr | 2 +- .../lint/command-line-lint-group-warn.stderr | 2 +- ...0-unused-variable-in-struct-pattern.stderr | 30 +- .../lint/lint-group-nonstandard-style.stderr | 16 +- src/test/ui/lint/lint-group-style.stderr | 16 +- src/test/ui/lint/must-use-ops.stderr | 42 +-- src/test/ui/lint/suggestions.stderr | 12 +- src/test/ui/lint/type-overflow.stderr | 14 +- .../ui/lint/unreachable_pub-pub_crate.stderr | 28 +- src/test/ui/lint/unreachable_pub.stderr | 28 +- src/test/ui/loop-break-value-no-repeat.stderr | 2 +- .../ui/loops-reject-duplicate-labels-2.stderr | 16 +- .../ui/loops-reject-duplicate-labels.stderr | 16 +- ...s-reject-labels-shadowing-lifetimes.stderr | 24 +- ...ops-reject-lifetime-shadowing-label.stderr | 2 +- src/test/ui/lub-glb/old-lub-glb-hr.stderr | 2 +- src/test/ui/lub-glb/old-lub-glb-object.stderr | 2 +- src/test/ui/main-wrong-location.stderr | 2 +- src/test/ui/method-call-err-msg.stderr | 8 +- .../ui/method-call-lifetime-args-lint.stderr | 4 +- src/test/ui/method-call-lifetime-args.stderr | 8 +- src/test/ui/method-missing-call.stderr | 4 +- src/test/ui/mismatched_types/E0053.stderr | 4 +- src/test/ui/mismatched_types/E0409.stderr | 2 +- src/test/ui/mismatched_types/E0631.stderr | 8 +- src/test/ui/mismatched_types/abridged.stderr | 12 +- src/test/ui/mismatched_types/binops.stderr | 12 +- .../ui/mismatched_types/cast-rfc0401.stderr | 70 ++--- ...arg-count-expected-type-issue-47244.stderr | 2 +- .../mismatched_types/closure-arg-count.stderr | 26 +- .../closure-arg-type-mismatch.stderr | 10 +- .../mismatched_types/closure-mismatch.stderr | 4 +- .../ui/mismatched_types/fn-variance-1.stderr | 4 +- .../for-loop-has-unit-body.stderr | 2 +- .../ui/mismatched_types/issue-19109.stderr | 2 +- .../ui/mismatched_types/issue-35030.stderr | 2 +- .../ui/mismatched_types/issue-36053-2.stderr | 4 +- .../ui/mismatched_types/issue-38371.stderr | 8 +- src/test/ui/mismatched_types/main.stderr | 2 +- .../method-help-unsatisfied-bound.stderr | 2 +- .../overloaded-calls-bad.stderr | 6 +- .../trait-bounds-cant-coerce.stderr | 2 +- .../trait-impl-fn-incompatibility.stderr | 4 +- .../unboxed-closures-vtable-mismatch.stderr | 2 +- .../missing-fields-in-struct-pattern.stderr | 4 +- src/test/ui/missing-items/issue-40221.stderr | 2 +- .../missing-type-parameter.stderr | 2 +- .../ui/moves-based-on-type-block-bad.stderr | 2 +- .../moves-based-on-type-match-bindings.stderr | 2 +- src/test/ui/moves-based-on-type-tuple.stderr | 4 +- src/test/ui/nll/borrowed-local-error.stderr | 2 +- .../ui/nll/borrowed-match-issue-45045.stderr | 4 +- .../nll/borrowed-referent-issue-38899.stderr | 2 +- .../ui/nll/borrowed-temporary-error.stderr | 2 +- .../ui/nll/borrowed-universal-error-2.stderr | 2 +- .../ui/nll/borrowed-universal-error.stderr | 2 +- src/test/ui/nll/capture-ref-in-struct.stderr | 2 +- .../escape-argument-callee.stderr | 6 +- .../escape-argument.stderr | 4 +- .../escape-upvar-nested.stderr | 6 +- .../escape-upvar-ref.stderr | 4 +- ...pagate-approximated-fail-no-postdom.stderr | 6 +- .../propagate-approximated-ref.stderr | 6 +- ...er-to-static-comparing-against-free.stderr | 10 +- ...oximated-shorter-to-static-no-bound.stderr | 6 +- ...mated-shorter-to-static-wrong-bound.stderr | 6 +- .../propagate-approximated-val.stderr | 6 +- .../propagate-despite-same-free-region.stderr | 4 +- ...ail-to-approximate-longer-no-bounds.stderr | 6 +- ...-to-approximate-longer-wrong-bounds.stderr | 6 +- .../propagate-from-trait-match.stderr | 6 +- ...on-lbr-anon-does-not-outlive-static.stderr | 4 +- ...n-lbr-named-does-not-outlive-static.stderr | 4 +- .../region-lbr1-does-not-outlive-ebr2.stderr | 4 +- .../return-wrong-bound-region.stderr | 6 +- .../ui/nll/decl-macro-illegal-copy.stderr | 2 +- src/test/ui/nll/drop-no-may-dangle.stderr | 4 +- src/test/ui/nll/get_default.stderr | 8 +- src/test/ui/nll/guarantor-issue-46974.stderr | 4 +- src/test/ui/nll/issue-31567.stderr | 2 +- src/test/ui/nll/issue-47388.stderr | 2 +- src/test/ui/nll/issue-47470.stderr | 2 +- src/test/ui/nll/issue-48238.stderr | 2 +- ...ialized-drop-implicit-fragment-drop.stderr | 2 +- ...aybe-initialized-drop-with-fragment.stderr | 2 +- ...d-drop-with-uninitialized-fragments.stderr | 2 +- src/test/ui/nll/maybe-initialized-drop.stderr | 2 +- .../ui/nll/return-ref-mut-issue-46557.stderr | 2 +- .../ty-outlives/impl-trait-captures.stderr | 4 +- .../ty-outlives/impl-trait-outlives.stderr | 8 +- .../projection-implied-bounds.stderr | 4 +- .../projection-no-regions-closure.stderr | 16 +- .../projection-no-regions-fn.stderr | 8 +- .../projection-one-region-closure.stderr | 26 +- ...tion-one-region-trait-bound-closure.stderr | 22 +- ...e-region-trait-bound-static-closure.stderr | 10 +- ...tion-two-region-trait-bound-closure.stderr | 32 +- ...ram-closure-approximate-lower-bound.stderr | 12 +- ...m-closure-outlives-from-return-type.stderr | 10 +- ...-closure-outlives-from-where-clause.stderr | 16 +- .../ty-param-fn-body-nll-feature.stderr | 2 +- .../nll/ty-outlives/ty-param-fn-body.stderr | 4 +- .../ui/nll/ty-outlives/ty-param-fn.stderr | 8 +- .../ui/non-exhaustive-pattern-witness.stderr | 14 +- src/test/ui/not-enough-arguments.stderr | 2 +- src/test/ui/numeric-fields.stderr | 4 +- ...ect-safety-supertrait-mentions-Self.stderr | 2 +- .../ui/on-unimplemented/multiple-impls.stderr | 18 +- src/test/ui/on-unimplemented/no-debug.stderr | 8 +- src/test/ui/on-unimplemented/on-impl.stderr | 6 +- src/test/ui/on-unimplemented/on-trait.stderr | 4 +- .../ui/on-unimplemented/slice-index.stderr | 4 +- .../ui/order-dependent-cast-inference.stderr | 2 +- src/test/ui/partialeq_help.stderr | 2 +- src/test/ui/reachable/expr_add.stderr | 2 +- src/test/ui/reachable/expr_again.stderr | 2 +- src/test/ui/reachable/expr_array.stderr | 4 +- src/test/ui/reachable/expr_assign.stderr | 6 +- src/test/ui/reachable/expr_block.stderr | 4 +- src/test/ui/reachable/expr_box.stderr | 2 +- src/test/ui/reachable/expr_call.stderr | 4 +- src/test/ui/reachable/expr_cast.stderr | 2 +- src/test/ui/reachable/expr_if.stderr | 2 +- src/test/ui/reachable/expr_loop.stderr | 6 +- src/test/ui/reachable/expr_match.stderr | 6 +- src/test/ui/reachable/expr_method.stderr | 4 +- src/test/ui/reachable/expr_repeat.stderr | 2 +- src/test/ui/reachable/expr_return.stderr | 2 +- src/test/ui/reachable/expr_struct.stderr | 8 +- src/test/ui/reachable/expr_tup.stderr | 4 +- src/test/ui/reachable/expr_type.stderr | 2 +- src/test/ui/reachable/expr_unary.stderr | 4 +- src/test/ui/reachable/expr_while.stderr | 6 +- src/test/ui/recursive-requirements.stderr | 2 +- ...ion-borrow-params-issue-29793-small.stderr | 40 +-- .../regions-fn-subtyping-return-static.stderr | 2 +- src/test/ui/regions-nested-fns-2.stderr | 2 +- src/test/ui/resolve/issue-5035-2.stderr | 2 +- src/test/ui/resolve/name-clash-nullary.stderr | 2 +- src/test/ui/resolve/privacy-enum-ctor.stderr | 12 +- .../ui/resolve/token-error-correct-3.stderr | 2 +- .../termination-trait-impl-trait.stderr | 2 +- .../termination-trait-main-wrong-type.stderr | 2 +- .../borrowck-issue-49631.stderr | 2 +- .../const.stderr | 2 +- .../rfc-2005-default-binding-mode/enum.stderr | 6 +- .../explicit-mut.stderr | 6 +- .../rfc-2005-default-binding-mode/for.stderr | 2 +- .../rfc-2005-default-binding-mode/lit.stderr | 4 +- .../no-double-error.stderr | 2 +- .../slice.stderr | 2 +- .../ui/rfc-2093-infer-outlives/enum.stderr | 8 +- .../explicit-impl.stderr | 4 +- .../explicit-where.stderr | 4 +- .../multiple-regions.stderr | 2 +- .../nested-structs.stderr | 4 +- .../projections.stderr | 4 +- .../rfc-2093-infer-outlives/reference.stderr | 4 +- .../ui/rfc-2093-infer-outlives/union.stderr | 8 +- .../rfc-2166-underscore-imports/basic.stderr | 2 +- .../collections.stderr | 10 +- .../construct_with_other_type.stderr | 6 +- ...ssociated_type_undeclared_lifetimes.stderr | 10 +- .../iterable.stderr | 12 +- .../parameter_number_and_kind.stderr | 10 +- .../pointer_family.stderr | 8 +- .../streaming_iterator.stderr | 10 +- src/test/ui/self-impl.stderr | 4 +- src/test/ui/shadowed-lifetime.stderr | 4 +- src/test/ui/shadowed-type-parameter.stderr | 6 +- .../ui/single-use-lifetime/fn-types.stderr | 4 +- .../one-use-in-fn-argument-in-band.stderr | 4 +- .../one-use-in-fn-argument.stderr | 2 +- ...one-use-in-inherent-method-argument.stderr | 2 +- .../one-use-in-trait-method-argument.stderr | 2 +- .../zero-uses-in-fn.stderr | 2 +- src/test/ui/span/E0057.stderr | 4 +- ...ck-borrow-overloaded-auto-deref-mut.stderr | 20 +- ...orrowck-borrow-overloaded-deref-mut.stderr | 8 +- ...borrowck-call-is-borrow-issue-12224.stderr | 10 +- ...owck-call-method-from-mut-aliasable.stderr | 2 +- .../ui/span/borrowck-fn-in-const-b.stderr | 2 +- .../borrowck-let-suggestion-suffixes.stderr | 8 +- .../ui/span/borrowck-object-mutability.stderr | 4 +- .../ui/span/borrowck-ref-into-rvalue.stderr | 2 +- src/test/ui/span/coerce-suggestions.stderr | 12 +- .../ui/span/destructor-restrictions.stderr | 2 +- src/test/ui/span/dropck-object-cycle.stderr | 2 +- .../ui/span/dropck_arr_cycle_checked.stderr | 12 +- .../span/dropck_direct_cycle_with_drop.stderr | 4 +- src/test/ui/span/dropck_misc_variants.stderr | 4 +- .../ui/span/dropck_vec_cycle_checked.stderr | 12 +- src/test/ui/span/issue-11925.stderr | 2 +- src/test/ui/span/issue-15480.stderr | 2 +- ...338-locals-die-before-temps-of-body.stderr | 4 +- src/test/ui/span/issue-23729.stderr | 2 +- src/test/ui/span/issue-24356.stderr | 2 +- src/test/ui/span/issue-24690.stderr | 6 +- ...5-dropck-child-has-items-via-parent.stderr | 2 +- .../issue-24805-dropck-trait-has-items.stderr | 6 +- .../span/issue-24895-copy-clone-dropck.stderr | 2 +- src/test/ui/span/issue-25199.stderr | 4 +- src/test/ui/span/issue-26656.stderr | 2 +- src/test/ui/span/issue-27522.stderr | 2 +- src/test/ui/span/issue-29106.stderr | 4 +- src/test/ui/span/issue-29595.stderr | 4 +- src/test/ui/span/issue-33884.stderr | 2 +- src/test/ui/span/issue-34264.stderr | 6 +- src/test/ui/span/issue-36537.stderr | 2 +- src/test/ui/span/issue-37767.stderr | 18 +- src/test/ui/span/issue-39018.stderr | 6 +- src/test/ui/span/issue-40157.stderr | 2 +- .../issue-42234-unknown-receiver-type.stderr | 4 +- src/test/ui/span/issue-7575.stderr | 14 +- src/test/ui/span/issue28498-reject-ex1.stderr | 4 +- .../issue28498-reject-lifetime-param.stderr | 4 +- .../issue28498-reject-passed-to-fn.stderr | 4 +- .../span/issue28498-reject-trait-bound.stderr | 4 +- src/test/ui/span/lint-unused-unsafe.stderr | 16 +- .../method-and-field-eager-resolution.stderr | 4 +- src/test/ui/span/missing-unit-argument.stderr | 12 +- src/test/ui/span/move-closure.stderr | 2 +- src/test/ui/span/multiline-span-simple.stderr | 2 +- src/test/ui/span/mut-arg-hint.stderr | 6 +- .../ui/span/mut-ptr-cant-outlive-ref.stderr | 2 +- src/test/ui/span/pub-struct-field.stderr | 4 +- src/test/ui/span/range-2.stderr | 4 +- .../regionck-unboxed-closure-lifetimes.stderr | 2 +- ...ions-close-over-borrowed-ref-in-obj.stderr | 2 +- ...regions-close-over-type-parameter-2.stderr | 2 +- .../regions-escape-loop-via-variable.stderr | 2 +- .../span/regions-escape-loop-via-vec.stderr | 8 +- ...ions-infer-borrow-scope-within-loop.stderr | 2 +- .../send-is-not-static-ensures-scoping.stderr | 4 +- .../span/send-is-not-static-std-sync-2.stderr | 6 +- .../span/send-is-not-static-std-sync.stderr | 12 +- src/test/ui/span/slice-borrow.stderr | 2 +- src/test/ui/span/suggestion-non-ascii.stderr | 2 +- src/test/ui/span/type-binding.stderr | 2 +- .../vec-must-not-hide-type-from-dropck.stderr | 4 +- .../vec_refs_data_with_early_death.stderr | 4 +- .../span/wf-method-late-bound-regions.stderr | 2 +- src/test/ui/str-concat-on-double-ref.stderr | 2 +- src/test/ui/str-lit-type-mismatch.stderr | 6 +- src/test/ui/struct-fields-decl-dupe.stderr | 2 +- .../ui/struct-fields-hints-no-dupe.stderr | 2 +- src/test/ui/struct-fields-hints.stderr | 2 +- src/test/ui/struct-fields-too-many.stderr | 2 +- .../ui/struct-path-self-type-mismatch.stderr | 6 +- src/test/ui/suggest-private-fields.stderr | 8 +- src/test/ui/suggest-remove-refs-1.stderr | 2 +- src/test/ui/suggest-remove-refs-2.stderr | 2 +- src/test/ui/suggest-remove-refs-3.stderr | 2 +- .../closure-immutable-outer-variable.stderr | 2 +- .../issue-18343.stderr | 2 +- .../issue-2392.stderr | 22 +- .../issue-32128.stderr | 2 +- .../issue-33784.stderr | 6 +- .../private-field.stderr | 2 +- .../ui/suggestions/const-type-mismatch.stderr | 2 +- .../ui/suggestions/conversion-methods.stderr | 8 +- .../dont-suggest-private-trait-method.stderr | 2 +- .../fn-closure-mutable-capture.stderr | 4 +- src/test/ui/suggestions/for-c-in-str.stderr | 2 +- .../issue-43420-no-over-suggest.stderr | 2 +- ...-consider-borrowing-cast-or-binexpr.stderr | 4 +- .../method-on-ambiguous-numeric-type.stderr | 4 +- src/test/ui/suggestions/numeric-cast-2.stderr | 6 +- src/test/ui/suggestions/numeric-cast.stderr | 268 ++++++++--------- .../suggestions/removing-extern-crate.stderr | 4 +- src/test/ui/suggestions/return-type.stderr | 2 +- .../suggestions/str-array-assignment.stderr | 8 +- .../ui/suggestions/suggest-methods.stderr | 8 +- src/test/ui/suggestions/try-on-option.stderr | 4 +- .../suggestions/try-operator-on-main.stderr | 8 +- ...e-ascription-instead-of-initializer.stderr | 2 +- src/test/ui/switched-expectations.stderr | 2 +- src/test/ui/trait-method-private.stderr | 2 +- src/test/ui/trait-safety-fn-body.stderr | 2 +- src/test/ui/trait-suggest-where-clause.stderr | 14 +- ...ts-multidispatch-convert-ambig-dest.stderr | 2 +- src/test/ui/transmute/main.stderr | 8 +- .../transmute-from-fn-item-types-error.stderr | 18 +- .../transmute-type-parameters.stderr | 12 +- ...l-bounds-inconsistent-copy-reborrow.stderr | 4 +- src/test/ui/trivial-bounds-leak-copy.stderr | 2 +- src/test/ui/trivial-bounds-leak.stderr | 10 +- src/test/ui/type-annotation-needed.stderr | 2 +- src/test/ui/type-check-defaults.stderr | 4 +- .../ui/type-check/assignment-in-if.stderr | 10 +- .../cannot_infer_local_or_array.stderr | 2 +- .../cannot_infer_local_or_vec.stderr | 2 +- ...cannot_infer_local_or_vec_in_tuples.stderr | 2 +- src/test/ui/type-check/issue-22897.stderr | 2 +- src/test/ui/type-check/issue-41314.stderr | 4 +- .../ui/type-check/missing_trait_impl.stderr | 4 +- .../unknown_type_for_closure.stderr | 2 +- .../ui/type-dependent-def-issue-49241.stderr | 2 +- ...ypeck-builtin-bound-type-parameters.stderr | 12 +- .../ui/typeck_type_placeholder_item.stderr | 60 ++-- .../typeck_type_placeholder_lifetime_1.stderr | 2 +- .../typeck_type_placeholder_lifetime_2.stderr | 2 +- .../ui/unboxed-closure-no-cyclic-sig.stderr | 2 +- .../unboxed-closure-sugar-wrong-trait.stderr | 4 +- ...-infer-fn-once-move-from-projection.stderr | 2 +- src/test/ui/unconstrained-none.stderr | 2 +- src/test/ui/unconstrained-ref.stderr | 2 +- .../dyn-trait-underscore-in-struct.stderr | 4 +- .../dyn-trait-underscore.stderr | 4 +- .../unevaluated_fixed_size_array_len.stderr | 4 +- src/test/ui/union/union-derive-eq.stderr | 2 +- src/test/ui/union/union-fields-1.stderr | 8 +- src/test/ui/union/union-fields-2.stderr | 26 +- src/test/ui/union/union-sized-field.stderr | 6 +- src/test/ui/union/union-suggest-field.stderr | 6 +- src/test/ui/unsized-enum2.stderr | 40 +-- src/test/ui/variadic-ffi-3.stderr | 20 +- src/test/ui/variance-unused-type-param.stderr | 6 +- src/test/ui/vector-no-ann.stderr | 2 +- 754 files changed, 2136 insertions(+), 2141 deletions(-) diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index 82f527f8cca88..8df1bb0adf7e9 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 + --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5: in fn main | LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -13,7 +13,7 @@ LL | fn f1(_: F) where F: Fn(&(), &()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/anonymous-higher-ranked-lifetime.rs:13:5 + --> $DIR/anonymous-higher-ranked-lifetime.rs:13:5: in fn main | LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -27,7 +27,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5: in fn main | LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -41,7 +41,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:15:5: in fn main | LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -55,7 +55,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5: in fn main | LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -69,7 +69,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:17:5: in fn main | LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -83,7 +83,7 @@ LL | fn g1(_: F) where F: Fn(&(), Box) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 + --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5: in fn main | LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -97,7 +97,7 @@ LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/anonymous-higher-ranked-lifetime.rs:19:5 + --> $DIR/anonymous-higher-ranked-lifetime.rs:19:5: in fn main | LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -111,7 +111,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5: in fn main | LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch | ^^ -------------- found signature of `fn((), ()) -> _` @@ -125,7 +125,7 @@ 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 + --> $DIR/anonymous-higher-ranked-lifetime.rs:21:5: in fn main | LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` @@ -139,7 +139,7 @@ LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 + --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5: in fn main | LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` 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 b3f9cbc587bac..e5b703bd1cb3a 100644 --- a/src/test/ui/arbitrary-self-types-not-object-safe.stderr +++ b/src/test/ui/arbitrary-self-types-not-object-safe.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Foo` cannot be made into an object - --> $DIR/arbitrary-self-types-not-object-safe.rs:40:33 + --> $DIR/arbitrary-self-types-not-object-safe.rs:40:33: in fn make_foo | LL | let x = Box::new(5usize) as Box; | ^^^^^^^^ the trait `Foo` cannot be made into an object @@ -7,7 +7,7 @@ LL | let x = Box::new(5usize) as Box; = note: method `foo` has a non-standard `self` type error[E0038]: the trait `Foo` cannot be made into an object - --> $DIR/arbitrary-self-types-not-object-safe.rs:40:13 + --> $DIR/arbitrary-self-types-not-object-safe.rs:40:13: in fn make_foo | LL | let x = Box::new(5usize) as Box; | ^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object diff --git a/src/test/ui/asm-out-assign-imm.stderr b/src/test/ui/asm-out-assign-imm.stderr index d9fd4b26c3900..fff764574c82b 100644 --- a/src/test/ui/asm-out-assign-imm.stderr +++ b/src/test/ui/asm-out-assign-imm.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/asm-out-assign-imm.rs:30:9 + --> $DIR/asm-out-assign-imm.rs:30:9: in fn main | LL | x = 1; | ----- first assignment to `x` diff --git a/src/test/ui/associated-const-impl-wrong-type.stderr b/src/test/ui/associated-const-impl-wrong-type.stderr index cfccacaee282a..bb195407b988f 100644 --- a/src/test/ui/associated-const-impl-wrong-type.stderr +++ b/src/test/ui/associated-const-impl-wrong-type.stderr @@ -1,5 +1,5 @@ error[E0326]: implemented const `BAR` has an incompatible type for trait - --> $DIR/associated-const-impl-wrong-type.rs:19:16 + --> $DIR/associated-const-impl-wrong-type.rs:19:16: in impl BAR | LL | const BAR: u32; | --- type in trait 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 7a10b6d021f54..8025a5b692509 100644 --- a/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr +++ b/src/test/ui/associated-type-projection-from-multiple-supertraits.stderr @@ -1,5 +1,5 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C` - --> $DIR/associated-type-projection-from-multiple-supertraits.rs:29:32 + --> $DIR/associated-type-projection-from-multiple-supertraits.rs:29:32: in fn dent | LL | type Color; | ----------- ambiguous `Color` from `Vehicle` @@ -11,7 +11,7 @@ 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 + --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:33: in fn dent_object | LL | type Color; | ----------- ambiguous `Color` from `Vehicle` @@ -23,13 +23,13 @@ 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 + --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:26: in fn dent_object | 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 + --> $DIR/associated-type-projection-from-multiple-supertraits.rs:38:29: in fn paint | LL | type Color; | ----------- ambiguous `Color` from `Vehicle` 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 7924ab7444406..375fa149ff685 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,5 +1,5 @@ error[E0277]: the trait bound `(): Add` is not satisfied - --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:33:11 + --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:33:11: in fn ice | LL | r = r + a; | ^ the trait `Add` is not implemented for `()` diff --git a/src/test/ui/associated-types-in-ambiguous-context.stderr b/src/test/ui/associated-types-in-ambiguous-context.stderr index c45873ffd5308..79e725184ef45 100644 --- a/src/test/ui/associated-types-in-ambiguous-context.stderr +++ b/src/test/ui/associated-types-in-ambiguous-context.stderr @@ -1,5 +1,5 @@ error[E0223]: ambiguous associated type - --> $DIR/associated-types-in-ambiguous-context.rs:16:36 + --> $DIR/associated-types-in-ambiguous-context.rs:16:36: in fn get | LL | fn get(x: T, y: U) -> Get::Value {} | ^^^^^^^^^^ ambiguous associated type @@ -15,7 +15,7 @@ LL | type X = std::ops::Deref::Target; = note: specify the type using the syntax `::Target` error[E0223]: ambiguous associated type - --> $DIR/associated-types-in-ambiguous-context.rs:21:23 + --> $DIR/associated-types-in-ambiguous-context.rs:21:23: in trait Grab::grab | LL | fn grab(&self) -> Grab::Value; | ^^^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index 953af813c3821..e9051cda0457c 100644 --- a/src/test/ui/augmented-assignments.stderr +++ b/src/test/ui/augmented-assignments.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable - --> $DIR/augmented-assignments.rs:30:5 + --> $DIR/augmented-assignments.rs:30:5: in fn main | LL | let y = Int(2); | - consider changing this to `mut y` @@ -8,7 +8,7 @@ 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 + --> $DIR/augmented-assignments.rs:23:5: in fn main | LL | x //~ error: use of moved value: `x` | ^ value used here after move diff --git a/src/test/ui/binary-op-on-double-ref.stderr b/src/test/ui/binary-op-on-double-ref.stderr index c89defa3dd196..4e71a24252e90 100644 --- a/src/test/ui/binary-op-on-double-ref.stderr +++ b/src/test/ui/binary-op-on-double-ref.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `%` cannot be applied to type `&&{integer}` - --> $DIR/binary-op-on-double-ref.rs:14:9 + --> $DIR/binary-op-on-double-ref.rs:14:9: in fn main | LL | x % 2 == 0 | ^^^^^ 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 d864d767957da..8447f4ce3c492 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,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/block-must-not-have-result-do.rs:13:9 + --> $DIR/block-must-not-have-result-do.rs:13:9: in fn main | LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool 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 005a3ab9b5df1..5dc97c4a11d67 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,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/block-must-not-have-result-res.rs:15:9 + --> $DIR/block-must-not-have-result-res.rs:15:9: in fn drop::drop | LL | fn drop(&mut self) { | - expected `()` because of default return 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 a003ae871cadc..30c89ebb388f1 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,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/block-must-not-have-result-while.rs:13:9 + --> $DIR/block-must-not-have-result-while.rs:13:9: in fn main | LL | true //~ ERROR mismatched types | ^^^^ expected (), found bool diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr index e54e22522f252..029ec1f558f71 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-13624.rs:17:5 + --> $DIR/issue-13624.rs:17:5: in fn a::get_enum_struct_variant | LL | pub fn get_enum_struct_variant() -> () { | -- expected `()` because of return type @@ -10,7 +10,7 @@ LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } found type `a::Enum` error[E0308]: mismatched types - --> $DIR/issue-13624.rs:32:9 + --> $DIR/issue-13624.rs:32:9: in fn b::test::test_enum_struct_variant | LL | a::Enum::EnumStructVariant { x, y, z } => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index 990fb404c9466..1851c20fdb122 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-20862.rs:12:5 + --> $DIR/issue-20862.rs:12:5: in fn foo | LL | fn foo(x: i32) { | - possibly return type missing here? @@ -10,7 +10,7 @@ LL | |y| x + y found type `[closure@$DIR/issue-20862.rs:12:5: 12:14 x:_]` error[E0618]: expected function, found `()` - --> $DIR/issue-20862.rs:17:13 + --> $DIR/issue-20862.rs:17:13: in fn main | LL | let x = foo(5)(2); | ^^^^^^^^^ not a function diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index c94dd7086266a..5215724192b36 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied - --> $DIR/issue-22645.rs:25:5 + --> $DIR/issue-22645.rs:25:5: in fn main | LL | b + 3 //~ ERROR E0277 | ^ the trait `Scalar` is not implemented for `{integer}` @@ -9,7 +9,7 @@ LL | b + 3 //~ ERROR E0277 = note: required because of the requirements on the impl of `std::ops::Add<{integer}>` for `Bob` error[E0308]: mismatched types - --> $DIR/issue-22645.rs:25:3 + --> $DIR/issue-22645.rs:25:3: in fn main | LL | fn main() { | - expected `()` because of default return type diff --git a/src/test/ui/block-result/issue-3563.stderr b/src/test/ui/block-result/issue-3563.stderr index c4dee857574b8..864817c690447 100644 --- a/src/test/ui/block-result/issue-3563.stderr +++ b/src/test/ui/block-result/issue-3563.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `b` found for type `&Self` in the current scope - --> $DIR/issue-3563.rs:13:17 + --> $DIR/issue-3563.rs:13:17: in fn A::a::a | LL | || self.b() | ^ diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr index 27018b5da7bd8..f067b7bc7ed0c 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-5500.rs:12:5 + --> $DIR/issue-5500.rs:12:5: in fn main | LL | fn main() { | - expected `()` because of default return 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 585cfb3d0d35f..659c520dfea0e 100644 --- a/src/test/ui/block-result/unexpected-return-on-unit.stderr +++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/unexpected-return-on-unit.rs:19:5 + --> $DIR/unexpected-return-on-unit.rs:19:5: in fn bar | LL | foo() //~ ERROR mismatched types | ^^^^^ expected (), found usize diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index f9917b07f070b..45637b22fae8d 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,5 +1,5 @@ error[E0599]: no variant named `hsl` found for type `color` in the current scope - --> $DIR/bogus-tag.rs:18:7 + --> $DIR/bogus-tag.rs:18:7: in fn main | LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } | ---------- variant `hsl` not found here diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr index 5bf1fc0817868..a36b8806f6d54 100644 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-box-insensitivity.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:37:9 + --> $DIR/borrowck-box-insensitivity.rs:37:9: in fn copy_after_move | LL | let _x = a.x; | -- value moved here @@ -10,7 +10,7 @@ LL | let _y = a.y; //~ ERROR use of moved = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:46:9 + --> $DIR/borrowck-box-insensitivity.rs:46:9: in fn move_after_move | LL | let _x = a.x; | -- value moved here @@ -21,7 +21,7 @@ LL | let _y = a.y; //~ ERROR use of moved = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:55:15 + --> $DIR/borrowck-box-insensitivity.rs:55:15: in fn borrow_after_move | LL | let _x = a.x; | -- value moved here @@ -32,7 +32,7 @@ LL | let _y = &a.y; //~ ERROR use of moved = note: move occurs because `a.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:63:9 + --> $DIR/borrowck-box-insensitivity.rs:63:9: in fn move_after_borrow | LL | let _x = &a.x; | --- borrow of `a.x` occurs here @@ -40,7 +40,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:71:9: in fn copy_after_mut_borrow | LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here @@ -48,7 +48,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:77:9: in fn move_after_mut_borrow | LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here @@ -56,7 +56,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:85:15: in fn borrow_after_mut_borrow | LL | let _x = &mut a.x; | --- mutable borrow occurs here (via `a.x`) @@ -67,7 +67,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:92:19: in fn mut_borrow_after_borrow | LL | let _x = &a.x; | --- immutable borrow occurs here (via `a.x`) @@ -78,7 +78,7 @@ LL | } | - immutable borrow ends here error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:100:9 + --> $DIR/borrowck-box-insensitivity.rs:100:9: in fn copy_after_move_nested | LL | let _x = a.x.x; | -- value moved here @@ -89,7 +89,7 @@ LL | let _y = a.y; //~ ERROR use of collaterally moved = 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 + --> $DIR/borrowck-box-insensitivity.rs:108:9: in fn move_after_move_nested | LL | let _x = a.x.x; | -- value moved here @@ -100,7 +100,7 @@ LL | let _y = a.y; //~ ERROR use of collaterally moved = 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 + --> $DIR/borrowck-box-insensitivity.rs:116:15: in fn borrow_after_move_nested | LL | let _x = a.x.x; | -- value moved here @@ -111,7 +111,7 @@ LL | let _y = &a.y; //~ ERROR use of collaterally moved = 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 + --> $DIR/borrowck-box-insensitivity.rs:124:9: in fn move_after_borrow_nested | LL | let _x = &a.x.x; | ----- borrow of `a.x.x` occurs here @@ -120,7 +120,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:132:9: in fn copy_after_mut_borrow_nested | LL | let _x = &mut a.x.x; | ----- borrow of `a.x.x` occurs here @@ -128,7 +128,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:138:9: in fn move_after_mut_borrow_nested | LL | let _x = &mut a.x.x; | ----- borrow of `a.x.x` occurs here @@ -136,7 +136,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:147:15: in fn borrow_after_mut_borrow_nested | LL | let _x = &mut a.x.x; | ----- mutable borrow occurs here @@ -148,7 +148,7 @@ 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 + --> $DIR/borrowck-box-insensitivity.rs:155:19: in fn mut_borrow_after_borrow_nested | LL | let _x = &a.x.x; | ----- immutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr index a4f8e8b408ba5..d39dcd99e7a3b 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:24:24 + --> $DIR/borrowck-closures-two-mut.rs:24:24: in fn a | LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure @@ -14,7 +14,7 @@ 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:36:24 + --> $DIR/borrowck-closures-two-mut.rs:36:24: in fn b | LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure @@ -29,7 +29,7 @@ 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:44:24 + --> $DIR/borrowck-closures-two-mut.rs:44:24: in fn c | LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure @@ -44,7 +44,7 @@ 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:52:24 + --> $DIR/borrowck-closures-two-mut.rs:52:24: in fn d | LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure @@ -59,7 +59,7 @@ 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:65:24 + --> $DIR/borrowck-closures-two-mut.rs:65:24: in fn g | LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure @@ -74,7 +74,7 @@ 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 + --> $DIR/borrowck-closures-two-mut.rs:24:24: in fn a | LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure @@ -89,7 +89,7 @@ LL | drop((c1, c2)); | -- borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:36:24 + --> $DIR/borrowck-closures-two-mut.rs:36:24: in fn b | LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure @@ -104,7 +104,7 @@ LL | drop((c1, c2)); | -- borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:44:24 + --> $DIR/borrowck-closures-two-mut.rs:44:24: in fn c | LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure @@ -119,7 +119,7 @@ LL | drop((c1, c2)); | -- borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:52:24 + --> $DIR/borrowck-closures-two-mut.rs:52:24: in fn d | LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure @@ -134,7 +134,7 @@ LL | drop((c1, c2)); | -- borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:65:24 + --> $DIR/borrowck-closures-two-mut.rs:65:24: in fn g | LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - previous borrow occurs due to use of `x` in closure 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 eb1fa53d7558a..70a120c59abc3 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/borrowck-escaping-closure-error-1.rs:23:11: in fn main | LL | spawn(|| books.push(4)); | ^^ ----- `books` is borrowed here 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 1343c0a1f5b71..478d745d74e3e 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/borrowck-escaping-closure-error-2.rs:21:14: in fn foo | LL | Box::new(|| books.push(4)) | ^^ ----- `books` is borrowed here 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 81ed058e47f46..d1cc398a041e6 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-error-with-note.rs:21:11 + --> $DIR/borrowck-move-error-with-note.rs:21:11: in fn blah | LL | match *f { //~ ERROR cannot move out of | ^^ cannot move out of borrowed content @@ -12,7 +12,7 @@ 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 + --> $DIR/borrowck-move-error-with-note.rs:40:9: in fn move_in_match | LL | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait LL | | //~| cannot move out of here @@ -24,7 +24,7 @@ LL | | } => {} | |_________^ cannot move out of here error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-error-with-note.rs:57:11 + --> $DIR/borrowck-move-error-with-note.rs:57:11: in fn blah2 | LL | match a.a { //~ ERROR cannot move out of | ^ cannot move out of borrowed content 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 c4051e5a25567..75b9c18d735a2 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,5 +1,5 @@ error[E0508]: cannot move out of type `[Foo]`, a non-copy slice - --> $DIR/borrowck-move-out-of-vec-tail.rs:30:18 + --> $DIR/borrowck-move-out-of-vec-tail.rs:30:18: in fn main | LL | &[Foo { string: a }, | ^ - hint: to prevent move, use `ref a` or `ref mut a` diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index 654afa421868a..29b756bbf04ca 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` (Ast) - --> $DIR/borrowck-reinit.rs:18:16 + --> $DIR/borrowck-reinit.rs:18:16: in fn main | LL | drop(x); | - value moved here @@ -9,7 +9,7 @@ LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x` (Mir) - --> $DIR/borrowck-reinit.rs:18:16 + --> $DIR/borrowck-reinit.rs:18:16: in fn main | LL | drop(x); | - value moved here 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 648ee1dff7851..59eeb7cffa056 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-report-with-custom-diagnostic.rs:17:14 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:17:14: in fn main | LL | let y = &mut x; | - mutable borrow occurs here @@ -11,7 +11,7 @@ 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 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:28:26: in fn foo | LL | let y = &x; | - immutable borrow occurs here @@ -23,7 +23,7 @@ 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 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:41:22: in fn bar | LL | let y = &mut x; | - first mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index 6673549e23903..e77daf8627b3c 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed - --> $DIR/borrowck-vec-pattern-nesting.rs:20:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:20:13: in fn a | LL | [box ref _a, _, _] => { | ------ borrow of `vec[..]` occurs here @@ -8,7 +8,7 @@ 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:32:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:32:13: in fn b | LL | &mut [ref _b..] => { | ------ borrow of `vec[..]` occurs here @@ -17,7 +17,7 @@ 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:42:14 + --> $DIR/borrowck-vec-pattern-nesting.rs:42:14: in fn c | LL | &mut [_a, //~ ERROR cannot move out | ^-- hint: to prevent move, use `ref _a` or `ref mut _a` @@ -30,7 +30,7 @@ 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:55:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:55:13: in fn c | LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ @@ -39,7 +39,7 @@ LL | let a = vec[0]; //~ ERROR cannot move out | help: consider using a reference instead: `&vec[0]` error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:63:14 + --> $DIR/borrowck-vec-pattern-nesting.rs:63:14: in fn d | LL | &mut [ //~ ERROR cannot move out | ______________^ @@ -50,7 +50,7 @@ LL | | _b] => {} | hint: to prevent move, use `ref _b` or `ref mut _b` error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:68:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:68:13: in fn d | LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ @@ -59,7 +59,7 @@ LL | let a = vec[0]; //~ ERROR cannot move out | help: consider using a reference instead: `&vec[0]` error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:76:14 + --> $DIR/borrowck-vec-pattern-nesting.rs:76:14: in fn e | LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ^--^^--^^--^ @@ -70,7 +70,7 @@ LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | 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:80:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:80:13: in fn e | LL | let a = vec[0]; //~ ERROR cannot move out | ^^^^^^ diff --git a/src/test/ui/borrowck/immutable-arg.stderr b/src/test/ui/borrowck/immutable-arg.stderr index b7506849b817d..5e56d5d9ddb4f 100644 --- a/src/test/ui/borrowck/immutable-arg.stderr +++ b/src/test/ui/borrowck/immutable-arg.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `_x` (Ast) - --> $DIR/immutable-arg.rs:14:5 + --> $DIR/immutable-arg.rs:14:5: in fn foo | LL | fn foo(_x: u32) { | -- first assignment to `_x` @@ -7,7 +7,7 @@ LL | _x = 4; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign to immutable argument `_x` (Mir) - --> $DIR/immutable-arg.rs:14:5 + --> $DIR/immutable-arg.rs:14:5: in fn foo | LL | fn foo(_x: u32) { | -- argument not declared as `mut` diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 39525d787b1f9..a087677465fb2 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -1,5 +1,5 @@ error[E0382]: use of partially moved value: `maybe` (Ast) - --> $DIR/issue-41962.rs:17:30 + --> $DIR/issue-41962.rs:17:30: in fn main | LL | if let Some(thing) = maybe { | ----- ^^^^^ value used here after move @@ -9,7 +9,7 @@ LL | if let Some(thing) = maybe { = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) - --> $DIR/issue-41962.rs:17:21 + --> $DIR/issue-41962.rs:17:21: in fn main | LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop @@ -17,7 +17,7 @@ LL | if let Some(thing) = maybe { = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait error[E0382]: use of moved value: `maybe` (Mir) - --> $DIR/issue-41962.rs:17:9 + --> $DIR/issue-41962.rs:17:9: in fn main | LL | if let Some(thing) = maybe { | ^ ----- value moved here @@ -34,7 +34,7 @@ LL | | } = note: move occurs because `maybe` has type `std::option::Option>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `maybe` (Mir) - --> $DIR/issue-41962.rs:17:16 + --> $DIR/issue-41962.rs:17:16: in fn main | LL | if let Some(thing) = maybe { | ^^^^^-----^ @@ -45,7 +45,7 @@ LL | if let Some(thing) = maybe { = note: move occurs because `maybe` has type `std::option::Option>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `maybe.0` (Mir) - --> $DIR/issue-41962.rs:17:21 + --> $DIR/issue-41962.rs:17:21: in fn main | LL | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop diff --git a/src/test/ui/borrowck/issue-45983.stderr b/src/test/ui/borrowck/issue-45983.stderr index 7625b9e76186a..f67a435031e53 100644 --- a/src/test/ui/borrowck/issue-45983.stderr +++ b/src/test/ui/borrowck/issue-45983.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/issue-45983.rs:17:27 + --> $DIR/issue-45983.rs:17:27: in fn main | LL | let x = None; | - borrowed data cannot be stored into here... diff --git a/src/test/ui/borrowck/issue-7573.stderr b/src/test/ui/borrowck/issue-7573.stderr index 41a804adfe369..407446159b737 100644 --- a/src/test/ui/borrowck/issue-7573.stderr +++ b/src/test/ui/borrowck/issue-7573.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/issue-7573.rs:32:27 + --> $DIR/issue-7573.rs:32:27: in fn remove_package_from_database | LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); | - cannot infer an appropriate lifetime... diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index cda59d3bc68be..94a6e8bc99181 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time - --> $DIR/mut-borrow-in-loop.rs:20:25 + --> $DIR/mut-borrow-in-loop.rs:20:25: in fn in_loop::in_loop | LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop @@ -8,7 +8,7 @@ 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 + --> $DIR/mut-borrow-in-loop.rs:26:25: in fn in_while::in_while | LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop @@ -17,7 +17,7 @@ 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 + --> $DIR/mut-borrow-in-loop.rs:33:25: in fn in_for::in_for | LL | (self.func)(arg) //~ ERROR cannot borrow | ^^^ mutable borrow starts here in previous iteration of loop diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 80a3ba4493c5b..d76abaa9db263 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `void` as mutable more than once at a time - --> $DIR/mut-borrow-outside-loop.rs:17:23 + --> $DIR/mut-borrow-outside-loop.rs:17:23: in fn main | LL | let first = &mut void; | ---- first mutable borrow occurs here @@ -10,7 +10,7 @@ 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 + --> $DIR/mut-borrow-outside-loop.rs:23:33: in fn main | LL | let inner_first = &mut inner_void; | ---------- first mutable borrow occurs here 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 05654a9356484..5a8baa255973a 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/regions-escape-bound-fn-2.rs:18:27 + --> $DIR/regions-escape-bound-fn-2.rs:18:27: in fn main | LL | let mut x = None; | ----- borrowed data cannot be stored into here... diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.stderr b/src/test/ui/borrowck/regions-escape-bound-fn.stderr index 5f05ee90d072c..4d9c28b1da85e 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/regions-escape-bound-fn.rs:18:27 + --> $DIR/regions-escape-bound-fn.rs:18:27: in fn main | LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr index c90dd2417d0e0..3d7fd564cd069 100644 --- a/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr +++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/regions-escape-unboxed-closure.rs:16:32 + --> $DIR/regions-escape-unboxed-closure.rs:16:32: in fn main | LL | let mut x: Option<&isize> = None; | ----- borrowed data cannot be stored into here... diff --git a/src/test/ui/borrowck/two-phase-multi-mut.stderr b/src/test/ui/borrowck/two-phase-multi-mut.stderr index 0c02acf654855..4c3ecfac02711 100644 --- a/src/test/ui/borrowck/two-phase-multi-mut.stderr +++ b/src/test/ui/borrowck/two-phase-multi-mut.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-multi-mut.rs:23:16 + --> $DIR/two-phase-multi-mut.rs:23:16: in fn main | LL | foo.method(&mut foo); | -----------^^^^^^^^- @@ -9,7 +9,7 @@ LL | foo.method(&mut foo); | borrow later used here error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-multi-mut.rs:23:5 + --> $DIR/two-phase-multi-mut.rs:23:5: in fn main | LL | foo.method(&mut foo); | ^^^^^^^^^^^--------^ 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 f2f8ae8c08c2c..1f1b29ddcf6cf 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,5 +1,5 @@ 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 + --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:21:9: in fn main | LL | let y = vec![format!("World")]; | - captured outer variable diff --git a/src/test/ui/cast-as-bool.stderr b/src/test/ui/cast-as-bool.stderr index 050a18ec9d3e3..04f6f7cea4827 100644 --- a/src/test/ui/cast-as-bool.stderr +++ b/src/test/ui/cast-as-bool.stderr @@ -1,5 +1,5 @@ error[E0054]: cannot cast as `bool` - --> $DIR/cast-as-bool.rs:12:13 + --> $DIR/cast-as-bool.rs:12:13: in fn main | LL | let u = 5 as bool; | ^^^^^^^^^ unsupported cast diff --git a/src/test/ui/cast-rfc0401-2.stderr b/src/test/ui/cast-rfc0401-2.stderr index f7ffa24595977..8238440b7386a 100644 --- a/src/test/ui/cast-rfc0401-2.stderr +++ b/src/test/ui/cast-rfc0401-2.stderr @@ -1,5 +1,5 @@ error[E0054]: cannot cast as `bool` - --> $DIR/cast-rfc0401-2.rs:16:13 + --> $DIR/cast-rfc0401-2.rs:16:13: in fn main | LL | let _ = 3 as bool; | ^^^^^^^^^ unsupported cast 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 67c33740f1969..027c97074027c 100644 --- a/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr +++ b/src/test/ui/cast-to-unsized-trait-object-suggestion.stderr @@ -1,5 +1,5 @@ error[E0620]: cast to unsized type: `&{integer}` as `std::marker::Send` - --> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5 + --> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5: in fn main | LL | &1 as Send; //~ ERROR cast to unsized | ^^^^^^---- @@ -7,7 +7,7 @@ LL | &1 as Send; //~ ERROR cast to unsized | help: try casting to a reference instead: `&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 + --> $DIR/cast-to-unsized-trait-object-suggestion.rs:13:5: in fn main | LL | Box::new(1) as Send; //~ ERROR cast to unsized | ^^^^^^^^^^^^^^^---- diff --git a/src/test/ui/cast_char.stderr b/src/test/ui/cast_char.stderr index 600d7e61a0986..8fae2020605e3 100644 --- a/src/test/ui/cast_char.stderr +++ b/src/test/ui/cast_char.stderr @@ -1,5 +1,5 @@ error: only u8 can be cast into char - --> $DIR/cast_char.rs:14:23 + --> $DIR/cast_char.rs:14:23: in fn main | LL | const XYZ: char = 0x1F888 as char; | ^^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` @@ -11,7 +11,7 @@ LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ error: only u8 can be cast into char - --> $DIR/cast_char.rs:16:22 + --> $DIR/cast_char.rs:16:22: in fn main | LL | const XY: char = 129160 as char; | ^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'` diff --git a/src/test/ui/casts-differing-anon.stderr b/src/test/ui/casts-differing-anon.stderr index dac24af671cf1..10bf0e5e46bf2 100644 --- a/src/test/ui/casts-differing-anon.stderr +++ b/src/test/ui/casts-differing-anon.stderr @@ -1,5 +1,5 @@ error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid - --> $DIR/casts-differing-anon.rs:31:13 + --> $DIR/casts-differing-anon.rs:31:13: in fn main | LL | b_raw = f_raw as *mut _; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/catch-block-type-error.stderr b/src/test/ui/catch-block-type-error.stderr index 0ae8d4862f7c8..599a4c67a8433 100644 --- a/src/test/ui/catch-block-type-error.stderr +++ b/src/test/ui/catch-block-type-error.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == {integer}` - --> $DIR/catch-block-type-error.rs:18:9 + --> $DIR/catch-block-type-error.rs:18:9: in fn main | LL | 42 | ^^ expected f32, found integral variable @@ -8,7 +8,7 @@ LL | 42 found type `{integer}` error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` - --> $DIR/catch-block-type-error.rs:24:5 + --> $DIR/catch-block-type-error.rs:24:5: in fn main | LL | }; | ^ expected i32, found () diff --git a/src/test/ui/check_match/issue-35609.stderr b/src/test/ui/check_match/issue-35609.stderr index 418573171f1ea..5c7bcd2635c11 100644 --- a/src/test/ui/check_match/issue-35609.stderr +++ b/src/test/ui/check_match/issue-35609.stderr @@ -1,47 +1,47 @@ error[E0004]: non-exhaustive patterns: `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered - --> $DIR/issue-35609.rs:20:11 + --> $DIR/issue-35609.rs:20:11: in fn main | 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 + --> $DIR/issue-35609.rs:24:11: in fn main | 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 + --> $DIR/issue-35609.rs:28:11: in fn main | 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 + --> $DIR/issue-35609.rs:32:11: in fn main | 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 + --> $DIR/issue-35609.rs:36:11: in fn main | 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 + --> $DIR/issue-35609.rs:41:11: in fn main | 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 + --> $DIR/issue-35609.rs:45:11: in fn main | 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 + --> $DIR/issue-35609.rs:49:11: in fn main | LL | match Some(A) { //~ ERROR non-exhaustive | ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered diff --git a/src/test/ui/check_match/issue-43253.stderr b/src/test/ui/check_match/issue-43253.stderr index 111f4e44ee9c1..5d040c16725a5 100644 --- a/src/test/ui/check_match/issue-43253.stderr +++ b/src/test/ui/check_match/issue-43253.stderr @@ -1,5 +1,5 @@ warning: unreachable pattern - --> $DIR/issue-43253.rs:39:9 + --> $DIR/issue-43253.rs:39:9: in fn main | LL | 9 => {}, | ^ @@ -11,13 +11,13 @@ LL | #![warn(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ warning: unreachable pattern - --> $DIR/issue-43253.rs:45:9 + --> $DIR/issue-43253.rs:45:9: in fn main | LL | 8...9 => {}, | ^^^^^ warning: unreachable pattern - --> $DIR/issue-43253.rs:51:9 + --> $DIR/issue-43253.rs:51:9: in fn main | 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 8184616c97ff3..193551b082d25 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,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/expect-region-supply-region.rs:28:18 + --> $DIR/expect-region-supply-region.rs:28:18: in fn expect_bound_supply_nothing | LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... @@ -9,7 +9,7 @@ LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of it | ^ 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 + --> $DIR/expect-region-supply-region.rs:38:18: in fn expect_bound_supply_bound | LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... @@ -19,7 +19,7 @@ LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of it | ^ cannot be stored outside of its closure error[E0308]: mismatched types - --> $DIR/expect-region-supply-region.rs:47:33 + --> $DIR/expect-region-supply-region.rs:47:33: in fn expect_bound_supply_named | LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch @@ -27,7 +27,7 @@ LL | closure_expecting_bound(|x: &'x u32| { = note: expected type `&u32` found type `&'x u32` note: the anonymous lifetime #2 defined on the body at 47:29... - --> $DIR/expect-region-supply-region.rs:47:29 + --> $DIR/expect-region-supply-region.rs:47:29: in fn expect_bound_supply_named | LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ @@ -45,7 +45,7 @@ LL | fn expect_bound_supply_named<'x>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/expect-region-supply-region.rs:47:33 + --> $DIR/expect-region-supply-region.rs:47:33: in fn expect_bound_supply_named | LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch @@ -58,7 +58,7 @@ note: the lifetime 'x as defined on the function body at 42:1... 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 + --> $DIR/expect-region-supply-region.rs:47:29: in fn expect_bound_supply_named | LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ @@ -71,7 +71,7 @@ LL | | }); | |_____^ error: borrowed data cannot be stored outside of its closure - --> $DIR/expect-region-supply-region.rs:52:18 + --> $DIR/expect-region-supply-region.rs:52:18: in fn expect_bound_supply_named | LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... diff --git a/src/test/ui/closure-move-sync.stderr b/src/test/ui/closure-move-sync.stderr index 076bae8dbd7af..a1c6dbee07c45 100644 --- a/src/test/ui/closure-move-sync.stderr +++ b/src/test/ui/closure-move-sync.stderr @@ -1,5 +1,5 @@ error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely - --> $DIR/closure-move-sync.rs:16:13 + --> $DIR/closure-move-sync.rs:16:13: in fn bar | LL | let t = thread::spawn(|| { | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely @@ -10,7 +10,7 @@ LL | let t = thread::spawn(|| { = note: required by `std::thread::spawn` error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely - --> $DIR/closure-move-sync.rs:28:5 + --> $DIR/closure-move-sync.rs:28:5: in fn foo | LL | thread::spawn(|| tx.send(()).unwrap()); | ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely 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 ac98d9427e45e..c08f51de08ceb 100644 --- a/src/test/ui/closure_context/issue-26046-fn-mut.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-mut.stderr @@ -1,5 +1,5 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` - --> $DIR/issue-26046-fn-mut.rs:14:19 + --> $DIR/issue-26046-fn-mut.rs:14:19: in fn foo | LL | let closure = || { //~ ERROR expected a closure that | ^^ this closure implements `FnMut`, not `Fn` 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 e09fdb5fb7787..807c963dbd70d 100644 --- a/src/test/ui/closure_context/issue-26046-fn-once.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-once.stderr @@ -1,5 +1,5 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` - --> $DIR/issue-26046-fn-once.rs:14:19 + --> $DIR/issue-26046-fn-once.rs:14:19: in fn get_closure | LL | let closure = move || { //~ ERROR expected a closure | ^^^^^^^ this closure implements `FnOnce`, not `Fn` diff --git a/src/test/ui/closure_context/issue-42065.stderr b/src/test/ui/closure_context/issue-42065.stderr index 5c2105c4f7954..21decfda000cb 100644 --- a/src/test/ui/closure_context/issue-42065.stderr +++ b/src/test/ui/closure_context/issue-42065.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `debug_dump_dict` - --> $DIR/issue-42065.rs:21:5 + --> $DIR/issue-42065.rs:21:5: in fn main | LL | debug_dump_dict(); | --------------- value moved here @@ -7,7 +7,7 @@ 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 + --> $DIR/issue-42065.rs:16:29: in fn main | LL | for (key, value) in dict { | ^^^^ diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr index 9383bfc92a870..c7ccdff57ae3e 100644 --- a/src/test/ui/codemap_tests/empty_span.stderr +++ b/src/test/ui/codemap_tests/empty_span.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/empty_span.rs:17:5: in fn main | LL | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr index 68818f50cd273..1ff07d418831d 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/huge_multispan_highlight.rs:100:18 + --> $DIR/huge_multispan_highlight.rs:100:18: in fn main | LL | let x = "foo"; | - consider changing this to `mut x` diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index d9551d7918a9f..cb91cace05f9b 100644 --- a/src/test/ui/codemap_tests/issue-11715.stderr +++ b/src/test/ui/codemap_tests/issue-11715.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/issue-11715.rs:100:18 + --> $DIR/issue-11715.rs:100:18: in fn main | LL | let y = &mut x; | - first mutable borrow occurs here diff --git a/src/test/ui/codemap_tests/issue-28308.stderr b/src/test/ui/codemap_tests/issue-28308.stderr index 15c159a3b153c..515b81f1d48d6 100644 --- a/src/test/ui/codemap_tests/issue-28308.stderr +++ b/src/test/ui/codemap_tests/issue-28308.stderr @@ -1,5 +1,5 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` - --> $DIR/issue-28308.rs:12:5 + --> $DIR/issue-28308.rs:12:5: in fn main | LL | assert!("foo"); | ^^^^^^^^^^^^^^^ cannot apply unary operator `!` diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index 5a6d474ed1667..5f16ac019777c 100644 --- a/src/test/ui/codemap_tests/one_line.stderr +++ b/src/test/ui/codemap_tests/one_line.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time - --> $DIR/one_line.rs:13:12 + --> $DIR/one_line.rs:13:12: in fn main | LL | v.push(v.pop().unwrap()); //~ ERROR cannot borrow | - ^ - first borrow ends here diff --git a/src/test/ui/codemap_tests/overlapping_spans.stderr b/src/test/ui/codemap_tests/overlapping_spans.stderr index 62a4f08e15661..99f4582ce09ce 100644 --- a/src/test/ui/codemap_tests/overlapping_spans.stderr +++ b/src/test/ui/codemap_tests/overlapping_spans.stderr @@ -1,5 +1,5 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/overlapping_spans.rs:21:9 + --> $DIR/overlapping_spans.rs:21:9: in fn main | LL | S {f:_s} => {} //~ ERROR cannot move out | ^^^^^--^ diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index c466610bcec82..f3f808a6934be 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -5,7 +5,7 @@ LL | bar; //~ ERROR cannot find value `bar` | ^^^ not found in this scope error[E0308]: mismatched types - --> $DIR/tab.rs:18:2 + --> $DIR/tab.rs:18:2: in fn foo | LL | fn foo() { | - help: try adding a return type: `-> &'static str` diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index d960c0b7da80c..f4d76234c6f8e 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `some_vec` - --> $DIR/tab_3.rs:17:20 + --> $DIR/tab_3.rs:17:20: in fn main | LL | some_vec.into_iter(); | -------- value moved here diff --git a/src/test/ui/codemap_tests/unicode_3.stderr b/src/test/ui/codemap_tests/unicode_3.stderr index 1a44d39aa27a2..24a606a2910e1 100644 --- a/src/test/ui/codemap_tests/unicode_3.stderr +++ b/src/test/ui/codemap_tests/unicode_3.stderr @@ -1,5 +1,5 @@ warning: denote infinite loops with `loop { ... }` - --> $DIR/unicode_3.rs:14:45 + --> $DIR/unicode_3.rs:14:45: in fn main | LL | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } | ^^^^^^^^^^ help: use `loop` diff --git a/src/test/ui/command-line-diagnostics.stderr b/src/test/ui/command-line-diagnostics.stderr index 2a45edae32565..4b5cb218a5bc6 100644 --- a/src/test/ui/command-line-diagnostics.stderr +++ b/src/test/ui/command-line-diagnostics.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/command-line-diagnostics.rs:16:5 + --> $DIR/command-line-diagnostics.rs:16:5: in fn main | LL | let x = 42; | - first assignment to `x` diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index 1efd5f2fb258d..abee4050614b0 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -1,5 +1,5 @@ error[E0053]: method `b` has an incompatible type for trait - --> $DIR/reordered-type-param.rs:26:30 + --> $DIR/reordered-type-param.rs:26:30: in fn b::b | LL | fn b(&self, x: C) -> C; | - type in trait diff --git a/src/test/ui/const-deref-ptr.stderr b/src/test/ui/const-deref-ptr.stderr index 61db58104d2d2..ea42e5ba43825 100644 --- a/src/test/ui/const-deref-ptr.stderr +++ b/src/test/ui/const-deref-ptr.stderr @@ -1,5 +1,5 @@ error[E0396]: raw pointers cannot be dereferenced in statics - --> $DIR/const-deref-ptr.rs:14:29 + --> $DIR/const-deref-ptr.rs:14:29: in fn main | LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; //~ ERROR E0396 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer in constant diff --git a/src/test/ui/const-eval-overflow-2.stderr b/src/test/ui/const-eval-overflow-2.stderr index 9cee718c286b6..e0fc04446bb18 100644 --- a/src/test/ui/const-eval-overflow-2.stderr +++ b/src/test/ui/const-eval-overflow-2.stderr @@ -5,7 +5,7 @@ LL | const NEG_NEG_128: i8 = -NEG_128; | ^^^^^^^^ attempt to negate with overflow | note: for pattern here - --> $DIR/const-eval-overflow-2.rs:26:9 + --> $DIR/const-eval-overflow-2.rs:26:9: in fn main | LL | NEG_NEG_128 => println!("A"), | ^^^^^^^^^^^ diff --git a/src/test/ui/const-eval-span.stderr b/src/test/ui/const-eval-span.stderr index afe8d1bc0b5b7..c7e58a7625f6b 100644 --- a/src/test/ui/const-eval-span.stderr +++ b/src/test/ui/const-eval-span.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/const-eval-span.rs:19:9 + --> $DIR/const-eval-span.rs:19:9: in enum E | LL | V = CONSTANT, | ^^^^^^^^ expected isize, found struct `S` diff --git a/src/test/ui/const-eval/conditional_array_execution.stderr b/src/test/ui/const-eval/conditional_array_execution.stderr index 713b1b36c08b1..737aa1bcd92c0 100644 --- a/src/test/ui/const-eval/conditional_array_execution.stderr +++ b/src/test/ui/const-eval/conditional_array_execution.stderr @@ -13,7 +13,7 @@ LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow warning: constant evaluation error - --> $DIR/conditional_array_execution.rs:20:20 + --> $DIR/conditional_array_execution.rs:20:20: in fn main | LL | println!("{}", FOO); | ^^^ referenced constant has errors diff --git a/src/test/ui/const-eval/issue-43197.stderr b/src/test/ui/const-eval/issue-43197.stderr index a22e8016296c4..4dff6eae1ce2e 100644 --- a/src/test/ui/const-eval/issue-43197.stderr +++ b/src/test/ui/const-eval/issue-43197.stderr @@ -1,5 +1,5 @@ warning: attempt to subtract with overflow - --> $DIR/issue-43197.rs:20:20 + --> $DIR/issue-43197.rs:20:20: in fn main | LL | const X: u32 = 0-1; | ^^^ @@ -7,31 +7,31 @@ LL | const X: u32 = 0-1; = note: #[warn(const_err)] on by default warning: this constant cannot be used - --> $DIR/issue-43197.rs:20:5 + --> $DIR/issue-43197.rs:20:5: in fn main | LL | const X: u32 = 0-1; | ^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow warning: attempt to subtract with overflow - --> $DIR/issue-43197.rs:23:24 + --> $DIR/issue-43197.rs:23:24: in fn main | LL | const Y: u32 = foo(0-1); | ^^^ warning: this constant cannot be used - --> $DIR/issue-43197.rs:23:5 + --> $DIR/issue-43197.rs:23:5: in fn main | LL | const Y: u32 = foo(0-1); | ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow warning: constant evaluation error - --> $DIR/issue-43197.rs:26:23 + --> $DIR/issue-43197.rs:26:23: in fn main | LL | println!("{} {}", X, Y); | ^ referenced constant has errors warning: constant evaluation error - --> $DIR/issue-43197.rs:26:26 + --> $DIR/issue-43197.rs:26:26: in fn main | LL | println!("{} {}", X, Y); | ^ referenced constant has errors diff --git a/src/test/ui/const-eval/issue-44578.stderr b/src/test/ui/const-eval/issue-44578.stderr index 01c6fa3623f8d..b62348dca8d2f 100644 --- a/src/test/ui/const-eval/issue-44578.stderr +++ b/src/test/ui/const-eval/issue-44578.stderr @@ -1,5 +1,5 @@ warning: constant evaluation error - --> $DIR/issue-44578.rs:35:20 + --> $DIR/issue-44578.rs:35:20: in fn main | LL | println!("{}", as Foo>::AMT); //~ WARN const_err | ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors @@ -7,7 +7,7 @@ LL | println!("{}", as Foo>::AMT); //~ WARN const_err = note: #[warn(const_err)] on by default warning: constant evaluation error - --> $DIR/issue-44578.rs:35:20 + --> $DIR/issue-44578.rs:35:20: in fn main | LL | println!("{}", as Foo>::AMT); //~ WARN const_err | ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors diff --git a/src/test/ui/const-eval/promoted_errors.stderr b/src/test/ui/const-eval/promoted_errors.stderr index 7761f192fdb70..4ffd7ba414a9a 100644 --- a/src/test/ui/const-eval/promoted_errors.stderr +++ b/src/test/ui/const-eval/promoted_errors.stderr @@ -1,5 +1,5 @@ warning: constant evaluation error - --> $DIR/promoted_errors.rs:14:20 + --> $DIR/promoted_errors.rs:14:20: in fn main | LL | println!("{}", 0u32 - 1); | ^^^^^^^^ attempt to subtract with overflow @@ -7,43 +7,43 @@ LL | println!("{}", 0u32 - 1); = note: #[warn(const_err)] on by default warning: constant evaluation error - --> $DIR/promoted_errors.rs:14:20 + --> $DIR/promoted_errors.rs:14:20: in fn main | LL | println!("{}", 0u32 - 1); | ^^^^^^^^ attempt to subtract with overflow warning: constant evaluation error - --> $DIR/promoted_errors.rs:17:14 + --> $DIR/promoted_errors.rs:17:14: in fn main | LL | let _x = 0u32 - 1; | ^^^^^^^^ attempt to subtract with overflow warning: attempt to divide by zero - --> $DIR/promoted_errors.rs:19:20 + --> $DIR/promoted_errors.rs:19:20: in fn main | LL | println!("{}", 1/(1-1)); | ^^^^^^^ warning: constant evaluation error - --> $DIR/promoted_errors.rs:19:20 + --> $DIR/promoted_errors.rs:19:20: in fn main | LL | println!("{}", 1/(1-1)); | ^^^^^^^ attempt to divide by zero warning: attempt to divide by zero - --> $DIR/promoted_errors.rs:22:14 + --> $DIR/promoted_errors.rs:22:14: in fn main | LL | let _x = 1/(1-1); | ^^^^^^^ warning: constant evaluation error - --> $DIR/promoted_errors.rs:22:14 + --> $DIR/promoted_errors.rs:22:14: in fn main | LL | let _x = 1/(1-1); | ^^^^^^^ attempt to divide by zero warning: constant evaluation error - --> $DIR/promoted_errors.rs:25:20 + --> $DIR/promoted_errors.rs:25:20: in fn main | LL | println!("{}", 1/(false as u32)); | ^^^^^^^^^^^^^^^^ attempt to divide by zero diff --git a/src/test/ui/const-fn-error.stderr b/src/test/ui/const-fn-error.stderr index 767f28ff7b190..b8bf0f88252fb 100644 --- a/src/test/ui/const-fn-error.stderr +++ b/src/test/ui/const-fn-error.stderr @@ -1,23 +1,23 @@ error[E0016]: blocks in constant functions are limited to items and tail expressions - --> $DIR/const-fn-error.rs:16:19 + --> $DIR/const-fn-error.rs:16:19: in fn f | LL | let mut sum = 0; | ^ error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants - --> $DIR/const-fn-error.rs:18:14 + --> $DIR/const-fn-error.rs:18:14: in fn f | LL | for i in 0..x { | ^^^^ error[E0019]: constant function contains unimplemented expression type - --> $DIR/const-fn-error.rs:18:14 + --> $DIR/const-fn-error.rs:18:14: in fn f | LL | for i in 0..x { | ^^^^ error[E0080]: constant evaluation error - --> $DIR/const-fn-error.rs:18:14 + --> $DIR/const-fn-error.rs:18:14: in fn f | LL | for i in 0..x { | ^^^^ calling non-const fn `>::into_iter` @@ -26,7 +26,7 @@ LL | let a : [i32; f(X)]; | ---- inside call to `f` | note: for constant expression here - --> $DIR/const-fn-error.rs:29:13 + --> $DIR/const-fn-error.rs:29:13: in fn main | LL | let a : [i32; f(X)]; | ^^^^^^^^^^^ diff --git a/src/test/ui/const-len-underflow-separate-spans.stderr b/src/test/ui/const-len-underflow-separate-spans.stderr index 8d737dbfc0857..588c41278372d 100644 --- a/src/test/ui/const-len-underflow-separate-spans.stderr +++ b/src/test/ui/const-len-underflow-separate-spans.stderr @@ -13,7 +13,7 @@ LL | const LEN: usize = ONE - TWO; | ^^^^^^^^^ attempt to subtract with overflow error[E0080]: constant evaluation error - --> $DIR/const-len-underflow-separate-spans.rs:22:17 + --> $DIR/const-len-underflow-separate-spans.rs:22:17: in fn main | LL | let a: [i8; LEN] = unimplemented!(); | ^^^ referenced constant has errors diff --git a/src/test/ui/const-pattern-irrefutable.stderr b/src/test/ui/const-pattern-irrefutable.stderr index 6d5738f332877..2ffeabe4e4653 100644 --- a/src/test/ui/const-pattern-irrefutable.stderr +++ b/src/test/ui/const-pattern-irrefutable.stderr @@ -1,17 +1,17 @@ error[E0005]: refutable pattern in local binding: `_` not covered - --> $DIR/const-pattern-irrefutable.rs:22:9 + --> $DIR/const-pattern-irrefutable.rs:22:9: in fn main | 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 + --> $DIR/const-pattern-irrefutable.rs:23:9: in fn main | 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 + --> $DIR/const-pattern-irrefutable.rs:24:9: in fn main | LL | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered | ^ interpreted as a constant pattern, not new variable diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index a5f87928924ca..5bee8fa042782 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/deref-suggestion.rs:18:9 + --> $DIR/deref-suggestion.rs:18:9: in fn foo2 | LL | foo(s); //~ ERROR mismatched types | ^ @@ -11,7 +11,7 @@ LL | foo(s); //~ ERROR mismatched types found type `&std::string::String` error[E0308]: mismatched types - --> $DIR/deref-suggestion.rs:23:10 + --> $DIR/deref-suggestion.rs:23:10: in fn foo4 | LL | foo3(u); //~ ERROR mismatched types | ^ @@ -23,7 +23,7 @@ LL | foo3(u); //~ ERROR mismatched types found type `&u32` error[E0308]: mismatched types - --> $DIR/deref-suggestion.rs:30:9 + --> $DIR/deref-suggestion.rs:30:9: in fn main | LL | foo(&"aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | foo(&"aaa".to_owned()); //~ ERROR mismatched types found type `&std::string::String` error[E0308]: mismatched types - --> $DIR/deref-suggestion.rs:31:9 + --> $DIR/deref-suggestion.rs:31:9: in fn main | LL | foo(&mut "aaa".to_owned()); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ 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 10ee175a97e16..ce30c59dc31b5 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -23,25 +23,25 @@ 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 + --> $DIR/bad-assoc-pat.rs:13:9: in fn main | 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 + --> $DIR/bad-assoc-pat.rs:16:9: in fn main | 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 + --> $DIR/bad-assoc-pat.rs:19:9: in fn main | 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 + --> $DIR/bad-assoc-pat.rs:24:10: in fn main | LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)` 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 1e55b0c024fb7..eb755b348cb77 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,5 +1,5 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied - --> $DIR/issue-21659-show-relevant-trait-impls-1.rs:34:8 + --> $DIR/issue-21659-show-relevant-trait-impls-1.rs:34:8: in fn main | LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` 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 eee7f32032b6d..e4c516a59c5f2 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,5 +1,5 @@ error[E0277]: the trait bound `Bar: Foo` is not satisfied - --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8 + --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8: in fn main | LL | f1.foo(1usize); | ^^^ the trait `Foo` is not implemented for `Bar` diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index a80593e05f105..dde6ff2b1879c 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-31424.rs:17:15 + --> $DIR/issue-31424.rs:17:15: in fn foo::foo | LL | (&mut self).bar(); //~ ERROR cannot borrow | ^^^^ @@ -8,7 +8,7 @@ LL | (&mut self).bar(); //~ ERROR cannot borrow | try removing `&mut` here error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-31424.rs:23:15 + --> $DIR/issue-31424.rs:23:15: in fn bar::bar | LL | fn bar(self: &mut Self) { | --------------- consider changing this to `mut self: &mut Self` diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 08ece78b78885..0837647641f49 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-34126.rs:16:23 + --> $DIR/issue-34126.rs:16:23: in fn start::start | LL | self.run(&mut self); //~ ERROR cannot borrow | ^^^^ diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 7a4a03ce5d7e7..3dfb0fa8e94fe 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable local variable `key` as mutable - --> $DIR/issue-34337.rs:16:14 + --> $DIR/issue-34337.rs:16:14: in fn main | LL | get(&mut key); //~ ERROR cannot borrow | ^^^ diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index 4a29cd81425c4..6ca48a1cc175f 100644 --- a/src/test/ui/did_you_mean/issue-35937.stderr +++ b/src/test/ui/did_you_mean/issue-35937.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow field `f.v` of immutable binding as mutable - --> $DIR/issue-35937.rs:17:5 + --> $DIR/issue-35937.rs:17:5: in fn main | LL | let f = Foo { v: Vec::new() }; | - consider changing this to `mut f` @@ -7,7 +7,7 @@ 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 + --> $DIR/issue-35937.rs:26:5: in fn foo | LL | let s = S { x: 42 }; | - consider changing this to `mut s` @@ -15,7 +15,7 @@ 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 + --> $DIR/issue-35937.rs:30:5: in fn bar | LL | fn bar(s: S) { | - consider changing this to `mut s` diff --git a/src/test/ui/did_you_mean/issue-36798.stderr b/src/test/ui/did_you_mean/issue-36798.stderr index c0a73abdf725d..21f1f8470fc1f 100644 --- a/src/test/ui/did_you_mean/issue-36798.stderr +++ b/src/test/ui/did_you_mean/issue-36798.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `baz` on type `Foo` - --> $DIR/issue-36798.rs:17:7 + --> $DIR/issue-36798.rs:17:7: in fn main | LL | f.baz; //~ ERROR no field | ^^^ did you mean `bar`? 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 4cf0df4435126..988049ec53ba9 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,5 +1,5 @@ error[E0609]: no field `zz` on type `Foo` - --> $DIR/issue-36798_unknown_field.rs:17:7 + --> $DIR/issue-36798_unknown_field.rs:17:7: in fn main | LL | f.zz; //~ ERROR no field | ^^ unknown field diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index 7cf3326f9d613..91ea4d6775402 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/issue-37139.rs:22:23 + --> $DIR/issue-37139.rs:22:23: in fn main | LL | test(&mut x); //~ ERROR cannot borrow immutable | ^ 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 4ebb5683405d4..8edd17122cb2c 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.stderr @@ -1,5 +1,5 @@ error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/issue-38147-1.rs:27:9 + --> $DIR/issue-38147-1.rs:27:9: in fn f::f | LL | fn f(&self) { | ----- use `&mut self` here to make mutable 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 31433cf83c3bf..bd9986aab3f94 100644 --- a/src/test/ui/did_you_mean/issue-38147-2.stderr +++ b/src/test/ui/did_you_mean/issue-38147-2.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable - --> $DIR/issue-38147-2.rs:17:9 + --> $DIR/issue-38147-2.rs:17:9: in fn f::f | LL | s: &'a String | ---------- use `&'a mut String` here to make mutable 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 8bb23acdc4076..3d48da05faa53 100644 --- a/src/test/ui/did_you_mean/issue-38147-3.stderr +++ b/src/test/ui/did_you_mean/issue-38147-3.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable - --> $DIR/issue-38147-3.rs:17:9 + --> $DIR/issue-38147-3.rs:17:9: in fn f::f | LL | s: &'a String | ---------- use `&'a mut String` here to make mutable 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 e78cea14a7b53..0225b29703ca0 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.stderr @@ -1,5 +1,5 @@ error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/issue-38147-4.rs:16:5 + --> $DIR/issue-38147-4.rs:16:5: in fn f | LL | fn f(x: usize, f: &Foo) { | ---- use `&mut Foo` here to make mutable diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index dfa9cb880e568..06d34f7ac913f 100644 --- a/src/test/ui/did_you_mean/issue-39544.stderr +++ b/src/test/ui/did_you_mean/issue-39544.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow field `z.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:21:18 + --> $DIR/issue-39544.rs:21:18: in fn main | LL | let z = Z { x: X::Y }; | - consider changing this to `mut z` @@ -7,7 +7,7 @@ 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 + --> $DIR/issue-39544.rs:26:22: in fn foo::foo | LL | fn foo<'z>(&'z self) { | -------- use `&'z mut self` here to make mutable @@ -15,7 +15,7 @@ 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 + --> $DIR/issue-39544.rs:30:22: in fn foo1::foo1 | LL | fn foo1(&self, other: &Z) { | ----- use `&mut self` here to make mutable @@ -23,7 +23,7 @@ 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 + --> $DIR/issue-39544.rs:31:22: in fn foo1::foo1 | LL | fn foo1(&self, other: &Z) { | -- use `&mut Z` here to make mutable @@ -32,7 +32,7 @@ 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 + --> $DIR/issue-39544.rs:35:22: in fn foo2::foo2 | LL | fn foo2<'a>(&'a self, other: &Z) { | -------- use `&'a mut self` here to make mutable @@ -40,7 +40,7 @@ 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 + --> $DIR/issue-39544.rs:36:22: in fn foo2::foo2 | LL | fn foo2<'a>(&'a self, other: &Z) { | -- use `&mut Z` here to make mutable @@ -49,7 +49,7 @@ 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 + --> $DIR/issue-39544.rs:40:22: in fn foo3::foo3 | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -------- use `&'a mut Self` here to make mutable @@ -57,7 +57,7 @@ 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 + --> $DIR/issue-39544.rs:41:22: in fn foo3::foo3 | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -- use `&mut Z` here to make mutable @@ -66,7 +66,7 @@ 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 + --> $DIR/issue-39544.rs:45:22: in fn foo4::foo4 | LL | fn foo4(other: &Z) { | -- use `&mut Z` here to make mutable @@ -74,7 +74,7 @@ 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 + --> $DIR/issue-39544.rs:51:18: in fn with_arg | LL | pub fn with_arg(z: Z, w: &Z) { | - consider changing this to `mut z` @@ -82,7 +82,7 @@ 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 + --> $DIR/issue-39544.rs:52:18: in fn with_arg | LL | pub fn with_arg(z: Z, w: &Z) { | -- use `&mut Z` here to make mutable @@ -91,7 +91,7 @@ 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 + --> $DIR/issue-39544.rs:58:5: in fn with_tuple | LL | *x.0 = 1; | ^^^^^^^^ cannot borrow as mutable 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 3f955da86ba00..f9a6098450983 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,5 +1,5 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied - --> $DIR/issue-39802-show-5-trait-impls.rs:34:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:34:5: in fn main | LL | Foo::::bar(&1i8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i8` @@ -11,13 +11,13 @@ LL | Foo::::bar(&1i8); //~ ERROR is not satisfied > > note: required by `Foo::bar` - --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:12:5: in trait Foo | LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `u8: Foo` is not satisfied - --> $DIR/issue-39802-show-5-trait-impls.rs:35:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:35:5: in fn main | LL | Foo::::bar(&1u8); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u8` @@ -28,13 +28,13 @@ LL | Foo::::bar(&1u8); //~ ERROR is not satisfied > > note: required by `Foo::bar` - --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:12:5: in trait Foo | LL | fn bar(&self){} | ^^^^^^^^^^^^^ error[E0277]: the trait bound `bool: Foo` is not satisfied - --> $DIR/issue-39802-show-5-trait-impls.rs:36:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:36:5: in fn main | LL | Foo::::bar(&true); //~ ERROR is not satisfied | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `bool` @@ -46,7 +46,7 @@ LL | Foo::::bar(&true); //~ ERROR is not satisfied > and 2 others note: required by `Foo::bar` - --> $DIR/issue-39802-show-5-trait-impls.rs:12:5 + --> $DIR/issue-39802-show-5-trait-impls.rs:12:5: in trait Foo | LL | fn bar(&self){} | ^^^^^^^^^^^^^ diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index 20e95513ec2f3..d50538599b04a 100644 --- a/src/test/ui/did_you_mean/issue-40823.stderr +++ b/src/test/ui/did_you_mean/issue-40823.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable borrowed content `*buf` as mutable - --> $DIR/issue-40823.rs:13:5 + --> $DIR/issue-40823.rs:13:5: in fn main | LL | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content | ^^^ cannot borrow as mutable 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 c4b282bde5283..b5c2bb1dd6d20 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,11 +1,11 @@ error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable` - --> $DIR/issue-42599_available_fields_note.rs:26:39 + --> $DIR/issue-42599_available_fields_note.rs:26:39: in fn submodule::new_with_secret_two::new_with_secret_two | 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 + --> $DIR/issue-42599_available_fields_note.rs:31:39: in fn submodule::new_with_secret_three::new_with_secret_three | LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field @@ -13,13 +13,13 @@ LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } = note: available fields are: `favorite_integer`, `secret_integer`, `innocently_misspellable`, `another_field`, `yet_another_field` ... and 2 others error[E0609]: no field `inocently_mispellable` on type `submodule::Demo` - --> $DIR/issue-42599_available_fields_note.rs:42:41 + --> $DIR/issue-42599_available_fields_note.rs:42:41: in fn main | 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 + --> $DIR/issue-42599_available_fields_note.rs:45:42: in fn main | LL | let egregious_field_misaccess = demo.egregiously_nonexistent_field; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown field diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index f1da920872d7c..77f648ea9ee0a 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-42764.rs:21:43 + --> $DIR/issue-42764.rs:21:43: in fn main | LL | this_function_expects_a_double_option(n); | ^ expected enum `DoubleOption`, found usize diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index 691c7ccd9fdf2..a4c490fe4a597 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `K: std::marker::Send` - --> $DIR/recursion_limit.rs:44:5 + --> $DIR/recursion_limit.rs:44:5: in fn main | LL | is_send::(); //~ ERROR overflow evaluating the requirement | ^^^^^^^^^^^^ 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 20a94f7aac196..be37e5741e5bd 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -1,5 +1,5 @@ error[E0055]: reached the recursion limit while auto-dereferencing I - --> $DIR/recursion_limit_deref.rs:60:22 + --> $DIR/recursion_limit_deref.rs:60:22: in fn main | LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ deref recursion limit reached @@ -7,7 +7,7 @@ LL | let x: &Bottom = &t; //~ ERROR mismatched types = help: consider adding a `#![recursion_limit="20"]` attribute to your crate error[E0308]: mismatched types - --> $DIR/recursion_limit_deref.rs:60:22 + --> $DIR/recursion_limit_deref.rs:60:22: in fn main | LL | let x: &Bottom = &t; //~ ERROR mismatched types | ^^ expected struct `Bottom`, found struct `Top` 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 6dd216489313c..412adaba19c2a 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 @@ -11,7 +11,7 @@ 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 + --> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12: in fn main | LL | let _: &Copy + 'static; //~ ERROR expected a path | ^^^^^ the trait `std::marker::Copy` cannot be made into an object diff --git a/src/test/ui/discrim-overflow-2.stderr b/src/test/ui/discrim-overflow-2.stderr index bd610bc7163d7..35f3ce48641a3 100644 --- a/src/test/ui/discrim-overflow-2.stderr +++ b/src/test/ui/discrim-overflow-2.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:27:9 + --> $DIR/discrim-overflow-2.rs:27:9: in enum f_i8::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:36:9 + --> $DIR/discrim-overflow-2.rs:36:9: in enum f_u8::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:45:9 + --> $DIR/discrim-overflow-2.rs:45:9: in enum f_i16::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:54:9 + --> $DIR/discrim-overflow-2.rs:54:9: in enum f_u16::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:63:9 + --> $DIR/discrim-overflow-2.rs:63:9: in enum f_i32::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:72:9 + --> $DIR/discrim-overflow-2.rs:72:9: in enum f_u32::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:81:9 + --> $DIR/discrim-overflow-2.rs:81:9: in enum f_i64::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:90:9 + --> $DIR/discrim-overflow-2.rs:90:9: in enum f_u64::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/discrim-overflow.stderr b/src/test/ui/discrim-overflow.stderr index ef784679ce02a..e379ff358eb1b 100644 --- a/src/test/ui/discrim-overflow.stderr +++ b/src/test/ui/discrim-overflow.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:25:9 + --> $DIR/discrim-overflow.rs:25:9: in enum f_i8::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:36:9 + --> $DIR/discrim-overflow.rs:36:9: in enum f_u8::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:47:9 + --> $DIR/discrim-overflow.rs:47:9: in enum f_i16::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:58:9 + --> $DIR/discrim-overflow.rs:58:9: in enum f_u16::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:70:9 + --> $DIR/discrim-overflow.rs:70:9: in enum f_i32::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:82:9 + --> $DIR/discrim-overflow.rs:82:9: in enum f_u32::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:94:9 + --> $DIR/discrim-overflow.rs:94:9: in enum f_i64::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:106:9 + --> $DIR/discrim-overflow.rs:106:9: in enum f_u64::A | LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr index 668fbf9521b17..73af7e56be149 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:39:20 + --> $DIR/dropck-eyepatch-extern-crate.rs:39:20: in fn main | LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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-extern-crate.rs:41:20 + --> $DIR/dropck-eyepatch-extern-crate.rs:41:20: in fn main | LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough @@ -21,7 +21,7 @@ LL | } = 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-extern-crate.rs:49:29 + --> $DIR/dropck-eyepatch-extern-crate.rs:49:29: in fn main | LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | } = 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-extern-crate.rs:51:29 + --> $DIR/dropck-eyepatch-extern-crate.rs:51:29: in fn main | LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr index 1a35996a0cadb..7e7e45f9c5e9b 100644 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:56:20 + --> $DIR/dropck-eyepatch-reorder.rs:56:20: in fn main | LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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-reorder.rs:58:20 + --> $DIR/dropck-eyepatch-reorder.rs:58:20: in fn main | LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough @@ -21,7 +21,7 @@ LL | } = 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-reorder.rs:66:29 + --> $DIR/dropck-eyepatch-reorder.rs:66:29: in fn main | LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | } = 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-reorder.rs:68:29 + --> $DIR/dropck-eyepatch-reorder.rs:68:29: in fn main | LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough diff --git a/src/test/ui/dropck/dropck-eyepatch.stderr b/src/test/ui/dropck/dropck-eyepatch.stderr index 4d29164202293..e88802f92b565 100644 --- a/src/test/ui/dropck/dropck-eyepatch.stderr +++ b/src/test/ui/dropck/dropck-eyepatch.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:79:20 + --> $DIR/dropck-eyepatch.rs:79:20: in fn main | LL | dt = Dt("dt", &c); | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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:81:20 + --> $DIR/dropck-eyepatch.rs:81:20: in fn main | LL | dr = Dr("dr", &c); | ^ borrowed value does not live long enough @@ -21,7 +21,7 @@ LL | } = 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:89:29 + --> $DIR/dropck-eyepatch.rs:89:29: in fn main | LL | pt = Pt("pt", &c_long, &c); | ^ borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | } = 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:91:29 + --> $DIR/dropck-eyepatch.rs:91:29: in fn main | LL | pr = Pr("pr", &c_long, &c); | ^ borrowed value does not live long enough diff --git a/src/test/ui/empty-struct-unit-expr.stderr b/src/test/ui/empty-struct-unit-expr.stderr index fff696fc80f05..aabb271ee14b6 100644 --- a/src/test/ui/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty-struct-unit-expr.stderr @@ -1,5 +1,5 @@ error[E0618]: expected function, found `Empty2` - --> $DIR/empty-struct-unit-expr.rs:25:14 + --> $DIR/empty-struct-unit-expr.rs:25:14: in fn main | LL | struct Empty2; | -------------- `Empty2` defined here @@ -8,7 +8,7 @@ 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 + --> $DIR/empty-struct-unit-expr.rs:26:14: in fn main | LL | Empty4 | ------ `E::Empty4` defined here @@ -21,13 +21,13 @@ LL | let e4 = E::Empty4; | ^^^^^^^^^ error[E0618]: expected function, found `empty_struct::XEmpty2` - --> $DIR/empty-struct-unit-expr.rs:28:15 + --> $DIR/empty-struct-unit-expr.rs:28:15: in fn main | 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 + --> $DIR/empty-struct-unit-expr.rs:29:15: in fn main | LL | let xe4 = XE::XEmpty4(); | ^^^^^^^^^^^^^ not a function diff --git a/src/test/ui/enum-size-variance.stderr b/src/test/ui/enum-size-variance.stderr index f6df65b1d9da7..ec7625f9f558a 100644 --- a/src/test/ui/enum-size-variance.stderr +++ b/src/test/ui/enum-size-variance.stderr @@ -1,5 +1,5 @@ warning: enum variant is more than three times larger (32 bytes) than the next largest - --> $DIR/enum-size-variance.rs:28:5 + --> $DIR/enum-size-variance.rs:28:5: in enum Enum5 | LL | L(i64, i64, i64, i64), //~ WARNING three times larger | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0001.stderr b/src/test/ui/error-codes/E0001.stderr index af67a438f52fa..8f8ffb9ce1793 100644 --- a/src/test/ui/error-codes/E0001.stderr +++ b/src/test/ui/error-codes/E0001.stderr @@ -1,5 +1,5 @@ error: unreachable pattern - --> $DIR/E0001.rs:18:9 + --> $DIR/E0001.rs:18:9: in fn main | LL | _ => {/* ... */} //~ ERROR unreachable pattern | ^ diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index 6a4392df35d8b..067669ad35d19 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -1,11 +1,11 @@ error[E0004]: non-exhaustive patterns: type std::option::Option is non-empty - --> $DIR/E0004-2.rs:14:11 + --> $DIR/E0004-2.rs:14:11: in fn main | 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 + --> $DIR/E0004-2.rs:14:11: in fn main | LL | match x { } //~ ERROR E0004 | ^ diff --git a/src/test/ui/error-codes/E0004.stderr b/src/test/ui/error-codes/E0004.stderr index cf364a886891e..95f4d6df240af 100644 --- a/src/test/ui/error-codes/E0004.stderr +++ b/src/test/ui/error-codes/E0004.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered - --> $DIR/E0004.rs:19:11 + --> $DIR/E0004.rs:19:11: in fn main | LL | match x { //~ ERROR E0004 | ^ pattern `HastaLaVistaBaby` not covered diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index b321a69805eb9..fde40512d0905 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding: `None` not covered - --> $DIR/E0005.rs:13:9 + --> $DIR/E0005.rs:13:9: in fn main | LL | let Some(y) = x; //~ ERROR E0005 | ^^^^^^^ pattern `None` not covered diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index f662365b8f185..a03f9440a1bba 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -1,11 +1,11 @@ error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/E0007.rs:14:9 + --> $DIR/E0007.rs:14:9: in fn main | 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 + --> $DIR/E0007.rs:14:26: in fn main | LL | op_string @ Some(s) => {}, | ^ not allowed after `@` diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr index e9af3166ed5ea..186f2302f7819 100644 --- a/src/test/ui/error-codes/E0008.stderr +++ b/src/test/ui/error-codes/E0008.stderr @@ -1,5 +1,5 @@ error[E0008]: cannot bind by-move into a pattern guard - --> $DIR/E0008.rs:13:14 + --> $DIR/E0008.rs:13:14: in fn main | LL | Some(s) if s.len() == 0 => {}, | ^ moves value into pattern guard diff --git a/src/test/ui/error-codes/E0009.stderr b/src/test/ui/error-codes/E0009.stderr index 8b3071420dd89..20a0207dfd4eb 100644 --- a/src/test/ui/error-codes/E0009.stderr +++ b/src/test/ui/error-codes/E0009.stderr @@ -1,5 +1,5 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/E0009.rs:15:15 + --> $DIR/E0009.rs:15:15: in fn main | LL | Some((y, ref z)) => {}, | ^ ----- both by-ref and by-move used diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index 26f7baeb1a46b..a760c4dfec0f7 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -1,17 +1,17 @@ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields - --> $DIR/E0023.rs:20:9 + --> $DIR/E0023.rs:20:9: in fn main | 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 + --> $DIR/E0023.rs:21:9: in fn main | 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 + --> $DIR/E0023.rs:22:9: in fn main | LL | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 | ^^^^^^^^^^^^^^^^^ expected 1 field, found 2 diff --git a/src/test/ui/error-codes/E0025.stderr b/src/test/ui/error-codes/E0025.stderr index f60372559a331..563ecec2fe7b9 100644 --- a/src/test/ui/error-codes/E0025.stderr +++ b/src/test/ui/error-codes/E0025.stderr @@ -1,5 +1,5 @@ error[E0025]: field `a` bound multiple times in the pattern - --> $DIR/E0025.rs:18:21 + --> $DIR/E0025.rs:18:21: in fn main | LL | let Foo { a: x, a: y, b: 0 } = x; | ---- ^^^^ multiple uses of `a` in pattern diff --git a/src/test/ui/error-codes/E0026-teach.stderr b/src/test/ui/error-codes/E0026-teach.stderr index 67ea32fba86d6..2aaf1d8699900 100644 --- a/src/test/ui/error-codes/E0026-teach.stderr +++ b/src/test/ui/error-codes/E0026-teach.stderr @@ -1,5 +1,5 @@ error[E0026]: struct `Thing` does not have a field named `z` - --> $DIR/E0026-teach.rs:21:23 + --> $DIR/E0026-teach.rs:21:23: in fn main | LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have this field diff --git a/src/test/ui/error-codes/E0026.stderr b/src/test/ui/error-codes/E0026.stderr index 9dabbc8a775fb..a63011cd35cce 100644 --- a/src/test/ui/error-codes/E0026.stderr +++ b/src/test/ui/error-codes/E0026.stderr @@ -1,5 +1,5 @@ error[E0026]: struct `Thing` does not have a field named `z` - --> $DIR/E0026.rs:19:23 + --> $DIR/E0026.rs:19:23: in fn main | LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have this field diff --git a/src/test/ui/error-codes/E0027-teach.stderr b/src/test/ui/error-codes/E0027-teach.stderr index 1c5333d76a85e..4814072ce729d 100644 --- a/src/test/ui/error-codes/E0027-teach.stderr +++ b/src/test/ui/error-codes/E0027-teach.stderr @@ -1,5 +1,5 @@ error[E0027]: pattern does not mention field `name` - --> $DIR/E0027-teach.rs:22:9 + --> $DIR/E0027-teach.rs:22:9: in fn main | LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr index 208b263e0f894..94fd2e2e09a20 100644 --- a/src/test/ui/error-codes/E0027.stderr +++ b/src/test/ui/error-codes/E0027.stderr @@ -1,5 +1,5 @@ error[E0027]: pattern does not mention field `name` - --> $DIR/E0027.rs:20:9 + --> $DIR/E0027.rs:20:9: in fn main | LL | Dog { age: x } => {} | ^^^^^^^^^^^^^^ missing field `name` diff --git a/src/test/ui/error-codes/E0029-teach.stderr b/src/test/ui/error-codes/E0029-teach.stderr index 4bb71f68a98b9..26983f874a79f 100644 --- a/src/test/ui/error-codes/E0029-teach.stderr +++ b/src/test/ui/error-codes/E0029-teach.stderr @@ -1,5 +1,5 @@ error[E0029]: only char and numeric types are allowed in range patterns - --> $DIR/E0029-teach.rs:17:9 + --> $DIR/E0029-teach.rs:17:9: in fn main | LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types diff --git a/src/test/ui/error-codes/E0029.stderr b/src/test/ui/error-codes/E0029.stderr index bcdfa38711107..21c3fa2accf94 100644 --- a/src/test/ui/error-codes/E0029.stderr +++ b/src/test/ui/error-codes/E0029.stderr @@ -1,5 +1,5 @@ error[E0029]: only char and numeric types are allowed in range patterns - --> $DIR/E0029.rs:15:9 + --> $DIR/E0029.rs:15:9: in fn main | LL | "hello" ... "world" => {} | ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types diff --git a/src/test/ui/error-codes/E0030-teach.stderr b/src/test/ui/error-codes/E0030-teach.stderr index 8b262d5b296b6..9b451d14d8609 100644 --- a/src/test/ui/error-codes/E0030-teach.stderr +++ b/src/test/ui/error-codes/E0030-teach.stderr @@ -1,5 +1,5 @@ error[E0030]: lower range bound must be less than or equal to upper - --> $DIR/E0030-teach.rs:15:9 + --> $DIR/E0030-teach.rs:15:9: in fn main | LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound diff --git a/src/test/ui/error-codes/E0030.stderr b/src/test/ui/error-codes/E0030.stderr index 0949cfb50b680..503910a9bd5ea 100644 --- a/src/test/ui/error-codes/E0030.stderr +++ b/src/test/ui/error-codes/E0030.stderr @@ -1,5 +1,5 @@ error[E0030]: lower range bound must be less than or equal to upper - --> $DIR/E0030.rs:14:9 + --> $DIR/E0030.rs:14:9: in fn main | LL | 1000 ... 5 => {} | ^^^^ lower bound larger than upper bound diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr index c74485781c123..48554924e9635 100644 --- a/src/test/ui/error-codes/E0033-teach.stderr +++ b/src/test/ui/error-codes/E0033-teach.stderr @@ -5,7 +5,7 @@ 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 + --> $DIR/E0033-teach.rs:18:20: in fn main | LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object @@ -13,7 +13,7 @@ LL | let trait_obj: &SomeTrait = SomeTrait; = note: method `foo` has no receiver error[E0033]: type `&SomeTrait` cannot be dereferenced - --> $DIR/E0033-teach.rs:23:9 + --> $DIR/E0033-teach.rs:23:9: in fn main | LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr index a1e72d6f66955..16f025189685f 100644 --- a/src/test/ui/error-codes/E0033.stderr +++ b/src/test/ui/error-codes/E0033.stderr @@ -5,7 +5,7 @@ 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 + --> $DIR/E0033.rs:16:20: in fn main | LL | let trait_obj: &SomeTrait = SomeTrait; | ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object @@ -13,7 +13,7 @@ LL | let trait_obj: &SomeTrait = SomeTrait; = note: method `foo` has no receiver error[E0033]: type `&SomeTrait` cannot be dereferenced - --> $DIR/E0033.rs:21:9 + --> $DIR/E0033.rs:21:9: in fn main | LL | let &invalid = trait_obj; | ^^^^^^^^ type `&SomeTrait` cannot be dereferenced diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr index cec0f2d2a80b0..3113b264a7c2b 100644 --- a/src/test/ui/error-codes/E0034.stderr +++ b/src/test/ui/error-codes/E0034.stderr @@ -1,5 +1,5 @@ error[E0034]: multiple applicable items in scope - --> $DIR/E0034.rs:30:5 + --> $DIR/E0034.rs:30:5: in fn main | LL | Test::foo() //~ ERROR multiple applicable items in scope | ^^^^^^^^^ multiple `foo` found diff --git a/src/test/ui/error-codes/E0040.stderr b/src/test/ui/error-codes/E0040.stderr index 01636ae98b815..9554dc92bd51a 100644 --- a/src/test/ui/error-codes/E0040.stderr +++ b/src/test/ui/error-codes/E0040.stderr @@ -1,5 +1,5 @@ error[E0040]: explicit use of destructor method - --> $DIR/E0040.rs:23:7 + --> $DIR/E0040.rs:23:7: in fn main | LL | x.drop(); | ^^^^ explicit destructor calls not allowed diff --git a/src/test/ui/error-codes/E0050.stderr b/src/test/ui/error-codes/E0050.stderr index bff3b7b16b911..ca34b8bf7fe10 100644 --- a/src/test/ui/error-codes/E0050.stderr +++ b/src/test/ui/error-codes/E0050.stderr @@ -1,5 +1,5 @@ error[E0050]: method `foo` has 1 parameter but the declaration in trait `Foo::foo` has 2 - --> $DIR/E0050.rs:20:12 + --> $DIR/E0050.rs:20:12: in fn foo::foo | LL | fn foo(&self, x: u8) -> bool; | -- trait requires 2 parameters @@ -8,7 +8,7 @@ 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 + --> $DIR/E0050.rs:21:12: in fn bar::bar | LL | fn bar(&self, x: u8, y: u8, z: u8); | -- trait requires 4 parameters @@ -17,7 +17,7 @@ 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 + --> $DIR/E0050.rs:22:37: in fn less::less | LL | fn less(&self); | ----- trait requires 1 parameter diff --git a/src/test/ui/error-codes/E0054.stderr b/src/test/ui/error-codes/E0054.stderr index d5cf18460fd88..2da5e90d1f6ba 100644 --- a/src/test/ui/error-codes/E0054.stderr +++ b/src/test/ui/error-codes/E0054.stderr @@ -1,5 +1,5 @@ error[E0054]: cannot cast as `bool` - --> $DIR/E0054.rs:13:24 + --> $DIR/E0054.rs:13:24: in fn main | LL | let x_is_nonzero = x as bool; //~ ERROR E0054 | ^^^^^^^^^ unsupported cast diff --git a/src/test/ui/error-codes/E0055.stderr b/src/test/ui/error-codes/E0055.stderr index 9653f4eaeefd0..cd3fb2544581b 100644 --- a/src/test/ui/error-codes/E0055.stderr +++ b/src/test/ui/error-codes/E0055.stderr @@ -1,5 +1,5 @@ error[E0055]: reached the recursion limit while auto-dereferencing Foo - --> $DIR/E0055.rs:21:13 + --> $DIR/E0055.rs:21:13: in fn main | LL | ref_foo.foo(); | ^^^ deref recursion limit reached diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr index fb3e710b8cf9d..078a4af682950 100644 --- a/src/test/ui/error-codes/E0057.stderr +++ b/src/test/ui/error-codes/E0057.stderr @@ -1,11 +1,11 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/E0057.rs:13:13 + --> $DIR/E0057.rs:13:13: in fn main | 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 + --> $DIR/E0057.rs:15:13: in fn main | LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter diff --git a/src/test/ui/error-codes/E0059.stderr b/src/test/ui/error-codes/E0059.stderr index abe8b729c93bf..13ef1935f9344 100644 --- a/src/test/ui/error-codes/E0059.stderr +++ b/src/test/ui/error-codes/E0059.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/E0059.rs:13:41: in fn foo | LL | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 | ^^^^ diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr index c6aac6e41c62a..96b834feaa38c 100644 --- a/src/test/ui/error-codes/E0060.stderr +++ b/src/test/ui/error-codes/E0060.stderr @@ -1,5 +1,5 @@ error[E0060]: this function takes at least 1 parameter but 0 parameters were supplied - --> $DIR/E0060.rs:16:14 + --> $DIR/E0060.rs:16:14: in fn main | LL | fn printf(_: *const u8, ...) -> u32; | ------------------------------------ defined here diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr index d5842a18bc8b7..7a464420607f8 100644 --- a/src/test/ui/error-codes/E0061.stderr +++ b/src/test/ui/error-codes/E0061.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied - --> $DIR/E0061.rs:16:5 + --> $DIR/E0061.rs:16:5: in fn main | LL | fn f(a: u16, b: &str) {} | --------------------- defined here @@ -8,7 +8,7 @@ LL | f(0); | ^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/E0061.rs:20:5 + --> $DIR/E0061.rs:20:5: in fn main | LL | fn f2(a: u16) {} | ------------- defined here diff --git a/src/test/ui/error-codes/E0062.stderr b/src/test/ui/error-codes/E0062.stderr index c5c38c6f5ffed..b40885db2cbaf 100644 --- a/src/test/ui/error-codes/E0062.stderr +++ b/src/test/ui/error-codes/E0062.stderr @@ -1,5 +1,5 @@ error[E0062]: field `x` specified more than once - --> $DIR/E0062.rs:18:9 + --> $DIR/E0062.rs:18:9: in fn main | LL | x: 0, | ---- first use of `x` diff --git a/src/test/ui/error-codes/E0063.stderr b/src/test/ui/error-codes/E0063.stderr index 1ed54b4e7ba63..73e09c15a8849 100644 --- a/src/test/ui/error-codes/E0063.stderr +++ b/src/test/ui/error-codes/E0063.stderr @@ -1,23 +1,23 @@ error[E0063]: missing field `x` in initializer of `SingleFoo` - --> $DIR/E0063.rs:42:13 + --> $DIR/E0063.rs:42:13: in fn main | LL | let w = SingleFoo { }; | ^^^^^^^^^ missing `x` error[E0063]: missing fields `y`, `z` in initializer of `PluralFoo` - --> $DIR/E0063.rs:44:13 + --> $DIR/E0063.rs:44:13: in fn main | 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 + --> $DIR/E0063.rs:46:13: in fn main | 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 + --> $DIR/E0063.rs:48:13: in fn main | LL | let z = TruncatedPluralFoo{x:1}; | ^^^^^^^^^^^^^^^^^^ missing `a`, `b`, `c` and 2 other fields diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index 43e1ca4096cf6..713504b054a33 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -1,5 +1,5 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>` - --> $DIR/E0067.rs:14:5 + --> $DIR/E0067.rs:14:5: in fn main | LL | LinkedList::new() += 1; //~ ERROR E0368 | -----------------^^^^^ @@ -9,7 +9,7 @@ LL | LinkedList::new() += 1; //~ ERROR E0368 = note: an implementation of `std::ops::AddAssign` might be missing for `std::collections::LinkedList<_>` error[E0067]: invalid left-hand side expression - --> $DIR/E0067.rs:14:5 + --> $DIR/E0067.rs:14:5: in fn main | LL | LinkedList::new() += 1; //~ ERROR E0368 | ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side diff --git a/src/test/ui/error-codes/E0069.stderr b/src/test/ui/error-codes/E0069.stderr index 0ba1ed456635f..fc170185efa94 100644 --- a/src/test/ui/error-codes/E0069.stderr +++ b/src/test/ui/error-codes/E0069.stderr @@ -1,5 +1,5 @@ error[E0069]: `return;` in a function whose return type is not `()` - --> $DIR/E0069.rs:12:5 + --> $DIR/E0069.rs:12:5: in fn foo | LL | return; | ^^^^^^ return type is not () diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index 892e6943112f0..d0ef502603248 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -1,17 +1,17 @@ error[E0070]: invalid left-hand side expression - --> $DIR/E0070.rs:16:5 + --> $DIR/E0070.rs:16:5: in fn some_function | LL | SOME_CONST = 14; //~ ERROR E0070 | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression - --> $DIR/E0070.rs:17:5 + --> $DIR/E0070.rs:17:5: in fn some_function | LL | 1 = 3; //~ ERROR E0070 | ^^^^^ left-hand of expression not valid error[E0308]: mismatched types - --> $DIR/E0070.rs:18:25 + --> $DIR/E0070.rs:18:25: in fn some_function | LL | some_other_func() = 4; //~ ERROR E0070 | ^ expected (), found integral variable @@ -20,7 +20,7 @@ LL | some_other_func() = 4; //~ ERROR E0070 found type `{integer}` error[E0070]: invalid left-hand side expression - --> $DIR/E0070.rs:18:5 + --> $DIR/E0070.rs:18:5: in fn some_function | LL | some_other_func() = 4; //~ ERROR E0070 | ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid diff --git a/src/test/ui/error-codes/E0071.stderr b/src/test/ui/error-codes/E0071.stderr index 637338672e0ba..dd934a63d4f97 100644 --- a/src/test/ui/error-codes/E0071.stderr +++ b/src/test/ui/error-codes/E0071.stderr @@ -1,5 +1,5 @@ error[E0071]: expected struct, variant or union type, found enum `Foo` - --> $DIR/E0071.rs:15:13 + --> $DIR/E0071.rs:15:13: in fn main | LL | let u = FooAlias { value: 0 }; | ^^^^^^^^ not a struct diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr index 5e401bd6c79da..33e9ef06ca5e7 100644 --- a/src/test/ui/error-codes/E0080.stderr +++ b/src/test/ui/error-codes/E0080.stderr @@ -1,5 +1,5 @@ error: attempt to shift left with overflow - --> $DIR/E0080.rs:12:9 + --> $DIR/E0080.rs:12:9: in enum Enum | LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ @@ -7,13 +7,13 @@ LL | X = (1 << 500), //~ ERROR E0080 = note: #[deny(exceeding_bitshifts)] on by default error[E0080]: constant evaluation error - --> $DIR/E0080.rs:12:9 + --> $DIR/E0080.rs:12:9: in enum Enum | LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ attempt to shift left with overflow warning: attempt to divide by zero - --> $DIR/E0080.rs:14:9 + --> $DIR/E0080.rs:14:9: in enum Enum | LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ @@ -21,13 +21,13 @@ LL | Y = (1 / 0) //~ ERROR E0080 = note: #[warn(const_err)] on by default warning: constant evaluation error - --> $DIR/E0080.rs:14:9 + --> $DIR/E0080.rs:14:9: in enum Enum | LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempt to divide by zero error[E0080]: constant evaluation error - --> $DIR/E0080.rs:14:9 + --> $DIR/E0080.rs:14:9: in enum Enum | LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempt to divide by zero diff --git a/src/test/ui/error-codes/E0081.stderr b/src/test/ui/error-codes/E0081.stderr index 36150d7c52636..79a2a29943662 100644 --- a/src/test/ui/error-codes/E0081.stderr +++ b/src/test/ui/error-codes/E0081.stderr @@ -1,5 +1,5 @@ error[E0081]: discriminant value `3` already exists - --> $DIR/E0081.rs:13:9 + --> $DIR/E0081.rs:13:9: in enum Enum | LL | P = 3, | - first use of `3` diff --git a/src/test/ui/error-codes/E0087.stderr b/src/test/ui/error-codes/E0087.stderr index cd1e99e7b411a..e526c9762a3b6 100644 --- a/src/test/ui/error-codes/E0087.stderr +++ b/src/test/ui/error-codes/E0087.stderr @@ -1,11 +1,11 @@ error[E0087]: too many type parameters provided: expected at most 0 type parameters, found 1 type parameter - --> $DIR/E0087.rs:15:11 + --> $DIR/E0087.rs:15:11: in fn main | 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 + --> $DIR/E0087.rs:17:16: in fn main | LL | bar::(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] | ^^^ expected 1 type parameter diff --git a/src/test/ui/error-codes/E0088.stderr b/src/test/ui/error-codes/E0088.stderr index 4bf2760994eb7..cccafb4515bc0 100644 --- a/src/test/ui/error-codes/E0088.stderr +++ b/src/test/ui/error-codes/E0088.stderr @@ -1,11 +1,11 @@ error[E0088]: too many lifetime parameters provided: expected at most 0 lifetime parameters, found 1 lifetime parameter - --> $DIR/E0088.rs:15:9 + --> $DIR/E0088.rs:15:9: in fn main | 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 + --> $DIR/E0088.rs:16:18: in fn main | LL | g::<'static, 'static>(); //~ ERROR E0088 | ^^^^^^^ expected 1 lifetime parameter diff --git a/src/test/ui/error-codes/E0089.stderr b/src/test/ui/error-codes/E0089.stderr index 0b95033fb3606..9d96849f8ddb8 100644 --- a/src/test/ui/error-codes/E0089.stderr +++ b/src/test/ui/error-codes/E0089.stderr @@ -1,5 +1,5 @@ error[E0089]: too few type parameters provided: expected 2 type parameters, found 1 type parameter - --> $DIR/E0089.rs:14:5 + --> $DIR/E0089.rs:14:5: in fn main | LL | foo::(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] | ^^^^^^^^^^ expected 2 type parameters diff --git a/src/test/ui/error-codes/E0090.stderr b/src/test/ui/error-codes/E0090.stderr index f119d5fa46719..4227025cbe01b 100644 --- a/src/test/ui/error-codes/E0090.stderr +++ b/src/test/ui/error-codes/E0090.stderr @@ -1,5 +1,5 @@ error[E0090]: too few lifetime parameters provided: expected 2 lifetime parameters, found 1 lifetime parameter - --> $DIR/E0090.rs:14:5 + --> $DIR/E0090.rs:14:5: in fn main | LL | foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] | ^^^^^^^^^^^^^^ expected 2 lifetime parameters diff --git a/src/test/ui/error-codes/E0106.stderr b/src/test/ui/error-codes/E0106.stderr index 9862dca3fdefb..203734d436dc7 100644 --- a/src/test/ui/error-codes/E0106.stderr +++ b/src/test/ui/error-codes/E0106.stderr @@ -1,11 +1,11 @@ error[E0106]: missing lifetime specifier - --> $DIR/E0106.rs:12:8 + --> $DIR/E0106.rs:12:8: in struct Foo | LL | x: &bool, | ^ expected lifetime parameter error[E0106]: missing lifetime specifier - --> $DIR/E0106.rs:17:7 + --> $DIR/E0106.rs:17:7: in enum Bar | LL | B(&bool), | ^ expected lifetime parameter @@ -17,13 +17,13 @@ LL | type MyStr = &str; | ^ expected lifetime parameter error[E0106]: missing lifetime specifier - --> $DIR/E0106.rs:27:10 + --> $DIR/E0106.rs:27:10: in struct Quux | LL | baz: Baz, | ^^^ expected lifetime parameter error[E0106]: missing lifetime specifiers - --> $DIR/E0106.rs:30:11 + --> $DIR/E0106.rs:30:11: in struct Quux | LL | buzz: Buzz, | ^^^^ expected 2 lifetime parameters diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr index 76bb2667643e6..0422479590543 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -1,17 +1,17 @@ error[E0107]: wrong number of lifetime parameters: expected 2, found 1 - --> $DIR/E0107.rs:21:11 + --> $DIR/E0107.rs:21:11: in struct Baz | LL | buzz: Buzz<'a>, | ^^^^^^^^ expected 2 lifetime parameters error[E0107]: wrong number of lifetime parameters: expected 0, found 1 - --> $DIR/E0107.rs:24:10 + --> $DIR/E0107.rs:24:10: in struct Baz | LL | bar: Bar<'a>, | ^^^^^^^ unexpected lifetime parameter error[E0107]: wrong number of lifetime parameters: expected 1, found 3 - --> $DIR/E0107.rs:27:11 + --> $DIR/E0107.rs:27:11: in struct Baz | LL | foo2: Foo<'a, 'b, 'c>, | ^^^^^^^^^^^^^^^ 2 unexpected lifetime parameters diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index 019e637aa8c55..a7145521adcca 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -1,5 +1,5 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/E0121.rs:11:13 + --> $DIR/E0121.rs:11:13: in fn foo | LL | fn foo() -> _ { 5 } //~ ERROR E0121 | ^ not allowed in type signatures diff --git a/src/test/ui/error-codes/E0124.stderr b/src/test/ui/error-codes/E0124.stderr index c95162c9d2142..8f2bea44b96c4 100644 --- a/src/test/ui/error-codes/E0124.stderr +++ b/src/test/ui/error-codes/E0124.stderr @@ -1,5 +1,5 @@ error[E0124]: field `field1` is already declared - --> $DIR/E0124.rs:13:5 + --> $DIR/E0124.rs:13:5: in struct Foo | LL | field1: i32, | ----------- `field1` first declared here diff --git a/src/test/ui/error-codes/E0131.stderr b/src/test/ui/error-codes/E0131.stderr index 3774e21c21433..b02b91b51deb1 100644 --- a/src/test/ui/error-codes/E0131.stderr +++ b/src/test/ui/error-codes/E0131.stderr @@ -1,5 +1,5 @@ error[E0131]: main function is not allowed to have type parameters - --> $DIR/E0131.rs:11:8 + --> $DIR/E0131.rs:11:8: in fn main | LL | fn main() { | ^^^ main cannot have type parameters diff --git a/src/test/ui/error-codes/E0132.stderr b/src/test/ui/error-codes/E0132.stderr index 80d1c29d50f99..c42f4060063ae 100644 --- a/src/test/ui/error-codes/E0132.stderr +++ b/src/test/ui/error-codes/E0132.stderr @@ -1,5 +1,5 @@ error[E0132]: start function is not allowed to have type parameters - --> $DIR/E0132.rs:14:5 + --> $DIR/E0132.rs:14:5: in fn f | LL | fn f< T >() {} //~ ERROR E0132 | ^^^^^ start function cannot have type parameters diff --git a/src/test/ui/error-codes/E0133.stderr b/src/test/ui/error-codes/E0133.stderr index dc57a6274445f..2dc55cf4c25e7 100644 --- a/src/test/ui/error-codes/E0133.stderr +++ b/src/test/ui/error-codes/E0133.stderr @@ -1,5 +1,5 @@ error[E0133]: call to unsafe function requires unsafe function or block - --> $DIR/E0133.rs:14:5 + --> $DIR/E0133.rs:14:5: in fn main | LL | f(); | ^^^ call to unsafe function diff --git a/src/test/ui/error-codes/E0161.stderr b/src/test/ui/error-codes/E0161.stderr index 0135e495c16b5..b36530969a4b7 100644 --- a/src/test/ui/error-codes/E0161.stderr +++ b/src/test/ui/error-codes/E0161.stderr @@ -1,11 +1,11 @@ error[E0161]: cannot move a value of type str: the size of str cannot be statically determined - --> $DIR/E0161.rs:14:28 + --> $DIR/E0161.rs:14:28: in fn main | LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/E0161.rs:14:28 + --> $DIR/E0161.rs:14:28: in fn main | LL | let _x: Box = box *"hello"; //~ ERROR E0161 | ^^^^^^^^ cannot move out of borrowed content diff --git a/src/test/ui/error-codes/E0162.stderr b/src/test/ui/error-codes/E0162.stderr index 91f402dad59b5..73d3b8eca7a76 100644 --- a/src/test/ui/error-codes/E0162.stderr +++ b/src/test/ui/error-codes/E0162.stderr @@ -1,5 +1,5 @@ error[E0162]: irrefutable if-let pattern - --> $DIR/E0162.rs:15:12 + --> $DIR/E0162.rs:15:12: in fn main | LL | if let Irrefutable(x) = irr { //~ ERROR E0162 | ^^^^^^^^^^^^^^ irrefutable pattern diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index 6eabace9b141d..c4c8848df2f96 100644 --- a/src/test/ui/error-codes/E0164.stderr +++ b/src/test/ui/error-codes/E0164.stderr @@ -1,5 +1,5 @@ error[E0164]: expected tuple struct/variant, found associated constant `::B` - --> $DIR/E0164.rs:20:9 + --> $DIR/E0164.rs:20:9: in fn bar | LL | Foo::B(i) => i, //~ ERROR E0164 | ^^^^^^^^^ not a tuple variant or struct diff --git a/src/test/ui/error-codes/E0165.stderr b/src/test/ui/error-codes/E0165.stderr index 66be95e38d2aa..00a765dfd687f 100644 --- a/src/test/ui/error-codes/E0165.stderr +++ b/src/test/ui/error-codes/E0165.stderr @@ -1,5 +1,5 @@ error[E0165]: irrefutable while-let pattern - --> $DIR/E0165.rs:15:15 + --> $DIR/E0165.rs:15:15: in fn main | LL | while let Irrefutable(x) = irr { //~ ERROR E0165 | ^^^^^^^^^^^^^^ irrefutable pattern diff --git a/src/test/ui/error-codes/E0194.stderr b/src/test/ui/error-codes/E0194.stderr index 6869f3c96f779..9d25715baf467 100644 --- a/src/test/ui/error-codes/E0194.stderr +++ b/src/test/ui/error-codes/E0194.stderr @@ -1,5 +1,5 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name - --> $DIR/E0194.rs:13:26 + --> $DIR/E0194.rs:13:26: in trait Foo::do_something_else | LL | trait Foo { | - first `T` declared here diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr index fc9232e85ab46..1bdd05b3b36a5 100644 --- a/src/test/ui/error-codes/E0221.stderr +++ b/src/test/ui/error-codes/E0221.stderr @@ -1,5 +1,5 @@ error[E0221]: ambiguous associated type `A` in bounds of `Self` - --> $DIR/E0221.rs:21:16 + --> $DIR/E0221.rs:21:16: in fn Bar::do_something::do_something | LL | type A: T1; | ----------- ambiguous `A` from `Foo` @@ -11,7 +11,7 @@ LL | let _: Self::A; | ^^^^^^^ ambiguous associated type `A` error[E0221]: ambiguous associated type `Err` in bounds of `Self` - --> $DIR/E0221.rs:31:16 + --> $DIR/E0221.rs:31:16: in fn My::test::test | LL | type Err: T3; | ------------- ambiguous `Err` from `My` @@ -20,7 +20,7 @@ LL | let _: Self::Err; | ^^^^^^^^^ ambiguous associated type `Err` | note: associated type `Self` could derive from `std::str::FromStr` - --> $DIR/E0221.rs:31:16 + --> $DIR/E0221.rs:31:16: in fn My::test::test | LL | let _: Self::Err; | ^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0223.stderr b/src/test/ui/error-codes/E0223.stderr index f65e744c62594..3fea9fe95fe81 100644 --- a/src/test/ui/error-codes/E0223.stderr +++ b/src/test/ui/error-codes/E0223.stderr @@ -1,5 +1,5 @@ error[E0223]: ambiguous associated type - --> $DIR/E0223.rs:14:14 + --> $DIR/E0223.rs:14:14: in fn main | LL | let foo: MyTrait::X; | ^^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/error-codes/E0225.stderr b/src/test/ui/error-codes/E0225.stderr index 6b9489c74c8af..7724285dd4440 100644 --- a/src/test/ui/error-codes/E0225.stderr +++ b/src/test/ui/error-codes/E0225.stderr @@ -1,5 +1,5 @@ error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/E0225.rs:12:32 + --> $DIR/E0225.rs:12:32: in fn main | LL | let _: Box; | ^^^^^^^^^^^^^^ non-auto additional trait diff --git a/src/test/ui/error-codes/E0229.stderr b/src/test/ui/error-codes/E0229.stderr index 218faf2dfdd63..67466c6eb1b1e 100644 --- a/src/test/ui/error-codes/E0229.stderr +++ b/src/test/ui/error-codes/E0229.stderr @@ -1,5 +1,5 @@ error[E0229]: associated type bindings are not allowed here - --> $DIR/E0229.rs:23:25 + --> $DIR/E0229.rs:23:25: in fn baz | LL | fn baz(x: &>::A) {} | ^^^^^ associated type not allowed here diff --git a/src/test/ui/error-codes/E0243.stderr b/src/test/ui/error-codes/E0243.stderr index 0477d1b844a10..6cb67829b1879 100644 --- a/src/test/ui/error-codes/E0243.stderr +++ b/src/test/ui/error-codes/E0243.stderr @@ -1,5 +1,5 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 - --> $DIR/E0243.rs:12:17 + --> $DIR/E0243.rs:12:17: in struct Bar | LL | struct Bar { x: Foo } | ^^^ expected 1 type argument diff --git a/src/test/ui/error-codes/E0244.stderr b/src/test/ui/error-codes/E0244.stderr index e323970396255..8eda7f8ad71b8 100644 --- a/src/test/ui/error-codes/E0244.stderr +++ b/src/test/ui/error-codes/E0244.stderr @@ -1,5 +1,5 @@ error[E0244]: wrong number of type arguments: expected 0, found 2 - --> $DIR/E0244.rs:12:23 + --> $DIR/E0244.rs:12:23: in struct Bar | LL | struct Bar { x: Foo } | ^^^^^^^^^ expected no type arguments diff --git a/src/test/ui/error-codes/E0261.stderr b/src/test/ui/error-codes/E0261.stderr index e9140ec2c7486..9dd8869f69517 100644 --- a/src/test/ui/error-codes/E0261.stderr +++ b/src/test/ui/error-codes/E0261.stderr @@ -1,11 +1,11 @@ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/E0261.rs:11:12 + --> $DIR/E0261.rs:11:12: in fn foo | LL | fn foo(x: &'a str) { } //~ ERROR E0261 | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/E0261.rs:15:9 + --> $DIR/E0261.rs:15:9: in struct Foo | LL | x: &'a str, //~ ERROR E0261 | ^^ undeclared lifetime diff --git a/src/test/ui/error-codes/E0262.stderr b/src/test/ui/error-codes/E0262.stderr index 1e5b5db692d8f..5554b3036bb43 100644 --- a/src/test/ui/error-codes/E0262.stderr +++ b/src/test/ui/error-codes/E0262.stderr @@ -1,5 +1,5 @@ error[E0262]: invalid lifetime parameter name: `'static` - --> $DIR/E0262.rs:11:8 + --> $DIR/E0262.rs:11:8: in fn foo | LL | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 | ^^^^^^^ 'static is a reserved lifetime name diff --git a/src/test/ui/error-codes/E0263.stderr b/src/test/ui/error-codes/E0263.stderr index 1b52deea88d4b..ccbf143f7c009 100644 --- a/src/test/ui/error-codes/E0263.stderr +++ b/src/test/ui/error-codes/E0263.stderr @@ -1,5 +1,5 @@ error[E0263]: lifetime name `'a` declared twice in the same scope - --> $DIR/E0263.rs:11:16 + --> $DIR/E0263.rs:11:16: in fn foo | LL | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { | -- ^^ declared twice diff --git a/src/test/ui/error-codes/E0267.stderr b/src/test/ui/error-codes/E0267.stderr index b72109f0644ee..ce31e94c3316b 100644 --- a/src/test/ui/error-codes/E0267.stderr +++ b/src/test/ui/error-codes/E0267.stderr @@ -1,5 +1,5 @@ error[E0267]: `break` inside of a closure - --> $DIR/E0267.rs:12:18 + --> $DIR/E0267.rs:12:18: in fn main | LL | let w = || { break; }; //~ ERROR E0267 | ^^^^^ cannot break inside of a closure diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr index e1b5b52085bc2..914a9369821ff 100644 --- a/src/test/ui/error-codes/E0268.stderr +++ b/src/test/ui/error-codes/E0268.stderr @@ -1,5 +1,5 @@ error[E0268]: `break` outside of loop - --> $DIR/E0268.rs:12:5 + --> $DIR/E0268.rs:12:5: in fn main | LL | break; //~ ERROR E0268 | ^^^^^ cannot break outside of a loop diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index 04c7d244376e5..b07bd427f676c 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` - --> $DIR/E0271.rs:20:5 + --> $DIR/E0271.rs:20:5: in fn main | LL | foo(3_i8); //~ ERROR E0271 | ^^^ expected reference, found u32 diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr index bbe04cfc6e16d..9b50c77e3e67d 100644 --- a/src/test/ui/error-codes/E0277-2.stderr +++ b/src/test/ui/error-codes/E0277-2.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `*const u8: std::marker::Send` is not satisfied in `Foo` - --> $DIR/E0277-2.rs:26:5 + --> $DIR/E0277-2.rs:26:5: in fn main | LL | is_send::(); | ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr index 477128d7d9f08..2808af46f2ed0 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path` - --> $DIR/E0277.rs:23:6 + --> $DIR/E0277.rs:23:6: in fn f | LL | fn f(p: Path) { } | ^ `[u8]` does not have a constant size known at compile-time @@ -9,7 +9,7 @@ LL | fn f(p: Path) { } = note: all local variables must have a statically known size error[E0277]: the trait bound `i32: Foo` is not satisfied - --> $DIR/E0277.rs:27:5 + --> $DIR/E0277.rs:27:5: in fn main | LL | some_func(5i32); | ^^^^^^^^^ the trait `Foo` is not implemented for `i32` diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr index f1319f4139585..8e05358adf90b 100644 --- a/src/test/ui/error-codes/E0282.stderr +++ b/src/test/ui/error-codes/E0282.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/E0282.rs:12:9 + --> $DIR/E0282.rs:12:9: in fn main | LL | let x = "hello".chars().rev().collect(); //~ ERROR E0282 | ^ diff --git a/src/test/ui/error-codes/E0283.stderr b/src/test/ui/error-codes/E0283.stderr index 3f63881b61e4d..18c0ac5fcb8e6 100644 --- a/src/test/ui/error-codes/E0283.stderr +++ b/src/test/ui/error-codes/E0283.stderr @@ -1,11 +1,11 @@ error[E0283]: type annotations required: cannot resolve `_: Generator` - --> $DIR/E0283.rs:28:21 + --> $DIR/E0283.rs:28:21: in fn main | LL | let cont: u32 = Generator::create(); //~ ERROR E0283 | ^^^^^^^^^^^^^^^^^ | note: required by `Generator::create` - --> $DIR/E0283.rs:12:5 + --> $DIR/E0283.rs:12:5: in trait Generator | LL | fn create() -> u32; | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr index d510fa99caecd..30d055f69a4d5 100644 --- a/src/test/ui/error-codes/E0297.stderr +++ b/src/test/ui/error-codes/E0297.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in `for` loop binding: `None` not covered - --> $DIR/E0297.rs:14:9 + --> $DIR/E0297.rs:14:9: in fn main | LL | for Some(x) in xs {} | ^^^^^^^ pattern `None` not covered diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index 7d5100c516e54..124371d8ee004 100644 --- a/src/test/ui/error-codes/E0301.stderr +++ b/src/test/ui/error-codes/E0301.stderr @@ -1,5 +1,5 @@ error[E0301]: cannot mutably borrow in a pattern guard - --> $DIR/E0301.rs:14:19 + --> $DIR/E0301.rs:14:19: in fn main | LL | option if option.take().is_none() => {}, //~ ERROR E0301 | ^^^^^^ borrowed mutably in pattern guard diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr index f55dd523f130f..5766cb3ec7178 100644 --- a/src/test/ui/error-codes/E0302.stderr +++ b/src/test/ui/error-codes/E0302.stderr @@ -1,5 +1,5 @@ error[E0302]: cannot assign in a pattern guard - --> $DIR/E0302.rs:14:21 + --> $DIR/E0302.rs:14:21: in fn main | LL | option if { option = None; false } => { }, //~ ERROR E0302 | ^^^^^^^^^^^^^ assignment in pattern guard diff --git a/src/test/ui/error-codes/E0303.stderr b/src/test/ui/error-codes/E0303.stderr index b9da037df0e67..23a92994e9baa 100644 --- a/src/test/ui/error-codes/E0303.stderr +++ b/src/test/ui/error-codes/E0303.stderr @@ -1,5 +1,5 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/E0303.rs:13:34 + --> $DIR/E0303.rs:13:34: in fn main | LL | ref op_string_ref @ Some(s) => {}, | -------------------------^- @@ -8,7 +8,7 @@ LL | ref op_string_ref @ Some(s) => {}, | both by-ref and by-move used error[E0303]: pattern bindings are not allowed after an `@` - --> $DIR/E0303.rs:13:34 + --> $DIR/E0303.rs:13:34: in fn main | LL | ref op_string_ref @ Some(s) => {}, | ^ not allowed after `@` diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr index 31875349bace0..3f42b1db2c596 100644 --- a/src/test/ui/error-codes/E0308-4.stderr +++ b/src/test/ui/error-codes/E0308-4.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/E0308-4.rs:14:9 + --> $DIR/E0308-4.rs:14:9: in fn main | LL | 0u8...3i8 => (), //~ ERROR E0308 | ^^^^^^^^^ expected u8, found i8 diff --git a/src/test/ui/error-codes/E0370.stderr b/src/test/ui/error-codes/E0370.stderr index f85d2cf5d0b0c..3ad1e794894d1 100644 --- a/src/test/ui/error-codes/E0370.stderr +++ b/src/test/ui/error-codes/E0370.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/E0370.rs:17:5 + --> $DIR/E0370.rs:17:5: in enum Foo | LL | Y, //~ ERROR E0370 | ^ overflowed on value after 9223372036854775807 diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index 29e1ea9dd169c..8842db0136688 100644 --- a/src/test/ui/error-codes/E0389.stderr +++ b/src/test/ui/error-codes/E0389.stderr @@ -1,5 +1,5 @@ error[E0389]: cannot assign to data in a `&` reference - --> $DIR/E0389.rs:18:5 + --> $DIR/E0389.rs:18:5: in fn main | LL | fancy_ref.num = 6; //~ ERROR E0389 | ^^^^^^^^^^^^^^^^^ assignment into an immutable reference diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index cfa9c49b2eeb4..ffc8614df80a2 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -1,5 +1,5 @@ error[E0392]: parameter `T` is never used - --> $DIR/E0392.rs:11:10 + --> $DIR/E0392.rs:11:10: in enum Foo | LL | enum Foo { Bar } //~ ERROR E0392 | ^ unused type parameter diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr index c0e282308c154..d89fc0097ac18 100644 --- a/src/test/ui/error-codes/E0393.stderr +++ b/src/test/ui/error-codes/E0393.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `T` must be explicitly specified - --> $DIR/E0393.rs:13:43 + --> $DIR/E0393.rs:13:43: in fn together_we_will_rule_the_galaxy | LL | fn together_we_will_rule_the_galaxy(son: &A) {} | ^ missing reference to `T` diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr index bb5ae494d6c8a..b185e9ac64aa2 100644 --- a/src/test/ui/error-codes/E0446.stderr +++ b/src/test/ui/error-codes/E0446.stderr @@ -1,5 +1,5 @@ error[E0446]: private type `Foo::Bar` in public interface - --> $DIR/E0446.rs:14:5 + --> $DIR/E0446.rs:14:5: in mod Foo | LL | / pub fn bar() -> Bar { //~ ERROR E0446 LL | | Bar(0) diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index 4d54e17d5070d..63de24ccedbe4 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -1,11 +1,11 @@ error[E0451]: field `b` of struct `Bar::Foo` is private - --> $DIR/E0451.rs:24:23 + --> $DIR/E0451.rs:24:23: in fn pat_match | 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 + --> $DIR/E0451.rs:28:29: in fn main | LL | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 | ^^^^ field `b` is private diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr index 44d8151303f72..8dad14a6e49df 100644 --- a/src/test/ui/error-codes/E0478.stderr +++ b/src/test/ui/error-codes/E0478.stderr @@ -1,5 +1,5 @@ error[E0478]: lifetime bound not satisfied - --> $DIR/E0478.rs:14:5 + --> $DIR/E0478.rs:14:5: in struct Prince | LL | child: Box + 'SnowWhite>, //~ ERROR E0478 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0496.stderr b/src/test/ui/error-codes/E0496.stderr index 198daa512bdaa..c0858d44420a0 100644 --- a/src/test/ui/error-codes/E0496.stderr +++ b/src/test/ui/error-codes/E0496.stderr @@ -1,5 +1,5 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope - --> $DIR/E0496.rs:16:10 + --> $DIR/E0496.rs:16:10: in fn f::f | LL | impl<'a> Foo<'a> { | -- first declared here diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index dcb477ab1cb85..a1c834d54add8 100644 --- a/src/test/ui/error-codes/E0499.stderr +++ b/src/test/ui/error-codes/E0499.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time - --> $DIR/E0499.rs:14:22 + --> $DIR/E0499.rs:14:22: in fn main | LL | let mut x = &mut i; | - first mutable borrow occurs here diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index d377fa883dd83..9724582eb582f 100644 --- a/src/test/ui/error-codes/E0502.stderr +++ b/src/test/ui/error-codes/E0502.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immutable - --> $DIR/E0502.rs:14:9 + --> $DIR/E0502.rs:14:9: in fn foo | LL | let ref y = a; | ----- immutable borrow occurs here diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 0342ebc419361..3b87f9b5bba2e 100644 --- a/src/test/ui/error-codes/E0503.stderr +++ b/src/test/ui/error-codes/E0503.stderr @@ -1,5 +1,5 @@ error[E0503]: cannot use `value` because it was mutably borrowed - --> $DIR/E0503.rs:14:16 + --> $DIR/E0503.rs:14:16: in fn main | LL | let _borrow = &mut value; | ----- borrow of `value` occurs here diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index cd1d3ec5ba471..8a9cac79e9d58 100644 --- a/src/test/ui/error-codes/E0504.stderr +++ b/src/test/ui/error-codes/E0504.stderr @@ -1,5 +1,5 @@ error[E0504]: cannot move `fancy_num` into closure because it is borrowed - --> $DIR/E0504.rs:20:40 + --> $DIR/E0504.rs:20:40: in fn main | LL | let fancy_ref = &fancy_num; | --------- borrow of `fancy_num` occurs here diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index 64558ba8c7c08..a8853c66c5d7c 100644 --- a/src/test/ui/error-codes/E0505.stderr +++ b/src/test/ui/error-codes/E0505.stderr @@ -1,5 +1,5 @@ error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/E0505.rs:19:13 + --> $DIR/E0505.rs:19:13: in fn main | LL | let _ref_to_val: &Value = &x; | - borrow of `x` occurs here diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr index 3d9d8a5145d0b..5e6b2bc6fc75c 100644 --- a/src/test/ui/error-codes/E0507.stderr +++ b/src/test/ui/error-codes/E0507.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/E0507.rs:22:5 + --> $DIR/E0507.rs:22:5: in fn main | LL | x.borrow().nothing_is_true(); //~ ERROR E0507 | ^^^^^^^^^^ cannot move out of borrowed content diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index 3952081a2655b..62db46eaf0bda 100644 --- a/src/test/ui/error-codes/E0509.stderr +++ b/src/test/ui/error-codes/E0509.stderr @@ -1,5 +1,5 @@ error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait - --> $DIR/E0509.rs:26:23 + --> $DIR/E0509.rs:26:23: in fn main | LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509 | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index 1b8d125cf1a09..873900ab50ecb 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -1,5 +1,5 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/E0511.rs:18:14 + --> $DIR/E0511.rs:18:14: in fn main | LL | unsafe { simd_add(0, 1); } //~ ERROR E0511 | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0512.stderr b/src/test/ui/error-codes/E0512.stderr index c91f6ad8f0afd..9f6b0b6a62123 100644 --- a/src/test/ui/error-codes/E0512.stderr +++ b/src/test/ui/error-codes/E0512.stderr @@ -1,5 +1,5 @@ error[E0512]: transmute called with types of different sizes - --> $DIR/E0512.rs:14:23 + --> $DIR/E0512.rs:14:23: in fn main | LL | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0516.stderr b/src/test/ui/error-codes/E0516.stderr index d298e288859dd..e5eca22692c7c 100644 --- a/src/test/ui/error-codes/E0516.stderr +++ b/src/test/ui/error-codes/E0516.stderr @@ -1,5 +1,5 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented - --> $DIR/E0516.rs:12:12 + --> $DIR/E0516.rs:12:12: in fn main | LL | let x: typeof(92) = 92; //~ ERROR E0516 | ^^^^^^^^^^ reserved keyword diff --git a/src/test/ui/error-codes/E0527.stderr b/src/test/ui/error-codes/E0527.stderr index 1e764c185877b..6df6e4875c551 100644 --- a/src/test/ui/error-codes/E0527.stderr +++ b/src/test/ui/error-codes/E0527.stderr @@ -1,5 +1,5 @@ error[E0527]: pattern requires 2 elements but array has 4 - --> $DIR/E0527.rs:14:10 + --> $DIR/E0527.rs:14:10: in fn main | LL | &[a, b] => { | ^^^^^^ expected 4 elements diff --git a/src/test/ui/error-codes/E0528.stderr b/src/test/ui/error-codes/E0528.stderr index ca9f8f4545759..60f600f42abdf 100644 --- a/src/test/ui/error-codes/E0528.stderr +++ b/src/test/ui/error-codes/E0528.stderr @@ -1,5 +1,5 @@ error[E0528]: pattern requires at least 3 elements but array has 2 - --> $DIR/E0528.rs:16:10 + --> $DIR/E0528.rs:16:10: in fn main | LL | &[a, b, c, rest..] => { | ^^^^^^^^^^^^^^^^^ pattern cannot match array of 2 elements diff --git a/src/test/ui/error-codes/E0529.stderr b/src/test/ui/error-codes/E0529.stderr index b2e7ae23fb0eb..0b7dffc0e7562 100644 --- a/src/test/ui/error-codes/E0529.stderr +++ b/src/test/ui/error-codes/E0529.stderr @@ -1,5 +1,5 @@ error[E0529]: expected an array or slice, found `f32` - --> $DIR/E0529.rs:14:9 + --> $DIR/E0529.rs:14:9: in fn main | LL | [a, b] => { | ^^^^^^ pattern cannot match with input type `f32` diff --git a/src/test/ui/error-codes/E0559.stderr b/src/test/ui/error-codes/E0559.stderr index cb9059ee53803..eec02098879bf 100644 --- a/src/test/ui/error-codes/E0559.stderr +++ b/src/test/ui/error-codes/E0559.stderr @@ -1,5 +1,5 @@ error[E0559]: variant `Field::Fool` has no field named `joke` - --> $DIR/E0559.rs:16:27 + --> $DIR/E0559.rs:16:27: in fn main | LL | let s = Field::Fool { joke: 0 }; | ^^^^ `Field::Fool` does not have this field diff --git a/src/test/ui/error-codes/E0560.stderr b/src/test/ui/error-codes/E0560.stderr index 66fb04111dbdf..a7990fb3e29af 100644 --- a/src/test/ui/error-codes/E0560.stderr +++ b/src/test/ui/error-codes/E0560.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `Simba` has no field named `father` - --> $DIR/E0560.rs:16:32 + --> $DIR/E0560.rs:16:32: in fn main | LL | let s = Simba { mother: 1, father: 0 }; | ^^^^^^ `Simba` does not have this field diff --git a/src/test/ui/error-codes/E0582.stderr b/src/test/ui/error-codes/E0582.stderr index c92e0b9f13708..b029846fe413b 100644 --- a/src/test/ui/error-codes/E0582.stderr +++ b/src/test/ui/error-codes/E0582.stderr @@ -1,11 +1,11 @@ error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types - --> $DIR/E0582.rs:38:30 + --> $DIR/E0582.rs:38:30: in fn bar | 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 + --> $DIR/E0582.rs:46:31: in fn baz | LL | where F: for<'a> Iterator | ^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index 5897cc13c94eb..067414f8cf63a 100644 --- a/src/test/ui/error-codes/E0597.stderr +++ b/src/test/ui/error-codes/E0597.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/E0597.rs:18:17 + --> $DIR/E0597.rs:18:17: in fn main | LL | x.x = Some(&y); | ^ borrowed value does not live long enough diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index d118939d17a15..6cbf86e2b3490 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -1,5 +1,5 @@ error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope - --> $DIR/E0599.rs:14:15 + --> $DIR/E0599.rs:14:15: in fn main | LL | struct Foo; | ----------- associated item `NotEvenReal` not found for this diff --git a/src/test/ui/error-codes/E0600.stderr b/src/test/ui/error-codes/E0600.stderr index c29ec4fe6ae76..cef9c641977ec 100644 --- a/src/test/ui/error-codes/E0600.stderr +++ b/src/test/ui/error-codes/E0600.stderr @@ -1,5 +1,5 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` - --> $DIR/E0600.rs:12:5 + --> $DIR/E0600.rs:12:5: in fn main | LL | !"a"; //~ ERROR E0600 | ^^^^ cannot apply unary operator `!` diff --git a/src/test/ui/error-codes/E0604.stderr b/src/test/ui/error-codes/E0604.stderr index 6aa176d1313bd..254580daf7a03 100644 --- a/src/test/ui/error-codes/E0604.stderr +++ b/src/test/ui/error-codes/E0604.stderr @@ -1,5 +1,5 @@ error[E0604]: only `u8` can be cast as `char`, not `u32` - --> $DIR/E0604.rs:12:5 + --> $DIR/E0604.rs:12:5: in fn main | LL | 1u32 as char; //~ ERROR E0604 | ^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr index e66e1c12d8f74..8c320e2aa841d 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -1,5 +1,5 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` - --> $DIR/E0605.rs:13:5 + --> $DIR/E0605.rs:13:5: in fn main | LL | x as Vec; //~ ERROR E0605 | ^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | x as Vec; //~ ERROR E0605 = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait error[E0605]: non-primitive cast: `*const u8` as `&u8` - --> $DIR/E0605.rs:16:5 + --> $DIR/E0605.rs:16:5: in fn main | LL | v as &u8; //~ ERROR E0605 | ^^^^^^^^ diff --git a/src/test/ui/error-codes/E0606.stderr b/src/test/ui/error-codes/E0606.stderr index bd5bc908f7294..737fc5730ef32 100644 --- a/src/test/ui/error-codes/E0606.stderr +++ b/src/test/ui/error-codes/E0606.stderr @@ -1,11 +1,11 @@ error[E0606]: casting `&u8` as `u8` is invalid - --> $DIR/E0606.rs:12:5 + --> $DIR/E0606.rs:12:5: in fn main | LL | &0u8 as u8; //~ ERROR E0606 | ^^^^^^^^^^ cannot cast `&u8` as `u8` | help: did you mean `*&0u8`? - --> $DIR/E0606.rs:12:5 + --> $DIR/E0606.rs:12:5: in fn main | LL | &0u8 as u8; //~ ERROR E0606 | ^^^^ diff --git a/src/test/ui/error-codes/E0607.stderr b/src/test/ui/error-codes/E0607.stderr index d109908bc746f..1b9874036c7ec 100644 --- a/src/test/ui/error-codes/E0607.stderr +++ b/src/test/ui/error-codes/E0607.stderr @@ -1,5 +1,5 @@ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` - --> $DIR/E0607.rs:13:5 + --> $DIR/E0607.rs:13:5: in fn main | LL | v as *const [u8]; //~ ERROR E0607 | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0608.stderr b/src/test/ui/error-codes/E0608.stderr index d5955d1b07077..0c4de2f22683b 100644 --- a/src/test/ui/error-codes/E0608.stderr +++ b/src/test/ui/error-codes/E0608.stderr @@ -1,5 +1,5 @@ error[E0608]: cannot index into a value of type `u8` - --> $DIR/E0608.rs:12:5 + --> $DIR/E0608.rs:12:5: in fn main | LL | 0u8[2]; //~ ERROR E0608 | ^^^^^^ diff --git a/src/test/ui/error-codes/E0609.stderr b/src/test/ui/error-codes/E0609.stderr index dd793b29febef..16607b0d44233 100644 --- a/src/test/ui/error-codes/E0609.stderr +++ b/src/test/ui/error-codes/E0609.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `foo` on type `Foo` - --> $DIR/E0609.rs:18:15 + --> $DIR/E0609.rs:18:15: in fn main | LL | let _ = x.foo; //~ ERROR E0609 | ^^^ unknown field @@ -7,7 +7,7 @@ LL | let _ = x.foo; //~ ERROR E0609 = note: available fields are: `x` error[E0609]: no field `1` on type `Bar` - --> $DIR/E0609.rs:21:7 + --> $DIR/E0609.rs:21:7: in fn main | LL | y.1; //~ ERROR E0609 | ^ unknown field diff --git a/src/test/ui/error-codes/E0610.stderr b/src/test/ui/error-codes/E0610.stderr index 3f1cda3b447d7..55ee2543df535 100644 --- a/src/test/ui/error-codes/E0610.stderr +++ b/src/test/ui/error-codes/E0610.stderr @@ -1,5 +1,5 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields - --> $DIR/E0610.rs:13:15 + --> $DIR/E0610.rs:13:15: in fn main | LL | let _ = x.foo; //~ ERROR E0610 | ^^^ diff --git a/src/test/ui/error-codes/E0614.stderr b/src/test/ui/error-codes/E0614.stderr index 571d6e76776a1..3111afd9de8ed 100644 --- a/src/test/ui/error-codes/E0614.stderr +++ b/src/test/ui/error-codes/E0614.stderr @@ -1,5 +1,5 @@ error[E0614]: type `u32` cannot be dereferenced - --> $DIR/E0614.rs:13:5 + --> $DIR/E0614.rs:13:5: in fn main | LL | *y; //~ ERROR E0614 | ^^ diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index 88317a34ee3f3..48a45e8da92b3 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -1,5 +1,5 @@ error[E0615]: attempted to take value of method `method` on type `Foo` - --> $DIR/E0615.rs:21:7 + --> $DIR/E0615.rs:21:7: in fn main | LL | f.method; //~ ERROR E0615 | ^^^^^^ diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr index 26525863c0d8c..9b19dfa1f398b 100644 --- a/src/test/ui/error-codes/E0616.stderr +++ b/src/test/ui/error-codes/E0616.stderr @@ -1,5 +1,5 @@ error[E0616]: field `x` of struct `a::Foo` is private - --> $DIR/E0616.rs:23:5 + --> $DIR/E0616.rs:23:5: in fn main | LL | f.x; //~ ERROR E0616 | ^^^ diff --git a/src/test/ui/error-codes/E0617.stderr b/src/test/ui/error-codes/E0617.stderr index 114220532c3f0..c72fa1a123a6e 100644 --- a/src/test/ui/error-codes/E0617.stderr +++ b/src/test/ui/error-codes/E0617.stderr @@ -1,35 +1,35 @@ error[E0617]: can't pass `f32` to variadic function - --> $DIR/E0617.rs:19:36 + --> $DIR/E0617.rs:19:36: in fn main | 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 + --> $DIR/E0617.rs:22:36: in fn main | 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 + --> $DIR/E0617.rs:25:36: in fn main | 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 + --> $DIR/E0617.rs:28:36: in fn main | 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 + --> $DIR/E0617.rs:31:36: in fn main | 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 + --> $DIR/E0617.rs:34:36: in fn main | LL | printf(::std::ptr::null(), printf); | ^^^^^^ diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr index ef7ace44d59a6..cc669ed87d323 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -1,5 +1,5 @@ error[E0618]: expected function, found enum variant `X::Entry` - --> $DIR/E0618.rs:16:5 + --> $DIR/E0618.rs:16:5: in fn main | LL | Entry, | ----- `X::Entry` defined here @@ -12,7 +12,7 @@ LL | X::Entry; | ^^^^^^^^ error[E0618]: expected function, found `i32` - --> $DIR/E0618.rs:19:5 + --> $DIR/E0618.rs:19:5: in fn main | LL | let x = 0i32; | - `i32` defined here diff --git a/src/test/ui/error-codes/E0620.stderr b/src/test/ui/error-codes/E0620.stderr index f7450a3313866..8f74201ff449f 100644 --- a/src/test/ui/error-codes/E0620.stderr +++ b/src/test/ui/error-codes/E0620.stderr @@ -1,11 +1,11 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` - --> $DIR/E0620.rs:12:16 + --> $DIR/E0620.rs:12:16: in fn main | LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead - --> $DIR/E0620.rs:12:16 + --> $DIR/E0620.rs:12:16: in fn main | LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 | ^^^^^^^^^^^^^^^^^^^^^^^^ 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 58f0ede630806..0de7fa40ec3d4 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,26 +1,26 @@ 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 + --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5: in fn foo | 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 + --> $DIR/E0621-does-not-trigger-for-closures.rs:25:16: in fn foo | 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 + --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45: in fn foo | 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 + --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5: in fn foo | 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 + --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5: in fn foo | LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr index ac911b9b7c0b7..905fa0e76529e 100644 --- a/src/test/ui/error-codes/E0624.stderr +++ b/src/test/ui/error-codes/E0624.stderr @@ -1,5 +1,5 @@ error[E0624]: method `method` is private - --> $DIR/E0624.rs:21:9 + --> $DIR/E0624.rs:21:9: in fn main | LL | foo.method(); //~ ERROR method `method` is private [E0624] | ^^^^^^ diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr index 245729376df36..f0c3944e9d327 100644 --- a/src/test/ui/error-codes/E0637.stderr +++ b/src/test/ui/error-codes/E0637.stderr @@ -1,11 +1,11 @@ error[E0637]: invalid lifetime bound name: `'_` - --> $DIR/E0637.rs:11:16 + --> $DIR/E0637.rs:11:16: in struct Foo | 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:12:12 + --> $DIR/E0637.rs:12:12: in fn foo | LL | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR invalid lifetime bound name: `'_` | ^^ `'_` is a reserved lifetime name diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr index 737ae3a163ac2..dc3b2cfa1d28a 100644 --- a/src/test/ui/error-codes/E0657.stderr +++ b/src/test/ui/error-codes/E0657.stderr @@ -1,11 +1,11 @@ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level - --> $DIR/E0657.rs:19:31 + --> $DIR/E0657.rs:19:31: in fn free_fn_capture_hrtb_in_impl_trait | LL | -> Box Id>> | ^^ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level - --> $DIR/E0657.rs:28:35 + --> $DIR/E0657.rs:28:35: in fn impl_fn_capture_hrtb_in_impl_trait::impl_fn_capture_hrtb_in_impl_trait | LL | -> Box Id>> | ^^ diff --git a/src/test/ui/error-codes/ex-E0611.stderr b/src/test/ui/error-codes/ex-E0611.stderr index 2f5066542db76..0fe34add2fb53 100644 --- a/src/test/ui/error-codes/ex-E0611.stderr +++ b/src/test/ui/error-codes/ex-E0611.stderr @@ -1,5 +1,5 @@ error[E0616]: field `0` of struct `a::Foo` is private - --> $DIR/ex-E0611.rs:21:4 + --> $DIR/ex-E0611.rs:21:4: in fn main | LL | y.0; //~ ERROR field `0` of struct `a::Foo` is private | ^^^ diff --git a/src/test/ui/error-codes/ex-E0612.stderr b/src/test/ui/error-codes/ex-E0612.stderr index a07efc939ab47..e84828f780982 100644 --- a/src/test/ui/error-codes/ex-E0612.stderr +++ b/src/test/ui/error-codes/ex-E0612.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `1` on type `Foo` - --> $DIR/ex-E0612.rs:15:6 + --> $DIR/ex-E0612.rs:15:6: in fn main | LL | y.1; //~ ERROR no field `1` on type `Foo` | ^ did you mean `0`? diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index 69f11b4b7c08c..c33060741a828 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -11,7 +11,7 @@ LL | foo::FOO; | ^^^^^^^^ error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` - --> $DIR/error-festival.rs:22:5 + --> $DIR/error-festival.rs:22:5: in fn main | LL | x += 2; | -^^^^^ @@ -21,13 +21,13 @@ LL | x += 2; = note: an implementation of `std::ops::AddAssign` might be missing for `&str` error[E0599]: no method named `z` found for type `&str` in the current scope - --> $DIR/error-festival.rs:26:7 + --> $DIR/error-festival.rs:26:7: in fn main | LL | x.z(); | ^ error[E0600]: cannot apply unary operator `!` to type `Question` - --> $DIR/error-festival.rs:29:5 + --> $DIR/error-festival.rs:29:5: in fn main | LL | !Question::Yes; | ^^^^^^^^^^^^^^ cannot apply unary operator `!` @@ -35,13 +35,13 @@ LL | !Question::Yes; = note: an implementation of `std::ops::Not` might be missing for `Question` error[E0604]: only `u8` can be cast as `char`, not `u32` - --> $DIR/error-festival.rs:35:5 + --> $DIR/error-festival.rs:35:5: in fn main | LL | 0u32 as char; | ^^^^^^^^^^^^ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` - --> $DIR/error-festival.rs:39:5 + --> $DIR/error-festival.rs:39:5: in fn main | LL | x as Vec; | ^^^^^^^^^^^^ @@ -49,7 +49,7 @@ LL | x as Vec; = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait error[E0054]: cannot cast as `bool` - --> $DIR/error-festival.rs:43:24 + --> $DIR/error-festival.rs:43:24: in fn main | LL | let x_is_nonzero = x as bool; | ^^^^^^^^^ unsupported cast @@ -57,19 +57,19 @@ LL | let x_is_nonzero = x as bool; = help: compare with zero instead error[E0606]: casting `&u8` as `u32` is invalid - --> $DIR/error-festival.rs:47:18 + --> $DIR/error-festival.rs:47:18: in fn main | LL | let y: u32 = x as u32; | ^^^^^^^^ cannot cast `&u8` as `u32` | help: did you mean `*x`? - --> $DIR/error-festival.rs:47:18 + --> $DIR/error-festival.rs:47:18: in fn main | 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 + --> $DIR/error-festival.rs:51:5: in fn main | LL | v as *const [u8]; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index cf1dcfcb8ade3..a4ea203aa6065 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -1,5 +1,5 @@ error[E0606]: casting `&[i32]` as `usize` is invalid - --> $DIR/fat-ptr-cast.rs:20:5 + --> $DIR/fat-ptr-cast.rs:20:5: in fn main | LL | a as usize; //~ ERROR casting | ^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | a as usize; //~ ERROR casting = help: cast through a raw pointer first error[E0606]: casting `&[i32]` as `isize` is invalid - --> $DIR/fat-ptr-cast.rs:21:5 + --> $DIR/fat-ptr-cast.rs:21:5: in fn main | LL | a as isize; //~ ERROR casting | ^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | a as isize; //~ ERROR casting = help: cast through a raw pointer first error[E0606]: casting `&[i32]` as `i16` is invalid - --> $DIR/fat-ptr-cast.rs:22:5 + --> $DIR/fat-ptr-cast.rs:22:5: in fn main | LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid | ^^^^^^^^ @@ -23,7 +23,7 @@ LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid = help: cast through a raw pointer first error[E0606]: casting `&[i32]` as `u32` is invalid - --> $DIR/fat-ptr-cast.rs:23:5 + --> $DIR/fat-ptr-cast.rs:23:5: in fn main | LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid | ^^^^^^^^ @@ -31,7 +31,7 @@ LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid = help: cast through a raw pointer first error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` - --> $DIR/fat-ptr-cast.rs:24:5 + --> $DIR/fat-ptr-cast.rs:24:5: in fn main | LL | b as usize; //~ ERROR non-primitive cast | ^^^^^^^^^^ @@ -39,7 +39,7 @@ 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 error[E0606]: casting `*const [i32]` as `usize` is invalid - --> $DIR/fat-ptr-cast.rs:25:5 + --> $DIR/fat-ptr-cast.rs:25:5: in fn main | LL | p as usize; | ^^^^^^^^^^ @@ -47,19 +47,19 @@ LL | p as usize; = help: cast through a thin pointer first error[E0607]: cannot cast thin pointer `*const i32` to fat pointer `*const [i32]` - --> $DIR/fat-ptr-cast.rs:29:5 + --> $DIR/fat-ptr-cast.rs:29:5: in fn main | 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 + --> $DIR/fat-ptr-cast.rs:32:37: in fn main | 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 + --> $DIR/fat-ptr-cast.rs:33:32: in fn main | LL | let mut fail: *const str = 0 as *const str; //~ ERROR casting | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr index ea259aa22adfb..6af455e4d3266 100644 --- a/src/test/ui/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr @@ -1,5 +1,5 @@ error[E0658]: arbitrary `self` types are unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary-self-types.rs:14:18 + --> $DIR/feature-gate-arbitrary-self-types.rs:14:18: in trait Foo::foo | LL | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unsta = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` error[E0658]: arbitrary `self` types are unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary-self-types.rs:20:18 + --> $DIR/feature-gate-arbitrary-self-types.rs:20:18: in fn foo::foo | LL | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are uns = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` error[E0658]: arbitrary `self` types are unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary-self-types.rs:24:18 + --> $DIR/feature-gate-arbitrary-self-types.rs:24:18: in fn bar::bar | LL | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable | ^^^^^^^^^^^^^ 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 5ed9a0f4ed040..599eb793f7788 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,5 +1,5 @@ error[E0658]: raw pointer `self` is unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:19:18 + --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:19:18: in trait Bar::bar | LL | fn bar(self: *const Self); | ^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | fn bar(self: *const Self); = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` error[E0658]: raw pointer `self` is unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18 + --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18: in fn foo::foo | LL | fn foo(self: *const Self) {} | ^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | fn foo(self: *const Self) {} = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` error[E0658]: raw pointer `self` is unstable (see issue #44874) - --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:24:18 + --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:24:18: in fn bar::bar | LL | fn bar(self: *const Self) {} | ^^^^^^^^^^^ 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 134bf29d2aa40..bb5ce57fe8b98 100644 --- a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8: in fn avg | LL | fn avg(_: T) {} | ^ diff --git a/src/test/ui/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gate-exhaustive-patterns.stderr index 4afe5b5d5e011..ec81548cbc0fb 100644 --- a/src/test/ui/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gate-exhaustive-patterns.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered - --> $DIR/feature-gate-exhaustive-patterns.rs:16:9 + --> $DIR/feature-gate-exhaustive-patterns.rs:16:9: in fn main | LL | let Ok(_x) = foo(); //~ ERROR refutable pattern in local binding | ^^^^^^ pattern `Err(_)` not covered diff --git a/src/test/ui/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gate-in_band_lifetimes.stderr index cc0855306e162..ba7842577df12 100644 --- a/src/test/ui/feature-gate-in_band_lifetimes.stderr +++ b/src/test/ui/feature-gate-in_band_lifetimes.stderr @@ -1,11 +1,11 @@ error[E0261]: use of undeclared lifetime name `'x` - --> $DIR/feature-gate-in_band_lifetimes.rs:13:12 + --> $DIR/feature-gate-in_band_lifetimes.rs:13:12: in fn foo | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:13:23: in fn foo | LL | fn foo(x: &'x u8) -> &'x u8 { x } | ^^ undeclared lifetime @@ -17,7 +17,7 @@ LL | impl<'a> X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/feature-gate-in_band_lifetimes.rs:27:27 + --> $DIR/feature-gate-in_band_lifetimes.rs:27:27: in fn inner_2::inner_2 | LL | fn inner_2(&self) -> &'b u8 { | ^^ undeclared lifetime @@ -29,7 +29,7 @@ LL | impl X<'b> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/feature-gate-in_band_lifetimes.rs:35:27 + --> $DIR/feature-gate-in_band_lifetimes.rs:35:27: in fn inner_3::inner_3 | LL | fn inner_3(&self) -> &'b u8 { | ^^ undeclared lifetime @@ -41,25 +41,25 @@ LL | impl Y<&'a u8> { | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/feature-gate-in_band_lifetimes.rs:45:25 + --> $DIR/feature-gate-in_band_lifetimes.rs:45:25: in fn inner::inner | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:53:27: in trait MyTrait::any_lifetime | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:55:27: in trait MyTrait::borrowed_lifetime | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:55:40: in trait MyTrait::borrowed_lifetime | LL | fn borrowed_lifetime(&'b self) -> &'b u8; | ^^ undeclared lifetime @@ -77,25 +77,25 @@ 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:63:31: in fn my_lifetime::my_lifetime | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:65:27: in fn any_lifetime::any_lifetime | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:67:27: in fn borrowed_lifetime::borrowed_lifetime | 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 + --> $DIR/feature-gate-in_band_lifetimes.rs:67:40: in fn borrowed_lifetime::borrowed_lifetime | LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } | ^^ undeclared lifetime diff --git a/src/test/ui/feature-gate-infer_outlives_requirements.stderr b/src/test/ui/feature-gate-infer_outlives_requirements.stderr index 560e494b5828d..1b2a75e5e31ee 100644 --- a/src/test/ui/feature-gate-infer_outlives_requirements.stderr +++ b/src/test/ui/feature-gate-infer_outlives_requirements.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/feature-gate-infer_outlives_requirements.rs:15:5 + --> $DIR/feature-gate-infer_outlives_requirements.rs:15:5: in struct Foo | LL | struct Foo<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... @@ -7,7 +7,7 @@ LL | bar: &'a [T] //~ ERROR the parameter type `T` may not live long enough | ^^^^^^^^^^^^ | note: ...so that the reference type `&'a [T]` does not outlive the data it points at - --> $DIR/feature-gate-infer_outlives_requirements.rs:15:5 + --> $DIR/feature-gate-infer_outlives_requirements.rs:15:5: in struct Foo | LL | bar: &'a [T] //~ ERROR the parameter type `T` may not live long enough [E0309] | ^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-negate-unsigned.stderr b/src/test/ui/feature-gate-negate-unsigned.stderr index 85e9b56e4af9d..50766ca82ad85 100644 --- a/src/test/ui/feature-gate-negate-unsigned.stderr +++ b/src/test/ui/feature-gate-negate-unsigned.stderr @@ -1,5 +1,5 @@ error[E0600]: cannot apply unary operator `-` to type `usize` - --> $DIR/feature-gate-negate-unsigned.rs:20:23 + --> $DIR/feature-gate-negate-unsigned.rs:20:23: in fn main | LL | let _max: usize = -1; | ^^ cannot apply unary operator `-` @@ -7,7 +7,7 @@ LL | let _max: usize = -1; = note: unsigned values cannot be negated error[E0600]: cannot apply unary operator `-` to type `u8` - --> $DIR/feature-gate-negate-unsigned.rs:24:14 + --> $DIR/feature-gate-negate-unsigned.rs:24:14: in fn main | LL | let _y = -x; | ^^ cannot apply unary operator `-` diff --git a/src/test/ui/feature-gate-nll.stderr b/src/test/ui/feature-gate-nll.stderr index f7b431d19be7a..dc26a5268efc0 100644 --- a/src/test/ui/feature-gate-nll.stderr +++ b/src/test/ui/feature-gate-nll.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/feature-gate-nll.rs:17:5 + --> $DIR/feature-gate-nll.rs:17:5: in fn main | LL | let p = &x; | - borrow of `x` occurs here diff --git a/src/test/ui/feature-gate-try_reserve.stderr b/src/test/ui/feature-gate-try_reserve.stderr index 928d266b37aec..880dcc2b65e48 100644 --- a/src/test/ui/feature-gate-try_reserve.stderr +++ b/src/test/ui/feature-gate-try_reserve.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature 'try_reserve': new API (see issue #48043) - --> $DIR/feature-gate-try_reserve.rs:13:7 + --> $DIR/feature-gate-try_reserve.rs:13:7: in fn main | LL | v.try_reserve(10); //~ ERROR: use of unstable library feature 'try_reserve' | ^^^^^^^^^^^ 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 cc8615d3620e1..15cf192523879 100644 --- a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7 + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7: in fn foo | LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^ @@ -7,7 +7,7 @@ LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' = help: add #![feature(fn_traits)] to the crate attributes to enable error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7 + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7: in fn foo | LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ @@ -15,7 +15,7 @@ LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' = help: add #![feature(fn_traits)] to the crate attributes to enable error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7 + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7: in fn foo | LL | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^ 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 26dd983e877df..a6968fd287395 100644 --- a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5 + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5: in fn foo | LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^ @@ -7,7 +7,7 @@ LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' = help: add #![feature(fn_traits)] to the crate attributes to enable error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5 + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5: in fn foo | LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature = help: add #![feature(fn_traits)] to the crate attributes to enable error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) - --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5 + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5: in fn foo | LL | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr index bf790a3b00390..5a902635b42d6 100644 --- a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr +++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/feature-gate-unsized_tuple_coercion.rs:12:24: in fn main | LL | let _ : &(Send,) = &((),); | ^^^^^^ 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 f8e5f58ca0e89..7b12ab4c451ec 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 @@ -187,7 +187,7 @@ LL | #[deny(x5100)] impl S { } | ^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:5: in mod macro_use | LL | #[macro_use] fn f() { } | ^^^^^^^^^^^^ @@ -199,49 +199,49 @@ LL | #![warn(unused_attributes, unknown_lints)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5: in mod macro_use | LL | #[macro_use] struct S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5: in mod macro_use | LL | #[macro_use] type T = S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5: in mod macro_use | LL | #[macro_use] impl S { } | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:208:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:208:17: in mod macro_export::inner | LL | mod inner { #![macro_export="4800"] } | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:211:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:211:5: in mod macro_export | LL | #[macro_export = "4800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:214:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:214:5: in mod macro_export | LL | #[macro_export = "4800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:217:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:217:5: in mod macro_export | LL | #[macro_export = "4800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:220:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:220:5: in mod macro_export | LL | #[macro_export = "4800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -253,25 +253,25 @@ LL | #[macro_export = "4800"] | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17: in mod plugin_registrar::inner | LL | mod inner { #![plugin_registrar="4700"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:232:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:232:5: in mod plugin_registrar | LL | #[plugin_registrar = "4700"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5: in mod plugin_registrar | LL | #[plugin_registrar = "4700"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:238:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:238:5: in mod plugin_registrar | LL | #[plugin_registrar = "4700"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -283,25 +283,25 @@ LL | #[plugin_registrar = "4700"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:17: in mod main::inner | LL | mod inner { #![main="4300"] } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:250:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:250:5: in mod main | LL | #[main = "4400"] struct S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:253:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:253:5: in mod main | LL | #[main = "4400"] type T = S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:256:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:256:5: in mod main | LL | #[main = "4400"] impl S { } | ^^^^^^^^^^^^^^^^ @@ -313,25 +313,25 @@ LL | #[main = "4400"] | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:17: in mod start::inner | LL | mod inner { #![start="4300"] } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:268:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:268:5: in mod start | LL | #[start = "4300"] struct S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5: in mod start | LL | #[start = "4300"] type T = S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5: in mod start | LL | #[start = "4300"] impl S { } | ^^^^^^^^^^^^^^^^^ @@ -343,25 +343,25 @@ LL | #[start = "4300"] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:313:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:313:17: in mod repr::inner | LL | mod inner { #![repr="3900"] } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:316:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:316:5: in mod repr | LL | #[repr = "3900"] fn f() { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:321:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:321:5: in mod repr | LL | #[repr = "3900"] type T = S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:324:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:324:5: in mod repr | LL | #[repr = "3900"] impl S { } | ^^^^^^^^^^^^^^^^ @@ -373,55 +373,55 @@ LL | #[repr = "3900"] | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:5: in mod path | LL | #[path = "3800"] fn f() { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:5: in mod path | LL | #[path = "3800"] struct S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:338:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:338:5: in mod path | LL | #[path = "3800"] type T = S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5: in mod path | LL | #[path = "3800"] impl S { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:348:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:348:17: in mod abi::inner | LL | mod inner { #![abi="3700"] } | ^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:351:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:351:5: in mod abi | LL | #[abi = "3700"] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5: in mod abi | LL | #[abi = "3700"] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:357:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:357:5: in mod abi | LL | #[abi = "3700"] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:5: in mod abi | LL | #[abi = "3700"] impl S { } | ^^^^^^^^^^^^^^^ @@ -433,31 +433,31 @@ LL | #[abi = "3700"] | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:17: in mod automatically_derived::inner | LL | mod inner { #![automatically_derived="3600"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:370:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:370:5: in mod automatically_derived | LL | #[automatically_derived = "3600"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:373:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:373:5: in mod automatically_derived | LL | #[automatically_derived = "3600"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:376:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:376:5: in mod automatically_derived | LL | #[automatically_derived = "3600"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:379:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:379:5: in mod automatically_derived | LL | #[automatically_derived = "3600"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -469,7 +469,7 @@ LL | #[automatically_derived = "3600"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:27 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:27: in mod no_mangle | LL | #[no_mangle = "3500"] fn f() { } | -^^^^^^^^^ @@ -479,31 +479,31 @@ LL | #[no_mangle = "3500"] fn f() { } = note: #[warn(private_no_mangle_fns)] on by default warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:400:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:400:17: in mod no_link::inner | LL | mod inner { #![no_link="3400"] } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:5: in mod no_link | LL | #[no_link = "3400"] fn f() { } | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:5: in mod no_link | LL | #[no_link = "3400"] struct S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5: in mod no_link | LL | #[no_link = "3400"]type T = S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5: in mod no_link | LL | #[no_link = "3400"] impl S { } | ^^^^^^^^^^^^^^^^^^^ @@ -515,31 +515,31 @@ LL | #[no_link = "3400"] | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:419:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:419:17: in mod should_panic::inner | LL | mod inner { #![should_panic="3200"] } | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:5: in mod should_panic | LL | #[should_panic = "3200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:425:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:425:5: in mod should_panic | LL | #[should_panic = "3200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:428:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:428:5: in mod should_panic | LL | #[should_panic = "3200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:431:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:431:5: in mod should_panic | LL | #[should_panic = "3200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -551,31 +551,31 @@ LL | #[should_panic = "3200"] | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:17: in mod ignore::inner | LL | mod inner { #![ignore="3100"] } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:441:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:441:5: in mod ignore | LL | #[ignore = "3100"] fn f() { } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:444:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:444:5: in mod ignore | LL | #[ignore = "3100"] struct S; | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5: in mod ignore | LL | #[ignore = "3100"] type T = S; | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:5: in mod ignore | LL | #[ignore = "3100"] impl S { } | ^^^^^^^^^^^^^^^^^^ @@ -587,31 +587,31 @@ LL | #[ignore = "3100"] | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:17: in mod no_implicit_prelude::inner | LL | mod inner { #![no_implicit_prelude="3000"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:460:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:460:5: in mod no_implicit_prelude | LL | #[no_implicit_prelude = "3000"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:463:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:463:5: in mod no_implicit_prelude | LL | #[no_implicit_prelude = "3000"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:5: in mod no_implicit_prelude | LL | #[no_implicit_prelude = "3000"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5: in mod no_implicit_prelude | LL | #[no_implicit_prelude = "3000"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -623,31 +623,31 @@ LL | #[no_implicit_prelude = "3000"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:17: in mod reexport_test_harness_main::inner | LL | mod inner { #![reexport_test_harness_main="2900"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:5: in mod reexport_test_harness_main | LL | #[reexport_test_harness_main = "2900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5: in mod reexport_test_harness_main | LL | #[reexport_test_harness_main = "2900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:485:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:485:5: in mod reexport_test_harness_main | LL | #[reexport_test_harness_main = "2900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:5: in mod reexport_test_harness_main | LL | #[reexport_test_harness_main = "2900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -659,85 +659,85 @@ LL | #[reexport_test_harness_main = "2900"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5: in mod macro_escape | LL | #[macro_escape] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5: in mod macro_escape | LL | #[macro_escape] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5: in mod macro_escape | LL | #[macro_escape] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5: in mod macro_escape | LL | #[macro_escape] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17: in mod no_std::inner | LL | mod inner { #![no_std="2600"] } | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:17: in mod no_std::inner | LL | mod inner { #![no_std="2600"] } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:520:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:520:5: in mod no_std | 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:520:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:520:5: in mod no_std | LL | #[no_std = "2600"] fn f() { } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:5: in mod no_std | 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:524:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:5: in mod no_std | LL | #[no_std = "2600"] struct S; | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5: in mod no_std | 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:528:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5: in mod no_std | LL | #[no_std = "2600"] type T = S; | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:5: in mod no_std | 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:532:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:5: in mod no_std | LL | #[no_std = "2600"] impl S { } | ^^^^^^^^^^^^^^^^^^ @@ -755,61 +755,61 @@ LL | #[no_std = "2600"] | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:17: in mod crate_name::inner | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:17: in mod crate_name::inner | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5: in mod crate_name | 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:675:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5: in mod crate_name | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:5: in mod crate_name | 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:679:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:5: in mod crate_name | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:5: in mod crate_name | 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:683:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:5: in mod crate_name | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5: in mod crate_name | 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:687:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5: in mod crate_name | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ @@ -827,61 +827,61 @@ LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:17: in mod crate_type::inner | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:17: in mod crate_type::inner | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5: in mod crate_type | 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:700:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5: in mod crate_type | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5: in mod crate_type | 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:704:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5: in mod crate_type | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5: in mod crate_type | 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:708:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5: in mod crate_type | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:5: in mod crate_type | 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:712:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:5: in mod crate_type | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ @@ -899,61 +899,61 @@ LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:17: in mod feature::inner | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:17: in mod feature::inner | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5: in mod feature | 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:725:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5: in mod feature | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5: in mod feature | 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:729:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5: in mod feature | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5: in mod feature | 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:733:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:733:5: in mod feature | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5: in mod feature | 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:737:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5: in mod feature | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ @@ -971,61 +971,61 @@ LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17: in mod no_main_1::inner | LL | mod inner { #![no_main="0400"] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17: in mod no_main_1::inner | LL | mod inner { #![no_main="0400"] } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5: in mod no_main_1 | 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:751:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5: in mod no_main_1 | LL | #[no_main = "0400"] fn f() { } | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5: in mod no_main_1 | 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:755:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5: in mod no_main_1 | LL | #[no_main = "0400"] struct S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5: in mod no_main_1 | 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:759:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5: in mod no_main_1 | LL | #[no_main = "0400"] type T = S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5: in mod no_main_1 | 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:763:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5: in mod no_main_1 | LL | #[no_main = "0400"] impl S { } | ^^^^^^^^^^^^^^^^^^^ @@ -1043,61 +1043,61 @@ LL | #[no_main = "0400"] | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:17: in mod recursion_limit::inner | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:17: in mod recursion_limit::inner | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5: in mod recursion_limit | 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:789:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5: in mod recursion_limit | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:5: in mod recursion_limit | 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:793:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:5: in mod recursion_limit | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:5: in mod recursion_limit | 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:797:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:5: in mod recursion_limit | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:5: in mod recursion_limit | 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:801:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:5: in mod recursion_limit | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1115,61 +1115,61 @@ LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:17: in mod type_length_limit::inner | 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:810:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:17: in mod type_length_limit::inner | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5: in mod type_length_limit | 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:814:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5: in mod type_length_limit | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5: in mod type_length_limit | 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:818:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:818:5: in mod type_length_limit | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5: in mod type_length_limit | 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:822:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:5: in mod type_length_limit | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:5: in mod type_length_limit | 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:826:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:5: in mod type_length_limit | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 4d63c3f50125d..89007badc99fe 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 @@ -14,25 +14,25 @@ LL | | } | |_- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:24:17 + --> $DIR/issue-43106-gating-of-inline.rs:24:17: in mod inline::inner | LL | mod inner { #![inline="2100"] } | ------------^^^^^^^^^^^^^^^^^-- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:29:5 + --> $DIR/issue-43106-gating-of-inline.rs:29:5: in mod inline | LL | #[inline = "2100"] struct S; | ^^^^^^^^^^^^^^^^^^ --------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:32:5 + --> $DIR/issue-43106-gating-of-inline.rs:32:5: in mod inline | LL | #[inline = "2100"] type T = S; | ^^^^^^^^^^^^^^^^^^ ----------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:35:5 + --> $DIR/issue-43106-gating-of-inline.rs:35:5: in mod inline | LL | #[inline = "2100"] impl S { } | ^^^^^^^^^^^^^^^^^^ ---------- not a function or closure 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 35c15cb6b1ea8..12cdd437f0c92 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 @@ -11,31 +11,31 @@ 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 + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:17: in mod rustc_deprecated::inner | 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 + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5: in mod rustc_deprecated | 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 + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:29:5: in mod rustc_deprecated | 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 + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:32:5: in mod rustc_deprecated | 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 + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:35:5: in mod rustc_deprecated | LL | #[rustc_deprecated = "1500"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 21543d1b20afc..0abf38cc71408 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 @@ -11,31 +11,31 @@ LL | #[stable = "1300"] | ^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library - --> $DIR/issue-43106-gating-of-stable.rs:23:17 + --> $DIR/issue-43106-gating-of-stable.rs:23:17: in mod stable::inner | 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 + --> $DIR/issue-43106-gating-of-stable.rs:26:5: in mod stable | 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 + --> $DIR/issue-43106-gating-of-stable.rs:29:5: in mod stable | 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 + --> $DIR/issue-43106-gating-of-stable.rs:32:5: in mod stable | 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 + --> $DIR/issue-43106-gating-of-stable.rs:35:5: in mod stable | LL | #[stable = "1300"] impl S { } | ^^^^^^^^^^^^^^^^^^ 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 6124e16f41804..d276ddced86d5 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 @@ -11,31 +11,31 @@ LL | #[unstable = "1200"] | ^^^^^^^^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library - --> $DIR/issue-43106-gating-of-unstable.rs:23:17 + --> $DIR/issue-43106-gating-of-unstable.rs:23:17: in mod unstable::inner | 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 + --> $DIR/issue-43106-gating-of-unstable.rs:26:5: in mod unstable | 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 + --> $DIR/issue-43106-gating-of-unstable.rs:29:5: in mod unstable | 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 + --> $DIR/issue-43106-gating-of-unstable.rs:32:5: in mod unstable | 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 + --> $DIR/issue-43106-gating-of-unstable.rs:35:5: in mod unstable | LL | #[unstable = "1200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index 807b499155b85..651aa93930a54 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -1,5 +1,5 @@ error[E0277]: `*mut std::ops::Fn() + 'static` cannot be shared between threads safely - --> $DIR/send-sync.rs:18:5 + --> $DIR/send-sync.rs:18:5: in fn main | LL | send(format_args!("{:?}", c)); //~ ERROR E0277 | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely @@ -19,7 +19,7 @@ LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `*mut std::ops::Fn() + 'static` cannot be shared between threads safely - --> $DIR/send-sync.rs:19:5 + --> $DIR/send-sync.rs:19:5: in fn main | LL | sync(format_args!("{:?}", c)); //~ ERROR E0277 | ^^^^ `*mut std::ops::Fn() + 'static` cannot be shared between threads safely diff --git a/src/test/ui/fn_must_use.stderr b/src/test/ui/fn_must_use.stderr index b5bad22f3dc78..61e4cf0836877 100644 --- a/src/test/ui/fn_must_use.stderr +++ b/src/test/ui/fn_must_use.stderr @@ -1,5 +1,5 @@ warning: unused return value of `need_to_use_this_value` which must be used - --> $DIR/fn_must_use.rs:60:5 + --> $DIR/fn_must_use.rs:60:5: in fn main | LL | need_to_use_this_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -12,13 +12,13 @@ LL | #![warn(unused_must_use)] = note: it's important warning: unused return value of `MyStruct::need_to_use_this_method_value` which must be used - --> $DIR/fn_must_use.rs:65:5 + --> $DIR/fn_must_use.rs:65:5: in fn main | LL | m.need_to_use_this_method_value(); //~ WARN unused return value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused return value of `EvenNature::is_even` which must be used - --> $DIR/fn_must_use.rs:66:5 + --> $DIR/fn_must_use.rs:66:5: in fn main | LL | m.is_even(); // trait method! | ^^^^^^^^^^^^ @@ -26,25 +26,25 @@ LL | m.is_even(); // trait method! = note: no side effects warning: unused return value of `std::cmp::PartialEq::eq` which must be used - --> $DIR/fn_must_use.rs:72:5 + --> $DIR/fn_must_use.rs:72:5: in fn main | 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:73:5 + --> $DIR/fn_must_use.rs:73:5: in fn main | LL | m.eq(&n); //~ WARN unused return value | ^^^^^^^^^ warning: unused comparison which must be used - --> $DIR/fn_must_use.rs:76:5 + --> $DIR/fn_must_use.rs:76:5: in fn main | LL | 2 == 3; //~ WARN unused comparison | ^^^^^^ warning: unused comparison which must be used - --> $DIR/fn_must_use.rs:77:5 + --> $DIR/fn_must_use.rs:77:5: in fn main | LL | m == n; //~ WARN unused comparison | ^^^^^^ diff --git a/src/test/ui/generator/auto-trait-regions.stderr b/src/test/ui/generator/auto-trait-regions.stderr index dd78baf927509..35ab512b18e10 100644 --- a/src/test/ui/generator/auto-trait-regions.stderr +++ b/src/test/ui/generator/auto-trait-regions.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `No: Foo` is not satisfied in `[generator@$DIR/auto-trait-regions.rs:35:15: 39:6 x:&&OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]` - --> $DIR/auto-trait-regions.rs:40:5 + --> $DIR/auto-trait-regions.rs:40:5: in fn main | 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:&&OnlyFooIfStaticRef for<'r> {&'r OnlyFooIfStaticRef, ()}]`, the trait `Foo` is not implemented for `No` @@ -17,7 +17,7 @@ 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 + --> $DIR/auto-trait-regions.rs:57:5: in fn main | LL | assert_foo(gen); //~ ERROR the requirement `for<'r, 's> 'r : 's` is not satisfied | ^^^^^^^^^^ diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index 45d950b5aef64..b3e8bfda1bc14 100644 --- a/src/test/ui/generator/borrowing.stderr +++ b/src/test/ui/generator/borrowing.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/borrowing.rs:18:29 + --> $DIR/borrowing.rs:18:29: in fn main | LL | unsafe { (|| yield &a).resume() } | -- ^ borrowed value does not live long enough @@ -13,7 +13,7 @@ LL | } | - borrowed value needs to live until here error[E0597]: `a` does not live long enough - --> $DIR/borrowing.rs:25:20 + --> $DIR/borrowing.rs:25:20: in fn main | LL | || { | -- capture occurs here diff --git a/src/test/ui/generator/dropck.stderr b/src/test/ui/generator/dropck.stderr index 1a6fed2dd3594..21fa259ea67cc 100644 --- a/src/test/ui/generator/dropck.stderr +++ b/src/test/ui/generator/dropck.stderr @@ -1,5 +1,5 @@ error[E0597]: `*cell` does not live long enough - --> $DIR/dropck.rs:19:40 + --> $DIR/dropck.rs:19:40: in fn main | LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut()))); | ^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `ref_` does not live long enough - --> $DIR/dropck.rs:24:18 + --> $DIR/dropck.rs:24:18: in fn main | LL | gen = || { | -- capture occurs here diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr index 7e39d3c545903..7f97d9da0b58b 100644 --- a/src/test/ui/generator/generator-with-nll.stderr +++ b/src/test/ui/generator/generator-with-nll.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields (Ast) - --> $DIR/generator-with-nll.rs:19:23 + --> $DIR/generator-with-nll.rs:19:23: in fn main | LL | let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ @@ -8,7 +8,7 @@ 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 + --> $DIR/generator-with-nll.rs:20:22: in fn main | LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^ @@ -17,7 +17,7 @@ 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 + --> $DIR/generator-with-nll.rs:20:17: in fn main | LL | let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast) | ^^^^^^^^^ diff --git a/src/test/ui/generator/issue-48048.stderr b/src/test/ui/generator/issue-48048.stderr index f0654685debae..18839749c2881 100644 --- a/src/test/ui/generator/issue-48048.stderr +++ b/src/test/ui/generator/issue-48048.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/issue-48048.rs:19:9 + --> $DIR/issue-48048.rs:19:9: in fn main | LL | x.0({ //~ ERROR borrow may still be in use when generator yields | ^^^ diff --git a/src/test/ui/generator/not-send-sync.stderr b/src/test/ui/generator/not-send-sync.stderr index edf7151f7c4b7..4bd1e14607246 100644 --- a/src/test/ui/generator/not-send-sync.stderr +++ b/src/test/ui/generator/not-send-sync.stderr @@ -1,5 +1,5 @@ error[E0277]: `std::cell::Cell` cannot be shared between threads safely - --> $DIR/not-send-sync.rs:26:5 + --> $DIR/not-send-sync.rs:26:5: in fn main | LL | assert_send(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely @@ -8,13 +8,13 @@ LL | assert_send(|| { = note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell` = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:26:17: 30:6 a:&std::cell::Cell _]` note: required by `main::assert_send` - --> $DIR/not-send-sync.rs:17:5 + --> $DIR/not-send-sync.rs:17:5: in fn main | LL | fn assert_send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::cell::Cell` cannot be shared between threads safely - --> $DIR/not-send-sync.rs:19:5 + --> $DIR/not-send-sync.rs:19:5: in fn main | LL | assert_sync(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely @@ -23,7 +23,7 @@ LL | assert_sync(|| { = note: required because it appears within the type `{std::cell::Cell, ()}` = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:19:17: 23:6 {std::cell::Cell, ()}]` note: required by `main::assert_sync` - --> $DIR/not-send-sync.rs:16:5 + --> $DIR/not-send-sync.rs:16:5: in fn main | LL | fn assert_sync(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generator/pattern-borrow.stderr b/src/test/ui/generator/pattern-borrow.stderr index 48f23486a317c..e286ede49a05d 100644 --- a/src/test/ui/generator/pattern-borrow.stderr +++ b/src/test/ui/generator/pattern-borrow.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/pattern-borrow.rs:19:24 + --> $DIR/pattern-borrow.rs:19:24: in fn fun | LL | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields | ^^^^^^ 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 65817e30c4de9..8bbf24175710b 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,5 +1,5 @@ error[E0597]: `b` does not live long enough - --> $DIR/ref-escapes-but-not-over-yield.rs:24:14 + --> $DIR/ref-escapes-but-not-over-yield.rs:24:14: in fn foo | LL | a = &b; | ^ borrowed value does not live long enough diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index 957fac172c258..9c862ba343724 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/sized-yield.rs:17:26 + --> $DIR/sized-yield.rs:17:26: in fn main | LL | let mut gen = move || { //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | __________________________^ @@ -11,7 +11,7 @@ LL | | }; = note: the yield type of a generator must have a statically known size error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/sized-yield.rs:20:17 + --> $DIR/sized-yield.rs:20:17: in fn main | LL | unsafe { gen.resume(); } //~ ERROR the trait bound `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time diff --git a/src/test/ui/generator/yield-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index 3219939e89b2a..e72b195f55cff 100644 --- a/src/test/ui/generator/yield-in-args.stderr +++ b/src/test/ui/generator/yield-in-args.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-in-args.rs:18:14 + --> $DIR/yield-in-args.rs:18:14: in fn main | LL | foo(&b, yield); //~ ERROR | ^ ----- possible yield occurs here diff --git a/src/test/ui/generator/yield-in-function.stderr b/src/test/ui/generator/yield-in-function.stderr index 35be1fcd28d1c..a380c085f9681 100644 --- a/src/test/ui/generator/yield-in-function.stderr +++ b/src/test/ui/generator/yield-in-function.stderr @@ -1,5 +1,5 @@ error[E0627]: yield statement outside of generator literal - --> $DIR/yield-in-function.rs:13:13 + --> $DIR/yield-in-function.rs:13:13: in fn main | LL | fn main() { yield; } | ^^^^^ diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index c20b1348e279d..bc868ae4db14c 100644 --- a/src/test/ui/generator/yield-while-iterating.stderr +++ b/src/test/ui/generator/yield-while-iterating.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-while-iterating.rs:22:19 + --> $DIR/yield-while-iterating.rs:22:19: in fn yield_during_iter_owned_data | LL | for p in &x { //~ ERROR | ^ @@ -7,7 +7,7 @@ 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 + --> $DIR/yield-while-iterating.rs:67:20: in fn yield_during_iter_borrowed_slice_4 | LL | let mut b = || { | -- mutable borrow occurs here diff --git a/src/test/ui/generator/yield-while-local-borrowed.stderr b/src/test/ui/generator/yield-while-local-borrowed.stderr index a7f9862a726f4..ca6104295951a 100644 --- a/src/test/ui/generator/yield-while-local-borrowed.stderr +++ b/src/test/ui/generator/yield-while-local-borrowed.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields (Ast) - --> $DIR/yield-while-local-borrowed.rs:24:22 + --> $DIR/yield-while-local-borrowed.rs:24:22: in fn borrow_local_inline | LL | let a = &mut 3; | ^ @@ -8,7 +8,7 @@ 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 + --> $DIR/yield-while-local-borrowed.rs:52:22: in fn borrow_local | LL | let b = &a; | ^ @@ -17,7 +17,7 @@ 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 + --> $DIR/yield-while-local-borrowed.rs:24:17: in fn borrow_local_inline | LL | let a = &mut 3; | ^^^^^^ @@ -26,7 +26,7 @@ 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 + --> $DIR/yield-while-local-borrowed.rs:52:21: in fn borrow_local | LL | let b = &a; | ^^ diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index 8139814c7f2b6..a8f47b28aa6c8 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.stderr @@ -1,5 +1,5 @@ error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access - --> $DIR/yield-while-ref-reborrowed.rs:45:20 + --> $DIR/yield-while-ref-reborrowed.rs:45:20: in fn reborrow_mutable_ref_2 | LL | let mut b = || { | -- closure construction occurs here 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 28867eb2254ea..33382b0ccd2b2 100644 --- a/src/test/ui/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generic-type-less-params-with-defaults.stderr @@ -1,5 +1,5 @@ error[E0243]: wrong number of type arguments: expected at least 1, found 0 - --> $DIR/generic-type-less-params-with-defaults.rs:19:12 + --> $DIR/generic-type-less-params-with-defaults.rs:19:12: in fn main | LL | let _: Vec; | ^^^ expected at least 1 type argument 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 684a22ce45c92..6e2cc09ae69ef 100644 --- a/src/test/ui/generic-type-more-params-with-defaults.stderr +++ b/src/test/ui/generic-type-more-params-with-defaults.stderr @@ -1,5 +1,5 @@ error[E0244]: wrong number of type arguments: expected at most 2, found 3 - --> $DIR/generic-type-more-params-with-defaults.rs:19:12 + --> $DIR/generic-type-more-params-with-defaults.rs:19:12: in fn main | LL | let _: Vec; | ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type arguments diff --git a/src/test/ui/hygiene/assoc_item_ctxt.stderr b/src/test/ui/hygiene/assoc_item_ctxt.stderr index 8b410405ae5ca..1a4791e2d7444 100644 --- a/src/test/ui/hygiene/assoc_item_ctxt.stderr +++ b/src/test/ui/hygiene/assoc_item_ctxt.stderr @@ -8,7 +8,7 @@ LL | mac_trait_impl!(); | ------------------ in this macro invocation error[E0046]: not all trait items implemented, missing: `method` - --> $DIR/assoc_item_ctxt.rs:44:9 + --> $DIR/assoc_item_ctxt.rs:44:9: in mod error | LL | fn method(); | ------------ `method` from trait diff --git a/src/test/ui/hygiene/fields-definition.stderr b/src/test/ui/hygiene/fields-definition.stderr index 73f524b7d2a7f..01ddf777a9d55 100644 --- a/src/test/ui/hygiene/fields-definition.stderr +++ b/src/test/ui/hygiene/fields-definition.stderr @@ -1,5 +1,5 @@ error[E0124]: field `a` is already declared - --> $DIR/fields-definition.rs:24:17 + --> $DIR/fields-definition.rs:24:17: in struct Legacy | LL | a: u8, | ----- `a` first declared here diff --git a/src/test/ui/hygiene/fields-move.stderr b/src/test/ui/hygiene/fields-move.stderr index ba9de09f9d2f1..bc3d71316e361 100644 --- a/src/test/ui/hygiene/fields-move.stderr +++ b/src/test/ui/hygiene/fields-move.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:38:42 + --> $DIR/fields-move.rs:38:42: in fn main | LL | $foo.x | ------ value moved here @@ -24,7 +24,7 @@ LL | assert_two_copies(copy_legacy!(foo), foo.x); //~ ERROR use of moved val = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:39:42 + --> $DIR/fields-move.rs:39:42: in fn main | LL | $foo.x | ------ value moved here diff --git a/src/test/ui/hygiene/fields-numeric-borrowck.stderr b/src/test/ui/hygiene/fields-numeric-borrowck.stderr index ccd898fff27b7..47fc7ddf99202 100644 --- a/src/test/ui/hygiene/fields-numeric-borrowck.stderr +++ b/src/test/ui/hygiene/fields-numeric-borrowck.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `s.0` as mutable more than once at a time - --> $DIR/fields-numeric-borrowck.rs:16:16 + --> $DIR/fields-numeric-borrowck.rs:16:16: in fn main | LL | let borrow1 = &mut s.0; | --- first mutable borrow occurs here diff --git a/src/test/ui/hygiene/fields.stderr b/src/test/ui/hygiene/fields.stderr index c4be1834c04f8..bfc640dcf37a0 100644 --- a/src/test/ui/hygiene/fields.stderr +++ b/src/test/ui/hygiene/fields.stderr @@ -1,5 +1,5 @@ error: type `foo::S` is private - --> $DIR/fields.rs:25:17 + --> $DIR/fields.rs:25:17: in mod foo | LL | let s = S { x: 0 }; //~ ERROR type `foo::S` is private | ^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | let s = foo::m!(S, x); | ------------- in this macro invocation error: type `foo::S` is private - --> $DIR/fields.rs:26:17 + --> $DIR/fields.rs:26:17: in mod foo | LL | let _ = s.x; //~ ERROR type `foo::S` is private | ^ @@ -17,7 +17,7 @@ LL | let s = foo::m!(S, x); | ------------- in this macro invocation error: type `foo::T` is private - --> $DIR/fields.rs:28:17 + --> $DIR/fields.rs:28:17: in mod foo | LL | let t = T(0); //~ ERROR type `foo::T` is private | ^^^^ @@ -26,7 +26,7 @@ LL | let s = foo::m!(S, x); | ------------- in this macro invocation error: type `foo::T` is private - --> $DIR/fields.rs:29:17 + --> $DIR/fields.rs:29:17: in mod foo | LL | let _ = t.0; //~ ERROR type `foo::T` is private | ^ diff --git a/src/test/ui/hygiene/impl_items.stderr b/src/test/ui/hygiene/impl_items.stderr index dbcf53554cf25..67cfa62fe6bc5 100644 --- a/src/test/ui/hygiene/impl_items.stderr +++ b/src/test/ui/hygiene/impl_items.stderr @@ -1,5 +1,5 @@ error: type `for<'r> fn(&'r foo::S) {foo::S::f}` is private - --> $DIR/impl_items.rs:22:23 + --> $DIR/impl_items.rs:22:23: in mod foo | LL | let _: () = S.f(); //~ ERROR type `for<'r> fn(&'r foo::S) {foo::S::f}` is private | ^ diff --git a/src/test/ui/hygiene/intercrate.stderr b/src/test/ui/hygiene/intercrate.stderr index ecbc6e7b1472c..3d1ad9445cd46 100644 --- a/src/test/ui/hygiene/intercrate.stderr +++ b/src/test/ui/hygiene/intercrate.stderr @@ -1,5 +1,5 @@ error: type `fn() -> u32 {intercrate::foo::bar::f}` is private - --> $DIR/intercrate.rs:22:16 + --> $DIR/intercrate.rs:22:16: in fn main | LL | assert_eq!(intercrate::foo::m!(), 1); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/hygiene/nested_macro_privacy.stderr b/src/test/ui/hygiene/nested_macro_privacy.stderr index 1179065b94cd8..9127faa79aa15 100644 --- a/src/test/ui/hygiene/nested_macro_privacy.stderr +++ b/src/test/ui/hygiene/nested_macro_privacy.stderr @@ -1,5 +1,5 @@ error[E0616]: field `i` of struct `foo::S` is private - --> $DIR/nested_macro_privacy.rs:25:5 + --> $DIR/nested_macro_privacy.rs:25:5: in fn main | LL | S::default().i; //~ ERROR field `i` of struct `foo::S` is private | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index 5753d1a32f74f..a70f78c8af0c0 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -12,7 +12,7 @@ error[E0601]: `main` function not found in crate `no_implicit_prelude` = note: consider adding a `main` function to `$DIR/no_implicit_prelude.rs` error[E0599]: no method named `clone` found for type `()` in the current scope - --> $DIR/no_implicit_prelude.rs:22:12 + --> $DIR/no_implicit_prelude.rs:22:12: in mod bar | LL | fn f() { ::bar::m!(); } | ------------ in this macro invocation diff --git a/src/test/ui/hygiene/trait_items.stderr b/src/test/ui/hygiene/trait_items.stderr index 56d9c585d6f85..e5e7311a39f18 100644 --- a/src/test/ui/hygiene/trait_items.stderr +++ b/src/test/ui/hygiene/trait_items.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `f` found for type `()` in the current scope - --> $DIR/trait_items.rs:27:24 + --> $DIR/trait_items.rs:27:24: in mod baz | LL | fn f() { ::baz::m!(); } | ------------ in this macro invocation diff --git a/src/test/ui/if-let-arm-types.stderr b/src/test/ui/if-let-arm-types.stderr index 2e6b71dadf132..5c30bb6d60f17 100644 --- a/src/test/ui/if-let-arm-types.stderr +++ b/src/test/ui/if-let-arm-types.stderr @@ -1,5 +1,5 @@ error[E0308]: `if let` arms have incompatible types - --> $DIR/if-let-arm-types.rs:12:5 + --> $DIR/if-let-arm-types.rs:12:5: in fn main | LL | / if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types LL | | //~^ expected (), found integral variable @@ -13,7 +13,7 @@ LL | | }; = note: expected type `()` found type `{integer}` note: `if let` arm with an incompatible type - --> $DIR/if-let-arm-types.rs:17:12 + --> $DIR/if-let-arm-types.rs:17:12: in fn main | LL | } else { | ____________^ diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index efa9a58d63310..afc539c376104 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,5 +1,5 @@ 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:25:5 + --> $DIR/auto-trait-leak.rs:25:5: in fn main | LL | send(before()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely @@ -14,7 +14,7 @@ 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:28:5 + --> $DIR/auto-trait-leak.rs:28:5: in fn main | LL | send(after()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely @@ -36,7 +36,7 @@ LL | fn cycle1() -> impl Clone { | note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle2::{{impl-Trait}}`... - --> $DIR/auto-trait-leak.rs:49:16 + --> $DIR/auto-trait-leak.rs:49:16: in fn cycle2 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle1::{{impl-Trait}}`... - --> $DIR/auto-trait-leak.rs:42:16 + --> $DIR/auto-trait-leak.rs:42:16: in fn cycle1 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index 0f310df07142b..21136c3b0193b 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/equality.rs:25:5 + --> $DIR/equality.rs:25:5: in fn two | LL | 0_u32 | ^^^^^ expected i32, found u32 @@ -8,7 +8,7 @@ LL | 0_u32 found type `u32` error[E0277]: cannot add `impl Foo` to `u32` - --> $DIR/equality.rs:34:11 + --> $DIR/equality.rs:34:11: in fn sum_to | LL | n + sum_to(n - 1) | ^ no implementation for `u32 + impl Foo` @@ -16,7 +16,7 @@ LL | n + sum_to(n - 1) = help: the trait `std::ops::Add` is not implemented for `u32` error[E0308]: mismatched types - --> $DIR/equality.rs:53:18 + --> $DIR/equality.rs:53:18: in fn main | LL | let _: u32 = hide(0_u32); | ^^^^^^^^^^^ expected u32, found anonymized type @@ -25,7 +25,7 @@ LL | let _: u32 = hide(0_u32); found type `impl Foo` error[E0308]: mismatched types - --> $DIR/equality.rs:59:18 + --> $DIR/equality.rs:59:18: in fn main | LL | let _: i32 = Leak::leak(hide(0_i32)); | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type @@ -34,7 +34,7 @@ LL | let _: i32 = Leak::leak(hide(0_i32)); found type `::T` error[E0308]: mismatched types - --> $DIR/equality.rs:66:10 + --> $DIR/equality.rs:66:10: in fn main | LL | x = (x.1, | ^^^ expected u32, found i32 @@ -43,7 +43,7 @@ LL | x = (x.1, found type `impl Foo` (i32) error[E0308]: mismatched types - --> $DIR/equality.rs:69:10 + --> $DIR/equality.rs:69:10: in fn main | LL | x.0); | ^^^ expected i32, found u32 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 89bc538849437..518c48679753b 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,5 +1,5 @@ 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 + --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:30:8: in fn main | LL | struct Bar; | ----------- method `foo` not found for this 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 f7aaab4242c0f..e3c87266b6ae1 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope - --> $DIR/method-suggestion-no-duplication.rs:19:15 + --> $DIR/method-suggestion-no-duplication.rs:19:15: in fn main | LL | struct Foo; | ----------- method `is_empty` not found for this 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 bc4afb931098f..bd58df403c39a 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `method` found for type `u32` in the current scope - --> $DIR/no-method-suggested-traits.rs:33:10 + --> $DIR/no-method-suggested-traits.rs:33:10: in fn main | LL | 1u32.method(); | ^^^^^^ @@ -17,7 +17,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:36:44: in fn main | LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); | ^^^^^^ @@ -35,7 +35,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:40:9: in fn main | LL | 'a'.method(); | ^^^^^^ @@ -47,7 +47,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:42:43: in fn main | LL | std::rc::Rc::new(&mut Box::new(&'a')).method(); | ^^^^^^ @@ -59,7 +59,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:45:10: in fn main | LL | 1i32.method(); | ^^^^^^ @@ -71,7 +71,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:47:44: in fn main | LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); | ^^^^^^ @@ -83,7 +83,7 @@ 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 + --> $DIR/no-method-suggested-traits.rs:50:9: in fn main | LL | struct Foo; | ----------- method `method` not found for this @@ -99,7 +99,7 @@ LL | Foo.method(); candidate #4: `no_method_suggested_traits::Reexported` 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 + --> $DIR/no-method-suggested-traits.rs:52:43: in fn main | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); | ^^^^^^ @@ -112,7 +112,7 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); candidate #4: `no_method_suggested_traits::Reexported` error[E0599]: no method named `method2` found for type `u64` in the current scope - --> $DIR/no-method-suggested-traits.rs:55:10 + --> $DIR/no-method-suggested-traits.rs:55:10: in fn main | LL | 1u64.method2(); | ^^^^^^^ @@ -122,7 +122,7 @@ LL | 1u64.method2(); candidate #1: `foo::Bar` 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 + --> $DIR/no-method-suggested-traits.rs:57:44: in fn main | LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); | ^^^^^^^ @@ -132,7 +132,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); candidate #1: `foo::Bar` 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 + --> $DIR/no-method-suggested-traits.rs:60:37: in fn main | LL | no_method_suggested_traits::Foo.method2(); | ^^^^^^^ @@ -142,7 +142,7 @@ LL | no_method_suggested_traits::Foo.method2(); candidate #1: `foo::Bar` 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 + --> $DIR/no-method-suggested-traits.rs:62:71: in fn main | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); | ^^^^^^^ @@ -152,7 +152,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).metho candidate #1: `foo::Bar` 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 + --> $DIR/no-method-suggested-traits.rs:64:40: in fn main | LL | no_method_suggested_traits::Bar::X.method2(); | ^^^^^^^ @@ -162,7 +162,7 @@ LL | no_method_suggested_traits::Bar::X.method2(); candidate #1: `foo::Bar` 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 + --> $DIR/no-method-suggested-traits.rs:66:74: in fn main | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); | ^^^^^^^ @@ -172,7 +172,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).me candidate #1: `foo::Bar` error[E0599]: no method named `method3` found for type `Foo` in the current scope - --> $DIR/no-method-suggested-traits.rs:69:9 + --> $DIR/no-method-suggested-traits.rs:69:9: in fn main | LL | struct Foo; | ----------- method `method3` not found for this @@ -185,7 +185,7 @@ LL | Foo.method3(); candidate #1: `no_method_suggested_traits::foo::PubPub` 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 + --> $DIR/no-method-suggested-traits.rs:71:43: in fn main | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); | ^^^^^^^ @@ -195,7 +195,7 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); candidate #1: `no_method_suggested_traits::foo::PubPub` error[E0599]: no method named `method3` found for type `Bar` in the current scope - --> $DIR/no-method-suggested-traits.rs:73:12 + --> $DIR/no-method-suggested-traits.rs:73:12: in fn main | LL | enum Bar { X } | -------- method `method3` not found for this @@ -208,7 +208,7 @@ LL | Bar::X.method3(); candidate #1: `no_method_suggested_traits::foo::PubPub` 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 + --> $DIR/no-method-suggested-traits.rs:75:46: in fn main | LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); | ^^^^^^^ @@ -218,37 +218,37 @@ LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); candidate #1: `no_method_suggested_traits::foo::PubPub` error[E0599]: no method named `method3` found for type `usize` in the current scope - --> $DIR/no-method-suggested-traits.rs:79:13 + --> $DIR/no-method-suggested-traits.rs:79:13: in fn main | 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 + --> $DIR/no-method-suggested-traits.rs:80:47: in fn main | 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 + --> $DIR/no-method-suggested-traits.rs:81:37: in fn main | 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 + --> $DIR/no-method-suggested-traits.rs:82:71: in fn main | 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 + --> $DIR/no-method-suggested-traits.rs:84:40: in fn main | 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 + --> $DIR/no-method-suggested-traits.rs:85:74: in fn main | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); | ^^^^^^^ diff --git a/src/test/ui/impl-trait/region-escape-via-bound.stderr b/src/test/ui/impl-trait/region-escape-via-bound.stderr index 4281a4c10adfa..308a833fccd52 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound.stderr +++ b/src/test/ui/impl-trait/region-escape-via-bound.stderr @@ -1,5 +1,5 @@ error[E0909]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/region-escape-via-bound.rs:26:29 + --> $DIR/region-escape-via-bound.rs:26:29: in fn foo | LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y> | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index c91ebb705deec..c2ad2282d58dd 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -8,7 +8,7 @@ LL | fn fmt(&self, x: &str) -> () { } found type `fn(&MyType, &str)` error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 - --> $DIR/trait_type.rs:22:11 + --> $DIR/trait_type.rs:22:11: in fn fmt::fmt | LL | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 diff --git a/src/test/ui/impl-trait/universal-issue-48703.stderr b/src/test/ui/impl-trait/universal-issue-48703.stderr index ea509684f9efc..5268975dd8a85 100644 --- a/src/test/ui/impl-trait/universal-issue-48703.stderr +++ b/src/test/ui/impl-trait/universal-issue-48703.stderr @@ -1,5 +1,5 @@ error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. - --> $DIR/universal-issue-48703.rs:18:5 + --> $DIR/universal-issue-48703.rs:18:5: in fn main | LL | foo::('a'); //~ ERROR cannot provide explicit type parameters | ^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index 031db511ff30d..b8facf33b1d23 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/universal-mismatched-type.rs:14:5 + --> $DIR/universal-mismatched-type.rs:14:5: in fn foo | LL | fn foo(x: impl Debug) -> String { | ------ expected `std::string::String` because of return type 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 ed406895fc699..ec32eb32847e5 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/universal-two-impl-traits.rs:15:9 + --> $DIR/universal-two-impl-traits.rs:15:9: in fn foo | LL | a = y; //~ ERROR mismatched | ^ expected type parameter, found a different type parameter diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index f6d58984ecef7..f18947bd43c2e 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -23,7 +23,7 @@ LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type - --> $DIR/impl_trait_projections.rs:21:50 + --> $DIR/impl_trait_projections.rs:21:50: in fn projection_is_disallowed | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr index 441494d738a7a..ff3038d6c0263 100644 --- a/src/test/ui/in-band-lifetimes/E0687.stderr +++ b/src/test/ui/in-band-lifetimes/E0687.stderr @@ -1,23 +1,23 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders - --> $DIR/E0687.rs:14:15 + --> $DIR/E0687.rs:14:15: in fn foo | 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 + --> $DIR/E0687.rs:16:16: in fn bar | 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 + --> $DIR/E0687.rs:18:15: in fn baz | 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 + --> $DIR/E0687.rs:23:26: in fn bar::bar | LL | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr index a2ad5cf0f83bf..7bc0591d1a79a 100644 --- a/src/test/ui/in-band-lifetimes/E0687_where.stderr +++ b/src/test/ui/in-band-lifetimes/E0687_where.stderr @@ -1,11 +1,11 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders - --> $DIR/E0687_where.rs:14:31 + --> $DIR/E0687_where.rs:14:31: in fn bar | 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 + --> $DIR/E0687_where.rs:16:21: in fn baz | LL | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly | ^^ in-band lifetime definition diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr index 66dca227941af..b46caa0eaf8f4 100644 --- a/src/test/ui/in-band-lifetimes/E0688.stderr +++ b/src/test/ui/in-band-lifetimes/E0688.stderr @@ -1,5 +1,5 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions - --> $DIR/E0688.rs:14:28 + --> $DIR/E0688.rs:14:28: in fn foo | LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix | -- ^^ in-band lifetime definition here @@ -7,7 +7,7 @@ LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix | explicit lifetime definition here error[E0688]: cannot mix in-band and explicit lifetime definitions - --> $DIR/E0688.rs:19:44 + --> $DIR/E0688.rs:19:44: in fn bar::bar | LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix | -- ^^ in-band 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 ba58ca1ed9597..8e12e656d73da 100644 --- a/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr @@ -1,5 +1,5 @@ error: hidden lifetime parameters are deprecated, try `Foo<'_>` - --> $DIR/ellided-lifetimes.rs:15:12 + --> $DIR/ellided-lifetimes.rs:15:12: in fn foo | LL | fn foo(x: &Foo) { | ^^^ diff --git a/src/test/ui/in-band-lifetimes/impl/assoc-type.stderr b/src/test/ui/in-band-lifetimes/impl/assoc-type.stderr index 59b2cfd2226db..eb785e5a61916 100644 --- a/src/test/ui/in-band-lifetimes/impl/assoc-type.stderr +++ b/src/test/ui/in-band-lifetimes/impl/assoc-type.stderr @@ -1,11 +1,11 @@ error[E0106]: missing lifetime specifier - --> $DIR/assoc-type.rs:23:19 + --> $DIR/assoc-type.rs:23:19: in impl Output | LL | type Output = &i32; | ^ expected lifetime parameter error[E0106]: missing lifetime specifier - --> $DIR/assoc-type.rs:28:20 + --> $DIR/assoc-type.rs:28:20: in impl Output | LL | type Output = &'_ i32; | ^^ expected lifetime parameter diff --git a/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr b/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr index 201470abe674c..83afd45717f1b 100644 --- a/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr +++ b/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr @@ -1,5 +1,5 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements - --> $DIR/dyn-trait.rs:32:16 + --> $DIR/dyn-trait.rs:32:16: in fn with_dyn_debug_static | LL | static_val(x); //~ ERROR cannot infer | ^ diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr index d2748b2da4b6a..0333de296e61e 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/mismatched.rs:14:42 + --> $DIR/mismatched.rs:14:42: in fn foo | LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required | - ^ lifetime `'a` required @@ -7,7 +7,7 @@ LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime re | consider changing the type of `y` to `&'a u32` error[E0623]: lifetime mismatch - --> $DIR/mismatched.rs:16:46 + --> $DIR/mismatched.rs:16:46: in fn foo2 | LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch | ------- ------- ^ ...but data from `y` is returned here diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr index 71b46f6d4d60e..a0fbe88986db3 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/mismatched_trait.rs:16:9 + --> $DIR/mismatched_trait.rs:16:9: in fn Get::baz::baz | LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { | - consider changing the type of `y` to `&'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 1498eb7ac1daa..dcf54c24eba48 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `p` because it is borrowed - --> $DIR/mut_while_borrow.rs:19:5 + --> $DIR/mut_while_borrow.rs:19:5: in fn main | LL | let r = foo(&p); | - borrow of `p` occurs here 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 da46cb7f22e34..a726b4964822f 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,11 +1,11 @@ error[E0261]: use of undeclared lifetime name `'test` - --> $DIR/no_in_band_in_struct.rs:15:9 + --> $DIR/no_in_band_in_struct.rs:15:9: in struct Foo | 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 + --> $DIR/no_in_band_in_struct.rs:19:10: in enum Bar | LL | Baz(&'test u32), //~ ERROR undeclared lifetime | ^^^^^ undeclared lifetime 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 d53b71907a42e..854d1585e0daf 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,11 +1,11 @@ error[E0261]: use of undeclared lifetime name `'test` - --> $DIR/no_introducing_in_band_in_locals.rs:15:13 + --> $DIR/no_introducing_in_band_in_locals.rs:15:13: in fn foo | 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 + --> $DIR/no_introducing_in_band_in_locals.rs:20:16: in fn bar | LL | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime | ^^^^^ undeclared lifetime diff --git a/src/test/ui/in-band-lifetimes/shadow.stderr b/src/test/ui/in-band-lifetimes/shadow.stderr index 0ee228fca3124..f328abf8ddfe4 100644 --- a/src/test/ui/in-band-lifetimes/shadow.stderr +++ b/src/test/ui/in-band-lifetimes/shadow.stderr @@ -1,5 +1,5 @@ error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope - --> $DIR/shadow.rs:17:12 + --> $DIR/shadow.rs:17:12: in fn bar::bar | LL | impl Foo<&'s u8> { | -- first declared here @@ -7,7 +7,7 @@ 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 + --> $DIR/shadow.rs:18:19: in fn baz::baz | LL | impl Foo<&'s u8> { | -- first declared here diff --git a/src/test/ui/index-help.stderr b/src/test/ui/index-help.stderr index 669c0837fdabd..702f348b62fbd 100644 --- a/src/test/ui/index-help.stderr +++ b/src/test/ui/index-help.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[{integer}]>` is not satisfied - --> $DIR/index-help.rs:13:5 + --> $DIR/index-help.rs:13:5: in fn main | LL | x[0i32]; //~ ERROR E0277 | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` diff --git a/src/test/ui/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference-variable-behind-raw-pointer.stderr index fe6dc0b07482f..24b9de6208c9f 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference-variable-behind-raw-pointer.stderr @@ -1,5 +1,5 @@ warning: type annotations needed - --> $DIR/inference-variable-behind-raw-pointer.rs:18:13 + --> $DIR/inference-variable-behind-raw-pointer.rs:18:13: in fn main | LL | if data.is_null() {} | ^^^^^^^ diff --git a/src/test/ui/inference_unstable.stderr b/src/test/ui/inference_unstable.stderr index a217bc57b3670..d609afe655fb4 100644 --- a/src/test/ui/inference_unstable.stderr +++ b/src/test/ui/inference_unstable.stderr @@ -1,5 +1,5 @@ warning: a method with this name may be added to the standard library in the future - --> $DIR/inference_unstable.rs:26:20 + --> $DIR/inference_unstable.rs:26:20: in fn main | LL | assert_eq!('x'.ipu_flatten(), 1); | ^^^^^^^^^^^ diff --git a/src/test/ui/inference_unstable_featured.stderr b/src/test/ui/inference_unstable_featured.stderr index cb5f3623291b5..51ab3edfadaac 100644 --- a/src/test/ui/inference_unstable_featured.stderr +++ b/src/test/ui/inference_unstable_featured.stderr @@ -1,5 +1,5 @@ error[E0034]: multiple applicable items in scope - --> $DIR/inference_unstable_featured.rs:26:20 + --> $DIR/inference_unstable_featured.rs:26:20: in fn main | LL | assert_eq!('x'.ipu_flatten(), 0); //~ ERROR E0034 | ^^^^^^^^^^^ multiple `ipu_flatten` found diff --git a/src/test/ui/inference_unstable_forced.stderr b/src/test/ui/inference_unstable_forced.stderr index 00eb81cd9a239..7a728dd37ddfe 100644 --- a/src/test/ui/inference_unstable_forced.stderr +++ b/src/test/ui/inference_unstable_forced.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature 'ipu_flatten' (see issue #99999) - --> $DIR/inference_unstable_forced.rs:21:20 + --> $DIR/inference_unstable_forced.rs:21:20: in fn main | LL | assert_eq!('x'.ipu_flatten(), 0); //~ ERROR E0658 | ^^^^^^^^^^^ diff --git a/src/test/ui/infinite-recursion-const-fn.stderr b/src/test/ui/infinite-recursion-const-fn.stderr index 81717fe1f0929..20a622c3c7394 100644 --- a/src/test/ui/infinite-recursion-const-fn.stderr +++ b/src/test/ui/infinite-recursion-const-fn.stderr @@ -1,5 +1,5 @@ error[E0080]: constant evaluation error - --> $DIR/infinite-recursion-const-fn.rs:14:25 + --> $DIR/infinite-recursion-const-fn.rs:14:25: in fn a | LL | const fn a() -> usize { b() } //~ ERROR constant evaluation error | ^^^ diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index 4c489c5964ba7..0221d1959bec1 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `std::cell::UnsafeCell: std::panic::RefUnwindSafe` is not satisfied in `std::cell::Cell` - --> $DIR/interior-mutability.rs:15:5 + --> $DIR/interior-mutability.rs:15:5: in fn main | 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 diff --git a/src/test/ui/invalid-path-in-const.stderr b/src/test/ui/invalid-path-in-const.stderr index 9214800b93a59..35d0f06c2275f 100644 --- a/src/test/ui/invalid-path-in-const.stderr +++ b/src/test/ui/invalid-path-in-const.stderr @@ -1,5 +1,5 @@ error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope - --> $DIR/invalid-path-in-const.rs:12:18 + --> $DIR/invalid-path-in-const.rs:12:18: in fn main::f | LL | fn f(a: [u8; u32::DOESNOTEXIST]) {} | ^^^^^^^^^^^^^^^^^ associated item not found in `u32` diff --git a/src/test/ui/issue-10969.stderr b/src/test/ui/issue-10969.stderr index edc4ecbab525a..5c227203c5fc6 100644 --- a/src/test/ui/issue-10969.stderr +++ b/src/test/ui/issue-10969.stderr @@ -1,5 +1,5 @@ error[E0618]: expected function, found `i32` - --> $DIR/issue-10969.rs:12:5 + --> $DIR/issue-10969.rs:12:5: in fn func | LL | fn func(i: i32) { | - `i32` defined here @@ -7,7 +7,7 @@ LL | i(); //~ERROR expected function, found `i32` | ^^^ not a function error[E0618]: expected function, found `i32` - --> $DIR/issue-10969.rs:16:5 + --> $DIR/issue-10969.rs:16:5: in fn main | LL | let i = 0i32; | - `i32` defined here diff --git a/src/test/ui/issue-11004.stderr b/src/test/ui/issue-11004.stderr index 215120c9c25ea..b3fc0e0aac946 100644 --- a/src/test/ui/issue-11004.stderr +++ b/src/test/ui/issue-11004.stderr @@ -1,11 +1,11 @@ error[E0609]: no field `x` on type `*mut A` - --> $DIR/issue-11004.rs:17:21 + --> $DIR/issue-11004.rs:17:21: in fn access | LL | let x : i32 = n.x; //~ no field `x` on type `*mut A` | ^ help: `n` is a native pointer; try dereferencing it: `(*n).x` error[E0609]: no field `y` on type `*mut A` - --> $DIR/issue-11004.rs:18:21 + --> $DIR/issue-11004.rs:18:21: in fn access | LL | let y : f64 = n.y; //~ no field `y` on type `*mut A` | ^ help: `n` is a native pointer; try dereferencing it: `(*n).y` diff --git a/src/test/ui/issue-11319.stderr b/src/test/ui/issue-11319.stderr index 8189cf5ea170e..dad029823f54c 100644 --- a/src/test/ui/issue-11319.stderr +++ b/src/test/ui/issue-11319.stderr @@ -1,5 +1,5 @@ error[E0308]: match arms have incompatible types - --> $DIR/issue-11319.rs:12:5 + --> $DIR/issue-11319.rs:12:5: in fn main | LL | / match Some(10) { LL | | //~^ ERROR match arms have incompatible types diff --git a/src/test/ui/issue-12187-1.stderr b/src/test/ui/issue-12187-1.stderr index 7d4df2901fe3c..62dace465efdd 100644 --- a/src/test/ui/issue-12187-1.stderr +++ b/src/test/ui/issue-12187-1.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-12187-1.rs:16:10 + --> $DIR/issue-12187-1.rs:16:10: in fn main | LL | let &v = new(); | -^ diff --git a/src/test/ui/issue-12187-2.stderr b/src/test/ui/issue-12187-2.stderr index f7ecbd4477293..bd4ed971a4826 100644 --- a/src/test/ui/issue-12187-2.stderr +++ b/src/test/ui/issue-12187-2.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-12187-2.rs:16:10 + --> $DIR/issue-12187-2.rs:16:10: in fn main | LL | let &v = new(); | -^ diff --git a/src/test/ui/issue-13058.stderr b/src/test/ui/issue-13058.stderr index cef5f5ae475bd..a6cd2d65e1314 100644 --- a/src/test/ui/issue-13058.stderr +++ b/src/test/ui/issue-13058.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `cont` - --> $DIR/issue-13058.rs:24:26 + --> $DIR/issue-13058.rs:24:26: in fn check | LL | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool | ---- consider changing the type of `cont` to `&'r T` @@ -8,7 +8,7 @@ LL | let cont_iter = cont.iter(); | ^^^^ lifetime `'r` required error[E0308]: mismatched types - --> $DIR/issue-13058.rs:36:11 + --> $DIR/issue-13058.rs:36:11: in fn main | LL | check((3, 5)); | ^^^^^^ diff --git a/src/test/ui/issue-14092.stderr b/src/test/ui/issue-14092.stderr index f90ea4776ab7c..d08cda6f701b7 100644 --- a/src/test/ui/issue-14092.stderr +++ b/src/test/ui/issue-14092.stderr @@ -1,5 +1,5 @@ error[E0243]: wrong number of type arguments: expected 1, found 0 - --> $DIR/issue-14092.rs:11:11 + --> $DIR/issue-14092.rs:11:11: in fn fn1 | LL | fn fn1(0: Box) {} | ^^^ expected 1 type argument diff --git a/src/test/ui/issue-15260.stderr b/src/test/ui/issue-15260.stderr index 10cb79e0fc547..986626654779a 100644 --- a/src/test/ui/issue-15260.stderr +++ b/src/test/ui/issue-15260.stderr @@ -1,5 +1,5 @@ error[E0025]: field `a` bound multiple times in the pattern - --> $DIR/issue-15260.rs:18:9 + --> $DIR/issue-15260.rs:18:9: in fn main | LL | a: _, | ---- first use of `a` @@ -7,7 +7,7 @@ LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern - --> $DIR/issue-15260.rs:24:9 + --> $DIR/issue-15260.rs:24:9: in fn main | LL | a, | - first use of `a` @@ -15,7 +15,7 @@ LL | a: _ | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern - --> $DIR/issue-15260.rs:30:9 + --> $DIR/issue-15260.rs:30:9: in fn main | LL | a, | - first use of `a` @@ -23,7 +23,7 @@ LL | a: _, | ^^^^ multiple uses of `a` in pattern error[E0025]: field `a` bound multiple times in the pattern - --> $DIR/issue-15260.rs:32:9 + --> $DIR/issue-15260.rs:32:9: in fn main | LL | a, | - first use of `a` diff --git a/src/test/ui/issue-15524.stderr b/src/test/ui/issue-15524.stderr index a116e621a95df..2486cb3da533e 100644 --- a/src/test/ui/issue-15524.stderr +++ b/src/test/ui/issue-15524.stderr @@ -1,5 +1,5 @@ error[E0081]: discriminant value `1` already exists - --> $DIR/issue-15524.rs:15:9 + --> $DIR/issue-15524.rs:15:9: in enum Foo | LL | A = 1, | - first use of `1` @@ -7,7 +7,7 @@ LL | B = 1, | ^ enum already has `1` error[E0081]: discriminant value `1` already exists - --> $DIR/issue-15524.rs:18:5 + --> $DIR/issue-15524.rs:18:5: in enum Foo | LL | A = 1, | - first use of `1` @@ -16,7 +16,7 @@ LL | D, | ^ enum already has `1` error[E0081]: discriminant value `1` already exists - --> $DIR/issue-15524.rs:21:9 + --> $DIR/issue-15524.rs:21:9: in enum Foo | LL | A = 1, | - first use of `1` diff --git a/src/test/ui/issue-17263.stderr b/src/test/ui/issue-17263.stderr index 4767fbbcfbbd5..341e0515814a2 100644 --- a/src/test/ui/issue-17263.stderr +++ b/src/test/ui/issue-17263.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `x` (via `x.b`) as mutable more than once at a time - --> $DIR/issue-17263.rs:17:34 + --> $DIR/issue-17263.rs:17:34: in fn main | LL | let (a, b) = (&mut x.a, &mut x.b); | --- ^^^ second mutable borrow occurs here (via `x.b`) @@ -10,7 +10,7 @@ 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 + --> $DIR/issue-17263.rs:21:32: in fn main | LL | let (c, d) = (&mut foo.a, &foo.b); | ----- ^^^^^ immutable borrow occurs here (via `foo.b`) diff --git a/src/test/ui/issue-17441.stderr b/src/test/ui/issue-17441.stderr index 80ba49cce1a0c..db800ef2a4925 100644 --- a/src/test/ui/issue-17441.stderr +++ b/src/test/ui/issue-17441.stderr @@ -1,17 +1,17 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` - --> $DIR/issue-17441.rs:12:16 + --> $DIR/issue-17441.rs:12:16: in fn main | LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead - --> $DIR/issue-17441.rs:12:16 + --> $DIR/issue-17441.rs:12:16: in fn main | 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 + --> $DIR/issue-17441.rs:15:16: in fn main | LL | let _bar = Box::new(1_usize) as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^--------------- @@ -19,25 +19,25 @@ LL | let _bar = Box::new(1_usize) as std::fmt::Debug; | help: try casting to a `Box` instead: `Box` error[E0620]: cast to unsized type: `usize` as `std::fmt::Debug` - --> $DIR/issue-17441.rs:18:16 + --> $DIR/issue-17441.rs:18:16: in fn main | LL | let _baz = 1_usize as std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate - --> $DIR/issue-17441.rs:18:16 + --> $DIR/issue-17441.rs:18:16: in fn main | 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 + --> $DIR/issue-17441.rs:21:17: in fn main | LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using a box or reference as appropriate - --> $DIR/issue-17441.rs:21:17 + --> $DIR/issue-17441.rs:21:17: in fn main | LL | let _quux = [1_usize, 2] as [usize]; | ^^^^^^^^^^^^ diff --git a/src/test/ui/issue-18819.stderr b/src/test/ui/issue-18819.stderr index 86926863598b2..956ebf9213488 100644 --- a/src/test/ui/issue-18819.stderr +++ b/src/test/ui/issue-18819.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied - --> $DIR/issue-18819.rs:26:5 + --> $DIR/issue-18819.rs:26:5: in fn main | LL | fn print_x(_: &Foo, extra: &str) { | ------------------------------------------- defined here diff --git a/src/test/ui/issue-19100.stderr b/src/test/ui/issue-19100.stderr index 96835f69b78c7..27e36b4e6c5cd 100644 --- a/src/test/ui/issue-19100.stderr +++ b/src/test/ui/issue-19100.stderr @@ -1,5 +1,5 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:27:1 + --> $DIR/issue-19100.rs:27:1: in fn foo::foo | LL | Bar if true | ^^^ @@ -7,7 +7,7 @@ LL | Bar if true = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Bar` warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:31:1 + --> $DIR/issue-19100.rs:31:1: in fn foo::foo | LL | Baz if false | ^^^ diff --git a/src/test/ui/issue-1962.stderr b/src/test/ui/issue-1962.stderr index b7c2bd844811d..0aafc9ae90d92 100644 --- a/src/test/ui/issue-1962.stderr +++ b/src/test/ui/issue-1962.stderr @@ -1,5 +1,5 @@ error: denote infinite loops with `loop { ... }` - --> $DIR/issue-1962.rs:14:3 + --> $DIR/issue-1962.rs:14:3: in fn main | LL | while true { //~ ERROR denote infinite loops with `loop | ^^^^^^^^^^ help: use `loop` diff --git a/src/test/ui/issue-19707.stderr b/src/test/ui/issue-19707.stderr index 56088d38aaf99..772278135d78a 100644 --- a/src/test/ui/issue-19707.stderr +++ b/src/test/ui/issue-19707.stderr @@ -7,7 +7,7 @@ LL | type foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier = 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 error[E0106]: missing lifetime specifier - --> $DIR/issue-19707.rs:15:27 + --> $DIR/issue-19707.rs:15:27: in fn bar | LL | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier | ^ expected lifetime parameter diff --git a/src/test/ui/issue-19922.stderr b/src/test/ui/issue-19922.stderr index a5bc579e1924e..e95c7c22489d0 100644 --- a/src/test/ui/issue-19922.stderr +++ b/src/test/ui/issue-19922.stderr @@ -1,5 +1,5 @@ error[E0559]: variant `Homura::Akemi` has no field named `kaname` - --> $DIR/issue-19922.rs:16:34 + --> $DIR/issue-19922.rs:16:34: in fn main | LL | let homura = Homura::Akemi { kaname: () }; | ^^^^^^ `Homura::Akemi` does not have this field diff --git a/src/test/ui/issue-20692.stderr b/src/test/ui/issue-20692.stderr index 1316773f6b789..89215c7cc1eec 100644 --- a/src/test/ui/issue-20692.stderr +++ b/src/test/ui/issue-20692.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Array` cannot be made into an object - --> $DIR/issue-20692.rs:17:5 + --> $DIR/issue-20692.rs:17:5: in fn f | LL | &Array; | ^^^^^^ the trait `Array` cannot be made into an object @@ -7,7 +7,7 @@ LL | &Array; = note: the trait cannot require that `Self : Sized` error[E0038]: the trait `Array` cannot be made into an object - --> $DIR/issue-20692.rs:14:13 + --> $DIR/issue-20692.rs:14:13: in fn f | LL | let _ = x | ^ the trait `Array` cannot be made into an object diff --git a/src/test/ui/issue-21600.stderr b/src/test/ui/issue-21600.stderr index 873dc7448be25..6907e0c4faa84 100644 --- a/src/test/ui/issue-21600.stderr +++ b/src/test/ui/issue-21600.stderr @@ -1,11 +1,11 @@ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/issue-21600.rs:24:17 + --> $DIR/issue-21600.rs:24:17: in fn main | 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 + --> $DIR/issue-21600.rs:22:13: in fn main | LL | call_it(|| { | _____________^ @@ -16,13 +16,13 @@ LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/issue-21600.rs:24:20 + --> $DIR/issue-21600.rs:24:20: in fn main | 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 + --> $DIR/issue-21600.rs:24:17: in fn main | LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/issue-21950.stderr b/src/test/ui/issue-21950.stderr index a2f74a29aab78..6c4f5d3b7b77d 100644 --- a/src/test/ui/issue-21950.stderr +++ b/src/test/ui/issue-21950.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `RHS` must be explicitly specified - --> $DIR/issue-21950.rs:17:14 + --> $DIR/issue-21950.rs:17:14: in fn main | LL | &Add; | ^^^ missing reference to `RHS` @@ -7,7 +7,7 @@ LL | &Add; = note: because of the default `Self` reference, type parameters must be specified on object types error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified - --> $DIR/issue-21950.rs:17:14 + --> $DIR/issue-21950.rs:17:14: in fn main | LL | &Add; | ^^^ missing associated type `Output` value diff --git a/src/test/ui/issue-22370.stderr b/src/test/ui/issue-22370.stderr index b3691503fc19a..9c7f042ce15e9 100644 --- a/src/test/ui/issue-22370.stderr +++ b/src/test/ui/issue-22370.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `T` must be explicitly specified - --> $DIR/issue-22370.rs:15:10 + --> $DIR/issue-22370.rs:15:10: in fn f | LL | fn f(a: &A) {} | ^ missing reference to `T` diff --git a/src/test/ui/issue-22933-2.stderr b/src/test/ui/issue-22933-2.stderr index 435a89b716f96..b674d20b459ca 100644 --- a/src/test/ui/issue-22933-2.stderr +++ b/src/test/ui/issue-22933-2.stderr @@ -1,5 +1,5 @@ error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope - --> $DIR/issue-22933-2.rs:14:44 + --> $DIR/issue-22933-2.rs:14:44: in enum Delicious | LL | enum Delicious { | -------------- variant `PIE` not found here diff --git a/src/test/ui/issue-23041.stderr b/src/test/ui/issue-23041.stderr index f89bce09c7ed3..949fc7f729316 100644 --- a/src/test/ui/issue-23041.stderr +++ b/src/test/ui/issue-23041.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-23041.rs:16:22 + --> $DIR/issue-23041.rs:16:22: in fn main | LL | b.downcast_ref::_>(); //~ ERROR E0282 | ^^^^^^^^ cannot infer type for `_` diff --git a/src/test/ui/issue-23173.stderr b/src/test/ui/issue-23173.stderr index d58a4d2b8f8a9..3472848928dbc 100644 --- a/src/test/ui/issue-23173.stderr +++ b/src/test/ui/issue-23173.stderr @@ -1,5 +1,5 @@ error[E0599]: no variant named `Homura` found for type `Token` in the current scope - --> $DIR/issue-23173.rs:19:16 + --> $DIR/issue-23173.rs:19:16: in fn main | LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } | ---------- variant `Homura` not found here @@ -8,7 +8,7 @@ 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 + --> $DIR/issue-23173.rs:21:5: in fn main | LL | struct Struct { | ------------- function or associated item `method` not found for this @@ -17,7 +17,7 @@ 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 + --> $DIR/issue-23173.rs:23:5: in fn main | LL | struct Struct { | ------------- function or associated item `method` not found for this @@ -26,7 +26,7 @@ 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 + --> $DIR/issue-23173.rs:25:5: in fn main | LL | struct Struct { | ------------- associated item `Assoc` not found for this diff --git a/src/test/ui/issue-23217.stderr b/src/test/ui/issue-23217.stderr index d542a10e9b605..8bbe613bc4fb3 100644 --- a/src/test/ui/issue-23217.stderr +++ b/src/test/ui/issue-23217.stderr @@ -1,5 +1,5 @@ error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope - --> $DIR/issue-23217.rs:12:9 + --> $DIR/issue-23217.rs:12:9: in enum SomeEnum | LL | pub enum SomeEnum { | ----------------- variant `A` not found here diff --git a/src/test/ui/issue-23302-1.stderr b/src/test/ui/issue-23302-1.stderr index 6ff46a7e21fda..790fca0a71974 100644 --- a/src/test/ui/issue-23302-1.stderr +++ b/src/test/ui/issue-23302-1.stderr @@ -1,12 +1,12 @@ error[E0391]: cycle detected when processing `X::A::{{initializer}}` - --> $DIR/issue-23302-1.rs:14:9 + --> $DIR/issue-23302-1.rs:14:9: in enum X | LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ | = note: ...which again requires processing `X::A::{{initializer}}`, completing the cycle note: cycle used when const-evaluating `X::A::{{initializer}}` - --> $DIR/issue-23302-1.rs:14:9 + --> $DIR/issue-23302-1.rs:14:9: in enum X | LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ diff --git a/src/test/ui/issue-23302-2.stderr b/src/test/ui/issue-23302-2.stderr index 6b72a5b544dce..dbf95ad4e06f7 100644 --- a/src/test/ui/issue-23302-2.stderr +++ b/src/test/ui/issue-23302-2.stderr @@ -1,12 +1,12 @@ error[E0391]: cycle detected when processing `Y::A::{{initializer}}` - --> $DIR/issue-23302-2.rs:14:9 + --> $DIR/issue-23302-2.rs:14:9: in enum Y | LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ | = note: ...which again requires processing `Y::A::{{initializer}}`, completing the cycle note: cycle used when const-evaluating `Y::A::{{initializer}}` - --> $DIR/issue-23302-2.rs:14:9 + --> $DIR/issue-23302-2.rs:14:9: in enum Y | LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ diff --git a/src/test/ui/issue-23543.stderr b/src/test/ui/issue-23543.stderr index ea443f1cbbbae..aae502e9a2c00 100644 --- a/src/test/ui/issue-23543.stderr +++ b/src/test/ui/issue-23543.stderr @@ -1,5 +1,5 @@ error[E0229]: associated type bindings are not allowed here - --> $DIR/issue-23543.rs:17:17 + --> $DIR/issue-23543.rs:17:17: in trait D::f | LL | where T: A; | ^^^^^^^^^^^ associated type not allowed here diff --git a/src/test/ui/issue-23544.stderr b/src/test/ui/issue-23544.stderr index 147e2a212edd1..618caa3743acb 100644 --- a/src/test/ui/issue-23544.stderr +++ b/src/test/ui/issue-23544.stderr @@ -1,5 +1,5 @@ error[E0229]: associated type bindings are not allowed here - --> $DIR/issue-23544.rs:15:17 + --> $DIR/issue-23544.rs:15:17: in trait D::f | LL | where T: A; | ^^^^^^^^^^^^^^^^^^^^^^^ associated type not allowed here diff --git a/src/test/ui/issue-24036.stderr b/src/test/ui/issue-24036.stderr index 24995be773e7a..a97676b4ddaf5 100644 --- a/src/test/ui/issue-24036.stderr +++ b/src/test/ui/issue-24036.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-24036.rs:13:9 + --> $DIR/issue-24036.rs:13:9: in fn closure_to_loc | LL | x = |c| c + 1; | ^^^^^^^^^ expected closure, found a different closure @@ -10,7 +10,7 @@ LL | x = |c| c + 1; = help: consider boxing your closure and/or using it as a trait object error[E0308]: match arms have incompatible types - --> $DIR/issue-24036.rs:18:13 + --> $DIR/issue-24036.rs:18:13: in fn closure_from_match | LL | let x = match 1usize { | _____________^ diff --git a/src/test/ui/issue-25385.stderr b/src/test/ui/issue-25385.stderr index f12388d4b458b..0845b338adb20 100644 --- a/src/test/ui/issue-25385.stderr +++ b/src/test/ui/issue-25385.stderr @@ -8,7 +8,7 @@ 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 + --> $DIR/issue-25385.rs:21:15: in fn main | LL | foo!(1i32.foo()); | ^^^ diff --git a/src/test/ui/issue-25826.stderr b/src/test/ui/issue-25826.stderr index fed9e8efa8487..6c7c0cfc20e36 100644 --- a/src/test/ui/issue-25826.stderr +++ b/src/test/ui/issue-25826.stderr @@ -1,5 +1,5 @@ error[E0395]: raw pointers cannot be compared in constants - --> $DIR/issue-25826.rs:13:21 + --> $DIR/issue-25826.rs:13:21: in fn main | LL | const A: bool = id:: as *const () < id:: as *const (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comparing raw pointers in static diff --git a/src/test/ui/issue-26056.stderr b/src/test/ui/issue-26056.stderr index 51a48af81a163..81634c2f18821 100644 --- a/src/test/ui/issue-26056.stderr +++ b/src/test/ui/issue-26056.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Map` cannot be made into an object - --> $DIR/issue-26056.rs:30:13 + --> $DIR/issue-26056.rs:30:13: in fn main | LL | as &Map; | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Map` cannot be made into an object diff --git a/src/test/ui/issue-26472.stderr b/src/test/ui/issue-26472.stderr index 26f54f61a7ee6..09af17048278d 100644 --- a/src/test/ui/issue-26472.stderr +++ b/src/test/ui/issue-26472.stderr @@ -1,5 +1,5 @@ error[E0616]: field `len` of struct `sub::S` is private - --> $DIR/issue-26472.rs:21:13 + --> $DIR/issue-26472.rs:21:13: in fn main | LL | let v = s.len; | ^^^^^ diff --git a/src/test/ui/issue-26638.stderr b/src/test/ui/issue-26638.stderr index cf6fcd9f01cc8..3423a9a0e1b9c 100644 --- a/src/test/ui/issue-26638.stderr +++ b/src/test/ui/issue-26638.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/issue-26638.rs:11:58 + --> $DIR/issue-26638.rs:11:58: in fn parse_type | LL | fn parse_type(iter: Box+'static>) -> &str { iter.next() } | ^ expected lifetime parameter @@ -7,7 +7,7 @@ LL | fn parse_type(iter: Box+'static>) -> &str { iter.next() = 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 error[E0106]: missing lifetime specifier - --> $DIR/issue-26638.rs:14:40 + --> $DIR/issue-26638.rs:14:40: in fn parse_type_2 | LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } | ^ expected lifetime parameter @@ -16,7 +16,7 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } = help: consider giving it an explicit bounded or 'static lifetime error[E0106]: missing lifetime specifier - --> $DIR/issue-26638.rs:17:22 + --> $DIR/issue-26638.rs:17:22: in fn parse_type_3 | LL | fn parse_type_3() -> &str { unimplemented!() } | ^ expected lifetime parameter diff --git a/src/test/ui/issue-27842.stderr b/src/test/ui/issue-27842.stderr index 026594811e479..17ea7b67e29a3 100644 --- a/src/test/ui/issue-27842.stderr +++ b/src/test/ui/issue-27842.stderr @@ -1,11 +1,11 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})` - --> $DIR/issue-27842.rs:14:13 + --> $DIR/issue-27842.rs:14:13: in fn main | 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 + --> $DIR/issue-27842.rs:19:13: in fn main | LL | let _ = tup[i]; | ^^^^^^ diff --git a/src/test/ui/issue-27942.stderr b/src/test/ui/issue-27942.stderr index 879eda0f85640..30dd73038f6c3 100644 --- a/src/test/ui/issue-27942.stderr +++ b/src/test/ui/issue-27942.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-27942.rs:15:5 + --> $DIR/issue-27942.rs:15:5: in trait Buffer | LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch @@ -7,7 +7,7 @@ LL | fn select(&self) -> BufferViewHandle; = note: expected type `Resources<'_>` found type `Resources<'a>` note: the anonymous lifetime #1 defined on the method body at 15:5... - --> $DIR/issue-27942.rs:15:5 + --> $DIR/issue-27942.rs:15:5: in trait Buffer | LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | pub trait Buffer<'a, R: Resources<'a>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/issue-27942.rs:15:5 + --> $DIR/issue-27942.rs:15:5: in trait Buffer | LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch @@ -31,7 +31,7 @@ note: the lifetime 'a as defined on the trait at 13:1... 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 + --> $DIR/issue-27942.rs:15:5: in trait Buffer | LL | fn select(&self) -> BufferViewHandle; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issue-28776.stderr b/src/test/ui/issue-28776.stderr index 3b468a8820544..6c63cd4a616e8 100644 --- a/src/test/ui/issue-28776.stderr +++ b/src/test/ui/issue-28776.stderr @@ -1,5 +1,5 @@ error[E0133]: call to unsafe function requires unsafe function or block - --> $DIR/issue-28776.rs:14:5 + --> $DIR/issue-28776.rs:14:5: in fn main | LL | (&ptr::write)(1 as *mut _, 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function diff --git a/src/test/ui/issue-28837.stderr b/src/test/ui/issue-28837.stderr index 88994eaeb9376..c6d7476489a1b 100644 --- a/src/test/ui/issue-28837.stderr +++ b/src/test/ui/issue-28837.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `A` - --> $DIR/issue-28837.rs:16:5 + --> $DIR/issue-28837.rs:16:5: in fn main | LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` | ^^^^^ @@ -7,7 +7,7 @@ LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` = note: an implementation of `std::ops::Add` might be missing for `A` error[E0369]: binary operation `-` cannot be applied to type `A` - --> $DIR/issue-28837.rs:18:5 + --> $DIR/issue-28837.rs:18:5: in fn main | LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` | ^^^^^ @@ -15,7 +15,7 @@ LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` = note: an implementation of `std::ops::Sub` might be missing for `A` error[E0369]: binary operation `*` cannot be applied to type `A` - --> $DIR/issue-28837.rs:20:5 + --> $DIR/issue-28837.rs:20:5: in fn main | LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` | ^^^^^ @@ -23,7 +23,7 @@ LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` = note: an implementation of `std::ops::Mul` might be missing for `A` error[E0369]: binary operation `/` cannot be applied to type `A` - --> $DIR/issue-28837.rs:22:5 + --> $DIR/issue-28837.rs:22:5: in fn main | LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` | ^^^^^ @@ -31,7 +31,7 @@ LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` = note: an implementation of `std::ops::Div` might be missing for `A` error[E0369]: binary operation `%` cannot be applied to type `A` - --> $DIR/issue-28837.rs:24:5 + --> $DIR/issue-28837.rs:24:5: in fn main | LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` | ^^^^^ @@ -39,7 +39,7 @@ LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` = note: an implementation of `std::ops::Rem` might be missing for `A` error[E0369]: binary operation `&` cannot be applied to type `A` - --> $DIR/issue-28837.rs:26:5 + --> $DIR/issue-28837.rs:26:5: in fn main | LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` | ^^^^^ @@ -47,7 +47,7 @@ LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` = note: an implementation of `std::ops::BitAnd` might be missing for `A` error[E0369]: binary operation `|` cannot be applied to type `A` - --> $DIR/issue-28837.rs:28:5 + --> $DIR/issue-28837.rs:28:5: in fn main | LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` | ^^^^^ @@ -55,7 +55,7 @@ LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` = note: an implementation of `std::ops::BitOr` might be missing for `A` error[E0369]: binary operation `<<` cannot be applied to type `A` - --> $DIR/issue-28837.rs:30:5 + --> $DIR/issue-28837.rs:30:5: in fn main | LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` | ^^^^^^ @@ -63,7 +63,7 @@ LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` = note: an implementation of `std::ops::Shl` might be missing for `A` error[E0369]: binary operation `>>` cannot be applied to type `A` - --> $DIR/issue-28837.rs:32:5 + --> $DIR/issue-28837.rs:32:5: in fn main | LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` | ^^^^^^ @@ -71,7 +71,7 @@ LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` = note: an implementation of `std::ops::Shr` might be missing for `A` error[E0369]: binary operation `==` cannot be applied to type `A` - --> $DIR/issue-28837.rs:34:5 + --> $DIR/issue-28837.rs:34:5: in fn main | LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` | ^^^^^^ @@ -79,7 +79,7 @@ LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` = note: an implementation of `std::cmp::PartialEq` might be missing for `A` error[E0369]: binary operation `!=` cannot be applied to type `A` - --> $DIR/issue-28837.rs:36:5 + --> $DIR/issue-28837.rs:36:5: in fn main | LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` | ^^^^^^ @@ -87,7 +87,7 @@ LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` = note: an implementation of `std::cmp::PartialEq` might be missing for `A` error[E0369]: binary operation `<` cannot be applied to type `A` - --> $DIR/issue-28837.rs:38:5 + --> $DIR/issue-28837.rs:38:5: in fn main | LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` | ^^^^^ @@ -95,7 +95,7 @@ LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` error[E0369]: binary operation `<=` cannot be applied to type `A` - --> $DIR/issue-28837.rs:40:5 + --> $DIR/issue-28837.rs:40:5: in fn main | LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` | ^^^^^^ @@ -103,7 +103,7 @@ LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` error[E0369]: binary operation `>` cannot be applied to type `A` - --> $DIR/issue-28837.rs:42:5 + --> $DIR/issue-28837.rs:42:5: in fn main | LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` | ^^^^^ @@ -111,7 +111,7 @@ LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` error[E0369]: binary operation `>=` cannot be applied to type `A` - --> $DIR/issue-28837.rs:44:5 + --> $DIR/issue-28837.rs:44:5: in fn main | LL | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` | ^^^^^^ diff --git a/src/test/ui/issue-28971.stderr b/src/test/ui/issue-28971.stderr index df114351ff571..3790266ef97b2 100644 --- a/src/test/ui/issue-28971.stderr +++ b/src/test/ui/issue-28971.stderr @@ -1,5 +1,5 @@ error[E0599]: no variant named `Baz` found for type `Foo` in the current scope - --> $DIR/issue-28971.rs:19:13 + --> $DIR/issue-28971.rs:19:13: in fn main | LL | enum Foo { | -------- variant `Baz` not found here diff --git a/src/test/ui/issue-29124.stderr b/src/test/ui/issue-29124.stderr index bd00772dfd287..741058478d565 100644 --- a/src/test/ui/issue-29124.stderr +++ b/src/test/ui/issue-29124.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `x` found for type `fn() -> ret {obj::func}` in the current scope - --> $DIR/issue-29124.rs:25:15 + --> $DIR/issue-29124.rs:25:15: in fn main | LL | obj::func.x(); | ^ @@ -7,7 +7,7 @@ LL | obj::func.x(); = note: obj::func is a function, perhaps you wish to call it error[E0599]: no method named `x` found for type `fn() -> ret {func}` in the current scope - --> $DIR/issue-29124.rs:27:10 + --> $DIR/issue-29124.rs:27:10: in fn main | LL | func.x(); | ^ diff --git a/src/test/ui/issue-29723.stderr b/src/test/ui/issue-29723.stderr index 48e50b9dea9c1..7c7a479b532ef 100644 --- a/src/test/ui/issue-29723.stderr +++ b/src/test/ui/issue-29723.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `s` - --> $DIR/issue-29723.rs:22:13 + --> $DIR/issue-29723.rs:22:13: in fn main | LL | 0 if { drop(s); false } => String::from("oops"), | - value moved here diff --git a/src/test/ui/issue-30255.stderr b/src/test/ui/issue-30255.stderr index 9556f6d9e2307..944dc4164fd51 100644 --- a/src/test/ui/issue-30255.stderr +++ b/src/test/ui/issue-30255.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/issue-30255.rs:18:24 + --> $DIR/issue-30255.rs:18:24: in fn f | LL | fn f(a: &S, b: i32) -> &i32 { | ^ expected lifetime parameter @@ -7,7 +7,7 @@ LL | fn f(a: &S, b: i32) -> &i32 { = 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 error[E0106]: missing lifetime specifier - --> $DIR/issue-30255.rs:23:34 + --> $DIR/issue-30255.rs:23:34: in fn g | LL | fn g(a: &S, b: bool, c: &i32) -> &i32 { | ^ expected lifetime parameter @@ -15,7 +15,7 @@ LL | fn g(a: &S, b: bool, c: &i32) -> &i32 { = 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` error[E0106]: missing lifetime specifier - --> $DIR/issue-30255.rs:28:44 + --> $DIR/issue-30255.rs:28:44: in fn h | LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 { | ^ expected lifetime parameter diff --git a/src/test/ui/issue-30302.stderr b/src/test/ui/issue-30302.stderr index 42dfdadf9c46f..85caa8ea319ef 100644 --- a/src/test/ui/issue-30302.stderr +++ b/src/test/ui/issue-30302.stderr @@ -1,5 +1,5 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants of the type `Stack` - --> $DIR/issue-30302.rs:23:9 + --> $DIR/issue-30302.rs:23:9: in fn is_empty | LL | Nil => true, | ^^^ @@ -7,7 +7,7 @@ LL | Nil => true, = help: if you meant to match on a variant, consider making the path in the pattern qualified: `Stack::Nil` error: unreachable pattern - --> $DIR/issue-30302.rs:25:9 + --> $DIR/issue-30302.rs:25:9: in fn is_empty | LL | Nil => true, | --- matches any value diff --git a/src/test/ui/issue-3044.stderr b/src/test/ui/issue-3044.stderr index cdca9be48ac68..d9f1d8df91a24 100644 --- a/src/test/ui/issue-3044.stderr +++ b/src/test/ui/issue-3044.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied - --> $DIR/issue-3044.rs:14:23 + --> $DIR/issue-3044.rs:14:23: in fn main | LL | needlesArr.iter().fold(|x, y| { | ^^^^ expected 2 parameters diff --git a/src/test/ui/issue-31221.stderr b/src/test/ui/issue-31221.stderr index 56c7b8ab6e757..6a3e20a219aeb 100644 --- a/src/test/ui/issue-31221.stderr +++ b/src/test/ui/issue-31221.stderr @@ -1,5 +1,5 @@ error: unreachable pattern - --> $DIR/issue-31221.rs:28:9 + --> $DIR/issue-31221.rs:28:9: in fn main | LL | Var3 => (), | ---- matches any value @@ -13,7 +13,7 @@ LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/issue-31221.rs:34:9 + --> $DIR/issue-31221.rs:34:9: in fn main | LL | &Var3 => (), | ----- matches any value @@ -21,7 +21,7 @@ LL | &Var2 => (), | ^^^^^ unreachable pattern error: unreachable pattern - --> $DIR/issue-31221.rs:41:9 + --> $DIR/issue-31221.rs:41:9: in fn main | LL | (c, d) => (), | ------ matches any value diff --git a/src/test/ui/issue-33525.stderr b/src/test/ui/issue-33525.stderr index 2b365e1cc98ba..c61bcb8ef9d4f 100644 --- a/src/test/ui/issue-33525.stderr +++ b/src/test/ui/issue-33525.stderr @@ -5,13 +5,13 @@ 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 + --> $DIR/issue-33525.rs:13:8: in fn main | LL | "".lorem; //~ ERROR no field | ^^^^^ error[E0609]: no field `ipsum` on type `&'static str` - --> $DIR/issue-33525.rs:14:8 + --> $DIR/issue-33525.rs:14:8: in fn main | LL | "".ipsum; //~ ERROR no field | ^^^^^ diff --git a/src/test/ui/issue-33941.stderr b/src/test/ui/issue-33941.stderr index f20b87fa371f2..d64e58cbf47d6 100644 --- a/src/test/ui/issue-33941.stderr +++ b/src/test/ui/issue-33941.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` - --> $DIR/issue-33941.rs:14:36 + --> $DIR/issue-33941.rs:14:36: in fn main | LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^ expected tuple, found reference @@ -8,7 +8,7 @@ LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch found type `&_` error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` - --> $DIR/issue-33941.rs:14:14 + --> $DIR/issue-33941.rs:14:14: in fn main | LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference diff --git a/src/test/ui/issue-34209.stderr b/src/test/ui/issue-34209.stderr index 5c31acea5b600..7f5c6e7423781 100644 --- a/src/test/ui/issue-34209.stderr +++ b/src/test/ui/issue-34209.stderr @@ -1,5 +1,5 @@ error[E0223]: ambiguous associated type - --> $DIR/issue-34209.rs:17:9 + --> $DIR/issue-34209.rs:17:9: in fn bug | LL | S::B{ } => { }, | ^^^^ ambiguous associated type diff --git a/src/test/ui/issue-35241.stderr b/src/test/ui/issue-35241.stderr index 42bf0aae5b12c..4f14f5f57dd00 100644 --- a/src/test/ui/issue-35241.stderr +++ b/src/test/ui/issue-35241.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-35241.rs:13:20 + --> $DIR/issue-35241.rs:13:20: in fn test | LL | fn test() -> Foo { Foo } //~ ERROR mismatched types | --- ^^^ diff --git a/src/test/ui/issue-35869.stderr b/src/test/ui/issue-35869.stderr index 1930dd5bbcb8e..f3ee451286a9c 100644 --- a/src/test/ui/issue-35869.stderr +++ b/src/test/ui/issue-35869.stderr @@ -1,5 +1,5 @@ error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/issue-35869.rs:21:15 + --> $DIR/issue-35869.rs:21:15: in fn foo::foo | LL | fn foo(_: fn(u8) -> ()); | ------------ type in trait @@ -11,7 +11,7 @@ LL | fn foo(_: fn(u16) -> ()) {} found type `fn(fn(u16))` error[E0053]: method `bar` has an incompatible type for trait - --> $DIR/issue-35869.rs:23:15 + --> $DIR/issue-35869.rs:23:15: in fn bar::bar | LL | fn bar(_: Option); | ---------- type in trait @@ -23,7 +23,7 @@ LL | fn bar(_: Option) {} found type `fn(std::option::Option)` error[E0053]: method `baz` has an incompatible type for trait - --> $DIR/issue-35869.rs:25:15 + --> $DIR/issue-35869.rs:25:15: in fn baz::baz | LL | fn baz(_: (u8, u16)); | --------- type in trait @@ -35,7 +35,7 @@ LL | fn baz(_: (u16, u16)) {} found type `fn((u16, u16))` error[E0053]: method `qux` has an incompatible type for trait - --> $DIR/issue-35869.rs:27:17 + --> $DIR/issue-35869.rs:27:17: in fn qux::qux | LL | fn qux() -> u8; | -- type in trait diff --git a/src/test/ui/issue-35976.stderr b/src/test/ui/issue-35976.stderr index f97ba33dfd32b..c57299b7432a4 100644 --- a/src/test/ui/issue-35976.stderr +++ b/src/test/ui/issue-35976.stderr @@ -1,5 +1,5 @@ error: the `wait` method cannot be invoked on a trait object - --> $DIR/issue-35976.rs:24:9 + --> $DIR/issue-35976.rs:24:9: in fn bar | LL | arg.wait(); | ^^^^ diff --git a/src/test/ui/issue-36163.stderr b/src/test/ui/issue-36163.stderr index 7199fffd386b4..51468b0edf401 100644 --- a/src/test/ui/issue-36163.stderr +++ b/src/test/ui/issue-36163.stderr @@ -1,5 +1,5 @@ error[E0391]: cycle detected when processing `Foo::B::{{initializer}}` - --> $DIR/issue-36163.rs:14:9 + --> $DIR/issue-36163.rs:14:9: in enum Foo | LL | B = A, //~ ERROR E0391 | ^ @@ -11,7 +11,7 @@ LL | const A: isize = Foo::B as isize; | ^^^^^^^^^^^^^^^ = note: ...which again requires processing `Foo::B::{{initializer}}`, completing the cycle note: cycle used when const-evaluating `Foo::B::{{initializer}}` - --> $DIR/issue-36163.rs:14:9 + --> $DIR/issue-36163.rs:14:9: in enum Foo | LL | B = A, //~ ERROR E0391 | ^ diff --git a/src/test/ui/issue-36400.stderr b/src/test/ui/issue-36400.stderr index dbd6999b4f29f..eea0e44353fea 100644 --- a/src/test/ui/issue-36400.stderr +++ b/src/test/ui/issue-36400.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable - --> $DIR/issue-36400.rs:15:12 + --> $DIR/issue-36400.rs:15:12: in fn main | LL | let x = Box::new(3); | - consider changing this to `mut x` diff --git a/src/test/ui/issue-36708.stderr b/src/test/ui/issue-36708.stderr index 4e28a769f5069..8358e1f3de0ff 100644 --- a/src/test/ui/issue-36708.stderr +++ b/src/test/ui/issue-36708.stderr @@ -1,5 +1,5 @@ error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/issue-36708.rs:18:11 + --> $DIR/issue-36708.rs:18:11: in fn foo::foo | LL | fn foo() {} | ^^^ found 1 type parameter, expected 0 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 70be30e4f71d9..4bd626512b731 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,5 +1,5 @@ error[E0507]: cannot move out of indexed content - --> $DIR/issue-40402-1.rs:19:13 + --> $DIR/issue-40402-1.rs:19:13: in fn main | LL | let e = f.v[0]; //~ ERROR 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 4ed28963b5b9f..40dc250d8f887 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,5 +1,5 @@ error[E0507]: cannot move out of indexed content - --> $DIR/issue-40402-2.rs:15:18 + --> $DIR/issue-40402-2.rs:15:18: in fn main | LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content | - - ^^^^ cannot move out of indexed content diff --git a/src/test/ui/issue-41652/issue_41652.stderr b/src/test/ui/issue-41652/issue_41652.stderr index 3f76b25692cf1..9a73f79b4395d 100644 --- a/src/test/ui/issue-41652/issue_41652.stderr +++ b/src/test/ui/issue-41652/issue_41652.stderr @@ -1,5 +1,5 @@ error[E0689]: can't call method `f` on ambiguous numeric type `{integer}` - --> $DIR/issue_41652.rs:19:11 + --> $DIR/issue_41652.rs:19:11: in fn f::f | LL | 3.f() | ^ diff --git a/src/test/ui/issue-42106.stderr b/src/test/ui/issue-42106.stderr index b8944bb242390..c4cb5d26338ab 100644 --- a/src/test/ui/issue-42106.stderr +++ b/src/test/ui/issue-42106.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable - --> $DIR/issue-42106.rs:13:5 + --> $DIR/issue-42106.rs:13:5: in fn do_something | LL | let _a = &collection; | ---------- immutable borrow occurs here diff --git a/src/test/ui/issue-4335.stderr b/src/test/ui/issue-4335.stderr index 80f5b445bb641..09a6cacd1c995 100644 --- a/src/test/ui/issue-4335.stderr +++ b/src/test/ui/issue-4335.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/issue-4335.rs:16:17: in fn f | LL | id(Box::new(|| *v)) | ^^ - `v` is borrowed here @@ -11,7 +11,7 @@ LL | id(Box::new(move || *v)) | ^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/issue-4335.rs:16:20 + --> $DIR/issue-4335.rs:16:20: in fn f | LL | id(Box::new(|| *v)) | ^^ cannot move out of borrowed content 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 eaf7569100ad3..b6b733cd45eca 100644 --- a/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr +++ b/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr @@ -1,5 +1,5 @@ error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13 + --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13: in fn main | LL | unsafe { | ------ because it's nested under this `unsafe` block @@ -14,7 +14,7 @@ LL | #[deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38 + --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38: in fn main | LL | unsafe { | ------ because it's nested under this `unsafe` block @@ -23,7 +23,7 @@ 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 + --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:23:34: in fn main | LL | unsafe { | ------ because it's nested under this `unsafe` block diff --git a/src/test/ui/issue-45157.stderr b/src/test/ui/issue-45157.stderr index e528a84ebd1a5..b24f0af58d070 100644 --- a/src/test/ui/issue-45157.stderr +++ b/src/test/ui/issue-45157.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `u.z.c` as immutable because it is also borrowed as mutable - --> $DIR/issue-45157.rs:37:20 + --> $DIR/issue-45157.rs:37:20: in fn main | LL | let mref = &mut u.s.a; | ---------- mutable borrow occurs here diff --git a/src/test/ui/issue-45697-1.stderr b/src/test/ui/issue-45697-1.stderr index cf108691a0e4f..af9594cb27121 100644 --- a/src/test/ui/issue-45697-1.stderr +++ b/src/test/ui/issue-45697-1.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) - --> $DIR/issue-45697-1.rs:30:9 + --> $DIR/issue-45697-1.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here @@ -7,7 +7,7 @@ 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 + --> $DIR/issue-45697-1.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here @@ -18,7 +18,7 @@ LL | *z.pointer += 1; | --------------- borrow later used here error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir) - --> $DIR/issue-45697-1.rs:30:9 + --> $DIR/issue-45697-1.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `*y.pointer` occurs here diff --git a/src/test/ui/issue-45697.stderr b/src/test/ui/issue-45697.stderr index a85972fcd7a1c..10fa01ed1dbe1 100644 --- a/src/test/ui/issue-45697.stderr +++ b/src/test/ui/issue-45697.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) - --> $DIR/issue-45697.rs:30:9 + --> $DIR/issue-45697.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here @@ -7,7 +7,7 @@ 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 + --> $DIR/issue-45697.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here @@ -18,7 +18,7 @@ LL | *z.pointer += 1; | --------------- borrow later used here error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir) - --> $DIR/issue-45697.rs:30:9 + --> $DIR/issue-45697.rs:30:9: in fn main | LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `*y.pointer` occurs here diff --git a/src/test/ui/issue-45730.stderr b/src/test/ui/issue-45730.stderr index aa5773e3dbff1..53a946b87ddf3 100644 --- a/src/test/ui/issue-45730.stderr +++ b/src/test/ui/issue-45730.stderr @@ -1,5 +1,5 @@ error[E0641]: cannot cast to a pointer of an unknown kind - --> $DIR/issue-45730.rs:13:23 + --> $DIR/issue-45730.rs:13:23: in fn main | LL | let x: *const _ = 0 as _; //~ ERROR cannot cast | ^^^^^- @@ -9,7 +9,7 @@ LL | let x: *const _ = 0 as _; //~ ERROR cannot cast = note: The type information given here is insufficient to check whether the pointer cast is valid error[E0641]: cannot cast to a pointer of an unknown kind - --> $DIR/issue-45730.rs:15:23 + --> $DIR/issue-45730.rs:15:23: in fn main | LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast | ^^^^^-------- @@ -19,7 +19,7 @@ LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast = note: The type information given here is insufficient to check whether the pointer cast is valid error[E0641]: cannot cast to a pointer of an unknown kind - --> $DIR/issue-45730.rs:18:13 + --> $DIR/issue-45730.rs:18:13: in fn main | LL | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ diff --git a/src/test/ui/issue-46112.stderr b/src/test/ui/issue-46112.stderr index 796187b93aa94..fbfcfe2046166 100644 --- a/src/test/ui/issue-46112.stderr +++ b/src/test/ui/issue-46112.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-46112.rs:19:21 + --> $DIR/issue-46112.rs:19:21: in fn main | LL | fn main() { test(Ok(())); } | ^^ diff --git a/src/test/ui/issue-46471-1.stderr b/src/test/ui/issue-46471-1.stderr index 0108056bc7278..45168b6098d4e 100644 --- a/src/test/ui/issue-46471-1.stderr +++ b/src/test/ui/issue-46471-1.stderr @@ -1,5 +1,5 @@ error[E0597]: `z` does not live long enough (Ast) - --> $DIR/issue-46471-1.rs:16:14 + --> $DIR/issue-46471-1.rs:16:14: in fn main | LL | &mut z | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - borrowed value needs to live until here error[E0597]: `z` does not live long enough (Mir) - --> $DIR/issue-46471-1.rs:16:9 + --> $DIR/issue-46471-1.rs:16:9: in fn main | LL | let y = { | _____________- diff --git a/src/test/ui/issue-46471.stderr b/src/test/ui/issue-46471.stderr index ac974afa13a1e..59c935b2b023e 100644 --- a/src/test/ui/issue-46471.stderr +++ b/src/test/ui/issue-46471.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough (Ast) - --> $DIR/issue-46471.rs:15:6 + --> $DIR/issue-46471.rs:15:6: in fn foo | LL | &x | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: borrowed value must be valid for the static lifetime... error[E0597]: `x` does not live long enough (Mir) - --> $DIR/issue-46471.rs:15:5 + --> $DIR/issue-46471.rs:15:5: in fn foo | LL | &x | ^^ borrowed value does not live long enough diff --git a/src/test/ui/issue-46472.stderr b/src/test/ui/issue-46472.stderr index 9b55b78b43d57..edb25b63f5287 100644 --- a/src/test/ui/issue-46472.stderr +++ b/src/test/ui/issue-46472.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough (Ast) - --> $DIR/issue-46472.rs:14:10 + --> $DIR/issue-46472.rs:14:10: in fn bar | LL | &mut 4 | ^ temporary value does not live long enough @@ -14,7 +14,7 @@ LL | fn bar<'a>() -> &'a mut u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: borrowed value does not live long enough (Mir) - --> $DIR/issue-46472.rs:14:10 + --> $DIR/issue-46472.rs:14:10: in fn bar | LL | &mut 4 | ^ temporary value does not live long enough diff --git a/src/test/ui/issue-46983.stderr b/src/test/ui/issue-46983.stderr index 31aeebd5a721e..094770d80e997 100644 --- a/src/test/ui/issue-46983.stderr +++ b/src/test/ui/issue-46983.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/issue-46983.rs:14:5 + --> $DIR/issue-46983.rs:14:5: in fn foo | LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&'static u32` 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 4a1c9b554a931..eddd91b4336bb 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,11 +1,11 @@ error[E0609]: no field `00` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:18:30 + --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:18:30: in fn main | LL | let _condemned = justice.00; | ^^ did you mean `0`? error[E0609]: no field `001` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:20:31 + --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:20:31: in fn main | LL | let _punishment = justice.001; | ^^^ unknown field diff --git a/src/test/ui/issue-47184.stderr b/src/test/ui/issue-47184.stderr index a9eb33f01e3e0..e2ff46f889894 100644 --- a/src/test/ui/issue-47184.stderr +++ b/src/test/ui/issue-47184.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/issue-47184.rs:14:44 + --> $DIR/issue-47184.rs:14:44: in fn main | LL | let _vec: Vec<&'static String> = vec![&String::new()]; | ^^^^^^^^^^^^^ temporary value does not live long enough diff --git a/src/test/ui/issue-47377.stderr b/src/test/ui/issue-47377.stderr index 66c4a1277a0f1..d2c9517b73307 100644 --- a/src/test/ui/issue-47377.stderr +++ b/src/test/ui/issue-47377.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` - --> $DIR/issue-47377.rs:13:12 + --> $DIR/issue-47377.rs:13:12: in fn main | LL | let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings diff --git a/src/test/ui/issue-47380.stderr b/src/test/ui/issue-47380.stderr index 585a2ec64d06c..209a43b232e1f 100644 --- a/src/test/ui/issue-47380.stderr +++ b/src/test/ui/issue-47380.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` - --> $DIR/issue-47380.rs:12:33 + --> $DIR/issue-47380.rs:12:33: in fn main | LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings diff --git a/src/test/ui/issue-47511.stderr b/src/test/ui/issue-47511.stderr index 6ee71fc6c73d3..4a0885538808b 100644 --- a/src/test/ui/issue-47511.stderr +++ b/src/test/ui/issue-47511.stderr @@ -1,5 +1,5 @@ error[E0581]: return type references an anonymous lifetime which is not constrained by the fn input types - --> $DIR/issue-47511.rs:15:15 + --> $DIR/issue-47511.rs:15:15: in fn f | LL | fn f(_: X) -> X { | ^ @@ -7,7 +7,7 @@ LL | fn f(_: X) -> X { = note: lifetimes appearing in an associated type are not considered constrained error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types - --> $DIR/issue-47511.rs:20:23 + --> $DIR/issue-47511.rs:20:23: in fn g | LL | fn g<'a>(_: X<'a>) -> X<'a> { | ^^^^^ diff --git a/src/test/ui/issue-47646.stderr b/src/test/ui/issue-47646.stderr index b1289146e0ea9..555445fc7d6d4 100644 --- a/src/test/ui/issue-47646.stderr +++ b/src/test/ui/issue-47646.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `heap` as immutable because it is also borrowed as mutable - --> $DIR/issue-47646.rs:22:30 + --> $DIR/issue-47646.rs:22:30: in fn main | LL | let borrow = heap.peek_mut(); | ---- mutable borrow occurs here diff --git a/src/test/ui/issue-47706-trait.stderr b/src/test/ui/issue-47706-trait.stderr index 717b3eb0b5625..f1dc18109fb81 100644 --- a/src/test/ui/issue-47706-trait.stderr +++ b/src/test/ui/issue-47706-trait.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/issue-47706-trait.rs:13:20: in fn T::f::f | LL | fn f(&self, _: ()) { | ------------------ takes 2 distinct arguments diff --git a/src/test/ui/issue-47706.stderr b/src/test/ui/issue-47706.stderr index 0a5c8beccd131..aa2f8a4948b27 100644 --- a/src/test/ui/issue-47706.stderr +++ b/src/test/ui/issue-47706.stderr @@ -1,5 +1,5 @@ error[E0593]: function is expected to take 1 argument, but it takes 2 arguments - --> $DIR/issue-47706.rs:21:18 + --> $DIR/issue-47706.rs:21:18: in fn map::map | LL | pub fn new(foo: Option, _: ()) -> Foo { | ------------------------------------------ takes 2 arguments @@ -8,7 +8,7 @@ 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 + --> $DIR/issue-47706.rs:37:5: in fn main | LL | Bar(i32), | -------- takes 1 argument diff --git a/src/test/ui/issue-48803.stderr b/src/test/ui/issue-48803.stderr index b37e2c07d23d7..4eea828bffb36 100644 --- a/src/test/ui/issue-48803.stderr +++ b/src/test/ui/issue-48803.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/issue-48803.rs:22:5 + --> $DIR/issue-48803.rs:22:5: in fn main | LL | let y = &x; | -- borrow of `x` occurs here diff --git a/src/test/ui/issue-49257.stderr b/src/test/ui/issue-49257.stderr index fec990764bb14..79f03daadf5b0 100644 --- a/src/test/ui/issue-49257.stderr +++ b/src/test/ui/issue-49257.stderr @@ -5,7 +5,7 @@ LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` | ^ `..` must be in the last position, and cannot have a trailing comma error[E0027]: pattern does not mention fields `x`, `y` - --> $DIR/issue-49257.rs:20:9 + --> $DIR/issue-49257.rs:20:9: in fn main | LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` | ^^^^^^^^^^^^^^^ missing fields `x`, `y` diff --git a/src/test/ui/issue-4935.stderr b/src/test/ui/issue-4935.stderr index 25efd54443ae1..443d4a6f1b4f6 100644 --- a/src/test/ui/issue-4935.stderr +++ b/src/test/ui/issue-4935.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 1 parameter but 2 parameters were supplied - --> $DIR/issue-4935.rs:15:13 + --> $DIR/issue-4935.rs:15:13: in fn main | LL | fn foo(a: usize) {} | ---------------- defined here diff --git a/src/test/ui/issue-49851/compiler-builtins-error.stderr b/src/test/ui/issue-49851/compiler-builtins-error.stderr index 7e23e0fd747fb..01358172329f0 100644 --- a/src/test/ui/issue-49851/compiler-builtins-error.stderr +++ b/src/test/ui/issue-49851/compiler-builtins-error.stderr @@ -1,7 +1,2 @@ -error[E0463]: can't find crate for `core` - | - = note: the `thumbv7em-none-eabihf` target may not be installed +error: Could not create LLVM TargetMachine for triple: thumbv7em-none-eabihf: No available targets are compatible with this triple. -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0463`. diff --git a/src/test/ui/issue-49934.stderr b/src/test/ui/issue-49934.stderr index 298230b8b29f7..47131adb6e62d 100644 --- a/src/test/ui/issue-49934.stderr +++ b/src/test/ui/issue-49934.stderr @@ -7,7 +7,7 @@ LL | #[derive(Debug)] = note: this may become a hard error in a future release warning: unused attribute - --> $DIR/issue-49934.rs:16:8 + --> $DIR/issue-49934.rs:16:8: in fn foo | LL | fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute | ^^^^^^^^^^^^^^^^ @@ -19,31 +19,31 @@ LL | #![warn(unused_attributes)] //~ NOTE lint level defined here | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-49934.rs:18:9 + --> $DIR/issue-49934.rs:18:9: in fn foo | LL | #[derive(Debug)] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-49934.rs:36:5 + --> $DIR/issue-49934.rs:36:5: in fn main | LL | #[derive(Debug)] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-49934.rs:40:5 + --> $DIR/issue-49934.rs:40:5: in fn main | LL | #[derive(Debug)] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-49934.rs:44:13 + --> $DIR/issue-49934.rs:44:13: in fn main | LL | let _ = #[derive(Debug)] "Hello, world!"; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-49934.rs:49:9 + --> $DIR/issue-49934.rs:49:9: in fn main | LL | #[derive(Debug)] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issue-50480.stderr b/src/test/ui/issue-50480.stderr index f5281fec4d1ea..5afa41e378ea0 100644 --- a/src/test/ui/issue-50480.stderr +++ b/src/test/ui/issue-50480.stderr @@ -5,7 +5,7 @@ LL | struct Foo(NotDefined, ::Item, Vec, String); | ^^^^^^^^^^ not found in this scope error[E0277]: the trait bound `i32: std::iter::Iterator` is not satisfied - --> $DIR/issue-50480.rs:13:24 + --> $DIR/issue-50480.rs:13:24: in struct Foo | LL | struct Foo(NotDefined, ::Item, Vec, String); | ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator; maybe try calling `.iter()` or a similar method diff --git a/src/test/ui/issue-50618.stderr b/src/test/ui/issue-50618.stderr index 07cc5a1318aa4..2efac3dcaed1d 100644 --- a/src/test/ui/issue-50618.stderr +++ b/src/test/ui/issue-50618.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `Point` has no field named `nonexistent` - --> $DIR/issue-50618.rs:24:13 + --> $DIR/issue-50618.rs:24:13: in fn main | LL | nonexistent: 0, | ^^^^^^^^^^^ `Point` does not have this field diff --git a/src/test/ui/issue-5239-1.stderr b/src/test/ui/issue-5239-1.stderr index 7ae01fb7d6012..2aafecc666da4 100644 --- a/src/test/ui/issue-5239-1.stderr +++ b/src/test/ui/issue-5239-1.stderr @@ -1,5 +1,5 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `&isize` - --> $DIR/issue-5239-1.rs:14:30 + --> $DIR/issue-5239-1.rs:14:30: in fn main | LL | let x = |ref x: isize| { x += 1; }; | -^^^^^ diff --git a/src/test/ui/issue-6458-3.stderr b/src/test/ui/issue-6458-3.stderr index c09b2643dfa21..f664a59b88076 100644 --- a/src/test/ui/issue-6458-3.stderr +++ b/src/test/ui/issue-6458-3.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-6458-3.rs:14:5 + --> $DIR/issue-6458-3.rs:14:5: in fn main | LL | mem::transmute(0); | ^^^^^^^^^^^^^^ cannot infer type for `U` diff --git a/src/test/ui/issue-6458.stderr b/src/test/ui/issue-6458.stderr index 701795c748dc2..c2a612c9d7ed1 100644 --- a/src/test/ui/issue-6458.stderr +++ b/src/test/ui/issue-6458.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-6458.rs:19:4 + --> $DIR/issue-6458.rs:19:4: in fn bar | LL | foo(TypeWithState(marker::PhantomData)); | ^^^ cannot infer type for `State` diff --git a/src/test/ui/issue-7813.stderr b/src/test/ui/issue-7813.stderr index 34837e90e4f79..677a82d2e6bcd 100644 --- a/src/test/ui/issue-7813.stderr +++ b/src/test/ui/issue-7813.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-7813.rs:12:13 + --> $DIR/issue-7813.rs:12:13: in fn main | LL | let v = &[]; //~ ERROR type annotations needed | - ^^^ cannot infer type for `_` diff --git a/src/test/ui/label_break_value_continue.stderr b/src/test/ui/label_break_value_continue.stderr index 24c2d1a22d01c..5f392c8c6209e 100644 --- a/src/test/ui/label_break_value_continue.stderr +++ b/src/test/ui/label_break_value_continue.stderr @@ -1,17 +1,17 @@ error[E0695]: unlabeled `continue` inside of a labeled block - --> $DIR/label_break_value_continue.rs:16:9 + --> $DIR/label_break_value_continue.rs:16:9: in fn continue_simple | LL | continue; //~ ERROR unlabeled `continue` inside of a labeled block | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label error[E0696]: `continue` pointing to a labeled block - --> $DIR/label_break_value_continue.rs:23:9 + --> $DIR/label_break_value_continue.rs:23:9: in fn continue_labeled | LL | continue 'b; //~ ERROR `continue` pointing to a labeled block | ^^^^^^^^^^^ labeled blocks cannot be `continue`'d | note: labeled block the continue points to - --> $DIR/label_break_value_continue.rs:22:5 + --> $DIR/label_break_value_continue.rs:22:5: in fn continue_labeled | LL | / 'b: { LL | | continue 'b; //~ ERROR `continue` pointing to a labeled block @@ -19,7 +19,7 @@ LL | | } | |_____^ error[E0695]: unlabeled `continue` inside of a labeled block - --> $DIR/label_break_value_continue.rs:31:13 + --> $DIR/label_break_value_continue.rs:31:13: in fn continue_crossing | LL | continue; //~ ERROR unlabeled `continue` inside of a labeled block | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label diff --git a/src/test/ui/label_break_value_unlabeled_break.stderr b/src/test/ui/label_break_value_unlabeled_break.stderr index 8a25975a7bda2..44958a0707fdd 100644 --- a/src/test/ui/label_break_value_unlabeled_break.stderr +++ b/src/test/ui/label_break_value_unlabeled_break.stderr @@ -1,11 +1,11 @@ error[E0695]: unlabeled `break` inside of a labeled block - --> $DIR/label_break_value_unlabeled_break.rs:16:9 + --> $DIR/label_break_value_unlabeled_break.rs:16:9: in fn unlabeled_break_simple | LL | break; //~ ERROR unlabeled `break` inside of a labeled block | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label error[E0695]: unlabeled `break` inside of a labeled block - --> $DIR/label_break_value_unlabeled_break.rs:24:13 + --> $DIR/label_break_value_unlabeled_break.rs:24:13: in fn unlabeled_break_crossing | LL | break; //~ ERROR unlabeled `break` inside of a labeled block | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label 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 30cff86ed1d40..4f3b5dc0a071a 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,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:12:11 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:12:11: in fn f | LL | fn f() -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter @@ -8,7 +8,7 @@ LL | fn f() -> &isize { //~ ERROR missing lifetime specifier = help: consider giving it a 'static lifetime error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:33 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:33: in fn g | LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter @@ -16,7 +16,7 @@ LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime spec = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_x` or `_y` error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:27:19 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:27:19: in fn h | LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter @@ -24,7 +24,7 @@ LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier = 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 error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:31:20 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:31:20: in fn i | LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter @@ -33,7 +33,7 @@ LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier = help: consider giving it an explicit bounded or 'static lifetime error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:44:24 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:44:24: in fn j | LL | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier | ^ expected lifetime parameter @@ -42,7 +42,7 @@ LL | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier = help: consider giving it an explicit bounded or 'static lifetime error[E0106]: missing lifetime specifier - --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:50:49 + --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:50:49: in fn k | LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize { | ^ expected lifetime parameter 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 87cb174891356..e656e913bd466 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/42701_one_named_and_one_anonymous.rs:20:9 + --> $DIR/42701_one_named_and_one_anonymous.rs:20:9: in fn foo2 | LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` 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 29163361e23f3..c0e360fb218a8 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `other` - --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 + --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21: in fn bar::bar | LL | fn bar(&self, other: Foo) -> Foo<'a> { | ----- consider changing the type of `other` to `Foo<'a>` 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 e18156179a208..d2fa798fb7189 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 + --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16: in fn foo | LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` 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 f208fb57f5b70..a4a0b489a97c2 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,5 +1,5 @@ error[E0621]: explicit lifetime required in parameter type - --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 + --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27: in fn foo | LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { | ------ consider changing type to `(&'a i32, &'a i32)` 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 7604b9a9017ee..fb9e46579f7d5 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15 + --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15: in fn Foo::foo::foo | LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | - consider changing the type of `x` to `&'a i32` 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 83c6ff19867d3..c940a54927c0b 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36 + --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36: in fn foo::foo | LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { | - consider changing the type of `x` to `&'a i32` 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 0eb8afbb26b67..da615dcc2d3d1 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 + --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20: in fn foo::foo | LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- ------- 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 9893eee77e8c4..0ad022c10b37e 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 + --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27: in fn foo | LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { | - consider changing the type of `y` to `&'a i32` 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 b6dfdff60be22..c1ba9fd57cd06 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 + --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5: in fn foo::foo | LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { | ------- ---- 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 6c32adc11ce05..4eca6cd72435c 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 + --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30: in fn foo::foo | LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { | ----- ------- 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 4710ebfa9679b..20c6d39768780 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,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/ex1b-return-no-names-if-else.rs:11:29 + --> $DIR/ex1b-return-no-names-if-else.rs:11:29: in fn foo | LL | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime | ^ expected lifetime parameter 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 5c9b7666de652..fbb21396f2d71 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex2a-push-one-existing-name-2.rs:16:12 + --> $DIR/ex2a-push-one-existing-name-2.rs:16:12: in fn foo | LL | fn foo<'a>(x: Ref, y: &mut Vec>) { | - consider changing the type of `x` to `Ref<'a, i32>` 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 4cfb76f85f2ac..9bf26224fad7c 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12 + --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12: in fn baz | LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) | - consider changing the type of `y` to `&'a T` 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 ede76bca2ba0a..789cc18746e91 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,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex2a-push-one-existing-name.rs:16:12 + --> $DIR/ex2a-push-one-existing-name.rs:16:12: in fn foo | LL | fn foo<'a>(x: &mut Vec>, y: Ref) { | - consider changing the type of `y` to `Ref<'a, i32>` 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 9884c0f351162..1fbb056a76623 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex2b-push-no-existing-names.rs:16:12 + --> $DIR/ex2b-push-no-existing-names.rs:16:12: in fn foo | LL | fn foo(x: &mut Vec>, y: Ref) { | -------- -------- these two types are declared with different lifetimes... 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 114024c2fb02e..38198dd0dc304 100644 --- a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex2c-push-inference-variable.rs:17:12 + --> $DIR/ex2c-push-inference-variable.rs:17:12: in fn foo | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... 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 32fc8b42f42e6..278e3d154b574 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex2d-push-inference-variable-2.rs:16:33 + --> $DIR/ex2d-push-inference-variable-2.rs:16:33: in fn foo | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... 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 f62848ffa8c13..5a70e324dfeb9 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex2e-push-inference-variable-3.rs:16:33 + --> $DIR/ex2e-push-inference-variable-3.rs:16:33: in fn foo | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... 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 f3716c307035e..ea2933ea1a616 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-2.rs:12:9 + --> $DIR/ex3-both-anon-regions-2.rs:12:9: in fn foo | LL | fn foo((v, w): (&u8, &u8), x: &u8) { | --- --- these two types are declared with different lifetimes... 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 5a584296d3ba9..e34883d3f2e55 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-3.rs:12:13 + --> $DIR/ex3-both-anon-regions-3.rs:12:13: in fn foo | LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... @@ -7,7 +7,7 @@ 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 + --> $DIR/ex3-both-anon-regions-3.rs:12:15: in fn foo | LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... 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 158f40f2969a4..4ba1fe6e0c958 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:11 + --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:11: in fn foo | LL | fn foo(mut x: Ref, y: Ref) { | --- --- these two types are declared with different lifetimes... 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 546789eedcb98..78ad7be9fc414 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:11 + --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:11: in fn foo | LL | fn foo(mut x: Ref) { | --- 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 ccc5e02ab704c..4d27a5c7ac8df 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11 + --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11: in fn foo | LL | fn foo(mut x: Ref) { | --- 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 f69bcb6429782..e62a64c595b63 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:12 + --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:12: in fn foo | LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) | ------- ------- these two types are declared with different lifetimes... 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 f9530c436a0a9..cadacd3bed291 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:12 + --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:12: in fn foo | LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { | ------- ------- these two types are declared with different lifetimes... 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 243103e2d1802..ab0417e70f50f 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12 + --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12: in fn foo | LL | fn foo(mut x: Vec, y: Ref) { | --- --- these two types are declared with different lifetimes... 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 c4dd282343176..be0e3a26c05fa 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:12 + --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:12: in fn foo | LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { | ------ ------ these two types are declared with different lifetimes... 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 52293e453061f..7bf5727398247 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:9 + --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:9: in fn foo | LL | fn foo(mut x: Ref, y: &u32) { | --- ---- 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 b5d10e573c4e1..6bbf6e2b2f8ba 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:11 + --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:11: in fn foo | LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... 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 089132995206f..997c40d5b34cf 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:11 + --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:11: in fn foo | LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... 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 133611ae48940..210ec2772f246 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:11 + --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:11: in fn foo | LL | fn foo(mut x: Ref, y: &u32) { | --- ---- these two types are declared with different lifetimes... 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 01ea885b63ea4..8c8e95c5a010d 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 + --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5: in fn foo::foo | LL | fn foo<'a>(&self, x: &i32) -> &i32 { | ---- ---- 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 aa5ab5402959c..8e25624a4d28f 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 + --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19: in fn foo::foo | LL | fn foo<'a>(&self, x: &Foo) -> &Foo { | ---- ---- 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 8a9ee9a05b810..96eda91e3ccf2 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:10 + --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:10: in fn foo | LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... 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 65c9ea4e757ff..47273f035872b 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:16 + --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:16: in fn foo::foo | LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... 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 43ca5cd603f13..1a18d73397f06 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,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:10 + --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:10: in fn foo | LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... 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 57187a47239c2..050d0620054cc 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions.rs:12:12 + --> $DIR/ex3-both-anon-regions.rs:12:12: in fn foo | LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... 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 4374311896659..a6d1e97c27afa 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,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `x` (Ast) - --> $DIR/liveness-assign-imm-local-notes.rs:23:9 + --> $DIR/liveness-assign-imm-local-notes.rs:23:9: in fn test | LL | x = 2; | ----- first assignment to `x` @@ -7,7 +7,7 @@ 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 + --> $DIR/liveness-assign-imm-local-notes.rs:35:13: in fn test_in_loop | LL | x = 2; | ----- first assignment to `x` @@ -15,13 +15,13 @@ 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 + --> $DIR/liveness-assign-imm-local-notes.rs:45:13: in fn test_using_loop | 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 + --> $DIR/liveness-assign-imm-local-notes.rs:48:13: in fn test_using_loop | LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` @@ -30,7 +30,7 @@ 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 + --> $DIR/liveness-assign-imm-local-notes.rs:23:9: in fn test | LL | x = 2; | ----- first assignment to `x` @@ -38,7 +38,7 @@ 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 + --> $DIR/liveness-assign-imm-local-notes.rs:35:13: in fn test_in_loop | LL | x = 2; | ----- first assignment to `x` @@ -46,13 +46,13 @@ 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 + --> $DIR/liveness-assign-imm-local-notes.rs:45:13: in fn test_using_loop | 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 + --> $DIR/liveness-assign-imm-local-notes.rs:48:13: in fn test_using_loop | LL | x = 1; //~ ERROR (Ast) [E0384] | ----- first assignment to `x` diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index c78b09a86a49d..f4647307ef00c 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-let-suggestion.rs:12:13 + --> $DIR/borrowck-let-suggestion.rs:12:13: in fn f | LL | let x = vec![1].iter(); | ^^^^^^^ - temporary value dropped here while still borrowed 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 ea79990bbb1fb..156100dd15627 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5 + --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5: in struct List | LL | struct List<'a, T: ListItem<'a>> { | -- help: consider adding an explicit lifetime bound `T: 'a`... @@ -7,13 +7,13 @@ 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:18:5: in struct List | LL | slice: &'a [T] | ^^^^^^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough - --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5 + --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5: in struct Foo | LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... @@ -21,13 +21,13 @@ 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:29:5: in struct Foo | LL | foo: &'static T | ^^^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough - --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5 + --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5: in trait X | LL | trait X: Sized { | - help: consider adding an explicit lifetime bound `K: 'a`... @@ -35,26 +35,26 @@ 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:34:5: in trait X | 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5: in trait X | 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:38:5: in trait X | 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5: in trait X | LL | fn baz<'a, L, M: X<&'a Nested>>() { | ^ - help: consider adding an explicit lifetime bound `L: 'a`... @@ -65,7 +65,7 @@ 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 + --> $DIR/lifetime-doesnt-live-long-enough.rs:42:5: in trait X | LL | / fn baz<'a, L, M: X<&'a Nested>>() { LL | | //~^ ERROR may not live long enough diff --git a/src/test/ui/lint-output-format-2.stderr b/src/test/ui/lint-output-format-2.stderr index d484061ef9661..e175ff60ee03d 100644 --- a/src/test/ui/lint-output-format-2.stderr +++ b/src/test/ui/lint-output-format-2.stderr @@ -7,7 +7,7 @@ LL | use lint_output_format::{foo, bar}; = note: #[warn(deprecated)] on by default warning: use of deprecated item 'lint_output_format::foo': text - --> $DIR/lint-output-format-2.rs:25:14 + --> $DIR/lint-output-format-2.rs:25:14: in fn main | LL | let _x = foo(); | ^^^ diff --git a/src/test/ui/lint-unconditional-recursion.stderr b/src/test/ui/lint-unconditional-recursion.stderr index 933c191551dac..77c99d139a7ed 100644 --- a/src/test/ui/lint-unconditional-recursion.stderr +++ b/src/test/ui/lint-unconditional-recursion.stderr @@ -42,7 +42,7 @@ LL | loop { quz(); } = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:47:5 + --> $DIR/lint-unconditional-recursion.rs:47:5: in trait Foo | LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring @@ -73,7 +73,7 @@ LL | 0.bar() = help: a `loop` may express intention better if this is on purpose error: function cannot return without recurring - --> $DIR/lint-unconditional-recursion.rs:75:5 + --> $DIR/lint-unconditional-recursion.rs:75:5: in trait Foo2 | LL | fn bar(&self) { //~ ERROR function cannot return without recurring | ^^^^^^^^^^^^^ cannot return without recurring 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 45a20434dd255..c0b6083a4697a 100644 --- a/src/test/ui/lint/command-line-lint-group-deny.stderr +++ b/src/test/ui/lint/command-line-lint-group-deny.stderr @@ -1,5 +1,5 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` - --> $DIR/command-line-lint-group-deny.rs:14:9 + --> $DIR/command-line-lint-group-deny.rs:14:9: in fn main | LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 1fe51c6278637..3e6f2312a3c70 100644 --- a/src/test/ui/lint/command-line-lint-group-forbid.stderr +++ b/src/test/ui/lint/command-line-lint-group-forbid.stderr @@ -1,5 +1,5 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` - --> $DIR/command-line-lint-group-forbid.rs:14:9 + --> $DIR/command-line-lint-group-forbid.rs:14:9: in fn main | LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 e46285096357f..321a1308e59b6 100644 --- a/src/test/ui/lint/command-line-lint-group-warn.stderr +++ b/src/test/ui/lint/command-line-lint-group-warn.stderr @@ -1,5 +1,5 @@ warning: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing` - --> $DIR/command-line-lint-group-warn.rs:15:9 + --> $DIR/command-line-lint-group-warn.rs:15:9: in fn main | LL | let _InappropriateCamelCasing = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 992be2c0a2844..cfb565a568cb2 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,5 +1,5 @@ warning: unused variable: `i_think_continually` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:31:9 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:31:9: in fn main | LL | let i_think_continually = 2; | ^^^^^^^^^^^^^^^^^^^ help: consider using `_i_think_continually` instead @@ -12,31 +12,31 @@ LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: unused variable: `mut_unused_var` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:38:13 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:38:13: in fn main | LL | let mut mut_unused_var = 1; | ^^^^^^^^^^^^^^ help: consider using `_mut_unused_var` instead warning: unused variable: `var` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:14 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:14: in fn main | LL | let (mut var, unused_var) = (1, 2); | ^^^ help: consider using `_var` instead warning: unused variable: `unused_var` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:19 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:19: in fn main | LL | let (mut var, unused_var) = (1, 2); | ^^^^^^^^^^ help: consider using `_unused_var` instead warning: unused variable: `corridors_of_light` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:42:26 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:42:26: in fn main | 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:43:30 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:43:30: in fn main | LL | mut hours_are_suns, | ^^^^^^^^^^^^^^ @@ -44,7 +44,7 @@ LL | mut hours_are_suns, = note: consider using `_hours_are_suns` instead warning: value assigned to `hours_are_suns` is never read - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:9 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:9: in fn main | LL | hours_are_suns = false; | ^^^^^^^^^^^^^^ @@ -57,43 +57,43 @@ LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) = note: #[warn(unused_assignments)] implied by #[warn(unused)] warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:54:23 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:54:23: in fn main | LL | Large::Suit { case } => {} | ^^^^ help: try ignoring the field: `case: _` warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:59:24 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:59:24: in fn main | LL | &Large::Suit { case } => {} | ^^^^ help: try ignoring the field: `case: _` warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:64:27 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:64:27: in fn main | LL | box Large::Suit { case } => {} | ^^^^ help: try ignoring the field: `case: _` warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:69:24 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:69:24: in fn main | LL | (Large::Suit { case },) => {} | ^^^^ help: try ignoring the field: `case: _` warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:74:24 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:74:24: in fn main | LL | [Large::Suit { case }] => {} | ^^^^ help: try ignoring the field: `case: _` warning: unused variable: `case` - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:79:29 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:79:29: in fn main | LL | Tuple(Large::Suit { case }, ()) => {} | ^^^^ help: try ignoring the field: `case: _` warning: variable does not need to be mutable - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:38:9 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:38:9: in fn main | LL | let mut mut_unused_var = 1; | ----^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) = note: #[warn(unused_mut)] implied by #[warn(unused)] warning: variable does not need to be mutable - --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:10 + --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:40:10: in fn main | LL | let (mut var, unused_var) = (1, 2); | ----^^^ diff --git a/src/test/ui/lint/lint-group-nonstandard-style.stderr b/src/test/ui/lint/lint-group-nonstandard-style.stderr index 6979510e50048..4d5cb248fd835 100644 --- a/src/test/ui/lint/lint-group-nonstandard-style.stderr +++ b/src/test/ui/lint/lint-group-nonstandard-style.stderr @@ -12,52 +12,52 @@ 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 + --> $DIR/lint-group-nonstandard-style.rs:22:9: in mod test::bad | LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-nonstandard-style.rs:20:14 + --> $DIR/lint-group-nonstandard-style.rs:20:14: in mod test | 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 + --> $DIR/lint-group-nonstandard-style.rs:24:9: in mod test::bad | LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-nonstandard-style.rs:20:14 + --> $DIR/lint-group-nonstandard-style.rs:20:14: in mod test | 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 + --> $DIR/lint-group-nonstandard-style.rs:30:9: in mod test::warn | LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-nonstandard-style.rs:28:17 + --> $DIR/lint-group-nonstandard-style.rs:28:17: in mod test::warn | 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 + --> $DIR/lint-group-nonstandard-style.rs:32:9: in mod test::warn | LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-nonstandard-style.rs:28:17 + --> $DIR/lint-group-nonstandard-style.rs:28:17: in mod test::warn | LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr index c1b15160bc501..45585a94c67ba 100644 --- a/src/test/ui/lint/lint-group-style.stderr +++ b/src/test/ui/lint/lint-group-style.stderr @@ -12,52 +12,52 @@ 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 + --> $DIR/lint-group-style.rs:22:9: in mod test::bad | LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-style.rs:20:14 + --> $DIR/lint-group-style.rs:20:14: in mod test | 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 + --> $DIR/lint-group-style.rs:24:9: in mod test::bad | LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-style.rs:20:14 + --> $DIR/lint-group-style.rs:20:14: in mod test | 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 + --> $DIR/lint-group-style.rs:30:9: in mod test::warn | LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-style.rs:28:17 + --> $DIR/lint-group-style.rs:28:17: in mod test::warn | 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 + --> $DIR/lint-group-style.rs:32:9: in mod test::warn | LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-group-style.rs:28:17 + --> $DIR/lint-group-style.rs:28:17: in mod test::warn | LL | #![warn(bad_style)] | ^^^^^^^^^ diff --git a/src/test/ui/lint/must-use-ops.stderr b/src/test/ui/lint/must-use-ops.stderr index 5703536ef48fd..967e75af5c06f 100644 --- a/src/test/ui/lint/must-use-ops.stderr +++ b/src/test/ui/lint/must-use-ops.stderr @@ -1,5 +1,5 @@ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:22:5 + --> $DIR/must-use-ops.rs:22:5: in fn main | LL | val == 1; | ^^^^^^^^ @@ -11,121 +11,121 @@ LL | #![warn(unused_must_use)] | ^^^^^^^^^^^^^^^ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:23:5 + --> $DIR/must-use-ops.rs:23:5: in fn main | LL | val < 1; | ^^^^^^^ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:24:5 + --> $DIR/must-use-ops.rs:24:5: in fn main | LL | val <= 1; | ^^^^^^^^ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:25:5 + --> $DIR/must-use-ops.rs:25:5: in fn main | LL | val != 1; | ^^^^^^^^ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:26:5 + --> $DIR/must-use-ops.rs:26:5: in fn main | LL | val >= 1; | ^^^^^^^^ warning: unused comparison which must be used - --> $DIR/must-use-ops.rs:27:5 + --> $DIR/must-use-ops.rs:27:5: in fn main | LL | val > 1; | ^^^^^^^ warning: unused arithmetic operation which must be used - --> $DIR/must-use-ops.rs:30:5 + --> $DIR/must-use-ops.rs:30:5: in fn main | LL | val + 2; | ^^^^^^^ warning: unused arithmetic operation which must be used - --> $DIR/must-use-ops.rs:31:5 + --> $DIR/must-use-ops.rs:31:5: in fn main | LL | val - 2; | ^^^^^^^ warning: unused arithmetic operation which must be used - --> $DIR/must-use-ops.rs:32:5 + --> $DIR/must-use-ops.rs:32:5: in fn main | LL | val / 2; | ^^^^^^^ warning: unused arithmetic operation which must be used - --> $DIR/must-use-ops.rs:33:5 + --> $DIR/must-use-ops.rs:33:5: in fn main | LL | val * 2; | ^^^^^^^ warning: unused arithmetic operation which must be used - --> $DIR/must-use-ops.rs:34:5 + --> $DIR/must-use-ops.rs:34:5: in fn main | LL | val % 2; | ^^^^^^^ warning: unused logical operation which must be used - --> $DIR/must-use-ops.rs:37:5 + --> $DIR/must-use-ops.rs:37:5: in fn main | LL | true && true; | ^^^^^^^^^^^^ warning: unused logical operation which must be used - --> $DIR/must-use-ops.rs:38:5 + --> $DIR/must-use-ops.rs:38:5: in fn main | LL | false || true; | ^^^^^^^^^^^^^ warning: unused bitwise operation which must be used - --> $DIR/must-use-ops.rs:41:5 + --> $DIR/must-use-ops.rs:41:5: in fn main | LL | 5 ^ val; | ^^^^^^^ warning: unused bitwise operation which must be used - --> $DIR/must-use-ops.rs:42:5 + --> $DIR/must-use-ops.rs:42:5: in fn main | LL | 5 & val; | ^^^^^^^ warning: unused bitwise operation which must be used - --> $DIR/must-use-ops.rs:43:5 + --> $DIR/must-use-ops.rs:43:5: in fn main | LL | 5 | val; | ^^^^^^^ warning: unused bitwise operation which must be used - --> $DIR/must-use-ops.rs:44:5 + --> $DIR/must-use-ops.rs:44:5: in fn main | LL | 5 << val; | ^^^^^^^^ warning: unused bitwise operation which must be used - --> $DIR/must-use-ops.rs:45:5 + --> $DIR/must-use-ops.rs:45:5: in fn main | LL | 5 >> val; | ^^^^^^^^ warning: unused unary operation which must be used - --> $DIR/must-use-ops.rs:48:5 + --> $DIR/must-use-ops.rs:48:5: in fn main | LL | !val; | ^^^^ warning: unused unary operation which must be used - --> $DIR/must-use-ops.rs:49:5 + --> $DIR/must-use-ops.rs:49:5: in fn main | LL | -val; | ^^^^ warning: unused unary operation which must be used - --> $DIR/must-use-ops.rs:50:5 + --> $DIR/must-use-ops.rs:50:5: in fn main | LL | *val_pointer; | ^^^^^^^^^^^^ diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index 84a2e4a91eccf..7317c78b1be07 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -19,7 +19,7 @@ LL | #[no_debug] // should suggest removal of deprecated attribute = note: #[warn(deprecated)] on by default warning: variable does not need to be mutable - --> $DIR/suggestions.rs:48:13 + --> $DIR/suggestions.rs:48:13: in fn main | LL | let mut a = (1); // should suggest no `mut`, no parens | ----^ @@ -33,7 +33,7 @@ LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issu | ^^^^^^^^^^ warning: variable does not need to be mutable - --> $DIR/suggestions.rs:52:13 + --> $DIR/suggestions.rs:52:13: in fn main | LL | let mut | _____________^ @@ -85,19 +85,19 @@ LL | fn rio_grande() {} // should suggest `pub` = note: #[warn(private_no_mangle_fns)] on by default warning: static is marked #[no_mangle], but not exported - --> $DIR/suggestions.rs:33:18 + --> $DIR/suggestions.rs:33:18: in mod badlands | LL | #[no_mangle] pub static DAUNTLESS: bool = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: function is marked #[no_mangle], but not exported - --> $DIR/suggestions.rs:35:18 + --> $DIR/suggestions.rs:35:18: in mod badlands | LL | #[no_mangle] pub fn val_jean() {} | ^^^^^^^^^^^^^^^^^^^^ warning: denote infinite loops with `loop { ... }` - --> $DIR/suggestions.rs:46:5 + --> $DIR/suggestions.rs:46:5: in fn main | LL | while true { // should suggest `loop` | ^^^^^^^^^^ help: use `loop` @@ -105,7 +105,7 @@ LL | while true { // should suggest `loop` = note: #[warn(while_true)] on by default warning: the `warp_factor:` in this pattern is redundant - --> $DIR/suggestions.rs:57:23 + --> $DIR/suggestions.rs:57:23: in fn main | LL | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand | ------------^^^^^^^^^^^^ diff --git a/src/test/ui/lint/type-overflow.stderr b/src/test/ui/lint/type-overflow.stderr index 6f5d3d07aea2d..9f8c671542acc 100644 --- a/src/test/ui/lint/type-overflow.stderr +++ b/src/test/ui/lint/type-overflow.stderr @@ -1,5 +1,5 @@ warning: literal out of range for i8 - --> $DIR/type-overflow.rs:14:17 + --> $DIR/type-overflow.rs:14:17: in fn main | LL | let error = 255i8; //~WARNING literal out of range for i8 | ^^^^^ @@ -7,7 +7,7 @@ LL | let error = 255i8; //~WARNING literal out of range for i8 = note: #[warn(overflowing_literals)] on by default warning: literal out of range for i8 - --> $DIR/type-overflow.rs:19:16 + --> $DIR/type-overflow.rs:19:16: in fn main | LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8 | ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8` @@ -15,7 +15,7 @@ LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8 = note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8` warning: literal out of range for i64 - --> $DIR/type-overflow.rs:21:16 + --> $DIR/type-overflow.rs:21:16: in fn main | LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64` @@ -23,7 +23,7 @@ LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range fo = note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64` warning: literal out of range for u32 - --> $DIR/type-overflow.rs:23:16 + --> $DIR/type-overflow.rs:23:16: in fn main | LL | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32 | ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64` @@ -31,7 +31,7 @@ LL | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32 = note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32` warning: literal out of range for i128 - --> $DIR/type-overflow.rs:25:22 + --> $DIR/type-overflow.rs:25:22: in fn main | LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000; = help: consider using `u128` instead warning: literal out of range for i32 - --> $DIR/type-overflow.rs:28:16 + --> $DIR/type-overflow.rs:28:16: in fn main | LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32 | ^^^^^^^^^^^^^^^^^^^^^ @@ -49,7 +49,7 @@ LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i = help: consider using `i128` instead warning: literal out of range for i8 - --> $DIR/type-overflow.rs:30:17 + --> $DIR/type-overflow.rs:30:17: in fn main | LL | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8 | ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16` diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.stderr b/src/test/ui/lint/unreachable_pub-pub_crate.stderr index 2948deb23009c..b36effebb0981 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.stderr +++ b/src/test/ui/lint/unreachable_pub-pub_crate.stderr @@ -1,5 +1,5 @@ warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:26:5 + --> $DIR/unreachable_pub-pub_crate.rs:26:5: in mod private_mod | LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | #![warn(unreachable_pub)] = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:27:24 + --> $DIR/unreachable_pub-pub_crate.rs:27:24: in mod private_mod | LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced | ^^^^ help: consider restricting its visibility: `pub(crate)` @@ -22,7 +22,7 @@ LL | pub use std::env::{Args}; // braced-use has different item spans than u = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:29:5 + --> $DIR/unreachable_pub-pub_crate.rs:29:5: in mod private_mod | LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | pub struct Hydrogen { = help: or consider exporting it for use by other crates warning: unreachable `pub` field - --> $DIR/unreachable_pub-pub_crate.rs:31:9 + --> $DIR/unreachable_pub-pub_crate.rs:31:9: in struct private_mod::Hydrogen | LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | pub neutrons: usize, | help: consider restricting its visibility: `pub(crate)` warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:37:9 + --> $DIR/unreachable_pub-pub_crate.rs:37:9: in mod private_mod | LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -48,7 +48,7 @@ LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | help: consider restricting its visibility: `pub(crate)` warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:41:5 + --> $DIR/unreachable_pub-pub_crate.rs:41:5: in mod private_mod | LL | pub enum Helium {} | ---^^^^^^^^^^^^ @@ -58,7 +58,7 @@ LL | pub enum Helium {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:42:5 + --> $DIR/unreachable_pub-pub_crate.rs:42:5: in mod private_mod | LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ @@ -68,7 +68,7 @@ LL | pub union Lithium { c1: usize, c2: u8 } = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:43:5 + --> $DIR/unreachable_pub-pub_crate.rs:43:5: in mod private_mod | LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ @@ -78,7 +78,7 @@ LL | pub fn beryllium() {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:44:5 + --> $DIR/unreachable_pub-pub_crate.rs:44:5: in mod private_mod | LL | pub trait Boron {} | ---^^^^^^^^^^^^ @@ -88,7 +88,7 @@ LL | pub trait Boron {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:45:5 + --> $DIR/unreachable_pub-pub_crate.rs:45:5: in mod private_mod | LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ LL | pub const CARBON: usize = 1; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:46:5 + --> $DIR/unreachable_pub-pub_crate.rs:46:5: in mod private_mod | LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | pub static NITROGEN: usize = 2; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:47:5 + --> $DIR/unreachable_pub-pub_crate.rs:47:5: in mod private_mod | LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ @@ -118,7 +118,7 @@ LL | pub type Oxygen = bool; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:50:47 + --> $DIR/unreachable_pub-pub_crate.rs:50:47: in mod private_mod | LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ @@ -131,7 +131,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:55:9 + --> $DIR/unreachable_pub-pub_crate.rs:55:9: in mod private_mod | LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/unreachable_pub.stderr b/src/test/ui/lint/unreachable_pub.stderr index ad88c55d54013..a16cb3cb04fe1 100644 --- a/src/test/ui/lint/unreachable_pub.stderr +++ b/src/test/ui/lint/unreachable_pub.stderr @@ -1,5 +1,5 @@ warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:21:5 + --> $DIR/unreachable_pub.rs:21:5: in mod private_mod | LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | #![warn(unreachable_pub)] = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:22:24 + --> $DIR/unreachable_pub.rs:22:24: in mod private_mod | LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced | ^^^^ help: consider restricting its visibility: `crate` @@ -22,7 +22,7 @@ LL | pub use std::env::{Args}; // braced-use has different item spans than u = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:24:5 + --> $DIR/unreachable_pub.rs:24:5: in mod private_mod | LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | pub struct Hydrogen { = help: or consider exporting it for use by other crates warning: unreachable `pub` field - --> $DIR/unreachable_pub.rs:26:9 + --> $DIR/unreachable_pub.rs:26:9: in struct private_mod::Hydrogen | LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | pub neutrons: usize, | help: consider restricting its visibility: `crate` warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:32:9 + --> $DIR/unreachable_pub.rs:32:9: in mod private_mod | LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -48,7 +48,7 @@ LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | help: consider restricting its visibility: `crate` warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:36:5 + --> $DIR/unreachable_pub.rs:36:5: in mod private_mod | LL | pub enum Helium {} | ---^^^^^^^^^^^^ @@ -58,7 +58,7 @@ LL | pub enum Helium {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:37:5 + --> $DIR/unreachable_pub.rs:37:5: in mod private_mod | LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ @@ -68,7 +68,7 @@ LL | pub union Lithium { c1: usize, c2: u8 } = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:38:5 + --> $DIR/unreachable_pub.rs:38:5: in mod private_mod | LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ @@ -78,7 +78,7 @@ LL | pub fn beryllium() {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:39:5 + --> $DIR/unreachable_pub.rs:39:5: in mod private_mod | LL | pub trait Boron {} | ---^^^^^^^^^^^^ @@ -88,7 +88,7 @@ LL | pub trait Boron {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:40:5 + --> $DIR/unreachable_pub.rs:40:5: in mod private_mod | LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ LL | pub const CARBON: usize = 1; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:41:5 + --> $DIR/unreachable_pub.rs:41:5: in mod private_mod | LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | pub static NITROGEN: usize = 2; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:42:5 + --> $DIR/unreachable_pub.rs:42:5: in mod private_mod | LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ @@ -118,7 +118,7 @@ LL | pub type Oxygen = bool; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:45:47 + --> $DIR/unreachable_pub.rs:45:47: in mod private_mod | LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | -----------^^^^^^^^^^^^^ @@ -131,7 +131,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:50:9 + --> $DIR/unreachable_pub.rs:50:9: in mod private_mod | LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/loop-break-value-no-repeat.stderr b/src/test/ui/loop-break-value-no-repeat.stderr index 68a2bab1674e8..65d438c1abc1e 100644 --- a/src/test/ui/loop-break-value-no-repeat.stderr +++ b/src/test/ui/loop-break-value-no-repeat.stderr @@ -1,5 +1,5 @@ error[E0571]: `break` with value from a `for` loop - --> $DIR/loop-break-value-no-repeat.rs:22:9 + --> $DIR/loop-break-value-no-repeat.rs:22:9: in fn main | LL | break 22 //~ ERROR `break` with value from a `for` loop | ^^^^^^^^ can only break with a value inside `loop` or breakable block diff --git a/src/test/ui/loops-reject-duplicate-labels-2.stderr b/src/test/ui/loops-reject-duplicate-labels-2.stderr index 830270a99d112..43b6a2fa58140 100644 --- a/src/test/ui/loops-reject-duplicate-labels-2.stderr +++ b/src/test/ui/loops-reject-duplicate-labels-2.stderr @@ -1,5 +1,5 @@ warning: label name `'fl` shadows a label name that is already in scope - --> $DIR/loops-reject-duplicate-labels-2.rs:23:7 + --> $DIR/loops-reject-duplicate-labels-2.rs:23:7: in fn foo | LL | { 'fl: for _ in 0..10 { break; } } | --- first declared here @@ -7,7 +7,7 @@ LL | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:25:7: in fn foo | LL | { 'lf: loop { break; } } | --- first declared here @@ -15,7 +15,7 @@ LL | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:27:7: in fn foo | LL | { 'wl: while 2 > 1 { break; } } | --- first declared here @@ -23,7 +23,7 @@ LL | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:29:7: in fn foo | LL | { 'lw: loop { break; } } | --- first declared here @@ -31,7 +31,7 @@ LL | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:31:7: in fn foo | LL | { 'fw: for _ in 0..10 { break; } } | --- first declared here @@ -39,7 +39,7 @@ LL | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:33:7: in fn foo | LL | { 'wf: while 2 > 1 { break; } } | --- first declared here @@ -47,7 +47,7 @@ LL | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:35:7: in fn foo | LL | { 'tl: while let Some(_) = None:: { break; } } | --- first declared here @@ -55,7 +55,7 @@ LL | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels-2.rs:37:7: in fn foo | LL | { 'lt: loop { break; } } | --- first declared here diff --git a/src/test/ui/loops-reject-duplicate-labels.stderr b/src/test/ui/loops-reject-duplicate-labels.stderr index a71f98b812a8c..7513d449fe297 100644 --- a/src/test/ui/loops-reject-duplicate-labels.stderr +++ b/src/test/ui/loops-reject-duplicate-labels.stderr @@ -1,5 +1,5 @@ warning: label name `'fl` shadows a label name that is already in scope - --> $DIR/loops-reject-duplicate-labels.rs:20:5 + --> $DIR/loops-reject-duplicate-labels.rs:20:5: in fn foo | LL | 'fl: for _ in 0..10 { break; } | --- first declared here @@ -7,7 +7,7 @@ LL | 'fl: loop { break; } //~ WARN label name `'fl` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:23:5: in fn foo | LL | 'lf: loop { break; } | --- first declared here @@ -15,7 +15,7 @@ LL | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:25:5: in fn foo | LL | 'wl: while 2 > 1 { break; } | --- first declared here @@ -23,7 +23,7 @@ LL | 'wl: loop { break; } //~ WARN label name `'wl` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:27:5: in fn foo | LL | 'lw: loop { break; } | --- first declared here @@ -31,7 +31,7 @@ LL | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:29:5: in fn foo | LL | 'fw: for _ in 0..10 { break; } | --- first declared here @@ -39,7 +39,7 @@ LL | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:31:5: in fn foo | LL | 'wf: while 2 > 1 { break; } | --- first declared here @@ -47,7 +47,7 @@ LL | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:33:5: in fn foo | LL | 'tl: while let Some(_) = None:: { break; } | --- first declared here @@ -55,7 +55,7 @@ LL | 'tl: loop { break; } //~ WARN label name `'tl` shadows a labe | ^^^ 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 + --> $DIR/loops-reject-duplicate-labels.rs:35:5: in fn foo | LL | 'lt: loop { break; } | --- first declared here diff --git a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr index af524d5b01766..bdf4716ac1bb0 100644 --- a/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr +++ b/src/test/ui/loops-reject-labels-shadowing-lifetimes.stderr @@ -1,5 +1,5 @@ warning: label name `'a` shadows a lifetime name that is already in scope - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:20:9 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:20:9: in fn foo::foo | LL | fn foo<'a>() { | -- first declared here @@ -7,7 +7,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:45:13: in fn foo::meth_bad::meth_bad | LL | impl<'bad, 'c> Struct<'bad, 'c> { | ---- first declared here @@ -16,7 +16,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:52:13: in fn foo::meth_bad2::meth_bad2 | LL | impl<'b, 'bad> Struct<'b, 'bad> { | ---- first declared here @@ -25,7 +25,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:59:13: in fn foo::meth_bad3::meth_bad3 | LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here @@ -33,7 +33,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:64:13: in fn foo::meth_bad4::meth_bad4 | LL | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { | ---- first declared here @@ -41,7 +41,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:71:13: in fn foo::meth_bad::meth_bad | LL | impl <'bad, 'e> Enum<'bad, 'e> { | ---- first declared here @@ -50,7 +50,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:77:13: in fn foo::meth_bad2::meth_bad2 | LL | impl <'d, 'bad> Enum<'d, 'bad> { | ---- first declared here @@ -59,7 +59,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:83:13: in fn foo::meth_bad3::meth_bad3 | LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here @@ -67,7 +67,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:88:13: in fn foo::meth_bad4::meth_bad4 | LL | fn meth_bad4<'a,'bad>(x: &'bad i8) { | ---- first declared here @@ -75,7 +75,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:98:13: in fn foo::HasDefaultMethod1::meth_bad::meth_bad | LL | trait HasDefaultMethod1<'bad> { | ---- first declared here @@ -84,7 +84,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13: in fn foo::HasDefaultMethod2::meth_bad::meth_bad | LL | trait HasDefaultMethod2<'a,'bad> { | ---- first declared here @@ -93,7 +93,7 @@ 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 + --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13: in fn foo::HasDefaultMethod3::meth_bad::meth_bad | LL | fn meth_bad<'bad>(&self) { | ---- first declared here diff --git a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr index 999cfb9cc3c6b..8923448e90f06 100644 --- a/src/test/ui/loops-reject-lifetime-shadowing-label.stderr +++ b/src/test/ui/loops-reject-lifetime-shadowing-label.stderr @@ -1,5 +1,5 @@ warning: lifetime name `'a` shadows a label name that is already in scope - --> $DIR/loops-reject-lifetime-shadowing-label.rs:31:51 + --> $DIR/loops-reject-lifetime-shadowing-label.rs:31:51: in fn foo | LL | 'a: loop { | -- first declared here 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 9b40062bd57b9..c10022f3e4388 100644 --- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr @@ -1,5 +1,5 @@ error[E0308]: match arms have incompatible types - --> $DIR/old-lub-glb-hr.rs:18:13 + --> $DIR/old-lub-glb-hr.rs:18:13: in fn foo | LL | let z = match 22 { //~ ERROR incompatible types | _____________^ 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 6a69e7cc71720..d947ea70e0ce6 100644 --- a/src/test/ui/lub-glb/old-lub-glb-object.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr @@ -1,5 +1,5 @@ error[E0308]: match arms have incompatible types - --> $DIR/old-lub-glb-object.rs:20:13 + --> $DIR/old-lub-glb-object.rs:20:13: in fn foo | LL | let z = match 22 { //~ ERROR incompatible types | _____________^ diff --git a/src/test/ui/main-wrong-location.stderr b/src/test/ui/main-wrong-location.stderr index a5ef92f14bbc5..be4530c3fa0c8 100644 --- a/src/test/ui/main-wrong-location.stderr +++ b/src/test/ui/main-wrong-location.stderr @@ -2,7 +2,7 @@ error[E0601]: `main` function not found in crate `main_wrong_location` | = 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 + --> $DIR/main-wrong-location.rs:14:5: in mod m | LL | fn main() { } | ^^^^^^^^^^^^^ diff --git a/src/test/ui/method-call-err-msg.stderr b/src/test/ui/method-call-err-msg.stderr index 3e5bbdfa8f84c..fb8f76c6eafc1 100644 --- a/src/test/ui/method-call-err-msg.stderr +++ b/src/test/ui/method-call-err-msg.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 0 parameters but 1 parameter was supplied - --> $DIR/method-call-err-msg.rs:22:7 + --> $DIR/method-call-err-msg.rs:22:7: in fn main | LL | fn zero(self) -> Foo { self } | -------------------- defined here @@ -8,7 +8,7 @@ LL | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter | ^^^^ expected 0 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/method-call-err-msg.rs:23:7 + --> $DIR/method-call-err-msg.rs:23:7: in fn main | LL | fn one(self, _: isize) -> Foo { self } | ----------------------------- defined here @@ -17,7 +17,7 @@ LL | .one() //~ ERROR this function takes 1 parameter but 0 parameters | ^^^ expected 1 parameter error[E0061]: this function takes 2 parameters but 1 parameter was supplied - --> $DIR/method-call-err-msg.rs:24:7 + --> $DIR/method-call-err-msg.rs:24:7: in fn main | LL | fn two(self, _: isize, _: isize) -> Foo { self } | --------------------------------------- defined here @@ -26,7 +26,7 @@ LL | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter | ^^^ 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 + --> $DIR/method-call-err-msg.rs:28:7: in fn main | LL | pub struct Foo; | --------------- method `take` not found for this diff --git a/src/test/ui/method-call-lifetime-args-lint.stderr b/src/test/ui/method-call-lifetime-args-lint.stderr index 1cb6804fa47fb..aec1e0c5cb9a9 100644 --- a/src/test/ui/method-call-lifetime-args-lint.stderr +++ b/src/test/ui/method-call-lifetime-args-lint.stderr @@ -1,5 +1,5 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint.rs:22:14 + --> $DIR/method-call-lifetime-args-lint.rs:22:14: in fn method_call | LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | -- the late bound lifetime parameter is introduced here @@ -16,7 +16,7 @@ LL | #![deny(late_bound_lifetime_arguments)] = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint.rs:26:23 + --> $DIR/method-call-lifetime-args-lint.rs:26:23: in fn method_call | LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here diff --git a/src/test/ui/method-call-lifetime-args.stderr b/src/test/ui/method-call-lifetime-args.stderr index 8bc48cc8e734c..1dfc8ca87792b 100644 --- a/src/test/ui/method-call-lifetime-args.stderr +++ b/src/test/ui/method-call-lifetime-args.stderr @@ -1,23 +1,23 @@ error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args.rs:19:15 + --> $DIR/method-call-lifetime-args.rs:19:15: in fn ufcs | LL | S::late::<'static>(S, &0, &0); | ^^^^^^^ | note: the late bound lifetime parameter is introduced here - --> $DIR/method-call-lifetime-args.rs:14:13 + --> $DIR/method-call-lifetime-args.rs:14:13: in fn late::late | 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 + --> $DIR/method-call-lifetime-args.rs:21:24: in fn ufcs | 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 + --> $DIR/method-call-lifetime-args.rs:15:31: in fn late_implicit::late_implicit | LL | fn late_implicit(self, _: &u8, _: &u8) {} | ^ diff --git a/src/test/ui/method-missing-call.stderr b/src/test/ui/method-missing-call.stderr index 82d04cb06dd4c..166ee946d6fd0 100644 --- a/src/test/ui/method-missing-call.stderr +++ b/src/test/ui/method-missing-call.stderr @@ -1,5 +1,5 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` - --> $DIR/method-missing-call.rs:32:26 + --> $DIR/method-missing-call.rs:32:26: in fn main | LL | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` | ^^^^^ @@ -7,7 +7,7 @@ LL | .get_x;//~ ERROR attempted to take value of method = help: maybe a `()` to call it is missing? 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 + --> $DIR/method-missing-call.rs:39:16: in fn main | LL | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type | ^^^^^^^^^^ diff --git a/src/test/ui/mismatched_types/E0053.stderr b/src/test/ui/mismatched_types/E0053.stderr index 1b16694bf2c4d..63834f3613d3e 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/src/test/ui/mismatched_types/E0053.stderr @@ -1,5 +1,5 @@ error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/E0053.rs:19:15 + --> $DIR/E0053.rs:19:15: in fn foo::foo | LL | fn foo(x: u16); | --- type in trait @@ -11,7 +11,7 @@ LL | fn foo(x: i16) { } found type `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait - --> $DIR/E0053.rs:21:12 + --> $DIR/E0053.rs:21:12: in fn bar::bar | LL | fn bar(&self); | ----- type in trait diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index a1bfcafe05399..e2a6728c7dc6d 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -7,7 +7,7 @@ LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | first binding error[E0308]: mismatched types - --> $DIR/E0409.rs:15:23 + --> $DIR/E0409.rs:15:23: in fn main | LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 | ^ expected &{integer}, found integral variable diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index 647e0a215aa53..6b4a1ebd90733 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/E0631.rs:17:5 + --> $DIR/E0631.rs:17:5: in fn main | LL | foo(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` @@ -13,7 +13,7 @@ LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/E0631.rs:18:5 + --> $DIR/E0631.rs:18:5: in fn main | LL | bar(|_: isize| {}); //~ ERROR type mismatch | ^^^ ---------- found signature of `fn(isize) -> _` @@ -27,7 +27,7 @@ LL | fn bar>(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments - --> $DIR/E0631.rs:19:5 + --> $DIR/E0631.rs:19:5: in fn main | LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` @@ -42,7 +42,7 @@ LL | fn foo(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in function arguments - --> $DIR/E0631.rs:20:5 + --> $DIR/E0631.rs:20:5: in fn main | LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index 1b2ea514f3e93..975dae728b18b 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/abridged.rs:26:5 + --> $DIR/abridged.rs:26:5: in fn a | LL | fn a() -> Foo { | --- expected `Foo` because of return type @@ -10,7 +10,7 @@ LL | Some(Foo { bar: 1 }) //~ ERROR mismatched types found type `std::option::Option` error[E0308]: mismatched types - --> $DIR/abridged.rs:30:5 + --> $DIR/abridged.rs:30:5: in fn a2 | LL | fn a2() -> Foo { | --- expected `Foo` because of return type @@ -21,7 +21,7 @@ LL | Ok(Foo { bar: 1}) //~ ERROR mismatched types found type `std::result::Result` error[E0308]: mismatched types - --> $DIR/abridged.rs:34:5 + --> $DIR/abridged.rs:34:5: in fn b | LL | fn b() -> Option { | ----------- expected `std::option::Option` because of return type @@ -32,7 +32,7 @@ LL | Foo { bar: 1 } //~ ERROR mismatched types found type `Foo` error[E0308]: mismatched types - --> $DIR/abridged.rs:38:5 + --> $DIR/abridged.rs:38:5: in fn c | LL | fn c() -> Result { | ---------------- expected `std::result::Result` because of return type @@ -43,7 +43,7 @@ LL | Foo { bar: 1 } //~ ERROR mismatched types found type `Foo` error[E0308]: mismatched types - --> $DIR/abridged.rs:49:5 + --> $DIR/abridged.rs:49:5: in fn d | LL | fn d() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type @@ -55,7 +55,7 @@ LL | x //~ ERROR mismatched types found type `X, {integer}>` error[E0308]: mismatched types - --> $DIR/abridged.rs:60:5 + --> $DIR/abridged.rs:60:5: in fn e | LL | fn e() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index 9d23b256fd333..d758fc416e4cc 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -1,5 +1,5 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` - --> $DIR/binops.rs:12:7 + --> $DIR/binops.rs:12:7: in fn main | LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` | ^ no implementation for `{integer} + std::option::Option<{integer}>` @@ -7,7 +7,7 @@ LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to ` = help: the trait `std::ops::Add>` is not implemented for `{integer}` error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` - --> $DIR/binops.rs:13:16 + --> $DIR/binops.rs:13:16: in fn main | LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` | ^ no implementation for `usize - std::option::Option<{integer}>` @@ -15,7 +15,7 @@ LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{i = help: the trait `std::ops::Sub>` is not implemented for `usize` error[E0277]: cannot multiply `()` to `{integer}` - --> $DIR/binops.rs:14:7 + --> $DIR/binops.rs:14:7: in fn main | LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` | ^ no implementation for `{integer} * ()` @@ -23,7 +23,7 @@ LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` = help: the trait `std::ops::Mul<()>` is not implemented for `{integer}` error[E0277]: cannot divide `{integer}` by `&str` - --> $DIR/binops.rs:15:7 + --> $DIR/binops.rs:15:7: in fn main | LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` | ^ no implementation for `{integer} / &str` @@ -31,7 +31,7 @@ LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` = help: the trait `std::ops::Div<&str>` is not implemented for `{integer}` error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd` is not satisfied - --> $DIR/binops.rs:16:7 + --> $DIR/binops.rs:16:7: in fn main | LL | 5 < String::new(); //~ ERROR is not satisfied | ^ can't compare `{integer}` with `std::string::String` @@ -39,7 +39,7 @@ LL | 5 < String::new(); //~ ERROR is not satisfied = help: the trait `std::cmp::PartialOrd` is not implemented for `{integer}` error[E0277]: the trait bound `{integer}: std::cmp::PartialEq>` is not satisfied - --> $DIR/binops.rs:17:7 + --> $DIR/binops.rs:17:7: in fn main | LL | 6 == Ok(1); //~ ERROR is not satisfied | ^^ can't compare `{integer}` with `std::result::Result<{integer}, _>` diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 7931e7ff07f4c..89f8cf1cc51e1 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -1,5 +1,5 @@ error[E0606]: casting `*const U` as `*const V` is invalid - --> $DIR/cast-rfc0401.rs:13:5 + --> $DIR/cast-rfc0401.rs:13:5: in fn illegal_cast | LL | u as *const V //~ ERROR is invalid | ^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | u as *const V //~ ERROR is invalid = note: vtable kinds may not match error[E0606]: casting `*const U` as `*const str` is invalid - --> $DIR/cast-rfc0401.rs:18:5 + --> $DIR/cast-rfc0401.rs:18:5: in fn illegal_cast_2 | LL | u as *const str //~ ERROR is invalid | ^^^^^^^^^^^^^^^ @@ -15,13 +15,13 @@ LL | u as *const str //~ ERROR is invalid = note: vtable kinds may not match error[E0609]: no field `f` on type `fn() {main}` - --> $DIR/cast-rfc0401.rs:75:18 + --> $DIR/cast-rfc0401.rs:75:18: in fn main | 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 + --> $DIR/cast-rfc0401.rs:39:13: in fn main | LL | let _ = v as &u8; //~ ERROR non-primitive cast | ^^^^^^^^ @@ -29,7 +29,7 @@ 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 error[E0605]: non-primitive cast: `*const u8` as `E` - --> $DIR/cast-rfc0401.rs:40:13 + --> $DIR/cast-rfc0401.rs:40:13: in fn main | LL | let _ = v as E; //~ ERROR non-primitive cast | ^^^^^^ @@ -37,7 +37,7 @@ 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 error[E0605]: non-primitive cast: `*const u8` as `fn()` - --> $DIR/cast-rfc0401.rs:41:13 + --> $DIR/cast-rfc0401.rs:41:13: in fn main | LL | let _ = v as fn(); //~ ERROR non-primitive cast | ^^^^^^^^^ @@ -45,7 +45,7 @@ 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 error[E0605]: non-primitive cast: `*const u8` as `(u32,)` - --> $DIR/cast-rfc0401.rs:42:13 + --> $DIR/cast-rfc0401.rs:42:13: in fn main | LL | let _ = v as (u32,); //~ ERROR non-primitive cast | ^^^^^^^^^^^ @@ -53,7 +53,7 @@ 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 error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8` - --> $DIR/cast-rfc0401.rs:43:13 + --> $DIR/cast-rfc0401.rs:43:13: in fn main | LL | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast | ^^^^^^^^^^^^^^^^^^^^^ @@ -61,19 +61,19 @@ 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 error[E0606]: casting `*const u8` as `f32` is invalid - --> $DIR/cast-rfc0401.rs:45:13 + --> $DIR/cast-rfc0401.rs:45:13: in fn main | LL | let _ = v as f32; //~ ERROR is invalid | ^^^^^^^^ error[E0606]: casting `fn() {main}` as `f64` is invalid - --> $DIR/cast-rfc0401.rs:46:13 + --> $DIR/cast-rfc0401.rs:46:13: in fn main | LL | let _ = main as f64; //~ ERROR is invalid | ^^^^^^^^^^^ error[E0606]: casting `&*const u8` as `usize` is invalid - --> $DIR/cast-rfc0401.rs:47:13 + --> $DIR/cast-rfc0401.rs:47:13: in fn main | LL | let _ = &v as usize; //~ ERROR is invalid | ^^^^^^^^^^^ @@ -81,13 +81,13 @@ LL | let _ = &v as usize; //~ ERROR is invalid = help: cast through a raw pointer first error[E0606]: casting `f32` as `*const u8` is invalid - --> $DIR/cast-rfc0401.rs:48:13 + --> $DIR/cast-rfc0401.rs:48:13: in fn main | LL | let _ = f as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0054]: cannot cast as `bool` - --> $DIR/cast-rfc0401.rs:49:13 + --> $DIR/cast-rfc0401.rs:49:13: in fn main | LL | let _ = 3_i32 as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^^ unsupported cast @@ -95,7 +95,7 @@ LL | let _ = 3_i32 as bool; //~ ERROR cannot cast = help: compare with zero instead error[E0054]: cannot cast as `bool` - --> $DIR/cast-rfc0401.rs:50:13 + --> $DIR/cast-rfc0401.rs:50:13: in fn main | LL | let _ = E::A as bool; //~ ERROR cannot cast | ^^^^^^^^^^^^ unsupported cast @@ -103,13 +103,13 @@ LL | let _ = E::A as bool; //~ ERROR cannot cast = help: compare with zero instead error[E0604]: only `u8` can be cast as `char`, not `u32` - --> $DIR/cast-rfc0401.rs:51:13 + --> $DIR/cast-rfc0401.rs:51:13: in fn main | LL | let _ = 0x61u32 as char; //~ ERROR can be cast as | ^^^^^^^^^^^^^^^ error[E0606]: casting `bool` as `f32` is invalid - --> $DIR/cast-rfc0401.rs:53:13 + --> $DIR/cast-rfc0401.rs:53:13: in fn main | LL | let _ = false as f32; //~ ERROR is invalid | ^^^^^^^^^^^^ @@ -117,7 +117,7 @@ LL | let _ = false as f32; //~ ERROR is invalid = help: cast through an integer first error[E0606]: casting `E` as `f32` is invalid - --> $DIR/cast-rfc0401.rs:54:13 + --> $DIR/cast-rfc0401.rs:54:13: in fn main | LL | let _ = E::A as f32; //~ ERROR is invalid | ^^^^^^^^^^^ @@ -125,7 +125,7 @@ LL | let _ = E::A as f32; //~ ERROR is invalid = help: cast through an integer first error[E0606]: casting `char` as `f32` is invalid - --> $DIR/cast-rfc0401.rs:55:13 + --> $DIR/cast-rfc0401.rs:55:13: in fn main | LL | let _ = 'a' as f32; //~ ERROR is invalid | ^^^^^^^^^^ @@ -133,67 +133,67 @@ LL | let _ = 'a' as f32; //~ ERROR is invalid = help: cast through an integer first error[E0606]: casting `bool` as `*const u8` is invalid - --> $DIR/cast-rfc0401.rs:57:13 + --> $DIR/cast-rfc0401.rs:57:13: in fn main | LL | let _ = false as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ error[E0606]: casting `E` as `*const u8` is invalid - --> $DIR/cast-rfc0401.rs:58:13 + --> $DIR/cast-rfc0401.rs:58:13: in fn main | 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 + --> $DIR/cast-rfc0401.rs:59:13: in fn main | LL | let _ = 'a' as *const u8; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*const [u8]` is invalid - --> $DIR/cast-rfc0401.rs:61:13 + --> $DIR/cast-rfc0401.rs:61:13: in fn main | 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 + --> $DIR/cast-rfc0401.rs:62:13: in fn main | LL | let _ = v as *const [u8]; //~ ERROR cannot cast | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*const str` is invalid - --> $DIR/cast-rfc0401.rs:64:13 + --> $DIR/cast-rfc0401.rs:64:13: in fn main | LL | let _ = foo as *const str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `&Foo` as `*mut str` is invalid - --> $DIR/cast-rfc0401.rs:65:13 + --> $DIR/cast-rfc0401.rs:65:13: in fn main | 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 + --> $DIR/cast-rfc0401.rs:66:13: in fn main | LL | let _ = main as *mut str; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*mut f32` is invalid - --> $DIR/cast-rfc0401.rs:67:13 + --> $DIR/cast-rfc0401.rs:67:13: in fn main | LL | let _ = &f as *mut f32; //~ ERROR is invalid | ^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*const f64` is invalid - --> $DIR/cast-rfc0401.rs:68:13 + --> $DIR/cast-rfc0401.rs:68:13: in fn main | LL | let _ = &f as *const f64; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ error[E0606]: casting `*const [i8]` as `usize` is invalid - --> $DIR/cast-rfc0401.rs:69:13 + --> $DIR/cast-rfc0401.rs:69:13: in fn main | LL | let _ = fat_sv as usize; //~ ERROR is invalid | ^^^^^^^^^^^^^^^ @@ -201,7 +201,7 @@ LL | let _ = fat_sv as usize; //~ ERROR is invalid = help: cast through a thin pointer first error[E0606]: casting `*const Foo` as `*const [u16]` is invalid - --> $DIR/cast-rfc0401.rs:78:13 + --> $DIR/cast-rfc0401.rs:78:13: in fn main | LL | let _ = cf as *const [u16]; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^^^ @@ -209,7 +209,7 @@ LL | let _ = cf as *const [u16]; //~ ERROR is invalid = note: vtable kinds may not match error[E0606]: casting `*const Foo` as `*const Bar` is invalid - --> $DIR/cast-rfc0401.rs:79:13 + --> $DIR/cast-rfc0401.rs:79:13: in fn main | LL | let _ = cf as *const Bar; //~ ERROR is invalid | ^^^^^^^^^^^^^^^^ @@ -217,7 +217,7 @@ LL | let _ = cf as *const Bar; //~ ERROR is invalid = note: vtable kinds may not match error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied - --> $DIR/cast-rfc0401.rs:63:13 + --> $DIR/cast-rfc0401.rs:63:13: in fn main | LL | let _ = fat_v as *const Foo; //~ ERROR is not satisfied | ^^^^^ `[u8]` does not have a constant size known at compile-time @@ -226,7 +226,7 @@ LL | let _ = fat_v as *const Foo; //~ ERROR is not satisfied = note: required for the cast to the object type `Foo` error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/cast-rfc0401.rs:72:13 + --> $DIR/cast-rfc0401.rs:72:13: in fn main | LL | let _ = a as *const Foo; //~ ERROR is not satisfied | ^ `str` does not have a constant size known at compile-time @@ -235,13 +235,13 @@ LL | let _ = a as *const Foo; //~ ERROR is not satisfied = note: required for the cast to the object type `Foo` error[E0606]: casting `&{float}` as `f32` is invalid - --> $DIR/cast-rfc0401.rs:81:30 + --> $DIR/cast-rfc0401.rs:81:30: in fn main | 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 + --> $DIR/cast-rfc0401.rs:81:30: in fn main | LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid | ^ 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 262c4aa1a7c7a..5ffe78cc88dc5 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,5 +1,5 @@ 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 + --> $DIR/closure-arg-count-expected-type-issue-47244.rs:24:14: in fn main | LL | m.iter().map( |_, b| { | ^^^ ------ takes 2 distinct arguments diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/src/test/ui/mismatched_types/closure-arg-count.stderr index 6270e79449876..19d9d5a67a12d 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count.stderr @@ -1,5 +1,5 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments - --> $DIR/closure-arg-count.rs:15:15 + --> $DIR/closure-arg-count.rs:15:15: in fn main | LL | [1, 2, 3].sort_by(|| panic!()); | ^^^^^^^ -- takes 0 arguments @@ -7,7 +7,7 @@ LL | [1, 2, 3].sort_by(|| panic!()); | expected closure that takes 2 arguments error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument - --> $DIR/closure-arg-count.rs:17:15 + --> $DIR/closure-arg-count.rs:17:15: in fn main | LL | [1, 2, 3].sort_by(|tuple| panic!()); | ^^^^^^^ ------- takes 1 argument @@ -15,7 +15,7 @@ LL | [1, 2, 3].sort_by(|tuple| panic!()); | expected closure that takes 2 arguments 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 + --> $DIR/closure-arg-count.rs:19:15: in fn main | LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ^^^^^^^ ----------------- takes a single 2-tuple as argument @@ -27,7 +27,7 @@ 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 + --> $DIR/closure-arg-count.rs:21:15: in fn main | LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!()); | ^^^^^^^ ----------------------------- takes a single 2-tuple as argument @@ -39,7 +39,7 @@ 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 + --> $DIR/closure-arg-count.rs:23:5: in fn main | LL | f(|| panic!()); | ^ -- takes 0 arguments @@ -53,7 +53,7 @@ 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 + --> $DIR/closure-arg-count.rs:26:53: in fn main | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i); | ^^^ ------ takes 2 distinct arguments @@ -65,7 +65,7 @@ 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 + --> $DIR/closure-arg-count.rs:28:53: in fn main | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i); | ^^^ ------------- takes 2 distinct arguments @@ -77,7 +77,7 @@ 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 + --> $DIR/closure-arg-count.rs:30:53: in fn main | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); | ^^^ --------- takes 3 distinct arguments @@ -85,7 +85,7 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i); | 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 0 arguments - --> $DIR/closure-arg-count.rs:32:53 + --> $DIR/closure-arg-count.rs:32:53: in fn main | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo); | ^^^ expected function that takes a single 2-tuple as argument @@ -94,7 +94,7 @@ 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 + --> $DIR/closure-arg-count.rs:35:53: in fn main | LL | let bar = |i, x, y| i; | --------- takes 3 distinct arguments @@ -102,7 +102,7 @@ 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 + --> $DIR/closure-arg-count.rs:37:53: in fn main | LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux); | ^^^ expected function that takes a single 2-tuple as argument @@ -111,13 +111,13 @@ 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 + --> $DIR/closure-arg-count.rs:40:41: in fn main | LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); | ^^^ expected function that takes 1 argument error[E0593]: function is expected to take 0 arguments, but it takes 1 argument - --> $DIR/closure-arg-count.rs:43:5 + --> $DIR/closure-arg-count.rs:43:5: in fn main | LL | call(Foo); | ^^^^ expected function that takes 0 arguments 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 62e646c8d3942..999d10bd4649f 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/closure-arg-type-mismatch.rs:13:14 + --> $DIR/closure-arg-type-mismatch.rs:13:14: in fn main | LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u32, u32)) -> _` @@ -7,7 +7,7 @@ LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch | expected signature of `fn(&(u32, u32)) -> _` error[E0631]: type mismatch in closure arguments - --> $DIR/closure-arg-type-mismatch.rs:14:14 + --> $DIR/closure-arg-type-mismatch.rs:14:14: in fn main | LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _` @@ -15,7 +15,7 @@ LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch | expected signature of `fn(&(u32, u32)) -> _` error[E0631]: type mismatch in closure arguments - --> $DIR/closure-arg-type-mismatch.rs:15:14 + --> $DIR/closure-arg-type-mismatch.rs:15:14: in fn main | LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch | ^^^ ------------------ found signature of `fn((u16, u16)) -> _` @@ -23,7 +23,7 @@ LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch | expected signature of `fn(&(u32, u32)) -> _` error[E0631]: type mismatch in function arguments - --> $DIR/closure-arg-type-mismatch.rs:20:5 + --> $DIR/closure-arg-type-mismatch.rs:20:5: in fn _test | LL | baz(f); //~ ERROR type mismatch | ^^^ @@ -38,7 +38,7 @@ LL | fn baz(_: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0271]: type mismatch resolving `for<'r> >::Output == ()` - --> $DIR/closure-arg-type-mismatch.rs:20:5 + --> $DIR/closure-arg-type-mismatch.rs:20:5: in fn _test | LL | baz(f); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index cb03d0ea4cca3..9a7772f851d17 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/closure-mismatch.rs:18:5: in fn main | LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ expected bound lifetime parameter, found concrete lifetime @@ -12,7 +12,7 @@ LL | fn baz(_: T) {} | ^^^^^^^^^^^^^^^^^^^^ error[E0631]: type mismatch in closure arguments - --> $DIR/closure-mismatch.rs:18:5 + --> $DIR/closure-mismatch.rs:18:5: in fn main | LL | baz(|_| ()); //~ ERROR type mismatch | ^^^ ------ found signature of `fn(_) -> _` diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/src/test/ui/mismatched_types/fn-variance-1.stderr index 221ee79bd67e8..291ded651294b 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/src/test/ui/mismatched_types/fn-variance-1.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in function arguments - --> $DIR/fn-variance-1.rs:21:5 + --> $DIR/fn-variance-1.rs:21:5: in fn main | LL | fn takes_mut(x: &mut isize) { } | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` @@ -14,7 +14,7 @@ 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 + --> $DIR/fn-variance-1.rs:25:5: in fn main | LL | fn takes_imm(x: &isize) { } | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` 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 1fed52883973b..452ed710c5ced 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,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/for-loop-has-unit-body.rs:13:9 + --> $DIR/for-loop-has-unit-body.rs:13:9: in fn main | LL | x //~ ERROR mismatched types | ^ expected (), found integral variable diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr index c838c617ae453..2d090a3e25658 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/src/test/ui/mismatched_types/issue-19109.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-19109.rs:14:5 + --> $DIR/issue-19109.rs:14:5: in fn function | LL | fn function(t: &mut Trait) { | - help: try adding a return type: `-> *mut Trait` diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr index 062bda4468a39..88ec3b0f90d00 100644 --- a/src/test/ui/mismatched_types/issue-35030.stderr +++ b/src/test/ui/mismatched_types/issue-35030.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-35030.rs:19:14 + --> $DIR/issue-35030.rs:19:14: in fn parse::parse | LL | Some(true) //~ ERROR mismatched types | ^^^^ expected type parameter, found bool diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index 86a92a70287e9..b7b72e0401bbb 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/issue-36053-2.rs:17:55: in fn main | LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^ @@ -9,7 +9,7 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); `&mut std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator` error[E0631]: type mismatch in closure arguments - --> $DIR/issue-36053-2.rs:17:32 + --> $DIR/issue-36053-2.rs:17:32: in fn main | LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | ^^^^^^ -------------- found 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 dd5da76907515..a1d6f8619fc15 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-38371.rs:14:8 + --> $DIR/issue-38371.rs:14:8: in fn foo | LL | fn foo(&foo: Foo) { //~ ERROR mismatched types | ^^^^ expected struct `Foo`, found reference @@ -9,7 +9,7 @@ LL | fn foo(&foo: Foo) { //~ ERROR mismatched types = help: did you mean `foo: &Foo`? error[E0308]: mismatched types - --> $DIR/issue-38371.rs:28:9 + --> $DIR/issue-38371.rs:28:9: in fn agh | LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types | ^^^^ expected u32, found reference @@ -19,7 +19,7 @@ LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types = help: did you mean `bar: &u32`? error[E0308]: mismatched types - --> $DIR/issue-38371.rs:31:8 + --> $DIR/issue-38371.rs:31:8: in fn bgh | LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types | ^^^^^ expected u32, found reference @@ -28,7 +28,7 @@ LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types found type `&_` error[E0529]: expected an array or slice, found `u32` - --> $DIR/issue-38371.rs:34:9 + --> $DIR/issue-38371.rs:34:9: in fn ugh | LL | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice | ^^^^^ pattern cannot match with input type `u32` diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr index ce6f2ee6e0524..edbb42609c5a8 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/src/test/ui/mismatched_types/main.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/main.rs:12:18 + --> $DIR/main.rs:12:18: in fn main | LL | let x: u32 = ( //~ ERROR mismatched types | __________________^ 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 471c15f6d72d5..5510a50744f9c 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/method-help-unsatisfied-bound.rs:15:7: in fn main | LL | a.unwrap(); | ^^^^^^ diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index d841a340431a6..7e7a181927aed 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/overloaded-calls-bad.rs:38:17 + --> $DIR/overloaded-calls-bad.rs:38:17: in fn main | LL | let ans = s("what"); //~ ERROR mismatched types | ^^^^^^ expected isize, found reference @@ -8,13 +8,13 @@ LL | let ans = s("what"); //~ ERROR mismatched types found type `&'static str` error[E0057]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/overloaded-calls-bad.rs:39:15 + --> $DIR/overloaded-calls-bad.rs:39:15: in fn main | 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 + --> $DIR/overloaded-calls-bad.rs:41:15: in fn main | LL | let ans = s("burma", "shave"); | ^^^^^^^^^^^^^^^^^^^ expected 1 parameter 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 bbe9053430a1c..c376ccef49670 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/trait-bounds-cant-coerce.rs:24:7 + --> $DIR/trait-bounds-cant-coerce.rs:24:7: in fn d | LL | a(x); //~ ERROR mismatched types [E0308] | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` 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 28b16641e4dd5..9b31527cac1e8 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -1,5 +1,5 @@ error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/trait-impl-fn-incompatibility.rs:21:15 + --> $DIR/trait-impl-fn-incompatibility.rs:21:15: in fn foo::foo | LL | fn foo(x: u16); | --- type in trait @@ -11,7 +11,7 @@ LL | fn foo(x: i16) { } //~ ERROR incompatible type found type `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait - --> $DIR/trait-impl-fn-incompatibility.rs:22:28 + --> $DIR/trait-impl-fn-incompatibility.rs:22:28: in fn bar::bar | LL | fn bar(&mut self, bar: &mut Bar); | -------- type in trait 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 762f0744d80c9..1d0fe7f20c03f 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/unboxed-closures-vtable-mismatch.rs:25:13 + --> $DIR/unboxed-closures-vtable-mismatch.rs:25:13: in fn main | LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); | ----------------------------- found signature of `fn(usize, isize) -> _` diff --git a/src/test/ui/missing-fields-in-struct-pattern.stderr b/src/test/ui/missing-fields-in-struct-pattern.stderr index d1c3260f11e30..dc8ad3244f2ab 100644 --- a/src/test/ui/missing-fields-in-struct-pattern.stderr +++ b/src/test/ui/missing-fields-in-struct-pattern.stderr @@ -1,11 +1,11 @@ error[E0026]: struct `S` does not have fields named `a`, `b`, `c`, `d` - --> $DIR/missing-fields-in-struct-pattern.rs:14:16 + --> $DIR/missing-fields-in-struct-pattern.rs:14:16: in fn main | LL | if let S { a, b, c, d } = S(1, 2, 3, 4) { | ^ ^ ^ ^ struct `S` does not have these fields error[E0027]: pattern does not mention fields `0`, `1`, `2`, `3` - --> $DIR/missing-fields-in-struct-pattern.rs:14:12 + --> $DIR/missing-fields-in-struct-pattern.rs:14:12: in fn main | LL | if let S { a, b, c, d } = S(1, 2, 3, 4) { | ^^^^^^^^^^^^^^^^ missing fields `0`, `1`, `2`, `3` diff --git a/src/test/ui/missing-items/issue-40221.stderr b/src/test/ui/missing-items/issue-40221.stderr index 81c9f40f6cfb1..41425a56be804 100644 --- a/src/test/ui/missing-items/issue-40221.stderr +++ b/src/test/ui/missing-items/issue-40221.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `C(QA)` not covered - --> $DIR/issue-40221.rs:21:11 + --> $DIR/issue-40221.rs:21:11: in fn test | LL | match proto { //~ ERROR non-exhaustive patterns | ^^^^^ pattern `C(QA)` not covered diff --git a/src/test/ui/missing-items/missing-type-parameter.stderr b/src/test/ui/missing-items/missing-type-parameter.stderr index a27e8aac28f23..1f3ba8ab282a1 100644 --- a/src/test/ui/missing-items/missing-type-parameter.stderr +++ b/src/test/ui/missing-items/missing-type-parameter.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/missing-type-parameter.rs:14:5 + --> $DIR/missing-type-parameter.rs:14:5: in fn main | LL | foo(); //~ ERROR type annotations needed | ^^^ cannot infer type for `X` 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 f1b882924109b..da135cd341853 100644 --- a/src/test/ui/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves-based-on-type-block-bad.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/moves-based-on-type-block-bad.rs:34:19 + --> $DIR/moves-based-on-type-block-bad.rs:34:19: in fn main | LL | match hellothere.x { //~ ERROR cannot move out | ^^^^^^^^^^ cannot move out of borrowed content 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 62e16df583f87..45f0798163381 100644 --- a/src/test/ui/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves-based-on-type-match-bindings.stderr @@ -1,5 +1,5 @@ error[E0382]: use of partially moved value: `x` - --> $DIR/moves-based-on-type-match-bindings.rs:26:12 + --> $DIR/moves-based-on-type-match-bindings.rs:26:12: in fn f10 | LL | Foo {f} => {} | - value moved here diff --git a/src/test/ui/moves-based-on-type-tuple.stderr b/src/test/ui/moves-based-on-type-tuple.stderr index b0a3b6bf1fd67..51ae01625b195 100644 --- a/src/test/ui/moves-based-on-type-tuple.stderr +++ b/src/test/ui/moves-based-on-type-tuple.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` (Ast) - --> $DIR/moves-based-on-type-tuple.rs:16:13 + --> $DIR/moves-based-on-type-tuple.rs:16:13: in fn dup | LL | box (x, x) | - ^ value used here after move @@ -9,7 +9,7 @@ LL | box (x, x) = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x` (Mir) - --> $DIR/moves-based-on-type-tuple.rs:16:13 + --> $DIR/moves-based-on-type-tuple.rs:16:13: in fn dup | LL | box (x, x) | - ^ value used here after move diff --git a/src/test/ui/nll/borrowed-local-error.stderr b/src/test/ui/nll/borrowed-local-error.stderr index 901b1ca271a5f..83b2ab0b43805 100644 --- a/src/test/ui/nll/borrowed-local-error.stderr +++ b/src/test/ui/nll/borrowed-local-error.stderr @@ -1,5 +1,5 @@ error[E0597]: `v` does not live long enough - --> $DIR/borrowed-local-error.rs:20:9 + --> $DIR/borrowed-local-error.rs:20:9: in fn main | LL | let x = gimme({ | _____________- diff --git a/src/test/ui/nll/borrowed-match-issue-45045.stderr b/src/test/ui/nll/borrowed-match-issue-45045.stderr index 7904e60157990..d8f6e470f4192 100644 --- a/src/test/ui/nll/borrowed-match-issue-45045.stderr +++ b/src/test/ui/nll/borrowed-match-issue-45045.stderr @@ -1,5 +1,5 @@ error[E0503]: cannot use `e` because it was mutably borrowed - --> $DIR/borrowed-match-issue-45045.rs:24:5 + --> $DIR/borrowed-match-issue-45045.rs:24:5: in fn main | LL | let f = &mut e; | ------ borrow of `e` occurs here @@ -14,7 +14,7 @@ LL | *g = Xyz::B; | ----------- borrow later used here error[E0503]: cannot use `e` because it was mutably borrowed - --> $DIR/borrowed-match-issue-45045.rs:25:9 + --> $DIR/borrowed-match-issue-45045.rs:25:9: in fn main | LL | let f = &mut e; | ------ borrow of `e` occurs here diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/src/test/ui/nll/borrowed-referent-issue-38899.stderr index 5c5a66e7e21df..6024a24c3d97e 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr +++ b/src/test/ui/nll/borrowed-referent-issue-38899.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowed-referent-issue-38899.rs:24:21 + --> $DIR/borrowed-referent-issue-38899.rs:24:21: in fn bump | LL | let x = &mut block; | ---------- mutable borrow occurs here diff --git a/src/test/ui/nll/borrowed-temporary-error.stderr b/src/test/ui/nll/borrowed-temporary-error.stderr index 37746a173eb7a..13160c21feb53 100644 --- a/src/test/ui/nll/borrowed-temporary-error.stderr +++ b/src/test/ui/nll/borrowed-temporary-error.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/borrowed-temporary-error.rs:20:10 + --> $DIR/borrowed-temporary-error.rs:20:10: in fn main | LL | &(v,) | ^^^^ temporary value does not live long enough diff --git a/src/test/ui/nll/borrowed-universal-error-2.stderr b/src/test/ui/nll/borrowed-universal-error-2.stderr index 467b02d207dd2..186fbc4540c83 100644 --- a/src/test/ui/nll/borrowed-universal-error-2.stderr +++ b/src/test/ui/nll/borrowed-universal-error-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `v` does not live long enough - --> $DIR/borrowed-universal-error-2.rs:16:5 + --> $DIR/borrowed-universal-error-2.rs:16:5: in fn foo | LL | &v | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/borrowed-universal-error.stderr b/src/test/ui/nll/borrowed-universal-error.stderr index 94d9bb36fa428..89f8f4070519c 100644 --- a/src/test/ui/nll/borrowed-universal-error.stderr +++ b/src/test/ui/nll/borrowed-universal-error.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/borrowed-universal-error.rs:20:12 + --> $DIR/borrowed-universal-error.rs:20:12: in fn foo | LL | gimme(&(v,)) | ^^^^ temporary value does not live long enough diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/src/test/ui/nll/capture-ref-in-struct.stderr index 81946de612afe..7ac8b26561750 100644 --- a/src/test/ui/nll/capture-ref-in-struct.stderr +++ b/src/test/ui/nll/capture-ref-in-struct.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/capture-ref-in-struct.rs:31:16 + --> $DIR/capture-ref-in-struct.rs:31:16: in fn test | LL | y: &y, | ^^ borrowed value does not live long enough 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 d876c751a41d2..6a806066a3ae1 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/escape-argument-callee.rs:36:50 + --> $DIR/escape-argument-callee.rs:36:50: in fn test | 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 + --> $DIR/escape-argument-callee.rs:36:45: in fn test | LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^ note: No external requirements - --> $DIR/escape-argument-callee.rs:36:38 + --> $DIR/escape-argument-callee.rs:36:38: in fn test | LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index a9a52aba8421e..2b20e545bfc14 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -1,5 +1,5 @@ note: No external requirements - --> $DIR/escape-argument.rs:36:38 + --> $DIR/escape-argument.rs:36:38: in fn test | LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ @@ -24,7 +24,7 @@ LL | | } = note: defining type: DefId(0/0:3 ~ escape_argument[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough - --> $DIR/escape-argument.rs:37:25 + --> $DIR/escape-argument.rs:37:25: in fn test | LL | closure(&mut p, &y); | ^^ borrowed value does not live long enough 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 a7fb9d90a2183..86826a964af84 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -1,5 +1,5 @@ note: External requirements - --> $DIR/escape-upvar-nested.rs:31:32 + --> $DIR/escape-upvar-nested.rs:31:32: in fn test | LL | let mut closure1 = || p = &y; | ^^^^^^^^^ @@ -14,7 +14,7 @@ LL | let mut closure1 = || p = &y; = note: where '_#3r: '_#2r note: External requirements - --> $DIR/escape-upvar-nested.rs:30:27 + --> $DIR/escape-upvar-nested.rs:30:27: in fn test | LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ @@ -47,7 +47,7 @@ LL | | } = note: defining type: DefId(0/0:3 ~ escape_upvar_nested[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough - --> $DIR/escape-upvar-nested.rs:30:27 + --> $DIR/escape-upvar-nested.rs:30:27: in fn test | LL | let mut closure = || { //~ ERROR `y` does not live long enough [E0597] | ___________________________^ 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 fd6b7a2e68d33..37fd6af5c6e9f 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr @@ -1,5 +1,5 @@ note: External requirements - --> $DIR/escape-upvar-ref.rs:33:27 + --> $DIR/escape-upvar-ref.rs:33:27: in fn test | LL | let mut closure = || p = &y; | ^^^^^^^^^ @@ -28,7 +28,7 @@ LL | | } = note: defining type: DefId(0/0:3 ~ escape_upvar_ref[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough - --> $DIR/escape-upvar-ref.rs:33:27 + --> $DIR/escape-upvar-ref.rs:33:27: in fn test | LL | let mut closure = || p = &y; | ^^^^^^^^^ borrowed value does not live long enough 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 ef5a31e40d445..cff8572c5f638 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-fail-no-postdom.rs:55:21 + --> $DIR/propagate-approximated-fail-no-postdom.rs:55:21: in fn supply | 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 + --> $DIR/propagate-approximated-fail-no-postdom.rs:55:17: in fn supply | LL | let p = x.get(); | ^ note: No external requirements - --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9 + --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9: in fn supply | LL | / |_outlives1, _outlives2, _outlives3, x, y| { LL | | // Only works if 'x: 'y: 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 3a3236fd16c49..719e3d65405d8 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-ref.rs:57:9 + --> $DIR/propagate-approximated-ref.rs:57:9: in fn supply | LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/propagate-approximated-ref.rs:53:47 + --> $DIR/propagate-approximated-ref.rs:53:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ @@ -24,7 +24,7 @@ LL | | }); = note: where '_#1r: '_#2r error[E0623]: lifetime mismatch - --> $DIR/propagate-approximated-ref.rs:53:29 + --> $DIR/propagate-approximated-ref.rs:53:29: in fn supply | LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- 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 6480cbe443127..9d3af58f378b4 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5: in fn case1 | 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 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9: in fn case1 | 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 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15: in fn case1 | LL | foo(cell, |cell_a, cell_x| { | _______________^ @@ -41,7 +41,7 @@ LL | | } = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] note: External requirements - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15: in fn case2 | LL | foo(cell, |cell_a, cell_x| { | _______________^ @@ -71,7 +71,7 @@ LL | | } = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] error[E0597]: `a` does not live long enough - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26: in fn case2 | LL | let cell = Cell::new(&a); | ^^ borrowed value does not live long enough 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 6dcc8421177d9..1bbed2a645a78 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:49:9 + --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:49:9: in fn supply | LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 + --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ @@ -24,7 +24,7 @@ LL | | }); = note: where '_#1r: '_#0r 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 + --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ 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 1291f2e9901b0..ccb4d86ea5f6d 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9 + --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9: in fn supply | LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 + --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ @@ -24,7 +24,7 @@ LL | | }); = note: where '_#1r: '_#0r 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 + --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ 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 d1824a9415102..a5dd104962880 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-approximated-val.rs:50:9 + --> $DIR/propagate-approximated-val.rs:50:9: in fn test | LL | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/propagate-approximated-val.rs:46:45 + --> $DIR/propagate-approximated-val.rs:46:45: in fn test | LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { | _____________________________________________^ @@ -24,7 +24,7 @@ LL | | }); = note: where '_#1r: '_#2r error[E0623]: lifetime mismatch - --> $DIR/propagate-approximated-val.rs:46:29 + --> $DIR/propagate-approximated-val.rs:46:29: in fn test | LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------- ------- 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 d6eeda881daf2..e41af9f40c7e3 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-despite-same-free-region.rs:54:21 + --> $DIR/propagate-despite-same-free-region.rs:54:21: in fn supply | LL | let p = x.get(); | ^^^^^^^ note: External requirements - --> $DIR/propagate-despite-same-free-region.rs:52:9 + --> $DIR/propagate-despite-same-free-region.rs:52:9: in fn supply | LL | / |_outlives1, _outlives2, x, y| { LL | | // Only works if 'x: 'y: 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 ffae47bd081c3..0977ad00bedcb 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9 + --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9: in fn supply | 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 + --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:18: in fn supply | LL | demand_y(x, y, x.get()) | ^ note: No external requirements - --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47 + --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ 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 01af756b8332c..310cf314237dc 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9 + --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9: in fn supply | 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 + --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:18: in fn supply | LL | demand_y(x, y, x.get()) | ^ note: No external requirements - --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47 + --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47: in fn supply | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ 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 a8b4ed528015f..2504a867a6b2f 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/propagate-from-trait-match.rs:55:9 + --> $DIR/propagate-from-trait-match.rs:55:9: in fn supply | LL | require(value); | ^^^^^^^ note: External requirements - --> $DIR/propagate-from-trait-match.rs:42:36 + --> $DIR/propagate-from-trait-match.rs:42:36: in fn supply | LL | establish_relationships(value, |value| { | ____________________________________^ @@ -27,7 +27,7 @@ LL | | }); = note: where T: '_#1r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/propagate-from-trait-match.rs:42:36 + --> $DIR/propagate-from-trait-match.rs:42:36: in fn supply | LL | establish_relationships(value, |value| { | ____________________________________^ 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 a823e62d3b843..6b0a86839f668 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 + --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5: in fn foo | LL | &*x | ^^^ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 + --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5: in fn foo | LL | fn foo(x: &u32) -> &'static u32 { | - consider changing the type of `x` to `&ReStatic u32` 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 9520b446303c3..5cf5cbfa1cc9e 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 + --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5: in fn foo | 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 + --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5: in fn foo | LL | &*x | ^^^ 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 415aefdeee947..b100a1054e2cb 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 + --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5: in fn foo | LL | &*x | ^^^ error[E0623]: lifetime mismatch - --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 + --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5: in fn foo | LL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { | ------- ------- 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 4d021fb545494..b5adc9868d043 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/return-wrong-bound-region.rs:21:23 + --> $DIR/return-wrong-bound-region.rs:21:23: in fn test | 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 + --> $DIR/return-wrong-bound-region.rs:21:23: in fn test | LL | expect_sig(|a, b| b); // ought to return `a` | ^ note: No external requirements - --> $DIR/return-wrong-bound-region.rs:21:16 + --> $DIR/return-wrong-bound-region.rs:21:16: in fn test | LL | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^ diff --git a/src/test/ui/nll/decl-macro-illegal-copy.stderr b/src/test/ui/nll/decl-macro-illegal-copy.stderr index 8bc25c23e0178..ca7ac355172d7 100644 --- a/src/test/ui/nll/decl-macro-illegal-copy.stderr +++ b/src/test/ui/nll/decl-macro-illegal-copy.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `wrapper.inner` - --> $DIR/decl-macro-illegal-copy.rs:32:9 + --> $DIR/decl-macro-illegal-copy.rs:32:9: in fn main | LL | $wrapper.inner | -------------- value moved here diff --git a/src/test/ui/nll/drop-no-may-dangle.stderr b/src/test/ui/nll/drop-no-may-dangle.stderr index a35271bdcfeff..20cb32ef2d0b2 100644 --- a/src/test/ui/nll/drop-no-may-dangle.stderr +++ b/src/test/ui/nll/drop-no-may-dangle.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `v[..]` because it is borrowed - --> $DIR/drop-no-may-dangle.rs:30:9 + --> $DIR/drop-no-may-dangle.rs:30:9: in fn main | LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here @@ -11,7 +11,7 @@ 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:33:5 + --> $DIR/drop-no-may-dangle.rs:33:5: in fn main | LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[..]` occurs here diff --git a/src/test/ui/nll/get_default.stderr b/src/test/ui/nll/get_default.stderr index 064fd38b87251..354bd167bd1b2 100644 --- a/src/test/ui/nll/get_default.stderr +++ b/src/test/ui/nll/get_default.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/get_default.rs:33:17 + --> $DIR/get_default.rs:33:17: in fn ok | LL | match map.get() { | --- immutable borrow occurs here @@ -11,7 +11,7 @@ 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 + --> $DIR/get_default.rs:44:17: in fn err | LL | match map.get() { | --- immutable borrow occurs here @@ -23,7 +23,7 @@ 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 + --> $DIR/get_default.rs:50:17: in fn err | LL | match map.get() { | --- immutable borrow occurs here @@ -35,7 +35,7 @@ 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 + --> $DIR/get_default.rs:44:17: in fn err | LL | match map.get() { | --- immutable borrow occurs here diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index 3cb20cc975f4d..caabec1a2fa19 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `*s` because it is borrowed - --> $DIR/guarantor-issue-46974.rs:19:5 + --> $DIR/guarantor-issue-46974.rs:19:5: in fn foo | LL | let t = &mut *s; // this borrow should last for the entire function | ------- borrow of `*s` occurs here @@ -10,7 +10,7 @@ LL | *x | -- borrow later used here error[E0621]: explicit lifetime required in the type of `s` - --> $DIR/guarantor-issue-46974.rs:25:5 + --> $DIR/guarantor-issue-46974.rs:25:5: in fn bar | LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { | - consider changing the type of `s` to `&'static std::boxed::Box<(i32,)>` diff --git a/src/test/ui/nll/issue-31567.stderr b/src/test/ui/nll/issue-31567.stderr index 579dc7eba8c85..dd7a603da8bbe 100644 --- a/src/test/ui/nll/issue-31567.stderr +++ b/src/test/ui/nll/issue-31567.stderr @@ -1,5 +1,5 @@ error[E0597]: `*v.0` does not live long enough - --> $DIR/issue-31567.rs:22:26 + --> $DIR/issue-31567.rs:22:26: in fn get_dangling | LL | let s_inner: &'a S = &*v.0; //~ ERROR `*v.0` does not live long enough | ^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/issue-47388.stderr b/src/test/ui/nll/issue-47388.stderr index f3952c49a2a36..c88f5826190c4 100644 --- a/src/test/ui/nll/issue-47388.stderr +++ b/src/test/ui/nll/issue-47388.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to data in a `&` reference - --> $DIR/issue-47388.rs:18:5 + --> $DIR/issue-47388.rs:18:5: in fn main | LL | let fancy_ref = &(&mut fancy); | ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)` diff --git a/src/test/ui/nll/issue-47470.stderr b/src/test/ui/nll/issue-47470.stderr index f84a68d85b95f..601bcdf4c1b25 100644 --- a/src/test/ui/nll/issue-47470.stderr +++ b/src/test/ui/nll/issue-47470.stderr @@ -1,5 +1,5 @@ error[E0597]: `local` does not live long enough - --> $DIR/issue-47470.rs:27:9 + --> $DIR/issue-47470.rs:27:9: in fn get::get | LL | &local //~ ERROR `local` does not live long enough | ^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/issue-48238.stderr b/src/test/ui/nll/issue-48238.stderr index 29385d9b2430f..19efe6544821b 100644 --- a/src/test/ui/nll/issue-48238.stderr +++ b/src/test/ui/nll/issue-48238.stderr @@ -1,5 +1,5 @@ error: free region `` does not outlive free region `'_#1r` - --> $DIR/issue-48238.rs:21:21 + --> $DIR/issue-48238.rs:21:21: in fn main | LL | move || use_val(&orig); //~ ERROR free region `` does not outlive free region `'_#1r` | ^^^^^ 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 327454ee60e53..917d010bada10 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,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:32:5 + --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:32:5: in fn main | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here 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 54be12f289545..acc6acdb69182 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/maybe-initialized-drop-with-fragment.rs:31:5 + --> $DIR/maybe-initialized-drop-with-fragment.rs:31:5: in fn main | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here 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 ee926e4279318..f988350776bd1 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,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/maybe-initialized-drop-with-uninitialized-fragments.rs:32:5 + --> $DIR/maybe-initialized-drop-with-uninitialized-fragments.rs:32:5: in fn main | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here diff --git a/src/test/ui/nll/maybe-initialized-drop.stderr b/src/test/ui/nll/maybe-initialized-drop.stderr index cc842c29ccb15..df38159a4c82c 100644 --- a/src/test/ui/nll/maybe-initialized-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/maybe-initialized-drop.rs:26:5 + --> $DIR/maybe-initialized-drop.rs:26:5: in fn main | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here 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 f40e38c63f5ac..5380936c025fd 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/return-ref-mut-issue-46557.rs:17:21 + --> $DIR/return-ref-mut-issue-46557.rs:17:21: in fn gimme_static_mut | LL | fn gimme_static_mut() -> &'static mut u32 { | ___________________________________________- 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 f836960a28cf3..4c506b716c015 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/impl-trait-captures.rs:21:5 + --> $DIR/impl-trait-captures.rs:21:5: in fn foo | LL | x | ^ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/impl-trait-captures.rs:21:5 + --> $DIR/impl-trait-captures.rs:21:5: in fn foo | LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> { | - consider changing the type of `x` to `&ReEarlyBound(0, 'a) T` 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 50b80282e6241..381f3bc5e4a32 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/impl-trait-outlives.rs:17:35 + --> $DIR/impl-trait-outlives.rs:17:35: in fn no_region | LL | fn no_region<'a, T>(x: Box) -> impl Debug + 'a | ^^^^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/impl-trait-outlives.rs:33:42 + --> $DIR/impl-trait-outlives.rs:33:42: in fn wrong_region | 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:22:5 + --> $DIR/impl-trait-outlives.rs:22:5: in fn no_region | LL | x | ^ @@ -19,7 +19,7 @@ LL | x = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/impl-trait-outlives.rs:38:5 + --> $DIR/impl-trait-outlives.rs:38:5: in fn wrong_region | LL | x | ^ 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 0a2bd3247655a..1ff19b3b95234 100644 --- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr +++ b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/projection-implied-bounds.rs:45:36 + --> $DIR/projection-implied-bounds.rs:45:36: in fn generic2 | 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 + --> $DIR/projection-implied-bounds.rs:45:18: in fn generic2 | LL | twice(value, |value_ref, item| invoke2(value_ref, item)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 3689ca74adb8c..270ded7f34e84 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:35:31 + --> $DIR/projection-no-regions-closure.rs:35:31: in fn no_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:53:31 + --> $DIR/projection-no-regions-closure.rs:53:31: in fn wrong_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/projection-no-regions-closure.rs:35:23 + --> $DIR/projection-no-regions-closure.rs:35:23: in fn no_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#2r error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-closure.rs:35:23 + --> $DIR/projection-no-regions-closure.rs:35:23: in fn no_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -51,7 +51,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:45:23 + --> $DIR/projection-no-regions-closure.rs:45:23: in fn correct_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,7 +82,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:53:23 + --> $DIR/projection-no-regions-closure.rs:53:23: in fn wrong_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#3r error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-closure.rs:53:23 + --> $DIR/projection-no-regions-closure.rs:53:23: in fn wrong_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -124,7 +124,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:64:23 + --> $DIR/projection-no-regions-closure.rs:64:23: in fn outlives_region | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 3199ec151335d..2fedcb5017c9a 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:23:5 + --> $DIR/projection-no-regions-fn.rs:23:5: in fn no_region | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:39:5 + --> $DIR/projection-no-regions-fn.rs:39:5: in fn wrong_region | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-fn.rs:23:5 + --> $DIR/projection-no-regions-fn.rs:23:5: in fn no_region | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ LL | Box::new(x.next()) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-fn.rs:39:5 + --> $DIR/projection-no-regions-fn.rs:39:5: in fn wrong_region | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ 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 e1218830dbb64..c6872da6a13c3 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,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:55:39 + --> $DIR/projection-one-region-closure.rs:55:39: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:67:39 + --> $DIR/projection-one-region-closure.rs:67:39: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:89:39 + --> $DIR/projection-one-region-closure.rs:89:39: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-one-region-closure.rs:55:29 + --> $DIR/projection-one-region-closure.rs:55:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:55:29 + --> $DIR/projection-one-region-closure.rs:55:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ 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))`... 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:55:20 + --> $DIR/projection-one-region-closure.rs:55:20: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -64,7 +64,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:67:29 + --> $DIR/projection-one-region-closure.rs:67:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:67:29 + --> $DIR/projection-one-region-closure.rs:67:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -89,7 +89,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:67:20 + --> $DIR/projection-one-region-closure.rs:67:20: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -113,7 +113,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:89:29 + --> $DIR/projection-one-region-closure.rs:89:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -130,7 +130,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:89:29 + --> $DIR/projection-one-region-closure.rs:89:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -138,7 +138,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:89:20 + --> $DIR/projection-one-region-closure.rs:89:20: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -162,7 +162,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:102:29 + --> $DIR/projection-one-region-closure.rs:102:29: in fn elements_outlive | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 76554e29f62ea..6af0382d394a5 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,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:47:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:39: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:58:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:39: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:79:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:39: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:47:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r 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:47:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:20: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -55,7 +55,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:58:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -71,7 +71,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:58:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:20: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -95,7 +95,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:79:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,7 +111,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:79:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:20: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -135,7 +135,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:90:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:90:29: in fn elements_outlive | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -169,7 +169,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:102:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:102:29: in fn one_region | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 136e143e80edf..301eb9f4964aa 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,5 +1,5 @@ note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:46:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:46:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:55:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:55:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:74:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:74:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -92,7 +92,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:83:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:83:29: in fn elements_outlive | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -124,7 +124,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:95:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:95:29: in fn one_region | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 c7f456929609e..d6d89410866ad 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,29 +1,29 @@ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:48:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:39: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:59:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:39: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:80:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:39: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:108:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:39: in fn two_regions | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -39,7 +39,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#3r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:29: in fn no_relationships_late | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,7 +82,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:29: in fn no_relationships_early | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -109,7 +109,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -126,7 +126,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:29: in fn projection_outlives | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -153,7 +153,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:91:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:91:29: in fn elements_outlive1 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -189,7 +189,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:100:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:100:29: in fn elements_outlive2 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -225,7 +225,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:108:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:29: in fn two_regions | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -240,7 +240,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = 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:108:20 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:20: in fn two_regions | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ @@ -263,7 +263,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:119:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:119:29: in fn two_regions_outlive | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -297,7 +297,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:131:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:131:29: in fn one_region | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 b4f51401a90f6..4cb637d1757af 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,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:31: in fn generic | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31: in fn generic_fail | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31: in fn generic_fail | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ note: External requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24: in fn generic | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24: in fn generic_fail | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -61,7 +61,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: where T: '_#1r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24: in fn generic_fail | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ 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 59a8a39a7b085..5be15a5303f5d 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27: in fn no_region | LL | with_signature(x, |y| y) | ^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5: in fn wrong_region | LL | x | ^ note: External requirements - --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23: in fn no_region | LL | with_signature(x, |y| y) | ^^^^^ @@ -26,7 +26,7 @@ LL | with_signature(x, |y| y) = note: where T: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23: in fn no_region | LL | with_signature(x, |y| y) | ^^^^^ @@ -51,7 +51,7 @@ LL | | } ] error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5: in fn wrong_region | LL | x | ^ 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 a53ce21b7e6d2..f998b0952fed8 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:44:9 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:44:9: in fn no_region | LL | require(&x, &y) | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:78:9 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:78:9: in fn wrong_region | LL | require(&x, &y) | ^^^^^^^ note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26: in fn no_region | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -32,7 +32,7 @@ LL | | }) = note: where T: '_#1r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26: in fn no_region | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -63,7 +63,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:54:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:54:26: in fn correct_region | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -102,7 +102,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26: in fn wrong_region | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -123,7 +123,7 @@ LL | | }) = note: where T: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26: in fn wrong_region | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -154,7 +154,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:89:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:89:26: in fn outlives_region | LL | with_signature(a, b, |x, y| { | __________________________^ 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 dec15f47a0301..fee3f6313ed05 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,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn-body-nll-feature.rs:30:5 + --> $DIR/ty-param-fn-body-nll-feature.rs:30:5: in fn region_static | LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ 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 537f12234708e..84689167411bc 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,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-fn-body.rs:29:5 + --> $DIR/ty-param-fn-body.rs:29:5: in fn region_static | LL | outlives(cell, t) | ^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn-body.rs:29:5 + --> $DIR/ty-param-fn-body.rs:29:5: in fn region_static | LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ 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 5ce50d8118578..5fd13d998e80f 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:21:5 + --> $DIR/ty-param-fn.rs:21:5: in fn no_region | LL | x | ^ warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:37:5 + --> $DIR/ty-param-fn.rs:37:5: in fn wrong_region | LL | x | ^ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn.rs:21:5 + --> $DIR/ty-param-fn.rs:21:5: in fn no_region | LL | x | ^ @@ -19,7 +19,7 @@ LL | x = help: consider adding an explicit lifetime bound `T: 'a`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn.rs:37:5 + --> $DIR/ty-param-fn.rs:37:5: in fn wrong_region | LL | x | ^ diff --git a/src/test/ui/non-exhaustive-pattern-witness.stderr b/src/test/ui/non-exhaustive-pattern-witness.stderr index e364e822ea878..b3a707a70e724 100644 --- a/src/test/ui/non-exhaustive-pattern-witness.stderr +++ b/src/test/ui/non-exhaustive-pattern-witness.stderr @@ -1,41 +1,41 @@ error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered - --> $DIR/non-exhaustive-pattern-witness.rs:19:11 + --> $DIR/non-exhaustive-pattern-witness.rs:19:11: in fn struct_with_a_nested_enum_and_vector | 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:35:11 + --> $DIR/non-exhaustive-pattern-witness.rs:35:11: in fn enum_with_single_missing_variant | 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:47:11 + --> $DIR/non-exhaustive-pattern-witness.rs:47:11: in fn enum_with_multiple_missing_variants | 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:58:11 + --> $DIR/non-exhaustive-pattern-witness.rs:58:11: in fn enum_with_excessive_missing_variants | 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:66:11 + --> $DIR/non-exhaustive-pattern-witness.rs:66:11: in fn enum_struct_variant | 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:82:11 + --> $DIR/non-exhaustive-pattern-witness.rs:82:11: in fn vectors_with_nested_enums | LL | match *x { | ^^ pattern `[Second(true), Second(false)]` not covered error[E0004]: non-exhaustive patterns: `((), false)` not covered - --> $DIR/non-exhaustive-pattern-witness.rs:95:11 + --> $DIR/non-exhaustive-pattern-witness.rs:95:11: in fn missing_nil | LL | match ((), false) { | ^^^^^^^^^^^ pattern `((), false)` not covered diff --git a/src/test/ui/not-enough-arguments.stderr b/src/test/ui/not-enough-arguments.stderr index 6a869cc5d5521..ca7a8e7afa422 100644 --- a/src/test/ui/not-enough-arguments.stderr +++ b/src/test/ui/not-enough-arguments.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 4 parameters but 3 parameters were supplied - --> $DIR/not-enough-arguments.rs:20:3 + --> $DIR/not-enough-arguments.rs:20:3: in fn main | LL | fn foo(a: isize, b: isize, c: isize, d:isize) { | --------------------------------------------- defined here diff --git a/src/test/ui/numeric-fields.stderr b/src/test/ui/numeric-fields.stderr index 68a87da8ded32..1a439f8f96e5f 100644 --- a/src/test/ui/numeric-fields.stderr +++ b/src/test/ui/numeric-fields.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `S` has no field named `0b1` - --> $DIR/numeric-fields.rs:14:15 + --> $DIR/numeric-fields.rs:14:15: in fn main | LL | let s = S{0b1: 10, 0: 11}; | ^^^ `S` does not have this field @@ -7,7 +7,7 @@ LL | let s = S{0b1: 10, 0: 11}; = note: available fields are: `0`, `1` error[E0026]: struct `S` does not have a field named `0x1` - --> $DIR/numeric-fields.rs:17:17 + --> $DIR/numeric-fields.rs:17:17: in fn main | LL | S{0: a, 0x1: b, ..} => {} | ^^^^^^ struct `S` does not have this field diff --git a/src/test/ui/object-safety-supertrait-mentions-Self.stderr b/src/test/ui/object-safety-supertrait-mentions-Self.stderr index f562bc6c54f9c..e348dbbfd7985 100644 --- a/src/test/ui/object-safety-supertrait-mentions-Self.stderr +++ b/src/test/ui/object-safety-supertrait-mentions-Self.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Baz` cannot be made into an object - --> $DIR/object-safety-supertrait-mentions-Self.rs:25:31 + --> $DIR/object-safety-supertrait-mentions-Self.rs:25:31: in fn make_baz | LL | fn make_baz(t: &T) -> &Baz { | ^^^ the trait `Baz` cannot be made into an object diff --git a/src/test/ui/on-unimplemented/multiple-impls.stderr b/src/test/ui/on-unimplemented/multiple-impls.stderr index 23635a3c415d4..62c3c0472f910 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.stderr +++ b/src/test/ui/on-unimplemented/multiple-impls.stderr @@ -1,18 +1,18 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied - --> $DIR/multiple-impls.rs:43:5 + --> $DIR/multiple-impls.rs:43:5: in fn main | 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 + --> $DIR/multiple-impls.rs:22:5: in trait Index | LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied - --> $DIR/multiple-impls.rs:43:5 + --> $DIR/multiple-impls.rs:43:5: in fn main | LL | Index::index(&[] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait message @@ -20,20 +20,20 @@ LL | Index::index(&[] as &[i32], 2u32); = help: the trait `Index` is not implemented for `[i32]` error[E0277]: the trait bound `[i32]: Index>` is not satisfied - --> $DIR/multiple-impls.rs:46:5 + --> $DIR/multiple-impls.rs:46:5: in fn main | 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 + --> $DIR/multiple-impls.rs:22:5: in trait Index | LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied - --> $DIR/multiple-impls.rs:46:5 + --> $DIR/multiple-impls.rs:46:5: in fn main | LL | Index::index(&[] as &[i32], Foo(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Foo @@ -41,20 +41,20 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); = help: the trait `Index>` is not implemented for `[i32]` error[E0277]: the trait bound `[i32]: Index>` is not satisfied - --> $DIR/multiple-impls.rs:49:5 + --> $DIR/multiple-impls.rs:49:5: in fn main | 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 + --> $DIR/multiple-impls.rs:22:5: in trait Index | LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index>` is not satisfied - --> $DIR/multiple-impls.rs:49:5 + --> $DIR/multiple-impls.rs:49:5: in fn main | LL | Index::index(&[] as &[i32], Bar(2u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Bar diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr index 275cd91a4353c..04df8df75d26f 100644 --- a/src/test/ui/on-unimplemented/no-debug.stderr +++ b/src/test/ui/on-unimplemented/no-debug.stderr @@ -1,5 +1,5 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Debug` - --> $DIR/no-debug.rs:20:27 + --> $DIR/no-debug.rs:20:27: in fn main | LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `Foo` cannot be formatted using `{:?}` @@ -9,7 +9,7 @@ LL | println!("{:?} {:?}", Foo, Bar); = note: required by `std::fmt::Debug::fmt` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` - --> $DIR/no-debug.rs:20:32 + --> $DIR/no-debug.rs:20:32: in fn main | LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` @@ -18,7 +18,7 @@ LL | println!("{:?} {:?}", Foo, Bar); = note: required by `std::fmt::Debug::fmt` error[E0277]: `Foo` doesn't implement `std::fmt::Display` - --> $DIR/no-debug.rs:21:23 + --> $DIR/no-debug.rs:21:23: in fn main | LL | println!("{} {}", Foo, Bar); | ^^^ `Foo` cannot be formatted with the default formatter @@ -28,7 +28,7 @@ LL | println!("{} {}", Foo, Bar); = note: required by `std::fmt::Display::fmt` error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Display` - --> $DIR/no-debug.rs:21:28 + --> $DIR/no-debug.rs:21:28: in fn main | LL | println!("{} {}", Foo, Bar); | ^^^ `no_debug::Bar` cannot be formatted with the default formatter diff --git a/src/test/ui/on-unimplemented/on-impl.stderr b/src/test/ui/on-unimplemented/on-impl.stderr index 2b286ad0be7f4..3b75f2a08e730 100644 --- a/src/test/ui/on-unimplemented/on-impl.stderr +++ b/src/test/ui/on-unimplemented/on-impl.stderr @@ -1,18 +1,18 @@ error[E0277]: the trait bound `[i32]: Index` is not satisfied - --> $DIR/on-impl.rs:32:5 + --> $DIR/on-impl.rs:32:5: in fn main | 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 + --> $DIR/on-impl.rs:19:5: in trait Index | LL | fn index(&self, index: Idx) -> &Self::Output; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `[i32]: Index` is not satisfied - --> $DIR/on-impl.rs:32:5 + --> $DIR/on-impl.rs:32:5: in fn main | LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index 8bd910403b47b..c17e31dffcb76 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `std::option::Option>: MyFromIterator<&u8>` is not satisfied - --> $DIR/on-trait.rs:37:30 + --> $DIR/on-trait.rs:37:30: in fn main | 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` @@ -12,7 +12,7 @@ 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 + --> $DIR/on-trait.rs:40:21: in fn main | LL | let x: String = foobar(); //~ ERROR | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index 6a4756eb1c98e..89a1f577c3b94 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `i32: std::slice::SliceIndex<[i32]>` is not satisfied - --> $DIR/slice-index.rs:21:5 + --> $DIR/slice-index.rs:21:5: in fn main | LL | x[1i32]; //~ ERROR E0277 | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` @@ -8,7 +8,7 @@ LL | x[1i32]; //~ ERROR E0277 = note: required because of the requirements on the impl of `std::ops::Index` for `[i32]` error[E0277]: the trait bound `std::ops::RangeTo: std::slice::SliceIndex<[i32]>` is not satisfied - --> $DIR/slice-index.rs:22:5 + --> $DIR/slice-index.rs:22:5: in fn main | LL | x[..1i32]; //~ ERROR E0277 | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` diff --git a/src/test/ui/order-dependent-cast-inference.stderr b/src/test/ui/order-dependent-cast-inference.stderr index 556acc87cffaf..e9ee36ed79f7a 100644 --- a/src/test/ui/order-dependent-cast-inference.stderr +++ b/src/test/ui/order-dependent-cast-inference.stderr @@ -1,5 +1,5 @@ error[E0641]: cannot cast to a pointer of an unknown kind - --> $DIR/order-dependent-cast-inference.rs:15:17 + --> $DIR/order-dependent-cast-inference.rs:15:17: in fn main | LL | let mut y = 0 as *const _; | ^^^^^-------- diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index c813b64d40b58..f2d4f4f0347a8 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&T: std::cmp::PartialEq` is not satisfied - --> $DIR/partialeq_help.rs:12:7 + --> $DIR/partialeq_help.rs:12:7: in fn foo | LL | a == b; //~ ERROR E0277 | ^^ can't compare `&T` with `T` diff --git a/src/test/ui/reachable/expr_add.stderr b/src/test/ui/reachable/expr_add.stderr index f49a781ce336a..b62081578436c 100644 --- a/src/test/ui/reachable/expr_add.stderr +++ b/src/test/ui/reachable/expr_add.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_add.rs:26:13 + --> $DIR/expr_add.rs:26:13: in fn main | LL | let x = Foo + return; //~ ERROR unreachable | ^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_again.stderr b/src/test/ui/reachable/expr_again.stderr index 65c0c588329cc..f6524514e353e 100644 --- a/src/test/ui/reachable/expr_again.stderr +++ b/src/test/ui/reachable/expr_again.stderr @@ -1,5 +1,5 @@ error: unreachable statement - --> $DIR/expr_again.rs:18:9 + --> $DIR/expr_again.rs:18:9: in fn main | LL | println!("hi"); | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_array.stderr b/src/test/ui/reachable/expr_array.stderr index 78ac76a6137f4..be16363a84062 100644 --- a/src/test/ui/reachable/expr_array.stderr +++ b/src/test/ui/reachable/expr_array.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_array.rs:19:34 + --> $DIR/expr_array.rs:19:34: in fn a | LL | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable | ^^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_array.rs:24:25 + --> $DIR/expr_array.rs:24:25: in fn b | LL | let x: [usize; 2] = [22, return]; //~ ERROR unreachable | ^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_assign.stderr b/src/test/ui/reachable/expr_assign.stderr index 628bfbf621716..e8b0fe0a11d9d 100644 --- a/src/test/ui/reachable/expr_assign.stderr +++ b/src/test/ui/reachable/expr_assign.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_assign.rs:19:5 + --> $DIR/expr_assign.rs:19:5: in fn foo | LL | x = return; //~ ERROR unreachable | ^^^^^^^^^^ @@ -11,13 +11,13 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_assign.rs:29:14 + --> $DIR/expr_assign.rs:29:14: in fn bar | LL | *p = return; //~ ERROR unreachable | ^^^^^^ error: unreachable expression - --> $DIR/expr_assign.rs:35:15 + --> $DIR/expr_assign.rs:35:15: in fn baz | LL | *{return; &mut i} = 22; //~ ERROR unreachable | ^^^^^^ diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index 5f5696aadb37c..0b064753d7ca0 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_block.rs:20:9 + --> $DIR/expr_block.rs:20:9: in fn a | LL | 22 //~ ERROR unreachable | ^^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement - --> $DIR/expr_block.rs:35:9 + --> $DIR/expr_block.rs:35:9: in fn c | LL | println!("foo"); | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_box.stderr b/src/test/ui/reachable/expr_box.stderr index 08b916030dd9f..6bdb9cb560752 100644 --- a/src/test/ui/reachable/expr_box.stderr +++ b/src/test/ui/reachable/expr_box.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_box.rs:16:13 + --> $DIR/expr_box.rs:16:13: in fn main | LL | let x = box return; //~ ERROR unreachable | ^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_call.stderr b/src/test/ui/reachable/expr_call.stderr index 414d29ec2a734..3cac321be24f0 100644 --- a/src/test/ui/reachable/expr_call.stderr +++ b/src/test/ui/reachable/expr_call.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_call.rs:22:17 + --> $DIR/expr_call.rs:22:17: in fn a | LL | foo(return, 22); //~ ERROR unreachable | ^^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_call.rs:27:5 + --> $DIR/expr_call.rs:27:5: in fn b | LL | bar(return); //~ ERROR unreachable | ^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_cast.stderr b/src/test/ui/reachable/expr_cast.stderr index 458334e2af967..791cf0f607f9a 100644 --- a/src/test/ui/reachable/expr_cast.stderr +++ b/src/test/ui/reachable/expr_cast.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_cast.rs:19:13 + --> $DIR/expr_cast.rs:19:13: in fn a | LL | let x = {return} as !; //~ ERROR unreachable | ^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index 6e8afd1c5be82..5c42aa83c9fe1 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -1,5 +1,5 @@ error: unreachable statement - --> $DIR/expr_if.rs:37:5 + --> $DIR/expr_if.rs:37:5: in fn baz | LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_loop.stderr b/src/test/ui/reachable/expr_loop.stderr index a51ef293acf15..6705baa496ea1 100644 --- a/src/test/ui/reachable/expr_loop.stderr +++ b/src/test/ui/reachable/expr_loop.stderr @@ -1,5 +1,5 @@ error: unreachable statement - --> $DIR/expr_loop.rs:18:5 + --> $DIR/expr_loop.rs:18:5: in fn a | LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ 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:30:5 + --> $DIR/expr_loop.rs:30:5: in fn c | LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ 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) error: unreachable statement - --> $DIR/expr_loop.rs:40:5 + --> $DIR/expr_loop.rs:40:5: in fn e | LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_match.stderr b/src/test/ui/reachable/expr_match.stderr index dfc1417f3d294..27a7fb3fe3db6 100644 --- a/src/test/ui/reachable/expr_match.stderr +++ b/src/test/ui/reachable/expr_match.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_match.rs:19:5 + --> $DIR/expr_match.rs:19:5: in fn a | LL | match {return} { } //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable statement - --> $DIR/expr_match.rs:24:5 + --> $DIR/expr_match.rs:24:5: in fn b | LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ 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) error: unreachable statement - --> $DIR/expr_match.rs:34:5 + --> $DIR/expr_match.rs:34:5: in fn d | LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_method.stderr b/src/test/ui/reachable/expr_method.stderr index 6d67bfcd54a7a..8ea9b56767734 100644 --- a/src/test/ui/reachable/expr_method.stderr +++ b/src/test/ui/reachable/expr_method.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_method.rs:25:21 + --> $DIR/expr_method.rs:25:21: in fn a | LL | Foo.foo(return, 22); //~ ERROR unreachable | ^^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_method.rs:30:5 + --> $DIR/expr_method.rs:30:5: in fn b | LL | Foo.bar(return); //~ ERROR unreachable | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_repeat.stderr b/src/test/ui/reachable/expr_repeat.stderr index 36393de90b7cd..fc7f83236089d 100644 --- a/src/test/ui/reachable/expr_repeat.stderr +++ b/src/test/ui/reachable/expr_repeat.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_repeat.rs:19:25 + --> $DIR/expr_repeat.rs:19:25: in fn a | LL | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable | ^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_return.stderr b/src/test/ui/reachable/expr_return.stderr index 2dcc50944c5d7..48caf67451586 100644 --- a/src/test/ui/reachable/expr_return.stderr +++ b/src/test/ui/reachable/expr_return.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_return.rs:20:22 + --> $DIR/expr_return.rs:20:22: in fn a | LL | let x = {return {return {return;}}}; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_struct.stderr b/src/test/ui/reachable/expr_struct.stderr index 3f0ecb204798b..a9f399cf711f9 100644 --- a/src/test/ui/reachable/expr_struct.stderr +++ b/src/test/ui/reachable/expr_struct.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_struct.rs:24:13 + --> $DIR/expr_struct.rs:24:13: in fn a | LL | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -11,19 +11,19 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_struct.rs:29:33 + --> $DIR/expr_struct.rs:29:33: in fn b | LL | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable | ^^ error: unreachable expression - --> $DIR/expr_struct.rs:34:39 + --> $DIR/expr_struct.rs:34:39: in fn c | LL | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable | ^^^^^^ error: unreachable expression - --> $DIR/expr_struct.rs:39:13 + --> $DIR/expr_struct.rs:39:13: in fn d | LL | let x = Foo { a: 22, b: return }; //~ ERROR unreachable | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_tup.stderr b/src/test/ui/reachable/expr_tup.stderr index d372373ced0f2..84280d1ec216a 100644 --- a/src/test/ui/reachable/expr_tup.stderr +++ b/src/test/ui/reachable/expr_tup.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_tup.rs:19:38 + --> $DIR/expr_tup.rs:19:38: in fn a | LL | let x: (usize, usize) = (return, 2); //~ ERROR unreachable | ^ @@ -11,7 +11,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_tup.rs:24:29 + --> $DIR/expr_tup.rs:24:29: in fn b | LL | let x: (usize, usize) = (2, return); //~ ERROR unreachable | ^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_type.stderr b/src/test/ui/reachable/expr_type.stderr index 9b165d6b3ee19..2905e3c4ff5bd 100644 --- a/src/test/ui/reachable/expr_type.stderr +++ b/src/test/ui/reachable/expr_type.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_type.rs:19:13 + --> $DIR/expr_type.rs:19:13: in fn a | LL | let x = {return}: !; //~ ERROR unreachable | ^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_unary.stderr b/src/test/ui/reachable/expr_unary.stderr index b889c884fcbb2..b3a71c582081b 100644 --- a/src/test/ui/reachable/expr_unary.stderr +++ b/src/test/ui/reachable/expr_unary.stderr @@ -1,11 +1,11 @@ error[E0600]: cannot apply unary operator `!` to type `!` - --> $DIR/expr_unary.rs:17:16 + --> $DIR/expr_unary.rs:17:16: in fn foo | LL | let x: ! = ! { return; }; //~ ERROR unreachable | ^^^^^^^^^^^^^ cannot apply unary operator `!` error: unreachable expression - --> $DIR/expr_unary.rs:17:16 + --> $DIR/expr_unary.rs:17:16: in fn foo | LL | let x: ! = ! { return; }; //~ ERROR unreachable | ^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_while.stderr b/src/test/ui/reachable/expr_while.stderr index 90c35bfaa7acd..5a2cf0091705c 100644 --- a/src/test/ui/reachable/expr_while.stderr +++ b/src/test/ui/reachable/expr_while.stderr @@ -1,5 +1,5 @@ error: unreachable statement - --> $DIR/expr_while.rs:18:9 + --> $DIR/expr_while.rs:18:9: in fn foo | LL | println!("Hello, world!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ 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:32:9 + --> $DIR/expr_while.rs:32:9: in fn baz | LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ 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) error: unreachable statement - --> $DIR/expr_while.rs:34:5 + --> $DIR/expr_while.rs:34:5: in fn baz | LL | println!("I am, too."); | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/recursive-requirements.stderr b/src/test/ui/recursive-requirements.stderr index d9e08102ab6a6..5bab6bfe22f32 100644 --- a/src/test/ui/recursive-requirements.stderr +++ b/src/test/ui/recursive-requirements.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `Foo: std::marker::Sync` - --> $DIR/recursive-requirements.rs:26:12 + --> $DIR/recursive-requirements.rs:26:12: in fn main | LL | let _: AssertSync = unimplemented!(); //~ ERROR E0275 | ^^^^^^^^^^^^^^^ 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 cfe38fe20040c..b123d1cf67097 100644 --- a/src/test/ui/region-borrow-params-issue-29793-small.stderr +++ b/src/test/ui/region-borrow-params-issue-29793-small.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:19:34 + --> $DIR/region-borrow-params-issue-29793-small.rs:19:34: in fn escaping_borrow_of_closure_params_1 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough @@ -12,7 +12,7 @@ LL | }; = note: values in a scope are dropped in the opposite order they are created error[E0597]: `y` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:19:45 + --> $DIR/region-borrow-params-issue-29793-small.rs:19:45: in fn escaping_borrow_of_closure_params_1 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough @@ -25,7 +25,7 @@ LL | }; = note: values in a scope are dropped in the opposite order they are created error[E0597]: `x` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:34:34 + --> $DIR/region-borrow-params-issue-29793-small.rs:34:34: in fn escaping_borrow_of_closure_params_2 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough @@ -38,7 +38,7 @@ LL | }; = note: values in a scope are dropped in the opposite order they are created error[E0597]: `y` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:34:45 + --> $DIR/region-borrow-params-issue-29793-small.rs:34:45: in fn escaping_borrow_of_closure_params_2 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | --------- ^ borrowed value does not live long enough @@ -51,7 +51,7 @@ LL | }; = note: values in a scope are dropped in the opposite order they are created 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:65:17: in fn escaping_borrow_of_fn_params_1::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -63,7 +63,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate errors f | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:65:17: in fn escaping_borrow_of_fn_params_1::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -75,7 +75,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate errors f | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:76:17: in fn escaping_borrow_of_fn_params_2::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -87,7 +87,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate errors f | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:76:17: in fn escaping_borrow_of_fn_params_2::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -99,7 +99,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate errors f | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21: in fn escaping_borrow_of_method_params_1::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -111,7 +111,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:100:21: in fn escaping_borrow_of_method_params_1::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -123,7 +123,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21: in fn escaping_borrow_of_method_params_2::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -135,7 +135,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:114:21: in fn escaping_borrow_of_method_params_2::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -147,7 +147,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21: in fn escaping_borrow_of_trait_impl_params_1::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -159,7 +159,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:142:21: in fn escaping_borrow_of_trait_impl_params_1::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -171,7 +171,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21: in fn escaping_borrow_of_trait_impl_params_2::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -183,7 +183,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:157:21: in fn escaping_borrow_of_trait_impl_params_2::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -195,7 +195,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21: in fn escaping_borrow_of_trait_default_params_1::T::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -207,7 +207,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:185:21: in fn escaping_borrow_of_trait_default_params_1::T::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -219,7 +219,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21: in fn escaping_borrow_of_trait_default_params_2::T::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -231,7 +231,7 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro | ^^^^^^^^^^^^^^ 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 + --> $DIR/region-borrow-params-issue-29793-small.rs:199:21: in fn escaping_borrow_of_trait_default_params_2::T::g::g | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here diff --git a/src/test/ui/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions-fn-subtyping-return-static.stderr index bd10dc8a808d6..bf2afb77ec370 100644 --- a/src/test/ui/regions-fn-subtyping-return-static.stderr +++ b/src/test/ui/regions-fn-subtyping-return-static.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/regions-fn-subtyping-return-static.rs:51:12 + --> $DIR/regions-fn-subtyping-return-static.rs:51:12: in fn supply_F | LL | want_F(bar); //~ ERROR E0308 | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx diff --git a/src/test/ui/regions-nested-fns-2.stderr b/src/test/ui/regions-nested-fns-2.stderr index c0aa6f9d5420c..d5d42012fdbeb 100644 --- a/src/test/ui/regions-nested-fns-2.stderr +++ b/src/test/ui/regions-nested-fns-2.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/regions-nested-fns-2.rs:16:9: in fn nested | LL | |z| { | ^^^ may outlive borrowed value `y` diff --git a/src/test/ui/resolve/issue-5035-2.stderr b/src/test/ui/resolve/issue-5035-2.stderr index 92309274e8442..ca00801a3655a 100644 --- a/src/test/ui/resolve/issue-5035-2.stderr +++ b/src/test/ui/resolve/issue-5035-2.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `I + 'static: std::marker::Sized` is not satisfied - --> $DIR/issue-5035-2.rs:14:8 + --> $DIR/issue-5035-2.rs:14:8: in fn foo | 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 diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 862ad270502fd..c70d8cbbd7b06 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/name-clash-nullary.rs:12:7 + --> $DIR/name-clash-nullary.rs:12:7: in fn main | LL | let None: isize = 42; //~ ERROR mismatched types | ^^^^ expected isize, found enum `std::option::Option` diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index d8ab21ddb5f39..6d79d8fc84d3e 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -156,7 +156,7 @@ LL | let _: Z = m::n::Z::Unit {}; | ^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/privacy-enum-ctor.rs:37:20 + --> $DIR/privacy-enum-ctor.rs:37:20: in fn m::f | LL | let _: Z = Z::Fn; | ^^^^^ expected enum `m::n::Z`, found fn item @@ -165,7 +165,7 @@ LL | let _: Z = Z::Fn; found type `fn(u8) -> m::n::Z {m::n::Z::Fn}` error[E0618]: expected function, found enum variant `Z::Unit` - --> $DIR/privacy-enum-ctor.rs:41:17 + --> $DIR/privacy-enum-ctor.rs:41:17: in fn m::f | LL | Unit, | ---- `Z::Unit` defined here @@ -178,7 +178,7 @@ LL | let _ = Z::Unit; | ^^^^^^^ error[E0308]: mismatched types - --> $DIR/privacy-enum-ctor.rs:53:16 + --> $DIR/privacy-enum-ctor.rs:53:16: in fn main | LL | let _: E = m::E::Fn; | ^^^^^^^^ expected enum `m::E`, found fn item @@ -187,7 +187,7 @@ LL | let _: E = m::E::Fn; found type `fn(u8) -> m::E {m::E::Fn}` error[E0618]: expected function, found enum variant `m::E::Unit` - --> $DIR/privacy-enum-ctor.rs:57:16 + --> $DIR/privacy-enum-ctor.rs:57:16: in fn main | LL | Unit, | ---- `m::E::Unit` defined here @@ -200,7 +200,7 @@ LL | let _: E = m::E::Unit; | ^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/privacy-enum-ctor.rs:61:16 + --> $DIR/privacy-enum-ctor.rs:61:16: in fn main | LL | let _: E = E::Fn; | ^^^^^ expected enum `m::E`, found fn item @@ -209,7 +209,7 @@ LL | let _: E = E::Fn; found type `fn(u8) -> m::E {m::E::Fn}` error[E0618]: expected function, found enum variant `E::Unit` - --> $DIR/privacy-enum-ctor.rs:65:16 + --> $DIR/privacy-enum-ctor.rs:65:16: in fn main | LL | Unit, | ---- `E::Unit` defined here diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index 284acd20ba5e7..a36e70afedef9 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -32,7 +32,7 @@ LL | if !is_directory(path.as_ref()) { //~ ERROR: cannot find function ` | ^^^^^^^^^^^^ not found in this scope error[E0308]: mismatched types - --> $DIR/token-error-correct-3.rs:25:13 + --> $DIR/token-error-correct-3.rs:25:13: in fn raw::ensure_dir_exists | LL | fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.stderr index 7485f3066bb27..c360052a41ae9 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.stderr @@ -1,5 +1,5 @@ error[E0277]: `main` has invalid return type `impl std::marker::Copy` - --> $DIR/termination-trait-impl-trait.rs:12:14 + --> $DIR/termination-trait-impl-trait.rs:12:14: in fn main | LL | fn main() -> impl Copy { } | ^^^^^^^^^ `main` can only return types that implement `std::process::Termination` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr index e53872593843c..1f5de7de2b336 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr @@ -1,5 +1,5 @@ error[E0277]: `main` has invalid return type `char` - --> $DIR/termination-trait-main-wrong-type.rs:11:14 + --> $DIR/termination-trait-main-wrong-type.rs:11:14: in fn main | LL | fn main() -> char { //~ ERROR | ^^^^ `main` can only return types that implement `std::process::Termination` diff --git a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr index 2da5ac8d240bf..c4a6a06b6469c 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-issue-49631.rs:30:9 + --> $DIR/borrowck-issue-49631.rs:30:9: in fn main | LL | while let Some(Ok(string)) = foo.get() { | --- - immutable borrow ends here 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 4849c39a5d099..b0269afa9bb50 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/const.rs:24:9 + --> $DIR/const.rs:24:9: in fn main | LL | FOO => {}, //~ ERROR mismatched types | ^^^ expected &Foo, found struct `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 a7f3b507508e8..5b6db4169cba6 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to immutable borrowed content `*x` - --> $DIR/enum.rs:19:5 + --> $DIR/enum.rs:19:5: in fn main | LL | let Wrap(x) = &Wrap(3); | - consider changing this to `x` @@ -7,7 +7,7 @@ LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` - --> $DIR/enum.rs:23:9 + --> $DIR/enum.rs:23:9: in fn main | LL | if let Some(x) = &Some(3) { | - consider changing this to `x` @@ -15,7 +15,7 @@ LL | *x += 1; //~ ERROR cannot assign to immutable | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` - --> $DIR/enum.rs:29:9 + --> $DIR/enum.rs:29:9: in fn main | LL | while let Some(x) = &Some(3) { | - consider changing this to `x` 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 f2b9bde41ab33..05d0c7985cedd 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,5 +1,5 @@ error[E0594]: cannot assign to immutable borrowed content `*n` - --> $DIR/explicit-mut.rs:17:13 + --> $DIR/explicit-mut.rs:17:13: in fn main | LL | Some(n) => { | - consider changing this to `n` @@ -7,7 +7,7 @@ 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:25:13 + --> $DIR/explicit-mut.rs:25:13: in fn main | LL | Some(n) => { | - consider changing this to `n` @@ -15,7 +15,7 @@ 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:33:13 + --> $DIR/explicit-mut.rs:33:13: in fn main | LL | Some(n) => { | - consider changing this to `n` 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 dbd4bd5dbec43..3a869cbaa4f89 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/for.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/for.stderr @@ -1,5 +1,5 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/for.rs:16:13 + --> $DIR/for.rs:16:13: in fn main | LL | for (n, mut m) in &tups { | - ^^^^^ by-move pattern here 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 d5c230bc8de54..679f09db5a22a 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/lit.rs:17:13 + --> $DIR/lit.rs:17:13: in fn with_str | LL | "abc" => true, //~ ERROR mismatched types | ^^^^^ expected &str, found str @@ -8,7 +8,7 @@ LL | "abc" => true, //~ ERROR mismatched types found type `&'static str` error[E0308]: mismatched types - --> $DIR/lit.rs:26:9 + --> $DIR/lit.rs:26:9: in fn with_bytes | LL | b"abc" => true, //~ ERROR mismatched types | ^^^^^^ expected &[u8], found array of 3 elements 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 e3a613f926110..9e4a535fdea62 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,5 +1,5 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current scope - --> $DIR/no-double-error.rs:18:9 + --> $DIR/no-double-error.rs:18:9: in fn main | LL | u32::XXX => { } //~ ERROR no associated item named | ^^^^^^^^ associated item not found in `u32` 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 18dc6b2869ab9..b711fad71413d 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `&[]` not covered - --> $DIR/slice.rs:16:11 + --> $DIR/slice.rs:16:11: in fn main | LL | match sl { //~ ERROR non-exhaustive patterns | ^^ pattern `&[]` not covered diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.stderr b/src/test/ui/rfc-2093-infer-outlives/enum.stderr index 604dd0b43c04a..586a992d4067f 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/enum.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `U` may not live long enough - --> $DIR/enum.rs:23:5 + --> $DIR/enum.rs:23:5: in struct Bar | LL | struct Bar<'b, U> { | - help: consider adding an explicit lifetime bound `U: 'b`... @@ -7,13 +7,13 @@ LL | field2: &'b U //~ ERROR the parameter type `U` may not live long enough | ^^^^^^^^^^^^^ | note: ...so that the reference type `&'b U` does not outlive the data it points at - --> $DIR/enum.rs:23:5 + --> $DIR/enum.rs:23:5: in struct Bar | LL | field2: &'b U //~ ERROR the parameter type `U` may not live long enough [E0309] | ^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough - --> $DIR/enum.rs:30:9 + --> $DIR/enum.rs:30:9: in enum Ying | LL | enum Ying<'c, K> { | - help: consider adding an explicit lifetime bound `K: 'c`... @@ -21,7 +21,7 @@ LL | One(&'c Yang) //~ ERROR the parameter type `K` may not live long eno | ^^^^^^^^^^^ | note: ...so that the reference type `&'c Yang` does not outlive the data it points at - --> $DIR/enum.rs:30:9 + --> $DIR/enum.rs:30:9: in enum Ying | LL | One(&'c Yang) //~ ERROR the parameter type `K` may not live long enough [E0309] | ^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-impl.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-impl.stderr index 498d66ef9a542..807cdea03c1cf 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-impl.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-impl.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/explicit-impl.rs:27:5 + --> $DIR/explicit-impl.rs:27:5: in struct Foo | LL | struct Foo<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... @@ -7,7 +7,7 @@ LL | foo: as MakeRef<'a>>::Type //~ Error the parameter type `T` may | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds - --> $DIR/explicit-impl.rs:27:5 + --> $DIR/explicit-impl.rs:27:5: in struct Foo | LL | foo: as MakeRef<'a>>::Type //~ Error the parameter type `T` may not live long enough [E0309] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-where.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-where.stderr index 436754c7dc1cd..ad67c39217607 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-where.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-where.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `U` may not live long enough - --> $DIR/explicit-where.rs:15:5 + --> $DIR/explicit-where.rs:15:5: in struct Foo | LL | struct Foo<'b, U> { | - help: consider adding an explicit lifetime bound `U: 'b`... @@ -7,7 +7,7 @@ LL | bar: Bar<'b, U> //~ Error the parameter type `U` may not live long enou | ^^^^^^^^^^^^^^^ | note: ...so that the type `U` will meet its required lifetime bounds - --> $DIR/explicit-where.rs:15:5 + --> $DIR/explicit-where.rs:15:5: in struct Foo | LL | bar: Bar<'b, U> //~ Error the parameter type `U` may not live long enough [E0309] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/multiple-regions.stderr b/src/test/ui/rfc-2093-infer-outlives/multiple-regions.stderr index 3722abd5ad648..0092db77e05ed 100644 --- a/src/test/ui/rfc-2093-infer-outlives/multiple-regions.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/multiple-regions.stderr @@ -1,5 +1,5 @@ error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references - --> $DIR/multiple-regions.rs:15:5 + --> $DIR/multiple-regions.rs:15:5: in struct Foo | LL | x: &'a &'b T //~ ERROR reference has a longer lifetime than the data it references [E0491] | ^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr index 94d6cbdb5fe84..47e5fa410807f 100644 --- a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `U` may not live long enough - --> $DIR/nested-structs.rs:22:5 + --> $DIR/nested-structs.rs:22:5: in struct Bar | LL | struct Bar<'b, U> { | - help: consider adding an explicit lifetime bound `U: 'b`... @@ -7,7 +7,7 @@ LL | field2: &'b U //~ ERROR the parameter type `U` may not live long enough | ^^^^^^^^^^^^^ | note: ...so that the reference type `&'b U` does not outlive the data it points at - --> $DIR/nested-structs.rs:22:5 + --> $DIR/nested-structs.rs:22:5: in struct Bar | LL | field2: &'b U //~ ERROR the parameter type `U` may not live long enough [E0309] | ^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/projections.stderr b/src/test/ui/rfc-2093-infer-outlives/projections.stderr index 9969cf48ecd3b..e55ff39612a62 100644 --- a/src/test/ui/rfc-2093-infer-outlives/projections.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/projections.stderr @@ -1,12 +1,12 @@ error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projections.rs:17:5 + --> $DIR/projections.rs:17:5: in struct Foo | LL | bar: &'a T::Item //~ Error the associated type `::Item` may not live long enough [E0309] | ^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... note: ...so that the reference type `&'a ::Item` does not outlive the data it points at - --> $DIR/projections.rs:17:5 + --> $DIR/projections.rs:17:5: in struct Foo | LL | bar: &'a T::Item //~ Error the associated type `::Item` may not live long enough [E0309] | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/reference.stderr b/src/test/ui/rfc-2093-infer-outlives/reference.stderr index 7236bd535c9f2..7ccb750b5852d 100644 --- a/src/test/ui/rfc-2093-infer-outlives/reference.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/reference.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/reference.rs:15:5 + --> $DIR/reference.rs:15:5: in struct Foo | LL | struct Foo<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... @@ -7,7 +7,7 @@ LL | bar: &'a [T] //~ ERROR the parameter type `T` may not live long enough | ^^^^^^^^^^^^ | note: ...so that the reference type `&'a [T]` does not outlive the data it points at - --> $DIR/reference.rs:15:5 + --> $DIR/reference.rs:15:5: in struct Foo | LL | bar: &'a [T] //~ ERROR the parameter type `T` may not live long enough [E0309] | ^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/union.stderr b/src/test/ui/rfc-2093-infer-outlives/union.stderr index cd13c42329332..04bb0eb0fe9bc 100644 --- a/src/test/ui/rfc-2093-infer-outlives/union.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/union.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `U` may not live long enough - --> $DIR/union.rs:25:5 + --> $DIR/union.rs:25:5: in union Bar | LL | union Bar<'b, U> { | - help: consider adding an explicit lifetime bound `U: 'b`... @@ -7,13 +7,13 @@ LL | field2: &'b U //~ ERROR 25:5: 25:18: the parameter type `U` may not liv | ^^^^^^^^^^^^^ | note: ...so that the reference type `&'b U` does not outlive the data it points at - --> $DIR/union.rs:25:5 + --> $DIR/union.rs:25:5: in union Bar | LL | field2: &'b U //~ ERROR 25:5: 25:18: the parameter type `U` may not live long enough [E0309] | ^^^^^^^^^^^^^ error[E0309]: the parameter type `K` may not live long enough - --> $DIR/union.rs:31:5 + --> $DIR/union.rs:31:5: in union Ying | LL | union Ying<'c, K> { | - help: consider adding an explicit lifetime bound `K: 'c`... @@ -21,7 +21,7 @@ LL | field1: &'c Yang //~ ERROR 31:5: 31:24: the parameter type `K` may n | ^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'c Yang` does not outlive the data it points at - --> $DIR/union.rs:31:5 + --> $DIR/union.rs:31:5: in union Ying | LL | field1: &'c Yang //~ ERROR 31:5: 31:24: the parameter type `K` may not live long enough [E0309] | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2166-underscore-imports/basic.stderr b/src/test/ui/rfc-2166-underscore-imports/basic.stderr index 4530d0fa604aa..6d551eb5c53d5 100644 --- a/src/test/ui/rfc-2166-underscore-imports/basic.stderr +++ b/src/test/ui/rfc-2166-underscore-imports/basic.stderr @@ -17,7 +17,7 @@ LL | use S as _; //~ WARN unused import | ^^^^^^ warning: unused extern crate - --> $DIR/basic.rs:33:5 + --> $DIR/basic.rs:33:5: in mod unused | LL | extern crate core as _; //~ WARN unused extern crate | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc1598-generic-associated-types/collections.stderr b/src/test/ui/rfc1598-generic-associated-types/collections.stderr index ed96570583f4f..5c5d4eb43d5e9 100644 --- a/src/test/ui/rfc1598-generic-associated-types/collections.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/collections.stderr @@ -1,29 +1,29 @@ error[E0109]: type parameters are not allowed on this type - --> $DIR/collections.rs:65:90 + --> $DIR/collections.rs:65:90: in fn floatify | LL | fn floatify(ints: &C) -> <>::Family as CollectionFamily>::Member | ^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type - --> $DIR/collections.rs:77:69 + --> $DIR/collections.rs:77:69: in fn floatify_sibling | LL | fn floatify_sibling(ints: &C) -> >::Sibling | ^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type - --> $DIR/collections.rs:26:71 + --> $DIR/collections.rs:26:71: in trait Collection::Sibling | LL | <>::Family as CollectionFamily>::Member; | ^ type parameter not allowed error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/collections.rs:33:50 + --> $DIR/collections.rs:33:50: in trait Collection::iterate | LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter>; | ^^^^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/collections.rs:59:50 + --> $DIR/collections.rs:59:50: in fn iterate::iterate | LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter> { | ^^^^^ lifetime parameter not allowed on this type 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 764a0db2478a8..449f70805fe5f 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,17 +1,17 @@ error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/construct_with_other_type.rs:26:46 + --> $DIR/construct_with_other_type.rs:26:46: in trait Baz::Baa | LL | type Baa<'a>: Deref as Foo>::Bar<'a, 'static>>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/construct_with_other_type.rs:26:63 + --> $DIR/construct_with_other_type.rs:26:63: in trait Baz::Baa | LL | type Baa<'a>: Deref as Foo>::Bar<'a, 'static>>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/construct_with_other_type.rs:34:40 + --> $DIR/construct_with_other_type.rs:34:40: in impl Baa | LL | type Baa<'a> = &'a ::Bar<'a, 'static>; | ^^ lifetime parameter not allowed on this type 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 64e82c0d1097f..173f6913b17b6 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,29 +1,29 @@ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37: in trait Iterable::Iter | LL | + Deref>; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'undeclared` - --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41: in trait Iterable::iter | 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 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:20:47: in trait Iterable::Iter | 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 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:22:37: in trait Iterable::Iter | 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 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:26:41: in trait Iterable::iter | LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ lifetime parameter not allowed on this type diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr index 0e251300e451f..afed966ec264e 100644 --- a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr @@ -1,35 +1,35 @@ error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:20:47 + --> $DIR/iterable.rs:20:47: in trait Iterable::Iter | 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:49:53 + --> $DIR/iterable.rs:49:53: in fn make_iter | LL | fn make_iter<'a, I: Iterable>(it: &'a I) -> I::Iter<'a> { | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:54:60 + --> $DIR/iterable.rs:54:60: in fn get_first | LL | fn get_first<'a, I: Iterable>(it: &'a I) -> Option> { | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:23:41 + --> $DIR/iterable.rs:23:41: in trait Iterable::iter | LL | fn iter<'a>(&'a self) -> Self::Iter<'a>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:32:41 + --> $DIR/iterable.rs:32:41: in fn iter::iter | LL | fn iter<'a>(&'a self) -> Self::Iter<'a> { | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/iterable.rs:43:41 + --> $DIR/iterable.rs:43:41: in fn iter::iter | LL | fn iter<'a>(&'a self) -> Self::Iter<'a> { | ^^ lifetime parameter not allowed on this type diff --git a/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr b/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr index df83fdaad5bfa..5f32644ea8e25 100644 --- a/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr @@ -1,29 +1,29 @@ error[E0109]: type parameters are not allowed on this type - --> $DIR/parameter_number_and_kind.rs:26:36 + --> $DIR/parameter_number_and_kind.rs:26:36: in trait Foo::FOk | LL | type FOk = Self::E<'static, T>; | ^ type parameter not allowed error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/parameter_number_and_kind.rs:26:27 + --> $DIR/parameter_number_and_kind.rs:26:27: in trait Foo::FOk | LL | type FOk = Self::E<'static, T>; | ^^^^^^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/parameter_number_and_kind.rs:29:26 + --> $DIR/parameter_number_and_kind.rs:29:26: in trait Foo::FErr1 | LL | type FErr1 = Self::E<'static, 'static>; // Error | ^^^^^^^ lifetime parameter not allowed on this type error[E0109]: type parameters are not allowed on this type - --> $DIR/parameter_number_and_kind.rs:31:38 + --> $DIR/parameter_number_and_kind.rs:31:38: in trait Foo::FErr2 | LL | type FErr2 = Self::E<'static, T, u32>; // Error | ^ type parameter not allowed error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/parameter_number_and_kind.rs:31:29 + --> $DIR/parameter_number_and_kind.rs:31:29: in trait Foo::FErr2 | LL | type FErr2 = Self::E<'static, T, u32>; // Error | ^^^^^^^ lifetime parameter not allowed on this type 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 3e772eee4f492..81ad017246d41 100644 --- a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr @@ -1,23 +1,23 @@ error[E0109]: type parameters are not allowed on this type - --> $DIR/pointer_family.rs:46:21 + --> $DIR/pointer_family.rs:46:21: in struct Foo | LL | bar: P::Pointer, | ^^^^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type - --> $DIR/pointer_family.rs:21:42 + --> $DIR/pointer_family.rs:21:42: in trait PointerFamily::new | 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 + --> $DIR/pointer_family.rs:29:42: in fn new::new | 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 + --> $DIR/pointer_family.rs:39:42: in fn new::new | LL | fn new(value: T) -> Self::Pointer { | ^ type parameter not allowed 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 607a4b8d57996..3fca425548a4e 100644 --- a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr @@ -1,29 +1,29 @@ error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/streaming_iterator.rs:27:41 + --> $DIR/streaming_iterator.rs:27:41: in struct Foo | 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 + --> $DIR/streaming_iterator.rs:35:64: in fn foo | 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 + --> $DIR/streaming_iterator.rs:21:48: in trait StreamingIterator::next | LL | fn next<'a>(&'a self) -> Option>; | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/streaming_iterator.rs:47:37 + --> $DIR/streaming_iterator.rs:47:37: in impl Item | LL | type Item<'a> = (usize, I::Item<'a>); | ^^ lifetime parameter not allowed on this type error[E0110]: lifetime parameters are not allowed on this type - --> $DIR/streaming_iterator.rs:49:48 + --> $DIR/streaming_iterator.rs:49:48: in fn next::next | LL | fn next<'a>(&'a self) -> Option> { | ^^ lifetime parameter not allowed on this type diff --git a/src/test/ui/self-impl.stderr b/src/test/ui/self-impl.stderr index a5a5135faad72..e7713c83a4e5a 100644 --- a/src/test/ui/self-impl.stderr +++ b/src/test/ui/self-impl.stderr @@ -1,5 +1,5 @@ error[E0223]: ambiguous associated type - --> $DIR/self-impl.rs:33:16 + --> $DIR/self-impl.rs:33:16: in fn f::f | LL | let _: ::Baz = true; | ^^^^^^^^^^^ ambiguous associated type @@ -7,7 +7,7 @@ LL | let _: ::Baz = true; = note: specify the type using the syntax `::Baz` error[E0223]: ambiguous associated type - --> $DIR/self-impl.rs:35:16 + --> $DIR/self-impl.rs:35:16: in fn f::f | LL | let _: Self::Baz = true; | ^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/shadowed-lifetime.stderr b/src/test/ui/shadowed-lifetime.stderr index 8d7c00bb61e1c..ee9d5b8c8f28b 100644 --- a/src/test/ui/shadowed-lifetime.stderr +++ b/src/test/ui/shadowed-lifetime.stderr @@ -1,5 +1,5 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope - --> $DIR/shadowed-lifetime.rs:16:25 + --> $DIR/shadowed-lifetime.rs:16:25: in fn shadow_in_method::shadow_in_method | LL | impl<'a> Foo<'a> { | -- first declared here @@ -7,7 +7,7 @@ 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 + --> $DIR/shadowed-lifetime.rs:22:20: in fn shadow_in_type::shadow_in_type | LL | fn shadow_in_type<'b>(&'b self) -> &'b isize { | -- first declared here diff --git a/src/test/ui/shadowed-type-parameter.stderr b/src/test/ui/shadowed-type-parameter.stderr index c40343e31b440..1d4cf626e41fa 100644 --- a/src/test/ui/shadowed-type-parameter.stderr +++ b/src/test/ui/shadowed-type-parameter.stderr @@ -1,5 +1,5 @@ error[E0194]: type parameter `T` shadows another type parameter of the same name - --> $DIR/shadowed-type-parameter.rs:30:27 + --> $DIR/shadowed-type-parameter.rs:30:27: in trait Bar::shadow_in_required | LL | trait Bar { | - first `T` declared here @@ -8,7 +8,7 @@ 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 + --> $DIR/shadowed-type-parameter.rs:33:27: in fn Bar::shadow_in_provided::shadow_in_provided | LL | trait Bar { | - first `T` declared here @@ -17,7 +17,7 @@ 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 + --> $DIR/shadowed-type-parameter.rs:18:25: in fn shadow_in_method::shadow_in_method | LL | impl Foo { | - first `T` declared here diff --git a/src/test/ui/single-use-lifetime/fn-types.stderr b/src/test/ui/single-use-lifetime/fn-types.stderr index bec712b004c3d..716639719aab7 100644 --- a/src/test/ui/single-use-lifetime/fn-types.stderr +++ b/src/test/ui/single-use-lifetime/fn-types.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'a` only used once - --> $DIR/fn-types.rs:19:10 + --> $DIR/fn-types.rs:19:10: in struct Foo | LL | a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once | ^^ @@ -11,7 +11,7 @@ LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types - --> $DIR/fn-types.rs:22:22 + --> $DIR/fn-types.rs:22:22: in struct Foo | LL | d: for<'a> fn() -> &'a u32, // OK, used only in return type. | ^^^^^^^ diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr b/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr index 2011359a51120..d2aef6f2955b1 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'b` only used once - --> $DIR/one-use-in-fn-argument-in-band.rs:19:22 + --> $DIR/one-use-in-fn-argument-in-band.rs:19:22: in fn a | LL | fn a(x: &'a u32, y: &'b u32) { | ^^ @@ -11,7 +11,7 @@ LL | #![deny(single_use_lifetime)] | ^^^^^^^^^^^^^^^^^^^ error: lifetime parameter `'a` only used once - --> $DIR/one-use-in-fn-argument-in-band.rs:19:10 + --> $DIR/one-use-in-fn-argument-in-band.rs:19:10: in fn a | LL | fn a(x: &'a u32, y: &'b u32) { | ^^ diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr index e9a3570b3fb4d..8da83dae9d1c3 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'a` only used once - --> $DIR/one-use-in-fn-argument.rs:18:6 + --> $DIR/one-use-in-fn-argument.rs:18:6: in fn a | LL | fn a<'a>(x: &'a u32) { //~ ERROR `'a` only used once | ^^ diff --git a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr index 38e90e76f56e2..d7642f2f770a8 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'a` only used once - --> $DIR/one-use-in-inherent-method-argument.rs:22:19 + --> $DIR/one-use-in-inherent-method-argument.rs:22:19: in fn inherent_a::inherent_a | LL | fn inherent_a<'a>(&self, data: &'a u32) { //~ ERROR `'a` only used once | ^^ diff --git a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr index e5278671a1afa..d5f4e11693480 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'g` only used once - --> $DIR/one-use-in-trait-method-argument.rs:25:13 + --> $DIR/one-use-in-trait-method-argument.rs:25:13: in fn next::next | LL | fn next<'g>(&'g mut self) -> Option { //~ ERROR `'g` only used once | ^^ diff --git a/src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr b/src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr index f1cdc6e495aa7..a20aae463206d 100644 --- a/src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr +++ b/src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr @@ -1,5 +1,5 @@ error: lifetime parameter `'a` never used - --> $DIR/zero-uses-in-fn.rs:17:6 + --> $DIR/zero-uses-in-fn.rs:17:6: in fn d | LL | fn d<'a>() { } //~ ERROR `'a` never used | ^^ diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr index fb3e710b8cf9d..078a4af682950 100644 --- a/src/test/ui/span/E0057.stderr +++ b/src/test/ui/span/E0057.stderr @@ -1,11 +1,11 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/E0057.rs:13:13 + --> $DIR/E0057.rs:13:13: in fn main | 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 + --> $DIR/E0057.rs:15:13: in fn main | LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter 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 01c0603256c15..1ef1fa356a205 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,5 +1,5 @@ error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24: in fn deref_mut_field1 | LL | fn deref_mut_field1(x: Own) { | - consider changing this to `mut x` @@ -7,7 +7,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:75:10: in fn deref_extend_mut_field1 | LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable @@ -15,7 +15,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:19: in fn deref_extend_mut_field3 | LL | let _x = &mut x.x; | - first mutable borrow occurs here @@ -25,7 +25,7 @@ LL | } | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5: in fn assign_field1 | LL | fn assign_field1<'a>(x: Own) { | - consider changing this to `mut x` @@ -33,7 +33,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5: in fn assign_field2 | LL | fn assign_field2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable @@ -41,7 +41,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5: in fn assign_field4 | LL | let _p: &mut Point = &mut **x; | -- first mutable borrow occurs here @@ -51,7 +51,7 @@ LL | } | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5: in fn deref_mut_method1 | LL | fn deref_mut_method1(x: Own) { | - consider changing this to `mut x` @@ -59,7 +59,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5: in fn deref_extend_mut_method1 | LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable @@ -67,7 +67,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6: in fn assign_method1 | LL | fn assign_method1<'a>(x: Own) { | - consider changing this to `mut x` @@ -75,7 +75,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6: in fn assign_method2 | LL | fn assign_method2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable 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 3a28ef36d0593..807c79c6665f0 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:39:25 + --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:39:25: in fn deref_mut1 | LL | fn deref_mut1(x: Own) { | - consider changing this to `mut x` @@ -7,7 +7,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:51:11: in fn deref_extend_mut1 | LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { | -------------- use `&'a mut Own` here to make mutable @@ -15,7 +15,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:59:6: in fn assign1 | LL | fn assign1<'a>(x: Own) { | - consider changing this to `mut x` @@ -23,7 +23,7 @@ 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 + --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:63:6: in fn assign2 | LL | fn assign2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable 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 2e7e1e0744141..ec16c12afaf84 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,5 +1,5 @@ error[E0499]: cannot borrow `f` as mutable more than once at a time - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:22:16 + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:22:16: in fn call | LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here @@ -12,7 +12,7 @@ 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 + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:35:5: in fn test2 | LL | fn test2(f: &F) where F: FnMut() { | -- use `&mut F` here to make mutable @@ -20,7 +20,7 @@ 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 + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:44:5: in fn test4 | LL | fn test4(f: &Test) { | ----- use `&mut Test` here to make mutable @@ -28,7 +28,7 @@ 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:66:13 + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:66:13: in fn test7 | LL | f(Box::new(|a| { | - borrow of `f` occurs here @@ -36,7 +36,7 @@ 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:66:13 + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:66:13: in fn test7 | LL | let mut f = move |g: Box, b: isize| { | ----- captured outer variable 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 a18d3c55394df..52fb5d2d9e3c1 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,5 +1,5 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-call-method-from-mut-aliasable.rs:27:5 + --> $DIR/borrowck-call-method-from-mut-aliasable.rs:27:5: in fn b | LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable 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 4b6c62e6ec83a..31fdf8cb7d2ae 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-fn-in-const-b.rs:17:9 + --> $DIR/borrowck-fn-in-const-b.rs:17:9: in fn broken | LL | fn broken(x: &Vec) { | ------------ use `&mut Vec` here to make mutable diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr index dfcd082c0c2ce..39ade3a04e393 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr @@ -1,5 +1,5 @@ error[E0597]: `young[..]` does not live long enough - --> $DIR/borrowck-let-suggestion-suffixes.rs:21:14 + --> $DIR/borrowck-let-suggestion-suffixes.rs:21:14: in fn f | LL | v2.push(&young[0]); // statement 4 | ^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-let-suggestion-suffixes.rs:28:14 + --> $DIR/borrowck-let-suggestion-suffixes.rs:28:14: in fn f | LL | v3.push(&id('x')); // statement 6 | ^^^^^^^ - temporary value dropped here while still borrowed @@ -23,7 +23,7 @@ LL | } = note: consider using a `let` binding to increase its lifetime error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-let-suggestion-suffixes.rs:38:18 + --> $DIR/borrowck-let-suggestion-suffixes.rs:38:18: in fn f | LL | v4.push(&id('y')); | ^^^^^^^ - temporary value dropped here while still borrowed @@ -36,7 +36,7 @@ LL | } // (statement 7) = note: consider using a `let` binding to increase its lifetime error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-let-suggestion-suffixes.rs:49:14 + --> $DIR/borrowck-let-suggestion-suffixes.rs:49:14: in fn f | LL | v5.push(&id('z')); | ^^^^^^^ - temporary value dropped here while still borrowed diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 5bc07949a951c..016409b34cd1a 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-object-mutability.rs:19:5 + --> $DIR/borrowck-object-mutability.rs:19:5: in fn borrowed_receiver | LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable @@ -8,7 +8,7 @@ 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 + --> $DIR/borrowck-object-mutability.rs:29:5: in fn owned_receiver | LL | fn owned_receiver(x: Box) { | - consider changing this to `mut x` diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index 5de3fc4ab0acd..99895e65d5367 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-ref-into-rvalue.rs:14:14 + --> $DIR/borrowck-ref-into-rvalue.rs:14:14: in fn main | LL | Some(ref m) => { | ^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 5153d80978822..255bdfa4e0ed5 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:17:20 + --> $DIR/coerce-suggestions.rs:17:20: in fn main | LL | let x: usize = String::new(); | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` @@ -8,7 +8,7 @@ LL | let x: usize = String::new(); found type `std::string::String` error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:19:19 + --> $DIR/coerce-suggestions.rs:19:19: in fn main | LL | let x: &str = String::new(); | ^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ LL | let x: &str = String::new(); found type `std::string::String` error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:22:10 + --> $DIR/coerce-suggestions.rs:22:10: in fn main | LL | test(&y); | ^^ types differ in mutability @@ -29,7 +29,7 @@ LL | test(&y); found type `&std::string::String` error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:24:11 + --> $DIR/coerce-suggestions.rs:24:11: in fn main | LL | test2(&y); | ^^ types differ in mutability @@ -38,7 +38,7 @@ LL | test2(&y); found type `&std::string::String` error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:27:9 + --> $DIR/coerce-suggestions.rs:27:9: in fn main | LL | f = box f; | ^^^^^ @@ -47,7 +47,7 @@ LL | f = box f; | help: try using a conversion method: `box f.to_string()` error[E0308]: mismatched types - --> $DIR/coerce-suggestions.rs:31:9 + --> $DIR/coerce-suggestions.rs:31:9: in fn main | LL | s = format!("foo"); | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index 0ca77a91f2d7c..6574af3cc68cd 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -1,5 +1,5 @@ error[E0597]: `*a` does not live long enough - --> $DIR/destructor-restrictions.rs:18:10 + --> $DIR/destructor-restrictions.rs:18:10: in fn main | LL | *a.borrow() + 1 | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index 7b3855917c9de..ac3d7b5b6c6a8 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -1,5 +1,5 @@ error[E0597]: `*m` does not live long enough - --> $DIR/dropck-object-cycle.rs:37:32 + --> $DIR/dropck-object-cycle.rs:37:32: in fn main | LL | assert_eq!(object_invoke1(&*m), (4,5)); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index 44803b281541c..e7cfd7667d51d 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -1,5 +1,5 @@ error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:103:25 + --> $DIR/dropck_arr_cycle_checked.rs:103:25: in fn f | LL | b1.a[0].v.set(Some(&b2)); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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 + --> $DIR/dropck_arr_cycle_checked.rs:105:25: in fn f | LL | b1.a[1].v.set(Some(&b3)); | ^^ borrowed value does not live long enough @@ -21,7 +21,7 @@ LL | } = 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 + --> $DIR/dropck_arr_cycle_checked.rs:107:25: in fn f | LL | b2.a[0].v.set(Some(&b2)); | ^^ borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | } = 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 + --> $DIR/dropck_arr_cycle_checked.rs:109:25: in fn f | LL | b2.a[1].v.set(Some(&b3)); | ^^ borrowed value does not live long enough @@ -43,7 +43,7 @@ LL | } = 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 + --> $DIR/dropck_arr_cycle_checked.rs:111:25: in fn f | LL | b3.a[0].v.set(Some(&b1)); | ^^ borrowed value does not live long enough @@ -54,7 +54,7 @@ LL | } = 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 + --> $DIR/dropck_arr_cycle_checked.rs:113:25: in fn f | LL | b3.a[1].v.set(Some(&b2)); | ^^ borrowed value does not live long enough 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 d20421c327fc0..d5fe3e59a2469 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -1,5 +1,5 @@ error[E0597]: `d2` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:46:20 + --> $DIR/dropck_direct_cycle_with_drop.rs:46:20: in fn g | LL | d1.p.set(Some(&d2)); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `d1` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:48:20 + --> $DIR/dropck_direct_cycle_with_drop.rs:48:20: in fn g | LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/span/dropck_misc_variants.stderr b/src/test/ui/span/dropck_misc_variants.stderr index af56448d4061c..a885d6366e80f 100644 --- a/src/test/ui/span/dropck_misc_variants.stderr +++ b/src/test/ui/span/dropck_misc_variants.stderr @@ -1,5 +1,5 @@ error[E0597]: `bomb` does not live long enough - --> $DIR/dropck_misc_variants.rs:33:37 + --> $DIR/dropck_misc_variants.rs:33:37: in fn projection | LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); | ^^^^ borrowed value does not live long enough @@ -9,7 +9,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `v` does not live long enough - --> $DIR/dropck_misc_variants.rs:41:28 + --> $DIR/dropck_misc_variants.rs:41:28: in fn closure | LL | let u = NoisyDrop(&v); | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index a6bc8da6f7c0c..92737552bdf5c 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -1,5 +1,5 @@ error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:113:25 + --> $DIR/dropck_vec_cycle_checked.rs:113:25: in fn f | LL | c1.v[0].v.set(Some(&c2)); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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:115:25 + --> $DIR/dropck_vec_cycle_checked.rs:115:25: in fn f | LL | c1.v[1].v.set(Some(&c3)); | ^^ borrowed value does not live long enough @@ -21,7 +21,7 @@ LL | } = 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:117:25 + --> $DIR/dropck_vec_cycle_checked.rs:117:25: in fn f | LL | c2.v[0].v.set(Some(&c2)); | ^^ borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | } = 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:119:25 + --> $DIR/dropck_vec_cycle_checked.rs:119:25: in fn f | LL | c2.v[1].v.set(Some(&c3)); | ^^ borrowed value does not live long enough @@ -43,7 +43,7 @@ LL | } = 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:121:25 + --> $DIR/dropck_vec_cycle_checked.rs:121:25: in fn f | LL | c3.v[0].v.set(Some(&c1)); | ^^ borrowed value does not live long enough @@ -54,7 +54,7 @@ LL | } = 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:123:25 + --> $DIR/dropck_vec_cycle_checked.rs:123:25: in fn f | LL | c3.v[1].v.set(Some(&c2)); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index bd66a5bc3929b..cb32dd3aab23d 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/issue-11925.rs:18:36 + --> $DIR/issue-11925.rs:18:36: in fn main | LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough | ^ diff --git a/src/test/ui/span/issue-15480.stderr b/src/test/ui/span/issue-15480.stderr index 1d239c712fe96..17c824ee05ae4 100644 --- a/src/test/ui/span/issue-15480.stderr +++ b/src/test/ui/span/issue-15480.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/issue-15480.rs:15:10 + --> $DIR/issue-15480.rs:15:10: in fn main | LL | &id(3) | ^^^^^ temporary value does not live long enough 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 6932134f4cdc2..242d7e4cab38d 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,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5 + --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5: in fn foo | LL | y.borrow().clone() | ^ borrowed value does not live long enough @@ -9,7 +9,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `y` does not live long enough - --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9 + --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9: in fn foo2 | LL | y.borrow().clone() | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-23729.stderr b/src/test/ui/span/issue-23729.stderr index 83a7671b8f934..e3044769dfb8a 100644 --- a/src/test/ui/span/issue-23729.stderr +++ b/src/test/ui/span/issue-23729.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Item` - --> $DIR/issue-23729.rs:20:9 + --> $DIR/issue-23729.rs:20:9: in fn main | LL | impl Iterator for Recurrence { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index 7c599138ef3c4..d8be3f6740373 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Target` - --> $DIR/issue-24356.rs:30:9 + --> $DIR/issue-24356.rs:30:9: in fn main | LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index b496a1a76c017..f39069f8960e2 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -1,5 +1,5 @@ warning: unused variable: `theOtherTwo` - --> $DIR/issue-24690.rs:23:9 + --> $DIR/issue-24690.rs:23:9: in fn main | LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ help: consider using `_theOtherTwo` instead @@ -12,7 +12,7 @@ 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 + --> $DIR/issue-24690.rs:22:9: in fn main | LL | let theTwo = 2; //~ WARN should have a snake case name | ^^^^^^ @@ -20,7 +20,7 @@ LL | let theTwo = 2; //~ WARN should have a snake case name = note: #[warn(non_snake_case)] on by default warning: variable `theOtherTwo` should have a snake case name such as `the_other_two` - --> $DIR/issue-24690.rs:23:9 + --> $DIR/issue-24690.rs:23:9: in fn main | LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ 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 13a79035003cd..e7c12b026e34c 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,5 +1,5 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:38:19 + --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:38:19: in fn f_child | LL | _d = D_Child(&d1); | ^^ borrowed value does not live long enough 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 a2e25492c1940..e5d524bda5b3a 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,5 +1,5 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:47:27 + --> $DIR/issue-24805-dropck-trait-has-items.rs:47:27: in fn f_sm | LL | _d = D_HasSelfMethod(&d1); | ^^ borrowed value does not live long enough @@ -9,7 +9,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:53:34 + --> $DIR/issue-24805-dropck-trait-has-items.rs:53:34: in fn f_mwsa | LL | _d = D_HasMethodWithSelfArg(&d1); | ^^ borrowed value does not live long enough @@ -19,7 +19,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:59:21 + --> $DIR/issue-24805-dropck-trait-has-items.rs:59:21: in fn f_t | LL | _d = D_HasType(&d1); | ^^ borrowed value does not live long enough 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 1f6c96d4a0c54..f241e0a008db4 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr @@ -1,5 +1,5 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24895-copy-clone-dropck.rs:37:15 + --> $DIR/issue-24895-copy-clone-dropck.rs:37:15: in fn main | LL | d2 = D(S(&d1, "inner"), "d2"); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index bee83b532baa6..6146f85555fa7 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -1,5 +1,5 @@ error[E0597]: `container` does not live long enough - --> $DIR/issue-25199.rs:80:28 + --> $DIR/issue-25199.rs:80:28: in fn main | LL | let test = Test{test: &container}; | ^^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `container` does not live long enough - --> $DIR/issue-25199.rs:83:5 + --> $DIR/issue-25199.rs:83:5: in fn main | LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-26656.stderr b/src/test/ui/span/issue-26656.stderr index 98f0c90ed7817..0c2ceda352578 100644 --- a/src/test/ui/span/issue-26656.stderr +++ b/src/test/ui/span/issue-26656.stderr @@ -1,5 +1,5 @@ error[E0597]: `ticking` does not live long enough - --> $DIR/issue-26656.rs:50:36 + --> $DIR/issue-26656.rs:50:36: in fn main | LL | zook.button = B::BigRedButton(&ticking); | ^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index 9b61ecae6512e..8956fa110fcb1 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -1,5 +1,5 @@ error[E0307]: invalid `self` type: &SomeType - --> $DIR/issue-27522.rs:16:22 + --> $DIR/issue-27522.rs:16:22: in trait Foo::handler | LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type | ^^^^^^^^^ diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index 23e53c9852d5e..375a6b44d6ad8 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:26:27 + --> $DIR/issue-29106.rs:26:27: in fn main | LL | y = Arc::new(Foo(&x)); | ^ borrowed value does not live long enough @@ -9,7 +9,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:33:26 + --> $DIR/issue-29106.rs:33:26: in fn main | LL | y = Rc::new(Foo(&x)); | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-29595.stderr b/src/test/ui/span/issue-29595.stderr index 15d56abca5086..ce569d480f293 100644 --- a/src/test/ui/span/issue-29595.stderr +++ b/src/test/ui/span/issue-29595.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied - --> $DIR/issue-29595.rs:17:17 + --> $DIR/issue-29595.rs:17:17: in fn main | 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 + --> $DIR/issue-29595.rs:13:5: in trait Tr | LL | const C: Self; | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index c47d28b45625d..ae7739436953a 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-33884.rs:18:22 + --> $DIR/issue-33884.rs:18:22: in fn handle_client | LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index bfa81a398a4ab..7367188b5e54f 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -17,7 +17,7 @@ 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 + --> $DIR/issue-34264.rs:17:5: in fn main | LL | fn foo(Option, String) {} //~ ERROR expected one of | --------------------------- defined here @@ -26,7 +26,7 @@ LL | foo(Some(42), 2, ""); //~ ERROR this function takes | ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters error[E0308]: mismatched types - --> $DIR/issue-34264.rs:18:13 + --> $DIR/issue-34264.rs:18:13: in fn main | LL | bar("", ""); //~ ERROR mismatched types | ^^ expected usize, found reference @@ -35,7 +35,7 @@ LL | bar("", ""); //~ ERROR mismatched types found type `&'static str` error[E0061]: this function takes 2 parameters but 3 parameters were supplied - --> $DIR/issue-34264.rs:20:5 + --> $DIR/issue-34264.rs:20:5: in fn main | LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ------------------- defined here diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index 73a0cf63c949e..3784e1cdc4c0a 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-36537.rs:14:10 + --> $DIR/issue-36537.rs:14:10: in fn main | LL | p = &a; | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index 5477146a55185..b18e70644d8b7 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -1,55 +1,55 @@ error[E0034]: multiple applicable items in scope - --> $DIR/issue-37767.rs:20:7 + --> $DIR/issue-37767.rs:20:7: in fn bar | 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 + --> $DIR/issue-37767.rs:12:5: in trait A | 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 + --> $DIR/issue-37767.rs:16:5: in trait B | 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 + --> $DIR/issue-37767.rs:32:7: in fn quz | 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 + --> $DIR/issue-37767.rs:24:5: in trait C | 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 + --> $DIR/issue-37767.rs:28:5: in trait D | 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 + --> $DIR/issue-37767.rs:44:7: in fn foo | 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 + --> $DIR/issue-37767.rs:36:5: in trait E | 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 + --> $DIR/issue-37767.rs:40:5: in trait F | LL | fn foo(self) {} | ^^^^^^^^^^^^ diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index ee6334e8164ca..824944569a19f 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` - --> $DIR/issue-39018.rs:12:13 + --> $DIR/issue-39018.rs:12:13: in fn main | LL | let x = "Hello " + "World!"; | ^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings @@ -9,7 +9,7 @@ LL | let x = "Hello ".to_owned() + "World!"; | ^^^^^^^^^^^^^^^^^^^ error[E0369]: binary operation `+` cannot be applied to type `World` - --> $DIR/issue-39018.rs:18:13 + --> $DIR/issue-39018.rs:18:13: in fn main | LL | let y = World::Hello + World::Goodbye; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | let y = World::Hello + World::Goodbye; = note: an implementation of `std::ops::Add` might be missing for `World` error[E0369]: binary operation `+` cannot be applied to type `&str` - --> $DIR/issue-39018.rs:21:13 + --> $DIR/issue-39018.rs:21:13: in fn main | LL | let x = "Hello " + "World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate a `&str` with a `String` diff --git a/src/test/ui/span/issue-40157.stderr b/src/test/ui/span/issue-40157.stderr index 8c6d3339e983f..f73d650e56f83 100644 --- a/src/test/ui/span/issue-40157.stderr +++ b/src/test/ui/span/issue-40157.stderr @@ -1,5 +1,5 @@ error[E0597]: `foo` does not live long enough - --> $DIR/issue-40157.rs:12:53 + --> $DIR/issue-40157.rs:12:53: in fn main | LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} | -----------------------------------------------^^^---------------------- 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 e1e13e9256dcd..c9f4aca18e98c 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-42234-unknown-receiver-type.rs:17:5 + --> $DIR/issue-42234-unknown-receiver-type.rs:17:5: in fn shines_a_beacon_through_the_darkness | LL | let x: Option<_> = None; | - consider giving `x` a type @@ -9,7 +9,7 @@ LL | x.unwrap().method_that_could_exist_on_some_type(); = note: type must be known at this point error[E0282]: type annotations needed - --> $DIR/issue-42234-unknown-receiver-type.rs:22:5 + --> $DIR/issue-42234-unknown-receiver-type.rs:22:5: in fn courier_to_des_moines_and_points_west | LL | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed LL | | .sum::<_>() diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index dc2cd4c2ddc30..1a68496ad1cb5 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope - --> $DIR/issue-7575.rs:74:18 + --> $DIR/issue-7575.rs:74:18: in fn no_param_bound | LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ @@ -7,19 +7,19 @@ 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 = help: try with `usize::f9` note: candidate #1 is defined in the trait `CtxtFn` - --> $DIR/issue-7575.rs:16:5 + --> $DIR/issue-7575.rs:16:5: in trait CtxtFn | 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 + --> $DIR/issue-7575.rs:20:5: in trait OtherTrait | 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 + --> $DIR/issue-7575.rs:29:5: in trait UnusedTrait | LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | fn f9(_: usize) -> usize; candidate #3: `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope - --> $DIR/issue-7575.rs:74:30 + --> $DIR/issue-7575.rs:74:30: in fn no_param_bound | LL | struct Myisize(isize); | ---------------------- method `fff` not found for this @@ -48,7 +48,7 @@ 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 + --> $DIR/issue-7575.rs:82:7: in fn param_bound | LL | t.is_str() | ^^^^^^ @@ -56,7 +56,7 @@ LL | t.is_str() = note: found the following associated functions; to be used as methods, functions must have a `self` parameter = help: try with `T::is_str` note: candidate #1 is defined in the trait `ManyImplTrait` - --> $DIR/issue-7575.rs:57:5 + --> $DIR/issue-7575.rs:57:5: in trait ManyImplTrait | LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index fb6eeb4de5dd8..6b98043f9e8f9 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -1,5 +1,5 @@ error[E0597]: `foo.data` does not live long enough - --> $DIR/issue28498-reject-ex1.rs:44:29 + --> $DIR/issue28498-reject-ex1.rs:44:29: in fn main | LL | foo.data[0].1.set(Some(&foo.data[1])); | ^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `foo.data` does not live long enough - --> $DIR/issue28498-reject-ex1.rs:46:29 + --> $DIR/issue28498-reject-ex1.rs:46:29: in fn main | LL | foo.data[1].1.set(Some(&foo.data[0])); | ^^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.stderr index 841ea5b25c840..5a41b239fc072 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.stderr @@ -1,5 +1,5 @@ error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-lifetime-param.rs:42:20 + --> $DIR/issue28498-reject-lifetime-param.rs:42:20: in fn main | LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-lifetime-param.rs:44:20 + --> $DIR/issue28498-reject-lifetime-param.rs:44:20: in fn main | LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough 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 2a5e34290ec92..0ffb18c8fd373 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr @@ -1,5 +1,5 @@ error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-passed-to-fn.rs:44:20 + --> $DIR/issue28498-reject-passed-to-fn.rs:44:20: in fn main | LL | foo0 = Foo(0, &last_dropped, Box::new(callback)); | ^^^^^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-passed-to-fn.rs:46:20 + --> $DIR/issue28498-reject-passed-to-fn.rs:46:20: in fn main | LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); | ^^^^^^^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/issue28498-reject-trait-bound.stderr b/src/test/ui/span/issue28498-reject-trait-bound.stderr index 6e46f67a1d51c..4ed896807f7ef 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.stderr @@ -1,5 +1,5 @@ error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-trait-bound.rs:44:20 + --> $DIR/issue28498-reject-trait-bound.rs:44:20: in fn main | LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-trait-bound.rs:46:20 + --> $DIR/issue28498-reject-trait-bound.rs:46:20: in fn main | LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index f85ca4ef00f8d..a46e937f51ffb 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -1,5 +1,5 @@ error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:26:13 + --> $DIR/lint-unused-unsafe.rs:26:13: in fn bad1 | LL | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block @@ -11,13 +11,13 @@ LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:27:13 + --> $DIR/lint-unused-unsafe.rs:27:13: in fn bad2 | LL | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:28:20 + --> $DIR/lint-unused-unsafe.rs:28:20: in fn bad3 | LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block @@ -25,13 +25,13 @@ LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` bl | because it's nested under this `unsafe` fn error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:29:13 + --> $DIR/lint-unused-unsafe.rs:29:13: in fn bad4 | LL | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:30:20 + --> $DIR/lint-unused-unsafe.rs:30:20: in fn bad5 | LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block @@ -39,7 +39,7 @@ LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` bl | because it's nested under this `unsafe` fn error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:33:9 + --> $DIR/lint-unused-unsafe.rs:33:9: in fn bad6 | LL | unsafe { // don't put the warning here | ------ because it's nested under this `unsafe` block @@ -47,7 +47,7 @@ LL | unsafe { //~ ERROR: unnecessary `unsafe` bl | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:39:5 + --> $DIR/lint-unused-unsafe.rs:39:5: in fn bad7 | LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn @@ -55,7 +55,7 @@ LL | unsafe { //~ ERROR: unnecessary `unsafe` bl | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block - --> $DIR/lint-unused-unsafe.rs:40:9 + --> $DIR/lint-unused-unsafe.rs:40:9: in fn bad7 | LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn diff --git a/src/test/ui/span/method-and-field-eager-resolution.stderr b/src/test/ui/span/method-and-field-eager-resolution.stderr index 21e19828a99cf..ad2eb279d00f1 100644 --- a/src/test/ui/span/method-and-field-eager-resolution.stderr +++ b/src/test/ui/span/method-and-field-eager-resolution.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/method-and-field-eager-resolution.rs:15:5 + --> $DIR/method-and-field-eager-resolution.rs:15:5: in fn main | LL | let mut x = Default::default(); | ----- consider giving `x` a type @@ -9,7 +9,7 @@ LL | x.0; = note: type must be known at this point error[E0282]: type annotations needed - --> $DIR/method-and-field-eager-resolution.rs:22:5 + --> $DIR/method-and-field-eager-resolution.rs:22:5: in fn foo | LL | let mut x = Default::default(); | ----- consider giving `x` a type diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index be514fdd81ced..249a23dca096b 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied - --> $DIR/missing-unit-argument.rs:21:33 + --> $DIR/missing-unit-argument.rs:21:33: in fn main | LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes | ^^^^ @@ -9,7 +9,7 @@ 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 + --> $DIR/missing-unit-argument.rs:22:5: in fn main | LL | fn foo(():(), ():()) {} | -------------------- defined here @@ -18,7 +18,7 @@ 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 + --> $DIR/missing-unit-argument.rs:23:5: in fn main | LL | fn foo(():(), ():()) {} | -------------------- defined here @@ -27,7 +27,7 @@ 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 + --> $DIR/missing-unit-argument.rs:24:5: in fn main | LL | fn bar(():()) {} | ------------- defined here @@ -40,7 +40,7 @@ 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 + --> $DIR/missing-unit-argument.rs:25:7: in fn main | LL | fn baz(self, (): ()) { } | -------------------- defined here @@ -53,7 +53,7 @@ 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 + --> $DIR/missing-unit-argument.rs:26:7: in fn main | LL | fn generic(self, _: T) { } | ------------------------- defined here diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index 1c629ee9841ca..49a5d13299eff 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/move-closure.rs:15:17 + --> $DIR/move-closure.rs:15:17: in fn main | LL | let x: () = move || (); //~ ERROR mismatched types | ^^^^^^^^^^ expected (), found closure diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index 463d5baae64ea..70019d8fdadc1 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -1,5 +1,5 @@ error[E0277]: cannot add `()` to `u32` - --> $DIR/multiline-span-simple.rs:23:18 + --> $DIR/multiline-span-simple.rs:23:18: in fn main | LL | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` | ^ no implementation for `u32 + ()` diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index 730592b31002e..3d2df0b88d3da 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable - --> $DIR/mut-arg-hint.rs:13:9 + --> $DIR/mut-arg-hint.rs:13:9: in fn B::foo::foo | LL | fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable @@ -7,7 +7,7 @@ LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed conte | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable - --> $DIR/mut-arg-hint.rs:18:5 + --> $DIR/mut-arg-hint.rs:18:5: in fn foo | LL | pub fn foo<'a>(mut a: &'a String) { | ---------- use `&'a mut String` here to make mutable @@ -15,7 +15,7 @@ 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 + --> $DIR/mut-arg-hint.rs:25:9: in fn foo::foo | LL | pub fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable 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 7898b066acd49..dd69b408c199a 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -1,5 +1,5 @@ error[E0597]: `b` does not live long enough - --> $DIR/mut-ptr-cant-outlive-ref.rs:18:15 + --> $DIR/mut-ptr-cant-outlive-ref.rs:18:15: in fn main | LL | p = &*b; | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index 4d2a48aef00a4..b2e071462dfd9 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -1,5 +1,5 @@ error[E0124]: field `bar` is already declared - --> $DIR/pub-struct-field.rs:16:5 + --> $DIR/pub-struct-field.rs:16:5: in struct Foo | LL | bar: u8, | ------- `bar` first declared here @@ -7,7 +7,7 @@ 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 + --> $DIR/pub-struct-field.rs:17:5: in struct Foo | LL | bar: u8, | ------- `bar` first declared here diff --git a/src/test/ui/span/range-2.stderr b/src/test/ui/span/range-2.stderr index e2ee86ae1f593..5b5d62d90d373 100644 --- a/src/test/ui/span/range-2.stderr +++ b/src/test/ui/span/range-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/range-2.rs:17:10 + --> $DIR/range-2.rs:17:10: in fn main | LL | &a..&b | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - borrowed value needs to live until here error[E0597]: `b` does not live long enough - --> $DIR/range-2.rs:17:14 + --> $DIR/range-2.rs:17:14: in fn main | LL | &a..&b | ^ borrowed value does not live long enough diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr index db47a9010e09d..c1e9175c8274f 100644 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr +++ b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22 + --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22: in fn main | LL | let c_ref = &c; | ^ borrowed value does not live long enough 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 2b63d5bd6c754..b25f9e9b6dd72 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,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27 + --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27: in fn main | LL | let ss: &isize = &id(1); | ^^^^^ temporary value does not live long enough 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 79c6a0be17902..d5f5b39ddffdc 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,5 +1,5 @@ error[E0597]: `tmp0` does not live long enough - --> $DIR/regions-close-over-type-parameter-2.rs:33:21 + --> $DIR/regions-close-over-type-parameter-2.rs:33:21: in fn main | LL | let tmp1 = &tmp0; | ^^^^ borrowed value does not live long enough 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 0ff0d76a5e464..e4808e24464b6 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/regions-escape-loop-via-variable.rs:21:14 + --> $DIR/regions-escape-loop-via-variable.rs:21:14: in fn main | LL | p = &x; | ^ borrowed value does not live long enough 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 1d4911bd5af73..5cd5a7b1f7e18 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -1,5 +1,5 @@ error[E0597]: `z` does not live long enough - --> $DIR/regions-escape-loop-via-vec.rs:17:22 + --> $DIR/regions-escape-loop-via-vec.rs:17:22: in fn broken | LL | _y.push(&mut z); | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ 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 + --> $DIR/regions-escape-loop-via-vec.rs:15:11: in fn broken | LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here @@ -18,7 +18,7 @@ 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 + --> $DIR/regions-escape-loop-via-vec.rs:16:13: in fn broken | LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here @@ -27,7 +27,7 @@ LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borr | ^^^^^ use of borrowed `x` error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/regions-escape-loop-via-vec.rs:19:9 + --> $DIR/regions-escape-loop-via-vec.rs:19:9: in fn broken | LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here 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 87dc0682199be..5a8df830449d7 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,5 +1,5 @@ error[E0597]: `*x` does not live long enough - --> $DIR/regions-infer-borrow-scope-within-loop.rs:24:21 + --> $DIR/regions-infer-borrow-scope-within-loop.rs:24:21: in fn foo | LL | y = borrow(&*x); | ^^ borrowed value does not live long enough 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 0447b578d44cb..b1bf86d04c583 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,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-ensures-scoping.rs:26:18 + --> $DIR/send-is-not-static-ensures-scoping.rs:26:18: in fn main | LL | let y = &x; | ^ borrowed value does not live long enough @@ -11,7 +11,7 @@ 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 + --> $DIR/send-is-not-static-ensures-scoping.rs:30:22: in fn main | LL | scoped(|| { | -- capture occurs here 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 53f4d685d0c2d..6eb59e9c6e0de 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,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:21:21 + --> $DIR/send-is-not-static-std-sync-2.rs:21:21: in fn mutex | LL | Mutex::new(&x) | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ 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 + --> $DIR/send-is-not-static-std-sync-2.rs:31:22: in fn rwlock | LL | RwLock::new(&x) | ^ borrowed value does not live long enough @@ -21,7 +21,7 @@ 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 + --> $DIR/send-is-not-static-std-sync-2.rs:41:26: in fn channel | LL | let _ = tx.send(&x); | ^ borrowed value does not live long enough 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 066715cd5b5f6..821c6e4815fc3 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,5 +1,5 @@ error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:26:34 + --> $DIR/send-is-not-static-std-sync.rs:26:34: in fn mutex | LL | *lock.lock().unwrap() = &z; | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ 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 + --> $DIR/send-is-not-static-std-sync.rs:23:10: in fn mutex | LL | *lock.lock().unwrap() = &*y; | -- borrow of `*y` occurs here @@ -18,7 +18,7 @@ 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 + --> $DIR/send-is-not-static-std-sync.rs:39:35: in fn rwlock | LL | *lock.write().unwrap() = &z; | ^ borrowed value does not live long enough @@ -29,7 +29,7 @@ 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 + --> $DIR/send-is-not-static-std-sync.rs:36:10: in fn rwlock | LL | *lock.write().unwrap() = &*y; | -- borrow of `*y` occurs here @@ -37,7 +37,7 @@ 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 + --> $DIR/send-is-not-static-std-sync.rs:54:18: in fn channel | LL | tx.send(&z).unwrap(); | ^ borrowed value does not live long enough @@ -48,7 +48,7 @@ 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 + --> $DIR/send-is-not-static-std-sync.rs:51:10: in fn channel | LL | tx.send(&*y); | -- borrow of `*y` occurs here diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 503d1f72c3544..f1f1ce9345a9c 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -1,5 +1,5 @@ error[E0597]: borrowed value does not live long enough - --> $DIR/slice-borrow.rs:16:28 + --> $DIR/slice-borrow.rs:16:28: in fn main | LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough diff --git a/src/test/ui/span/suggestion-non-ascii.stderr b/src/test/ui/span/suggestion-non-ascii.stderr index f74d4a5caefc3..6475e2f3222ae 100644 --- a/src/test/ui/span/suggestion-non-ascii.stderr +++ b/src/test/ui/span/suggestion-non-ascii.stderr @@ -1,5 +1,5 @@ error[E0608]: cannot index into a value of type `({integer},)` - --> $DIR/suggestion-non-ascii.rs:14:21 + --> $DIR/suggestion-non-ascii.rs:14:21: in fn main | LL | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type | ^^^^^^ help: to access tuple elements, use: `tup.0` diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr index d8bfdff142b5a..7a7f8a8ff39ac 100644 --- a/src/test/ui/span/type-binding.stderr +++ b/src/test/ui/span/type-binding.stderr @@ -1,5 +1,5 @@ error[E0220]: associated type `Trget` not found for `std::ops::Deref` - --> $DIR/type-binding.rs:16:20 + --> $DIR/type-binding.rs:16:20: in fn homura | LL | fn homura>(_: T) {} | ^^^^^^^^^^^ associated type `Trget` not found 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 b461f74c75990..23e890c75b4e3 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,5 +1,5 @@ error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 + --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25: in fn f | LL | c1.v[0].v.set(Some(&c2)); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = 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 + --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25: in fn f | LL | c2.v[0].v.set(Some(&c1)); | ^^ borrowed value does not live long enough 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 0dd7288ce64a1..5eb95cbd3514c 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,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:27:13 + --> $DIR/vec_refs_data_with_early_death.rs:27:13: in fn main | LL | v.push(&x); | ^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } = note: values in a scope are dropped in the opposite order they are created error[E0597]: `y` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:29:13 + --> $DIR/vec_refs_data_with_early_death.rs:29:13: in fn main | LL | v.push(&y); | ^ borrowed value does not live long enough 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 f455707366a58..73d7d15030589 100644 --- a/src/test/ui/span/wf-method-late-bound-regions.stderr +++ b/src/test/ui/span/wf-method-late-bound-regions.stderr @@ -1,5 +1,5 @@ error[E0597]: `pointer` does not live long enough - --> $DIR/wf-method-late-bound-regions.rs:30:19 + --> $DIR/wf-method-late-bound-regions.rs:30:19: in fn main | LL | f2.xmute(&pointer) | ^^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/str-concat-on-double-ref.stderr b/src/test/ui/str-concat-on-double-ref.stderr index d42c859598fdd..51d43030f97d0 100644 --- a/src/test/ui/str-concat-on-double-ref.stderr +++ b/src/test/ui/str-concat-on-double-ref.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` - --> $DIR/str-concat-on-double-ref.rs:14:13 + --> $DIR/str-concat-on-double-ref.rs:14:13: in fn main | LL | let c = a + b; | ^^^^^ diff --git a/src/test/ui/str-lit-type-mismatch.stderr b/src/test/ui/str-lit-type-mismatch.stderr index de18851636dfd..e7c2655ee4c31 100644 --- a/src/test/ui/str-lit-type-mismatch.stderr +++ b/src/test/ui/str-lit-type-mismatch.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/str-lit-type-mismatch.rs:13:20 + --> $DIR/str-lit-type-mismatch.rs:13:20: in fn main | LL | let x: &[u8] = "foo"; //~ ERROR mismatched types | ^^^^^ @@ -11,7 +11,7 @@ LL | let x: &[u8] = "foo"; //~ ERROR mismatched types found type `&'static str` error[E0308]: mismatched types - --> $DIR/str-lit-type-mismatch.rs:14:23 + --> $DIR/str-lit-type-mismatch.rs:14:23: in fn main | LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types | ^^^^^^ @@ -23,7 +23,7 @@ LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types found type `&'static str` error[E0308]: mismatched types - --> $DIR/str-lit-type-mismatch.rs:15:19 + --> $DIR/str-lit-type-mismatch.rs:15:19: in fn main | LL | let z: &str = b"foo"; //~ ERROR mismatched types | ^^^^^^ diff --git a/src/test/ui/struct-fields-decl-dupe.stderr b/src/test/ui/struct-fields-decl-dupe.stderr index b5068b4abda53..0e82339cc4bb0 100644 --- a/src/test/ui/struct-fields-decl-dupe.stderr +++ b/src/test/ui/struct-fields-decl-dupe.stderr @@ -1,5 +1,5 @@ error[E0124]: field `foo` is already declared - --> $DIR/struct-fields-decl-dupe.rs:13:5 + --> $DIR/struct-fields-decl-dupe.rs:13:5: in struct BuildData | LL | foo: isize, | ---------- `foo` first declared here diff --git a/src/test/ui/struct-fields-hints-no-dupe.stderr b/src/test/ui/struct-fields-hints-no-dupe.stderr index d04d193c66550..3ed9a166412de 100644 --- a/src/test/ui/struct-fields-hints-no-dupe.stderr +++ b/src/test/ui/struct-fields-hints-no-dupe.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `A` has no field named `bar` - --> $DIR/struct-fields-hints-no-dupe.rs:20:9 + --> $DIR/struct-fields-hints-no-dupe.rs:20:9: in fn main | LL | bar : 42, | ^^^ field does not exist - did you mean `barr`? diff --git a/src/test/ui/struct-fields-hints.stderr b/src/test/ui/struct-fields-hints.stderr index 6d0ec8bdf92c9..8cd023b77cbf2 100644 --- a/src/test/ui/struct-fields-hints.stderr +++ b/src/test/ui/struct-fields-hints.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `A` has no field named `bar` - --> $DIR/struct-fields-hints.rs:20:9 + --> $DIR/struct-fields-hints.rs:20:9: in fn main | LL | bar : 42, | ^^^ field does not exist - did you mean `car`? diff --git a/src/test/ui/struct-fields-too-many.stderr b/src/test/ui/struct-fields-too-many.stderr index 01b3fe16fbb62..4338a514c5622 100644 --- a/src/test/ui/struct-fields-too-many.stderr +++ b/src/test/ui/struct-fields-too-many.stderr @@ -1,5 +1,5 @@ error[E0560]: struct `BuildData` has no field named `bar` - --> $DIR/struct-fields-too-many.rs:18:9 + --> $DIR/struct-fields-too-many.rs:18:9: in fn main | LL | bar: 0 | ^^^ `BuildData` does not have this field diff --git a/src/test/ui/struct-path-self-type-mismatch.stderr b/src/test/ui/struct-path-self-type-mismatch.stderr index cfba3be613060..30370df496dd5 100644 --- a/src/test/ui/struct-path-self-type-mismatch.stderr +++ b/src/test/ui/struct-path-self-type-mismatch.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types - --> $DIR/struct-path-self-type-mismatch.rs:17:23 + --> $DIR/struct-path-self-type-mismatch.rs:17:23: in fn bar::bar | 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 + --> $DIR/struct-path-self-type-mismatch.rs:25:20: in fn new::new | LL | inner: u | ^ expected type parameter, found a different type parameter @@ -14,7 +14,7 @@ LL | inner: u found type `U` error[E0308]: mismatched types - --> $DIR/struct-path-self-type-mismatch.rs:23:9 + --> $DIR/struct-path-self-type-mismatch.rs:23:9: in fn new::new | LL | fn new(u: U) -> Foo { | ------ expected `Foo` because of return type diff --git a/src/test/ui/suggest-private-fields.stderr b/src/test/ui/suggest-private-fields.stderr index 51a96df951aec..6f1e4b9d625bf 100644 --- a/src/test/ui/suggest-private-fields.stderr +++ b/src/test/ui/suggest-private-fields.stderr @@ -1,11 +1,11 @@ error[E0560]: struct `xc::B` has no field named `aa` - --> $DIR/suggest-private-fields.rs:25:9 + --> $DIR/suggest-private-fields.rs:25:9: in fn main | 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 + --> $DIR/suggest-private-fields.rs:27:9: in fn main | LL | bb: 20, | ^^ `xc::B` does not have this field @@ -13,13 +13,13 @@ LL | bb: 20, = note: available fields are: `a` error[E0560]: struct `A` has no field named `aa` - --> $DIR/suggest-private-fields.rs:32:9 + --> $DIR/suggest-private-fields.rs:32:9: in fn main | 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 + --> $DIR/suggest-private-fields.rs:34:9: in fn main | LL | bb: 20, | ^^ field does not exist - did you mean `b`? diff --git a/src/test/ui/suggest-remove-refs-1.stderr b/src/test/ui/suggest-remove-refs-1.stderr index c47b4d283d7cd..1ecdfb0e67117 100644 --- a/src/test/ui/suggest-remove-refs-1.stderr +++ b/src/test/ui/suggest-remove-refs-1.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&std::iter::Enumerate>: std::iter::Iterator` is not satisfied - --> $DIR/suggest-remove-refs-1.rs:14:19 + --> $DIR/suggest-remove-refs-1.rs:14:19: in fn main | LL | for (i, n) in &v.iter().enumerate() { | -^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/suggest-remove-refs-2.stderr b/src/test/ui/suggest-remove-refs-2.stderr index fdd654ea3923f..ded24a4912cdf 100644 --- a/src/test/ui/suggest-remove-refs-2.stderr +++ b/src/test/ui/suggest-remove-refs-2.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&&&&&std::iter::Enumerate>: std::iter::Iterator` is not satisfied - --> $DIR/suggest-remove-refs-2.rs:14:19 + --> $DIR/suggest-remove-refs-2.rs:14:19: in fn main | LL | for (i, n) in & & & & &v.iter().enumerate() { | ---------^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/suggest-remove-refs-3.stderr b/src/test/ui/suggest-remove-refs-3.stderr index b0920a0fa523e..2da249f8c8826 100644 --- a/src/test/ui/suggest-remove-refs-3.stderr +++ b/src/test/ui/suggest-remove-refs-3.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&&&&&std::iter::Enumerate>: std::iter::Iterator` is not satisfied - --> $DIR/suggest-remove-refs-3.rs:14:19 + --> $DIR/suggest-remove-refs-3.rs:14:19: in fn main | LL | for (i, n) in & & & | ___________________^ diff --git a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr index 0ee11d8cf15de..06b1590014d45 100644 --- a/src/test/ui/suggestions/closure-immutable-outer-variable.stderr +++ b/src/test/ui/suggestions/closure-immutable-outer-variable.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure - --> $DIR/closure-immutable-outer-variable.rs:21:26 + --> $DIR/closure-immutable-outer-variable.rs:21:26: in fn main | LL | let y = true; | - help: consider making `y` mutable: `mut y` 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 b1e3105a5f920..34717240f407f 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,5 +1,5 @@ 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 + --> $DIR/issue-18343.rs:17:7: in fn main | LL | struct Obj where F: FnMut() -> u32 { | ------------------------------------- method `closure` not found for this 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 bd5efcd9fee7a..dd168fbc1e3e0 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,5 +1,5 @@ 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 + --> $DIR/issue-2392.rs:50:15: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this @@ -10,7 +10,7 @@ LL | o_closure.closure(); //~ ERROR no method named `closure` found = help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field 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 + --> $DIR/issue-2392.rs:52:15: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this @@ -21,7 +21,7 @@ LL | o_closure.not_closure(); = help: did you mean to write `o_closure.not_closure` instead of `o_closure.not_closure(...)`? error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope - --> $DIR/issue-2392.rs:56:12 + --> $DIR/issue-2392.rs:56:12: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this @@ -32,7 +32,7 @@ LL | o_func.closure(); //~ ERROR no method named `closure` found = help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope - --> $DIR/issue-2392.rs:59:14 + --> $DIR/issue-2392.rs:59:14: in fn main | LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this @@ -43,7 +43,7 @@ LL | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` foun = help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope - --> $DIR/issue-2392.rs:62:19 + --> $DIR/issue-2392.rs:62:19: in fn main | LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this @@ -54,7 +54,7 @@ LL | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` = help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope - --> $DIR/issue-2392.rs:67:12 + --> $DIR/issue-2392.rs:67:12: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this @@ -65,7 +65,7 @@ LL | w.wrap.closure();//~ ERROR no method named `closure` found = help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `not_closure` found for type `Obj u32 {func}>` in the current scope - --> $DIR/issue-2392.rs:69:12 + --> $DIR/issue-2392.rs:69:12: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this @@ -76,7 +76,7 @@ LL | w.wrap.not_closure(); = help: did you mean to write `w.wrap.not_closure` instead of `w.wrap.not_closure(...)`? error[E0599]: no method named `closure` found for type `Obj + 'static>>` in the current scope - --> $DIR/issue-2392.rs:72:24 + --> $DIR/issue-2392.rs:72:24: in fn main | LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this @@ -87,7 +87,7 @@ LL | check_expression().closure();//~ ERROR no method named `closure` found = help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope - --> $DIR/issue-2392.rs:78:31 + --> $DIR/issue-2392.rs:78:31: in fn run::run | LL | struct FuncContainer { | -------------------- method `f1` not found for this @@ -98,7 +98,7 @@ LL | (*self.container).f1(1); //~ ERROR no method named `f1` found = help: use `((*self.container).f1)(...)` if you meant to call the function stored in the `f1` field error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope - --> $DIR/issue-2392.rs:79:31 + --> $DIR/issue-2392.rs:79:31: in fn run::run | LL | struct FuncContainer { | -------------------- method `f2` not found for this @@ -109,7 +109,7 @@ LL | (*self.container).f2(1); //~ ERROR no method named `f2` found = help: use `((*self.container).f2)(...)` if you meant to call the function stored in the `f2` field error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope - --> $DIR/issue-2392.rs:80:31 + --> $DIR/issue-2392.rs:80:31: in fn run::run | LL | struct FuncContainer { | -------------------- method `f3` not found for this 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 95b764b43ede5..bd7b12d18a535 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,5 +1,5 @@ error[E0599]: no method named `example` found for type `Example` in the current scope - --> $DIR/issue-32128.rs:22:10 + --> $DIR/issue-32128.rs:22:10: in fn main | LL | struct Example { | -------------- method `example` not found for this 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 b7f13320eec6e..ffa5e32d6d767 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,5 +1,5 @@ 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 + --> $DIR/issue-33784.rs:37:7: in fn main | LL | p.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method @@ -7,7 +7,7 @@ LL | p.closure(); //~ ERROR no method named `closure` found = help: use `(p.closure)(...)` if you meant to call the function stored in the `closure` field 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 + --> $DIR/issue-33784.rs:39:7: in fn main | LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found | ^^^^^^ field, not a method @@ -15,7 +15,7 @@ LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found = help: use `(q.fn_ptr)(...)` if you meant to call the function stored in the `fn_ptr` field error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope - --> $DIR/issue-33784.rs:42:7 + --> $DIR/issue-33784.rs:42:7: in fn main | LL | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found | ^^^^^^^^ field, not a method 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 145df8b156bfb..62d7a89659a7c 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,5 +1,5 @@ error[E0599]: no method named `dog_age` found for type `animal::Dog` in the current scope - --> $DIR/private-field.rs:26:23 + --> $DIR/private-field.rs:26:23: in fn main | LL | pub struct Dog { | -------------- method `dog_age` not found for this diff --git a/src/test/ui/suggestions/const-type-mismatch.stderr b/src/test/ui/suggestions/const-type-mismatch.stderr index 965995f82c53a..8ca2a3511ca38 100644 --- a/src/test/ui/suggestions/const-type-mismatch.stderr +++ b/src/test/ui/suggestions/const-type-mismatch.stderr @@ -5,7 +5,7 @@ LL | const TWELVE: u16 = TEN + 2; | ^^^^^^^ expected u16, found u8 error[E0308]: mismatched types - --> $DIR/const-type-mismatch.rs:19:27 + --> $DIR/const-type-mismatch.rs:19:27: in fn main | LL | const ALSO_TEN: u16 = TEN; | ^^^ expected u16, found u8 diff --git a/src/test/ui/suggestions/conversion-methods.stderr b/src/test/ui/suggestions/conversion-methods.stderr index 970ccad231696..af1e921588e55 100644 --- a/src/test/ui/suggestions/conversion-methods.stderr +++ b/src/test/ui/suggestions/conversion-methods.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/conversion-methods.rs:15:41 + --> $DIR/conversion-methods.rs:15:41: in fn main | LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^^^ @@ -11,7 +11,7 @@ LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR found type `&'static str` error[E0308]: mismatched types - --> $DIR/conversion-methods.rs:16:40 + --> $DIR/conversion-methods.rs:16:40: in fn main | LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); found type `&std::path::Path` error[E0308]: mismatched types - --> $DIR/conversion-methods.rs:19:40 + --> $DIR/conversion-methods.rs:19:40: in fn main | LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here | ^ @@ -35,7 +35,7 @@ LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we sugge found type `{integer}` error[E0308]: mismatched types - --> $DIR/conversion-methods.rs:22:47 + --> $DIR/conversion-methods.rs:22:47: in fn main | LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types | ^^^^^^^^^^ 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 81ecc546a6dee..3a23a20d5d6df 100644 --- a/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr +++ b/src/test/ui/suggestions/dont-suggest-private-trait-method.stderr @@ -1,5 +1,5 @@ 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 + --> $DIR/dont-suggest-private-trait-method.rs:14:5: in fn main | LL | struct T; | --------- function or associated item `new` not found for this diff --git a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr index a58d663dc0ab7..8f9f266520076 100644 --- a/src/test/ui/suggestions/fn-closure-mutable-capture.stderr +++ b/src/test/ui/suggestions/fn-closure-mutable-capture.stderr @@ -1,12 +1,12 @@ error[E0594]: cannot assign to captured outer variable in an `Fn` closure - --> $DIR/fn-closure-mutable-capture.rs:15:17 + --> $DIR/fn-closure-mutable-capture.rs:15:17: in fn foo | 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 + --> $DIR/fn-closure-mutable-capture.rs:15:9: in fn foo | LL | bar(move || x = 1); | ^^^^^^^^^^^^^ diff --git a/src/test/ui/suggestions/for-c-in-str.stderr b/src/test/ui/suggestions/for-c-in-str.stderr index b249df3b4ef6a..288f9c13810b0 100644 --- a/src/test/ui/suggestions/for-c-in-str.stderr +++ b/src/test/ui/suggestions/for-c-in-str.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&str: std::iter::Iterator` is not satisfied - --> $DIR/for-c-in-str.rs:14:14 + --> $DIR/for-c-in-str.rs:14:14: in fn main | LL | for c in "asdf" { | ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` 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 80bbdd11289ac..6325b64f8f882 100644 --- a/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/suggestions/issue-43420-no-over-suggest.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-43420-no-over-suggest.rs:18:9 + --> $DIR/issue-43420-no-over-suggest.rs:18:9: in fn main | LL | foo(&a); //~ ERROR mismatched types | ^^ expected slice, found struct `std::vec::Vec` 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 9c492751ca1a0..516de096fc7d7 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,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:22:42 + --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:22:42: in fn main | LL | light_flows_our_war_of_mocking_words(behold as usize); | ^^^^^^^^^^^^^^^ @@ -11,7 +11,7 @@ LL | light_flows_our_war_of_mocking_words(behold as usize); found type `usize` error[E0308]: mismatched types - --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:24:42 + --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:24:42: in fn main | LL | light_flows_our_war_of_mocking_words(with_tears + 4); | ^^^^^^^^^^^^^^ 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 477b4c3821d51..f241891bab3ed 100644 --- a/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/suggestions/method-on-ambiguous-numeric-type.stderr @@ -1,5 +1,5 @@ error[E0689]: can't call method `recip` on ambiguous numeric type `{float}` - --> $DIR/method-on-ambiguous-numeric-type.rs:12:17 + --> $DIR/method-on-ambiguous-numeric-type.rs:12:17: in fn main | LL | let x = 2.0.recip(); | ^^^^^ @@ -9,7 +9,7 @@ LL | let x = 2.0_f32.recip(); | ^^^^^^^ error[E0689]: can't call method `recip` on ambiguous numeric type `{float}` - --> $DIR/method-on-ambiguous-numeric-type.rs:15:15 + --> $DIR/method-on-ambiguous-numeric-type.rs:15:15: in fn main | LL | let x = y.recip(); | ^^^^^ diff --git a/src/test/ui/suggestions/numeric-cast-2.stderr b/src/test/ui/suggestions/numeric-cast-2.stderr index 3d4855837172e..288d7a5d2b4d2 100644 --- a/src/test/ui/suggestions/numeric-cast-2.stderr +++ b/src/test/ui/suggestions/numeric-cast-2.stderr @@ -1,17 +1,17 @@ error[E0308]: mismatched types - --> $DIR/numeric-cast-2.rs:15:18 + --> $DIR/numeric-cast-2.rs:15:18: in fn main | LL | let x: u16 = foo(); | ^^^^^ expected u16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast-2.rs:17:18 + --> $DIR/numeric-cast-2.rs:17:18: in fn main | LL | let y: i64 = x + x; | ^^^^^ expected i64, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast-2.rs:19:18 + --> $DIR/numeric-cast-2.rs:19:18: in fn main | LL | let z: i32 = x + x; | ^^^^^ expected i32, found u16 diff --git a/src/test/ui/suggestions/numeric-cast.stderr b/src/test/ui/suggestions/numeric-cast.stderr index 4aac65ff4cbd2..72e4970db0d60 100644 --- a/src/test/ui/suggestions/numeric-cast.stderr +++ b/src/test/ui/suggestions/numeric-cast.stderr @@ -1,143 +1,143 @@ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:29:18 + --> $DIR/numeric-cast.rs:29:18: in fn main | LL | foo::(x_u64); | ^^^^^ expected usize, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:31:18 + --> $DIR/numeric-cast.rs:31:18: in fn main | LL | foo::(x_u32); | ^^^^^ expected usize, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:33:18 + --> $DIR/numeric-cast.rs:33:18: in fn main | LL | foo::(x_u16); | ^^^^^ expected usize, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:35:18 + --> $DIR/numeric-cast.rs:35:18: in fn main | LL | foo::(x_u8); | ^^^^ expected usize, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:37:18 + --> $DIR/numeric-cast.rs:37:18: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected usize, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:39:18 + --> $DIR/numeric-cast.rs:39:18: in fn main | LL | foo::(x_i64); | ^^^^^ expected usize, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:41:18 + --> $DIR/numeric-cast.rs:41:18: in fn main | LL | foo::(x_i32); | ^^^^^ expected usize, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:43:18 + --> $DIR/numeric-cast.rs:43:18: in fn main | LL | foo::(x_i16); | ^^^^^ expected usize, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:45:18 + --> $DIR/numeric-cast.rs:45:18: in fn main | LL | foo::(x_i8); | ^^^^ expected usize, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:47:18 + --> $DIR/numeric-cast.rs:47:18: in fn main | LL | foo::(x_f64); | ^^^^^ expected usize, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:49:18 + --> $DIR/numeric-cast.rs:49:18: in fn main | LL | foo::(x_f32); | ^^^^^ expected usize, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:52:18 + --> $DIR/numeric-cast.rs:52:18: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected isize, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:54:18 + --> $DIR/numeric-cast.rs:54:18: in fn main | LL | foo::(x_u64); | ^^^^^ expected isize, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:56:18 + --> $DIR/numeric-cast.rs:56:18: in fn main | LL | foo::(x_u32); | ^^^^^ expected isize, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:58:18 + --> $DIR/numeric-cast.rs:58:18: in fn main | LL | foo::(x_u16); | ^^^^^ expected isize, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:60:18 + --> $DIR/numeric-cast.rs:60:18: in fn main | LL | foo::(x_u8); | ^^^^ expected isize, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:63:18 + --> $DIR/numeric-cast.rs:63:18: in fn main | LL | foo::(x_i64); | ^^^^^ expected isize, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:65:18 + --> $DIR/numeric-cast.rs:65:18: in fn main | LL | foo::(x_i32); | ^^^^^ expected isize, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:67:18 + --> $DIR/numeric-cast.rs:67:18: in fn main | LL | foo::(x_i16); | ^^^^^ expected isize, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:69:18 + --> $DIR/numeric-cast.rs:69:18: in fn main | LL | foo::(x_i8); | ^^^^ expected isize, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:71:18 + --> $DIR/numeric-cast.rs:71:18: in fn main | LL | foo::(x_f64); | ^^^^^ expected isize, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:73:18 + --> $DIR/numeric-cast.rs:73:18: in fn main | LL | foo::(x_f32); | ^^^^^ expected isize, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:76:16 + --> $DIR/numeric-cast.rs:76:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected u64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:79:16 + --> $DIR/numeric-cast.rs:79:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected u64, found u32 @@ -147,7 +147,7 @@ LL | foo::(x_u32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:81:16 + --> $DIR/numeric-cast.rs:81:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected u64, found u16 @@ -157,7 +157,7 @@ LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:83:16 + --> $DIR/numeric-cast.rs:83:16: in fn main | LL | foo::(x_u8); | ^^^^ expected u64, found u8 @@ -167,85 +167,85 @@ LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:85:16 + --> $DIR/numeric-cast.rs:85:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected u64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:87:16 + --> $DIR/numeric-cast.rs:87:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected u64, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:89:16 + --> $DIR/numeric-cast.rs:89:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected u64, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:91:16 + --> $DIR/numeric-cast.rs:91:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected u64, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:93:16 + --> $DIR/numeric-cast.rs:93:16: in fn main | LL | foo::(x_i8); | ^^^^ expected u64, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:95:16 + --> $DIR/numeric-cast.rs:95:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected u64, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:97:16 + --> $DIR/numeric-cast.rs:97:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected u64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:100:16 + --> $DIR/numeric-cast.rs:100:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected i64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:102:16 + --> $DIR/numeric-cast.rs:102:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected i64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:104:16 + --> $DIR/numeric-cast.rs:104:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected i64, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:106:16 + --> $DIR/numeric-cast.rs:106:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected i64, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:108:16 + --> $DIR/numeric-cast.rs:108:16: in fn main | LL | foo::(x_u8); | ^^^^ expected i64, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:110:16 + --> $DIR/numeric-cast.rs:110:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected i64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:113:16 + --> $DIR/numeric-cast.rs:113:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected i64, found i32 @@ -255,7 +255,7 @@ LL | foo::(x_i32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:115:16 + --> $DIR/numeric-cast.rs:115:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected i64, found i16 @@ -265,7 +265,7 @@ LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:117:16 + --> $DIR/numeric-cast.rs:117:16: in fn main | LL | foo::(x_i8); | ^^^^ expected i64, found i8 @@ -275,31 +275,31 @@ LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:119:16 + --> $DIR/numeric-cast.rs:119:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected i64, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:121:16 + --> $DIR/numeric-cast.rs:121:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected i64, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:124:16 + --> $DIR/numeric-cast.rs:124:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected u32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:126:16 + --> $DIR/numeric-cast.rs:126:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected u32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:129:16 + --> $DIR/numeric-cast.rs:129:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected u32, found u16 @@ -309,7 +309,7 @@ LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:131:16 + --> $DIR/numeric-cast.rs:131:16: in fn main | LL | foo::(x_u8); | ^^^^ expected u32, found u8 @@ -319,91 +319,91 @@ LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:133:16 + --> $DIR/numeric-cast.rs:133:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected u32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:135:16 + --> $DIR/numeric-cast.rs:135:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected u32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:137:16 + --> $DIR/numeric-cast.rs:137:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected u32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:139:16 + --> $DIR/numeric-cast.rs:139:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected u32, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:141:16 + --> $DIR/numeric-cast.rs:141:16: in fn main | LL | foo::(x_i8); | ^^^^ expected u32, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:143:16 + --> $DIR/numeric-cast.rs:143:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected u32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:145:16 + --> $DIR/numeric-cast.rs:145:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected u32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:148:16 + --> $DIR/numeric-cast.rs:148:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected i32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:150:16 + --> $DIR/numeric-cast.rs:150:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected i32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:152:16 + --> $DIR/numeric-cast.rs:152:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected i32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:154:16 + --> $DIR/numeric-cast.rs:154:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected i32, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:156:16 + --> $DIR/numeric-cast.rs:156:16: in fn main | LL | foo::(x_u8); | ^^^^ expected i32, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:158:16 + --> $DIR/numeric-cast.rs:158:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected i32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:160:16 + --> $DIR/numeric-cast.rs:160:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected i32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:163:16 + --> $DIR/numeric-cast.rs:163:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected i32, found i16 @@ -413,7 +413,7 @@ LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:165:16 + --> $DIR/numeric-cast.rs:165:16: in fn main | LL | foo::(x_i8); | ^^^^ expected i32, found i8 @@ -423,37 +423,37 @@ LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:167:16 + --> $DIR/numeric-cast.rs:167:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected i32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:169:16 + --> $DIR/numeric-cast.rs:169:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected i32, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:172:16 + --> $DIR/numeric-cast.rs:172:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected u16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:174:16 + --> $DIR/numeric-cast.rs:174:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected u16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:176:16 + --> $DIR/numeric-cast.rs:176:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected u16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:179:16 + --> $DIR/numeric-cast.rs:179:16: in fn main | LL | foo::(x_u8); | ^^^^ expected u16, found u8 @@ -463,97 +463,97 @@ LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:181:16 + --> $DIR/numeric-cast.rs:181:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected u16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:183:16 + --> $DIR/numeric-cast.rs:183:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected u16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:185:16 + --> $DIR/numeric-cast.rs:185:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected u16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:187:16 + --> $DIR/numeric-cast.rs:187:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected u16, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:189:16 + --> $DIR/numeric-cast.rs:189:16: in fn main | LL | foo::(x_i8); | ^^^^ expected u16, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:191:16 + --> $DIR/numeric-cast.rs:191:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected u16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:193:16 + --> $DIR/numeric-cast.rs:193:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected u16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:196:16 + --> $DIR/numeric-cast.rs:196:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected i16, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:198:16 + --> $DIR/numeric-cast.rs:198:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected i16, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:200:16 + --> $DIR/numeric-cast.rs:200:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected i16, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:202:16 + --> $DIR/numeric-cast.rs:202:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected i16, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:204:16 + --> $DIR/numeric-cast.rs:204:16: in fn main | LL | foo::(x_u8); | ^^^^ expected i16, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:206:16 + --> $DIR/numeric-cast.rs:206:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected i16, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:208:16 + --> $DIR/numeric-cast.rs:208:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected i16, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:210:16 + --> $DIR/numeric-cast.rs:210:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected i16, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:213:16 + --> $DIR/numeric-cast.rs:213:16: in fn main | LL | foo::(x_i8); | ^^^^ expected i16, found i8 @@ -563,163 +563,163 @@ LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:215:16 + --> $DIR/numeric-cast.rs:215:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected i16, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:217:16 + --> $DIR/numeric-cast.rs:217:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected i16, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:220:15 + --> $DIR/numeric-cast.rs:220:15: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected u8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:222:15 + --> $DIR/numeric-cast.rs:222:15: in fn main | LL | foo::(x_u64); | ^^^^^ expected u8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:224:15 + --> $DIR/numeric-cast.rs:224:15: in fn main | LL | foo::(x_u32); | ^^^^^ expected u8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:226:15 + --> $DIR/numeric-cast.rs:226:15: in fn main | LL | foo::(x_u16); | ^^^^^ expected u8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:229:15 + --> $DIR/numeric-cast.rs:229:15: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected u8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:231:15 + --> $DIR/numeric-cast.rs:231:15: in fn main | LL | foo::(x_i64); | ^^^^^ expected u8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:233:15 + --> $DIR/numeric-cast.rs:233:15: in fn main | LL | foo::(x_i32); | ^^^^^ expected u8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:235:15 + --> $DIR/numeric-cast.rs:235:15: in fn main | LL | foo::(x_i16); | ^^^^^ expected u8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:237:15 + --> $DIR/numeric-cast.rs:237:15: in fn main | LL | foo::(x_i8); | ^^^^ expected u8, found i8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:239:15 + --> $DIR/numeric-cast.rs:239:15: in fn main | LL | foo::(x_f64); | ^^^^^ expected u8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:241:15 + --> $DIR/numeric-cast.rs:241:15: in fn main | LL | foo::(x_f32); | ^^^^^ expected u8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:244:15 + --> $DIR/numeric-cast.rs:244:15: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected i8, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:246:15 + --> $DIR/numeric-cast.rs:246:15: in fn main | LL | foo::(x_u64); | ^^^^^ expected i8, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:248:15 + --> $DIR/numeric-cast.rs:248:15: in fn main | LL | foo::(x_u32); | ^^^^^ expected i8, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:250:15 + --> $DIR/numeric-cast.rs:250:15: in fn main | LL | foo::(x_u16); | ^^^^^ expected i8, found u16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:252:15 + --> $DIR/numeric-cast.rs:252:15: in fn main | LL | foo::(x_u8); | ^^^^ expected i8, found u8 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:254:15 + --> $DIR/numeric-cast.rs:254:15: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected i8, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:256:15 + --> $DIR/numeric-cast.rs:256:15: in fn main | LL | foo::(x_i64); | ^^^^^ expected i8, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:258:15 + --> $DIR/numeric-cast.rs:258:15: in fn main | LL | foo::(x_i32); | ^^^^^ expected i8, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:260:15 + --> $DIR/numeric-cast.rs:260:15: in fn main | LL | foo::(x_i16); | ^^^^^ expected i8, found i16 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:263:15 + --> $DIR/numeric-cast.rs:263:15: in fn main | LL | foo::(x_f64); | ^^^^^ expected i8, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:265:15 + --> $DIR/numeric-cast.rs:265:15: in fn main | LL | foo::(x_f32); | ^^^^^ expected i8, found f32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:268:16 + --> $DIR/numeric-cast.rs:268:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected f64, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:270:16 + --> $DIR/numeric-cast.rs:270:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected f64, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:272:16 + --> $DIR/numeric-cast.rs:272:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected f64, found u32 @@ -729,7 +729,7 @@ LL | foo::(x_u32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:274:16 + --> $DIR/numeric-cast.rs:274:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected f64, found u16 @@ -739,7 +739,7 @@ LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:276:16 + --> $DIR/numeric-cast.rs:276:16: in fn main | LL | foo::(x_u8); | ^^^^ expected f64, found u8 @@ -749,19 +749,19 @@ LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:278:16 + --> $DIR/numeric-cast.rs:278:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected f64, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:280:16 + --> $DIR/numeric-cast.rs:280:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected f64, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:282:16 + --> $DIR/numeric-cast.rs:282:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected f64, found i32 @@ -771,7 +771,7 @@ LL | foo::(x_i32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:284:16 + --> $DIR/numeric-cast.rs:284:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected f64, found i16 @@ -781,7 +781,7 @@ LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:286:16 + --> $DIR/numeric-cast.rs:286:16: in fn main | LL | foo::(x_i8); | ^^^^ expected f64, found i8 @@ -791,7 +791,7 @@ LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:289:16 + --> $DIR/numeric-cast.rs:289:16: in fn main | LL | foo::(x_f32); | ^^^^^ expected f64, found f32 @@ -801,25 +801,25 @@ LL | foo::(x_f32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:292:16 + --> $DIR/numeric-cast.rs:292:16: in fn main | LL | foo::(x_usize); | ^^^^^^^ expected f32, found usize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:294:16 + --> $DIR/numeric-cast.rs:294:16: in fn main | LL | foo::(x_u64); | ^^^^^ expected f32, found u64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:296:16 + --> $DIR/numeric-cast.rs:296:16: in fn main | LL | foo::(x_u32); | ^^^^^ expected f32, found u32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:298:16 + --> $DIR/numeric-cast.rs:298:16: in fn main | LL | foo::(x_u16); | ^^^^^ expected f32, found u16 @@ -829,7 +829,7 @@ LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:300:16 + --> $DIR/numeric-cast.rs:300:16: in fn main | LL | foo::(x_u8); | ^^^^ expected f32, found u8 @@ -839,25 +839,25 @@ LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:302:16 + --> $DIR/numeric-cast.rs:302:16: in fn main | LL | foo::(x_isize); | ^^^^^^^ expected f32, found isize error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:304:16 + --> $DIR/numeric-cast.rs:304:16: in fn main | LL | foo::(x_i64); | ^^^^^ expected f32, found i64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:306:16 + --> $DIR/numeric-cast.rs:306:16: in fn main | LL | foo::(x_i32); | ^^^^^ expected f32, found i32 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:308:16 + --> $DIR/numeric-cast.rs:308:16: in fn main | LL | foo::(x_i16); | ^^^^^ expected f32, found i16 @@ -867,7 +867,7 @@ LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:310:16 + --> $DIR/numeric-cast.rs:310:16: in fn main | LL | foo::(x_i8); | ^^^^ expected f32, found i8 @@ -877,13 +877,13 @@ LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:312:16 + --> $DIR/numeric-cast.rs:312:16: in fn main | LL | foo::(x_f64); | ^^^^^ expected f32, found f64 error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:316:16 + --> $DIR/numeric-cast.rs:316:16: in fn main | LL | foo::(x_u8 as u16); | ^^^^^^^^^^^ expected u32, found u16 @@ -893,7 +893,7 @@ LL | foo::((x_u8 as u16).into()); | ^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:318:16 + --> $DIR/numeric-cast.rs:318:16: in fn main | LL | foo::(-x_i8); | ^^^^^ expected i32, found i8 diff --git a/src/test/ui/suggestions/removing-extern-crate.stderr b/src/test/ui/suggestions/removing-extern-crate.stderr index 317703d0caa52..e8fe484ec1bbd 100644 --- a/src/test/ui/suggestions/removing-extern-crate.stderr +++ b/src/test/ui/suggestions/removing-extern-crate.stderr @@ -18,13 +18,13 @@ LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ help: remove it warning: `extern crate` is unnecessary in the new edition - --> $DIR/removing-extern-crate.rs:23:5 + --> $DIR/removing-extern-crate.rs:23:5: in mod another | LL | extern crate std as foo; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `use`: `use std as foo;` warning: `extern crate` is unnecessary in the new edition - --> $DIR/removing-extern-crate.rs:24:5 + --> $DIR/removing-extern-crate.rs:24:5: in mod another | LL | extern crate std; | ^^^^^^^^^^^^^^^^^ help: use `use`: `use std;` diff --git a/src/test/ui/suggestions/return-type.stderr b/src/test/ui/suggestions/return-type.stderr index 7d7653eee28fd..c7da8e206788f 100644 --- a/src/test/ui/suggestions/return-type.stderr +++ b/src/test/ui/suggestions/return-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/return-type.rs:20:5 + --> $DIR/return-type.rs:20:5: in fn bar | LL | foo(4 as usize) | ^^^^^^^^^^^^^^^ expected (), found struct `S` diff --git a/src/test/ui/suggestions/str-array-assignment.stderr b/src/test/ui/suggestions/str-array-assignment.stderr index 76db882742a01..ac22f43c207dc 100644 --- a/src/test/ui/suggestions/str-array-assignment.stderr +++ b/src/test/ui/suggestions/str-array-assignment.stderr @@ -1,5 +1,5 @@ error[E0308]: if and else have incompatible types - --> $DIR/str-array-assignment.rs:13:11 + --> $DIR/str-array-assignment.rs:13:11: in fn main | LL | let t = if true { s[..2] } else { s }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found &str @@ -8,7 +8,7 @@ LL | let t = if true { s[..2] } else { s }; found type `&str` error[E0308]: mismatched types - --> $DIR/str-array-assignment.rs:15:27 + --> $DIR/str-array-assignment.rs:15:27: in fn main | LL | fn main() { | - expected `()` because of default return type @@ -20,7 +20,7 @@ LL | let u: &str = if true { s[..2] } else { s }; found type `str` error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/str-array-assignment.rs:17:7 + --> $DIR/str-array-assignment.rs:17:7: in fn main | LL | let v = s[..2]; | ^ ------ help: consider borrowing here: `&s[..2]` @@ -31,7 +31,7 @@ LL | let v = s[..2]; = note: all local variables must have a statically known size error[E0308]: mismatched types - --> $DIR/str-array-assignment.rs:19:17 + --> $DIR/str-array-assignment.rs:19:17: in fn main | LL | let w: &str = s[..2]; | ^^^^^^ diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index cb352361f33ef..4934d750264d4 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope - --> $DIR/suggest-methods.rs:28:7 + --> $DIR/suggest-methods.rs:28:7: in fn main | LL | struct Foo; | ----------- method `bat` not found for this @@ -10,7 +10,7 @@ LL | f.bat(1.0); //~ ERROR no method named = help: did you mean `bar`? error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope - --> $DIR/suggest-methods.rs:31:15 + --> $DIR/suggest-methods.rs:31:15: in fn main | LL | let _ = s.is_emtpy(); //~ ERROR no method named | ^^^^^^^^ @@ -18,7 +18,7 @@ LL | let _ = s.is_emtpy(); //~ ERROR no method named = help: did you mean `is_empty`? error[E0599]: no method named `count_eos` found for type `u32` in the current scope - --> $DIR/suggest-methods.rs:35:19 + --> $DIR/suggest-methods.rs:35:19: in fn main | LL | let _ = 63u32.count_eos(); //~ ERROR no method named | ^^^^^^^^^ @@ -26,7 +26,7 @@ LL | let _ = 63u32.count_eos(); //~ ERROR no method named = help: did you mean `count_zeros`? error[E0599]: no method named `count_o` found for type `u32` in the current scope - --> $DIR/suggest-methods.rs:38:19 + --> $DIR/suggest-methods.rs:38:19: in fn main | LL | let _ = 63u32.count_o(); //~ ERROR no method named | ^^^^^^^ diff --git a/src/test/ui/suggestions/try-on-option.stderr b/src/test/ui/suggestions/try-on-option.stderr index 265ee593bb709..b121a7f1787f7 100644 --- a/src/test/ui/suggestions/try-on-option.stderr +++ b/src/test/ui/suggestions/try-on-option.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): std::convert::From` is not satisfied - --> $DIR/try-on-option.rs:17:5 + --> $DIR/try-on-option.rs:17:5: in fn foo | LL | x?; //~ the trait bound | ^^ the trait `std::convert::From` is not implemented for `()` @@ -7,7 +7,7 @@ LL | x?; //~ the trait bound = note: required by `std::convert::From::from` error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) - --> $DIR/try-on-option.rs:23:5 + --> $DIR/try-on-option.rs:23:5: in fn bar | LL | x?; //~ the `?` operator | ^^ cannot use the `?` operator in a function that returns `u32` diff --git a/src/test/ui/suggestions/try-operator-on-main.stderr b/src/test/ui/suggestions/try-operator-on-main.stderr index 121ae14f999c1..9a9fcff0c53d4 100644 --- a/src/test/ui/suggestions/try-operator-on-main.stderr +++ b/src/test/ui/suggestions/try-operator-on-main.stderr @@ -1,5 +1,5 @@ error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) - --> $DIR/try-operator-on-main.rs:19:5 + --> $DIR/try-operator-on-main.rs:19:5: in fn main | LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` @@ -8,7 +8,7 @@ LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only = note: required by `std::ops::Try::from_error` error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` - --> $DIR/try-operator-on-main.rs:22:5 + --> $DIR/try-operator-on-main.rs:22:5: in fn main | LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` @@ -17,7 +17,7 @@ LL | ()?; //~ ERROR the `?` operator can only = note: required by `std::ops::Try::into_result` error[E0277]: the trait bound `(): std::ops::Try` is not satisfied - --> $DIR/try-operator-on-main.rs:25:5 + --> $DIR/try-operator-on-main.rs:25:5: in fn main | LL | try_trait_generic::<()>(); //~ ERROR the trait bound | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()` @@ -29,7 +29,7 @@ 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 + --> $DIR/try-operator-on-main.rs:32:5: in fn try_trait_generic | LL | ()?; //~ ERROR the `?` operator can only | ^^^ the `?` operator cannot be applied to type `()` 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 3722d2a0e3ff8..b6812c6ddae06 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-initializer.stderr @@ -8,7 +8,7 @@ LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | while parsing the type for `x` error[E0061]: this function takes 1 parameter but 2 parameters were supplied - --> $DIR/type-ascription-instead-of-initializer.rs:12:12 + --> $DIR/type-ascription-instead-of-initializer.rs:12:12: in fn main | LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index 9db318735bdc0..73ac7666e3958 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/switched-expectations.rs:13:30 + --> $DIR/switched-expectations.rs:13:30: in fn main | LL | let ref string: String = var; //~ ERROR mismatched types [E0308] | ^^^ expected struct `std::string::String`, found i32 diff --git a/src/test/ui/trait-method-private.stderr b/src/test/ui/trait-method-private.stderr index 3a625ae25a460..a68fd925b291c 100644 --- a/src/test/ui/trait-method-private.stderr +++ b/src/test/ui/trait-method-private.stderr @@ -1,5 +1,5 @@ error[E0624]: method `method` is private - --> $DIR/trait-method-private.rs:29:9 + --> $DIR/trait-method-private.rs:29:9: in fn main | LL | foo.method(); //~ ERROR is private | ^^^^^^ diff --git a/src/test/ui/trait-safety-fn-body.stderr b/src/test/ui/trait-safety-fn-body.stderr index 432df43822278..f2a33bcdd2961 100644 --- a/src/test/ui/trait-safety-fn-body.stderr +++ b/src/test/ui/trait-safety-fn-body.stderr @@ -1,5 +1,5 @@ error[E0133]: dereference of raw pointer requires unsafe function or block - --> $DIR/trait-safety-fn-body.rs:21:9 + --> $DIR/trait-safety-fn-body.rs:21:9: in fn foo::foo | LL | *self += 1; | ^^^^^^^^^^ dereference of raw pointer diff --git a/src/test/ui/trait-suggest-where-clause.stderr b/src/test/ui/trait-suggest-where-clause.stderr index abd9f5a8b73f7..138425eff2b90 100644 --- a/src/test/ui/trait-suggest-where-clause.stderr +++ b/src/test/ui/trait-suggest-where-clause.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:17:5 + --> $DIR/trait-suggest-where-clause.rs:17:5: in fn check | LL | mem::size_of::(); | ^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time @@ -9,7 +9,7 @@ LL | mem::size_of::(); = note: required by `std::mem::size_of` error[E0277]: the trait bound `U: std::marker::Sized` is not satisfied in `Misc` - --> $DIR/trait-suggest-where-clause.rs:20:5 + --> $DIR/trait-suggest-where-clause.rs:20:5: in fn check | LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `U` does not have a constant size known at compile-time @@ -20,7 +20,7 @@ LL | mem::size_of::>(); = note: required by `std::mem::size_of` error[E0277]: the trait bound `u64: std::convert::From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:25:5 + --> $DIR/trait-suggest-where-clause.rs:25:5: in fn check | LL | >::from; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `u64` @@ -29,7 +29,7 @@ LL | >::from; = note: required by `std::convert::From::from` error[E0277]: the trait bound `u64: std::convert::From<::Item>` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:28:5 + --> $DIR/trait-suggest-where-clause.rs:28:5: in fn check | LL | ::Item>>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<::Item>` is not implemented for `u64` @@ -38,7 +38,7 @@ LL | ::Item>>::from; = note: required by `std::convert::From::from` error[E0277]: the trait bound `Misc<_>: std::convert::From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:33:5 + --> $DIR/trait-suggest-where-clause.rs:33:5: in fn check | LL | as From>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `Misc<_>` @@ -46,7 +46,7 @@ LL | as From>::from; = note: required by `std::convert::From::from` error[E0277]: the trait bound `[T]: std::marker::Sized` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:38:5 + --> $DIR/trait-suggest-where-clause.rs:38:5: in fn check | LL | mem::size_of::<[T]>(); | ^^^^^^^^^^^^^^^^^^^ `[T]` does not have a constant size known at compile-time @@ -55,7 +55,7 @@ LL | mem::size_of::<[T]>(); = note: required by `std::mem::size_of` error[E0277]: the trait bound `[&U]: std::marker::Sized` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:41:5 + --> $DIR/trait-suggest-where-clause.rs:41:5: in fn check | LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ `[&U]` does not have a constant size known at compile-time diff --git a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr index 46c86cd767a07..4919c7a6bbaee 100644 --- a/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr +++ b/src/test/ui/traits-multidispatch-convert-ambig-dest.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/traits-multidispatch-convert-ambig-dest.rs:36:5 + --> $DIR/traits-multidispatch-convert-ambig-dest.rs:36:5: in fn a | LL | test(22, std::default::Default::default()); | ^^^^ cannot infer type for `U` diff --git a/src/test/ui/transmute/main.stderr b/src/test/ui/transmute/main.stderr index 7f6ee749c4fd5..bf55339a4dbc0 100644 --- a/src/test/ui/transmute/main.stderr +++ b/src/test/ui/transmute/main.stderr @@ -1,5 +1,5 @@ error[E0512]: transmute called with types of different sizes - --> $DIR/main.rs:26:5 + --> $DIR/main.rs:26:5: in fn transmute_lifetime | LL | transmute(x) //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ @@ -8,7 +8,7 @@ LL | transmute(x) //~ ERROR transmute called with types of different sizes = note: target type: >::T (size can vary because of ::T) error[E0512]: transmute called with types of different sizes - --> $DIR/main.rs:30:17 + --> $DIR/main.rs:30:17: in fn sizes | LL | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ @@ -17,7 +17,7 @@ LL | let x: u8 = transmute(10u16); //~ ERROR transmute called with types of = note: target type: u8 (8 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/main.rs:34:17 + --> $DIR/main.rs:34:17: in fn ptrs | LL | let x: u8 = transmute("test"); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ @@ -26,7 +26,7 @@ LL | let x: u8 = transmute("test"); //~ ERROR transmute called with types of = note: target type: u8 (8 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/main.rs:39:18 + --> $DIR/main.rs:39:18: in fn vary | LL | let x: Foo = transmute(10); //~ ERROR transmute called with types of different sizes | ^^^^^^^^^ 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 1591b06f3ac5b..91297bbd57ec4 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,5 +1,5 @@ error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-from-fn-item-types-error.rs:14:13 + --> $DIR/transmute-from-fn-item-types-error.rs:14:13: in fn foo | LL | let i = mem::transmute(bar); | ^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | let i = mem::transmute(bar); = note: target type: i8 (8 bits) error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:18:13 + --> $DIR/transmute-from-fn-item-types-error.rs:18:13: in fn foo | LL | let p = mem::transmute(foo); | ^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | let p = mem::transmute(foo); = help: cast with `as` to a pointer instead error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:22:14 + --> $DIR/transmute-from-fn-item-types-error.rs:22:14: in fn foo | LL | let of = mem::transmute(main); | ^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | let of = mem::transmute(main); = help: cast with `as` to a pointer instead error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-from-fn-item-types-error.rs:31:5 + --> $DIR/transmute-from-fn-item-types-error.rs:31:5: in fn bar | LL | mem::transmute::<_, u8>(main); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | mem::transmute::<_, u8>(main); = note: target type: u8 (8 bits) error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:35:5 + --> $DIR/transmute-from-fn-item-types-error.rs:35:5: in fn bar | LL | mem::transmute::<_, *mut ()>(foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | mem::transmute::<_, *mut ()>(foo); = help: cast with `as` to a pointer instead error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:39:5 + --> $DIR/transmute-from-fn-item-types-error.rs:39:5: in fn bar | LL | mem::transmute::<_, fn()>(bar); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -57,7 +57,7 @@ LL | mem::transmute::<_, fn()>(bar); = help: cast with `as` to a pointer instead error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:48:5 + --> $DIR/transmute-from-fn-item-types-error.rs:48:5: in fn baz | LL | mem::transmute::<_, *mut ()>(Some(foo)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -67,7 +67,7 @@ LL | mem::transmute::<_, *mut ()>(Some(foo)); = help: cast with `as` to a pointer instead error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:52:5 + --> $DIR/transmute-from-fn-item-types-error.rs:52:5: in fn baz | LL | mem::transmute::<_, fn()>(Some(bar)); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -77,7 +77,7 @@ LL | mem::transmute::<_, fn()>(Some(bar)); = help: cast with `as` to a pointer instead error[E0591]: can't transmute zero-sized type - --> $DIR/transmute-from-fn-item-types-error.rs:56:5 + --> $DIR/transmute-from-fn-item-types-error.rs:56:5: in fn baz | LL | mem::transmute::<_, Option>(Some(baz)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/transmute/transmute-type-parameters.stderr b/src/test/ui/transmute/transmute-type-parameters.stderr index ab0bd8fe2d81f..801bc94cf6b97 100644 --- a/src/test/ui/transmute/transmute-type-parameters.stderr +++ b/src/test/ui/transmute/transmute-type-parameters.stderr @@ -1,5 +1,5 @@ error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:21:18 + --> $DIR/transmute-type-parameters.rs:21:18: in fn f | LL | let _: i32 = transmute(x); | ^^^^^^^^^ @@ -8,7 +8,7 @@ LL | let _: i32 = transmute(x); = note: target type: i32 (32 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:26:18 + --> $DIR/transmute-type-parameters.rs:26:18: in fn g | LL | let _: i32 = transmute(x); | ^^^^^^^^^ @@ -17,7 +17,7 @@ LL | let _: i32 = transmute(x); = note: target type: i32 (32 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:31:18 + --> $DIR/transmute-type-parameters.rs:31:18: in fn h | LL | let _: i32 = transmute(x); | ^^^^^^^^^ @@ -26,7 +26,7 @@ LL | let _: i32 = transmute(x); = note: target type: i32 (32 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:40:18 + --> $DIR/transmute-type-parameters.rs:40:18: in fn i | LL | let _: i32 = transmute(x); | ^^^^^^^^^ @@ -35,7 +35,7 @@ LL | let _: i32 = transmute(x); = note: target type: i32 (32 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:50:18 + --> $DIR/transmute-type-parameters.rs:50:18: in fn j | LL | let _: i32 = transmute(x); | ^^^^^^^^^ @@ -44,7 +44,7 @@ LL | let _: i32 = transmute(x); = note: target type: i32 (32 bits) error[E0512]: transmute called with types of different sizes - --> $DIR/transmute-type-parameters.rs:55:18 + --> $DIR/transmute-type-parameters.rs:55:18: in fn k | LL | let _: i32 = transmute(x); | ^^^^^^^^^ diff --git a/src/test/ui/trivial-bounds-inconsistent-copy-reborrow.stderr b/src/test/ui/trivial-bounds-inconsistent-copy-reborrow.stderr index bea2bb66857f2..73db6aa373757 100644 --- a/src/test/ui/trivial-bounds-inconsistent-copy-reborrow.stderr +++ b/src/test/ui/trivial-bounds-inconsistent-copy-reborrow.stderr @@ -1,5 +1,5 @@ error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:16:5 + --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:16:5: in fn reborrow_mut | LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- use `&'a mut &'a mut i32` here to make mutable @@ -7,7 +7,7 @@ LL | *t //~ ERROR | ^^ assignment into an immutable reference error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:20:6 + --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:20:6: in fn copy_reborrow_mut | LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- use `&'a mut &'a mut i32` here to make mutable diff --git a/src/test/ui/trivial-bounds-leak-copy.stderr b/src/test/ui/trivial-bounds-leak-copy.stderr index 3c3fcbf9b803c..11a429b80e56b 100644 --- a/src/test/ui/trivial-bounds-leak-copy.stderr +++ b/src/test/ui/trivial-bounds-leak-copy.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/trivial-bounds-leak-copy.rs:19:5 + --> $DIR/trivial-bounds-leak-copy.rs:19:5: in fn move_out_string | LL | *t //~ ERROR | ^^ cannot move out of borrowed content diff --git a/src/test/ui/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds-leak.stderr index df91ba0dd2ac5..d1a78c97ecbdb 100644 --- a/src/test/ui/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds-leak.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/trivial-bounds-leak.rs:22:25 + --> $DIR/trivial-bounds-leak.rs:22:25: in fn cant_return_str | LL | fn cant_return_str() -> str { //~ ERROR | ^^^ `str` does not have a constant size known at compile-time @@ -8,7 +8,7 @@ LL | fn cant_return_str() -> str { //~ ERROR = note: the return type of a function must have a statically known size error[E0599]: no method named `test` found for type `i32` in the current scope - --> $DIR/trivial-bounds-leak.rs:34:10 + --> $DIR/trivial-bounds-leak.rs:34:10: in fn foo | LL | 3i32.test(); //~ ERROR | ^^^^ @@ -18,19 +18,19 @@ LL | 3i32.test(); //~ ERROR candidate #1: `Foo` error[E0277]: the trait bound `i32: Foo` is not satisfied - --> $DIR/trivial-bounds-leak.rs:35:5 + --> $DIR/trivial-bounds-leak.rs:35:5: in fn foo | LL | Foo::test(&4i32); //~ ERROR | ^^^^^^^^^ the trait `Foo` is not implemented for `i32` | note: required by `Foo::test` - --> $DIR/trivial-bounds-leak.rs:15:5 + --> $DIR/trivial-bounds-leak.rs:15:5: in trait Foo | LL | fn test(&self); | ^^^^^^^^^^^^^^^ error[E0277]: the trait bound `i32: Foo` is not satisfied - --> $DIR/trivial-bounds-leak.rs:36:5 + --> $DIR/trivial-bounds-leak.rs:36:5: in fn foo | LL | generic_function(5i32); //~ ERROR | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` diff --git a/src/test/ui/type-annotation-needed.stderr b/src/test/ui/type-annotation-needed.stderr index d48891596df2e..6cc75ced90f0c 100644 --- a/src/test/ui/type-annotation-needed.stderr +++ b/src/test/ui/type-annotation-needed.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations required: cannot resolve `_: std::convert::Into` - --> $DIR/type-annotation-needed.rs:15:5 + --> $DIR/type-annotation-needed.rs:15:5: in fn main | LL | foo(42); | ^^^ diff --git a/src/test/ui/type-check-defaults.stderr b/src/test/ui/type-check-defaults.stderr index a2d6e53df0502..c336d390fe64c 100644 --- a/src/test/ui/type-check-defaults.stderr +++ b/src/test/ui/type-check-defaults.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `i32: std::iter::FromIterator` is not satisfied - --> $DIR/type-check-defaults.rs:16:19 + --> $DIR/type-check-defaults.rs:16:19: in struct WellFormed | LL | struct WellFormed>(Z); | ^ a collection of type `i32` cannot be built from an iterator over elements of type `i32` @@ -12,7 +12,7 @@ LL | struct Foo>(T, U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `i32: std::iter::FromIterator` is not satisfied - --> $DIR/type-check-defaults.rs:18:27 + --> $DIR/type-check-defaults.rs:18:27: in struct WellFormedNoBounds | LL | struct WellFormedNoBounds>(Z); | ^ a collection of type `i32` cannot be built from an iterator over elements of type `i32` diff --git a/src/test/ui/type-check/assignment-in-if.stderr b/src/test/ui/type-check/assignment-in-if.stderr index 7f3ce0d2a5fea..7c32a34667ee0 100644 --- a/src/test/ui/type-check/assignment-in-if.stderr +++ b/src/test/ui/type-check/assignment-in-if.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/assignment-in-if.rs:25:8 + --> $DIR/assignment-in-if.rs:25:8: in fn main | LL | if x = x { | ^^^^^ @@ -11,7 +11,7 @@ LL | if x = x { found type `()` error[E0308]: mismatched types - --> $DIR/assignment-in-if.rs:30:8 + --> $DIR/assignment-in-if.rs:30:8: in fn main | LL | if (x = x) { | ^^^^^^^ @@ -23,7 +23,7 @@ LL | if (x = x) { found type `()` error[E0308]: mismatched types - --> $DIR/assignment-in-if.rs:35:8 + --> $DIR/assignment-in-if.rs:35:8: in fn main | LL | if y = (Foo { foo: x }) { | ^^^^^^^^^^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | if y = (Foo { foo: x }) { found type `()` error[E0308]: mismatched types - --> $DIR/assignment-in-if.rs:40:8 + --> $DIR/assignment-in-if.rs:40:8: in fn main | LL | if 3 = x { | ^^^^^ @@ -47,7 +47,7 @@ LL | if 3 = x { found type `()` error[E0308]: mismatched types - --> $DIR/assignment-in-if.rs:44:8 + --> $DIR/assignment-in-if.rs:44:8: in fn main | LL | if (if true { x = 4 } else { x = 5 }) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found () 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 90191ae67451f..977377f479b18 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,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot_infer_local_or_array.rs:12:13 + --> $DIR/cannot_infer_local_or_array.rs:12:13: in fn main | LL | let x = []; //~ ERROR type annotations needed | - ^^ cannot infer type for `_` 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 e58a5b67c196e..d5936d7362abd 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,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot_infer_local_or_vec.rs:12:13 + --> $DIR/cannot_infer_local_or_vec.rs:12:13: in fn main | LL | let x = vec![]; | - ^^^^^^ cannot infer type for `T` 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 d7887216bc910..d006aac9af3f5 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,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:12:18 + --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:12:18: in fn main | LL | let (x, ) = (vec![], ); | ----- ^^^^^^ cannot infer type for `T` diff --git a/src/test/ui/type-check/issue-22897.stderr b/src/test/ui/type-check/issue-22897.stderr index e2374809dd6b0..06932814260b8 100644 --- a/src/test/ui/type-check/issue-22897.stderr +++ b/src/test/ui/type-check/issue-22897.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-22897.rs:14:5 + --> $DIR/issue-22897.rs:14:5: in fn unconstrained_type | LL | []; //~ ERROR type annotations needed | ^^ cannot infer type for `[_; 0]` diff --git a/src/test/ui/type-check/issue-41314.stderr b/src/test/ui/type-check/issue-41314.stderr index f7d4bb9a02f45..df2c1add858ee 100644 --- a/src/test/ui/type-check/issue-41314.stderr +++ b/src/test/ui/type-check/issue-41314.stderr @@ -1,11 +1,11 @@ error[E0026]: variant `X::Y` does not have a field named `number` - --> $DIR/issue-41314.rs:17:16 + --> $DIR/issue-41314.rs:17:16: in fn main | LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^ variant `X::Y` does not have this field error[E0027]: pattern does not mention field `0` - --> $DIR/issue-41314.rs:17:9 + --> $DIR/issue-41314.rs:17:9: in fn main | LL | X::Y { number } => {} //~ ERROR does not have a field named `number` | ^^^^^^^^^^^^^^^ missing field `0` diff --git a/src/test/ui/type-check/missing_trait_impl.stderr b/src/test/ui/type-check/missing_trait_impl.stderr index 4b01a626814e5..e5309165be79c 100644 --- a/src/test/ui/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type-check/missing_trait_impl.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `+` cannot be applied to type `T` - --> $DIR/missing_trait_impl.rs:15:13 + --> $DIR/missing_trait_impl.rs:15:13: in fn foo | LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` | ^^^^^ @@ -7,7 +7,7 @@ LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type = note: `T` might need a bound for `std::ops::Add` error[E0368]: binary assignment operation `+=` cannot be applied to type `T` - --> $DIR/missing_trait_impl.rs:19:5 + --> $DIR/missing_trait_impl.rs:19:5: in fn bar | LL | x += x; //~ ERROR binary assignment operation `+=` cannot be applied to type `T` | -^^^^^ 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 25283f5e76b1b..714d3bd4ca461 100644 --- a/src/test/ui/type-check/unknown_type_for_closure.stderr +++ b/src/test/ui/type-check/unknown_type_for_closure.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/unknown_type_for_closure.rs:12:14 + --> $DIR/unknown_type_for_closure.rs:12:14: in fn main | LL | let x = |_| { }; //~ ERROR type annotations needed | ^ consider giving this closure parameter a type diff --git a/src/test/ui/type-dependent-def-issue-49241.stderr b/src/test/ui/type-dependent-def-issue-49241.stderr index f00edccae5d50..d824aad231ea1 100644 --- a/src/test/ui/type-dependent-def-issue-49241.stderr +++ b/src/test/ui/type-dependent-def-issue-49241.stderr @@ -7,7 +7,7 @@ LL | const l: usize = v.count(); //~ ERROR can't capture dynamic environment = help: use the `|| { ... }` closure form instead error[E0080]: constant evaluation error - --> $DIR/type-dependent-def-issue-49241.rs:14:18 + --> $DIR/type-dependent-def-issue-49241.rs:14:18: in fn main | LL | let s: [u32; l] = v.into_iter().collect(); //~ ERROR constant evaluation error | ^ encountered constants with type errors, stopping evaluation diff --git a/src/test/ui/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck-builtin-bound-type-parameters.stderr index 221f05b915090..50792d4aee085 100644 --- a/src/test/ui/typeck-builtin-bound-type-parameters.stderr +++ b/src/test/ui/typeck-builtin-bound-type-parameters.stderr @@ -1,35 +1,35 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 - --> $DIR/typeck-builtin-bound-type-parameters.rs:11:11 + --> $DIR/typeck-builtin-bound-type-parameters.rs:11:11: in fn foo1 | 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 + --> $DIR/typeck-builtin-bound-type-parameters.rs:14:14: in trait Trait | 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 + --> $DIR/typeck-builtin-bound-type-parameters.rs:17:21: in 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 + --> $DIR/typeck-builtin-bound-type-parameters.rs:20:25: in struct MyStruct2 | 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 + --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15: in fn foo2 | 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 + --> $DIR/typeck-builtin-bound-type-parameters.rs:24:15: in fn foo2 | LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^^^^^^^^ expected no type arguments diff --git a/src/test/ui/typeck_type_placeholder_item.stderr b/src/test/ui/typeck_type_placeholder_item.stderr index 3f814085955f7..98498338ab470 100644 --- a/src/test/ui/typeck_type_placeholder_item.stderr +++ b/src/test/ui/typeck_type_placeholder_item.stderr @@ -1,17 +1,17 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures - --> $DIR/typeck_type_placeholder_item.rs:14:14 + --> $DIR/typeck_type_placeholder_item.rs:14:14: in fn test | 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 + --> $DIR/typeck_type_placeholder_item.rs:17:16: in fn test2 | 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 + --> $DIR/typeck_type_placeholder_item.rs:17:19: in fn test2 | LL | fn test2() -> (_, _) { (5, 5) } | ^ not allowed in type signatures @@ -41,163 +41,163 @@ 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 + --> $DIR/typeck_type_placeholder_item.rs:31:13: in 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 + --> $DIR/typeck_type_placeholder_item.rs:34:13: in fn test7 | 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 + --> $DIR/typeck_type_placeholder_item.rs:37:22: in fn test8 | 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 + --> $DIR/typeck_type_placeholder_item.rs:59:8: in struct Test10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:61:9: in struct Test10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:61:12: in struct Test10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:67:21: in fn main::fn_test | 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 + --> $DIR/typeck_type_placeholder_item.rs:70:23: in fn main::fn_test2 | 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 + --> $DIR/typeck_type_placeholder_item.rs:70:26: in fn main::fn_test2 | 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 + --> $DIR/typeck_type_placeholder_item.rs:74:22: in fn main | 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 + --> $DIR/typeck_type_placeholder_item.rs:77:22: in fn main | 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 + --> $DIR/typeck_type_placeholder_item.rs:80:23: in fn main | 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 + --> $DIR/typeck_type_placeholder_item.rs:80:26: in fn main | 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 + --> $DIR/typeck_type_placeholder_item.rs:84:20: in fn main::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 + --> $DIR/typeck_type_placeholder_item.rs:87:20: in fn main::fn_test7 | 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 + --> $DIR/typeck_type_placeholder_item.rs:90:29: in fn main::fn_test8 | 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 + --> $DIR/typeck_type_placeholder_item.rs:112:12: in struct main::FnTest10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:114:13: in struct main::FnTest10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:114:16: in struct main::FnTest10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:43:24: in fn test9::test9 | 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 + --> $DIR/typeck_type_placeholder_item.rs:46:27: in fn test10::test10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:51:24: in fn clone::clone | 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 + --> $DIR/typeck_type_placeholder_item.rs:54:37: in fn clone_from::clone_from | 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 + --> $DIR/typeck_type_placeholder_item.rs:96:31: in fn main::fn_test9::fn_test9 | 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 + --> $DIR/typeck_type_placeholder_item.rs:99:34: in fn main::fn_test10::fn_test10 | 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 + --> $DIR/typeck_type_placeholder_item.rs:104:28: in fn main::clone::clone | 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 + --> $DIR/typeck_type_placeholder_item.rs:107:41: in fn main::clone_from::clone_from | LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } | ^ not allowed in type signatures diff --git a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr index fe9566b318156..24d3f19bb5df7 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_1.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_1.stderr @@ -1,5 +1,5 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 - --> $DIR/typeck_type_placeholder_lifetime_1.rs:19:12 + --> $DIR/typeck_type_placeholder_lifetime_1.rs:19:12: in fn main | LL | let c: Foo<_, _> = Foo { r: &5 }; | ^^^^^^^^^ expected 1 type argument diff --git a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr index 64ec424546666..4a4b1a9d3c721 100644 --- a/src/test/ui/typeck_type_placeholder_lifetime_2.stderr +++ b/src/test/ui/typeck_type_placeholder_lifetime_2.stderr @@ -1,5 +1,5 @@ error[E0244]: wrong number of type arguments: expected 1, found 2 - --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:12 + --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:12: in fn main | LL | let c: Foo<_, usize> = Foo { r: &5 }; | ^^^^^^^^^^^^^ expected 1 type argument diff --git a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr index 0c0c339286ec1..ca826ea00e088 100644 --- a/src/test/ui/unboxed-closure-no-cyclic-sig.stderr +++ b/src/test/ui/unboxed-closure-no-cyclic-sig.stderr @@ -1,5 +1,5 @@ error[E0644]: closure/generator type that references itself - --> $DIR/unboxed-closure-no-cyclic-sig.rs:18:7 + --> $DIR/unboxed-closure-no-cyclic-sig.rs:18:7: in fn main | LL | g(|_| { }); //~ ERROR closure/generator type that references itself | ^^^^^^^^ cyclic type of infinite size diff --git a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr index 82ba4e66393de..4d680b8807f89 100644 --- a/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr +++ b/src/test/ui/unboxed-closure-sugar-wrong-trait.stderr @@ -1,11 +1,11 @@ error[E0244]: wrong number of type arguments: expected 0, found 1 - --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:8 + --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:8: in fn 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 + --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:24: in fn f | LL | fn f isize>(x: F) {} | ^^^^^ associated type `Output` not found 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 0062ea77c0b54..2a02bccdcca3b 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,5 +1,5 @@ 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 + --> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:24:13: in fn main | LL | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait | ^^^^^^^^-^^^ diff --git a/src/test/ui/unconstrained-none.stderr b/src/test/ui/unconstrained-none.stderr index 34d524abed9ed..5db4ff7b35248 100644 --- a/src/test/ui/unconstrained-none.stderr +++ b/src/test/ui/unconstrained-none.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/unconstrained-none.rs:14:5 + --> $DIR/unconstrained-none.rs:14:5: in fn main | LL | None; //~ ERROR type annotations needed [E0282] | ^^^^ cannot infer type for `T` diff --git a/src/test/ui/unconstrained-ref.stderr b/src/test/ui/unconstrained-ref.stderr index 1fddf4531199e..5c3a7b31e04f5 100644 --- a/src/test/ui/unconstrained-ref.stderr +++ b/src/test/ui/unconstrained-ref.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/unconstrained-ref.rs:16:5 + --> $DIR/unconstrained-ref.rs:16:5: in fn main | LL | S { o: &None }; //~ ERROR type annotations needed [E0282] | ^ cannot infer type for `T` diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr index 1017217828a7b..ac5f086799ca6 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr @@ -1,11 +1,11 @@ error[E0106]: missing lifetime specifier - --> $DIR/dyn-trait-underscore-in-struct.rs:19:24 + --> $DIR/dyn-trait-underscore-in-struct.rs:19:24: in struct Foo | LL | x: Box, //~ ERROR missing lifetime specifier | ^^ expected lifetime parameter error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound - --> $DIR/dyn-trait-underscore-in-struct.rs:19:12 + --> $DIR/dyn-trait-underscore-in-struct.rs:19:12: in struct Foo | LL | x: Box, //~ ERROR missing lifetime specifier | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index 98249d3f2b567..23646a3935afc 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -1,5 +1,5 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements - --> $DIR/dyn-trait-underscore.rs:18:20 + --> $DIR/dyn-trait-underscore.rs:18:20: in fn a | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^ @@ -13,7 +13,7 @@ LL | | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime LL | | } | |_^ note: ...so that reference does not outlive borrowed content - --> $DIR/dyn-trait-underscore.rs:18:14 + --> $DIR/dyn-trait-underscore.rs:18:14: in fn a | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^ diff --git a/src/test/ui/unevaluated_fixed_size_array_len.stderr b/src/test/ui/unevaluated_fixed_size_array_len.stderr index 6e959da99397b..7e49431af921a 100644 --- a/src/test/ui/unevaluated_fixed_size_array_len.stderr +++ b/src/test/ui/unevaluated_fixed_size_array_len.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `[(); 0]: Foo` is not satisfied - --> $DIR/unevaluated_fixed_size_array_len.rs:22:5 + --> $DIR/unevaluated_fixed_size_array_len.rs:22:5: in fn main | LL | <[(); 0] as Foo>::foo() //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `[(); 0]` @@ -7,7 +7,7 @@ LL | <[(); 0] as Foo>::foo() //~ ERROR E0277 = help: the following implementations were found: <[(); 1] as Foo> note: required by `Foo::foo` - --> $DIR/unevaluated_fixed_size_array_len.rs:14:5 + --> $DIR/unevaluated_fixed_size_array_len.rs:14:5: in trait Foo | LL | fn foo(); | ^^^^^^^^^ diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index 02fa0ca6f8310..1af5e9b9dc88c 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied - --> $DIR/union-derive-eq.rs:25:5 + --> $DIR/union-derive-eq.rs:25:5: in union U2 | LL | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` diff --git a/src/test/ui/union/union-fields-1.stderr b/src/test/ui/union/union-fields-1.stderr index e337ea9d7eeac..660a27aeffb73 100644 --- a/src/test/ui/union/union-fields-1.stderr +++ b/src/test/ui/union/union-fields-1.stderr @@ -1,5 +1,5 @@ error: field is never used: `c` - --> $DIR/union-fields-1.rs:16:5 + --> $DIR/union-fields-1.rs:16:5: in union U1 | LL | c: u8, //~ ERROR field is never used | ^^^^^ @@ -11,19 +11,19 @@ LL | #![deny(dead_code)] | ^^^^^^^^^ error: field is never used: `a` - --> $DIR/union-fields-1.rs:19:5 + --> $DIR/union-fields-1.rs:19:5: in union U2 | LL | a: u8, //~ ERROR field is never used | ^^^^^ error: field is never used: `a` - --> $DIR/union-fields-1.rs:23:20 + --> $DIR/union-fields-1.rs:23:20: in union NoDropLike | LL | union NoDropLike { a: u8 } //~ ERROR field is never used | ^^^^^ error: field is never used: `c` - --> $DIR/union-fields-1.rs:28:5 + --> $DIR/union-fields-1.rs:28:5: in union U | LL | c: u8, //~ ERROR field is never used | ^^^^^ diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index cfb5bc7520b59..00a98549c71e4 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -1,17 +1,17 @@ error: union expressions should have exactly one field - --> $DIR/union-fields-2.rs:17:13 + --> $DIR/union-fields-2.rs:17:13: in fn main | 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 + --> $DIR/union-fields-2.rs:19:13: in fn main | 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 + --> $DIR/union-fields-2.rs:20:29: in fn main | LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^ `U` does not have this field @@ -19,61 +19,61 @@ LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have = note: available fields are: `a`, `b` error: union expressions should have exactly one field - --> $DIR/union-fields-2.rs:20:13 + --> $DIR/union-fields-2.rs:20:13: in fn main | 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 + --> $DIR/union-fields-2.rs:22:13: in fn main | 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 + --> $DIR/union-fields-2.rs:22:19: in fn main | 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 + --> $DIR/union-fields-2.rs:25:9: in fn main | 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 + --> $DIR/union-fields-2.rs:27:9: in fn main | 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 + --> $DIR/union-fields-2.rs:28:19: in fn main | LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^ union `U` does not have this field error: union patterns should have exactly one field - --> $DIR/union-fields-2.rs:28:9 + --> $DIR/union-fields-2.rs:28:9: in fn main | 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 + --> $DIR/union-fields-2.rs:30:9: in fn main | 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 + --> $DIR/union-fields-2.rs:30:9: in fn main | 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 + --> $DIR/union-fields-2.rs:32:9: in fn main | LL | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns | ^^^^^^^^^^^ diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index ba80af6c7e037..885ed9b262bff 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied - --> $DIR/union-sized-field.rs:14:5 + --> $DIR/union-sized-field.rs:14:5: in union Foo | 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 @@ -9,7 +9,7 @@ LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not sati = note: no field of a union may have a dynamically sized type error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied - --> $DIR/union-sized-field.rs:18:5 + --> $DIR/union-sized-field.rs:18:5: in struct Foo2 | 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 @@ -19,7 +19,7 @@ LL | value: T, //~ ERROR the trait bound `T: std::marker::Sized` is not sati = note: only the last field of a struct may have a dynamically sized type error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied - --> $DIR/union-sized-field.rs:23:11 + --> $DIR/union-sized-field.rs:23:11: in enum Foo3 | 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 diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index 631aacb0289f0..67731aa97cd9e 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -1,17 +1,17 @@ error[E0560]: union `U` has no field named `principle` - --> $DIR/union-suggest-field.rs:20:17 + --> $DIR/union-suggest-field.rs:20:17: in fn main | 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 + --> $DIR/union-suggest-field.rs:22:15: in fn main | 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 + --> $DIR/union-suggest-field.rs:25:15: in fn main | LL | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` | ^^^^^^^^^ diff --git a/src/test/ui/unsized-enum2.stderr b/src/test/ui/unsized-enum2.stderr index 0e18efbf9da3e..bc526800128c4 100644 --- a/src/test/ui/unsized-enum2.stderr +++ b/src/test/ui/unsized-enum2.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `W: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:33:8 + --> $DIR/unsized-enum2.rs:33:8: in enum E | LL | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied | ^ `W` does not have a constant size known at compile-time @@ -9,7 +9,7 @@ LL | VA(W), //~ ERROR `W: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `X: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:34:8 + --> $DIR/unsized-enum2.rs:34:8: in enum E | LL | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied | ^^^^ `X` does not have a constant size known at compile-time @@ -19,7 +19,7 @@ LL | VB{x: X}, //~ ERROR `X: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `Y: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:35:15 + --> $DIR/unsized-enum2.rs:35:15: in enum E | LL | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied | ^ `Y` does not have a constant size known at compile-time @@ -29,7 +29,7 @@ LL | VC(isize, Y), //~ ERROR `Y: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `Z: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:36:18 + --> $DIR/unsized-enum2.rs:36:18: in enum E | 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 @@ -39,7 +39,7 @@ LL | VD{u: isize, x: Z}, //~ ERROR `Z: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:39:8 + --> $DIR/unsized-enum2.rs:39:8: in enum E | LL | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied | ^^^^ `[u8]` does not have a constant size known at compile-time @@ -48,7 +48,7 @@ LL | VE([u8]), //~ ERROR `[u8]: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:40:8 + --> $DIR/unsized-enum2.rs:40:8: in enum E | LL | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied | ^^^^^^ `str` does not have a constant size known at compile-time @@ -57,7 +57,7 @@ LL | VF{x: str}, //~ ERROR `str: std::marker::Sized` is not satisfied = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[f32]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:41:15 + --> $DIR/unsized-enum2.rs:41:15: in enum E | LL | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfied | ^^^^^ `[f32]` does not have a constant size known at compile-time @@ -66,7 +66,7 @@ LL | VG(isize, [f32]), //~ ERROR `[f32]: std::marker::Sized` is not satisfie = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[u32]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:42:18 + --> $DIR/unsized-enum2.rs:42:18: in enum E | 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 @@ -75,7 +75,7 @@ LL | VH{u: isize, x: [u32]}, //~ ERROR `[u32]: std::marker::Sized` is not sa = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `Foo + 'static: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:51:8 + --> $DIR/unsized-enum2.rs:51:8: in enum E | LL | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfied | ^^^ `Foo + 'static` does not have a constant size known at compile-time @@ -84,7 +84,7 @@ LL | VM(Foo), //~ ERROR `Foo + 'static: std::marker::Sized` is not satisfie = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `Bar + 'static: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:52:8 + --> $DIR/unsized-enum2.rs:52:8: in enum E | 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 @@ -93,7 +93,7 @@ LL | VN{x: Bar}, //~ ERROR `Bar + 'static: std::marker::Sized` is not satisf = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `FooBar + 'static: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:53:15 + --> $DIR/unsized-enum2.rs:53:15: in enum E | 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 @@ -102,7 +102,7 @@ LL | VO(isize, FooBar), //~ ERROR `FooBar + 'static: std::marker::Sized` is = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `BarFoo + 'static: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:54:18 + --> $DIR/unsized-enum2.rs:54:18: in enum E | 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 @@ -111,7 +111,7 @@ LL | VP{u: isize, x: BarFoo}, //~ ERROR `BarFoo + 'static: std::marker::Size = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[i8]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:57:8 + --> $DIR/unsized-enum2.rs:57:8: in enum E | 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 @@ -120,7 +120,7 @@ LL | VQ(<&'static [i8] as Deref>::Target), //~ ERROR `[i8]: std::marker::Siz = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[char]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:58:8 + --> $DIR/unsized-enum2.rs:58:8: in enum E | LL | VR{x: <&'static [char] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[char]` does not have a constant size known at compile-time @@ -129,7 +129,7 @@ LL | VR{x: <&'static [char] as Deref>::Target}, = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[f64]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:60:15 + --> $DIR/unsized-enum2.rs:60:15: in enum E | LL | VS(isize, <&'static [f64] as Deref>::Target), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[f64]` does not have a constant size known at compile-time @@ -138,7 +138,7 @@ LL | VS(isize, <&'static [f64] as Deref>::Target), = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `[i32]: std::marker::Sized` is not satisfied - --> $DIR/unsized-enum2.rs:62:18 + --> $DIR/unsized-enum2.rs:62:18: in enum E | LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[i32]` does not have a constant size known at compile-time @@ -147,7 +147,7 @@ LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `PathHelper1 + 'static: std::marker::Sized` is not satisfied in `Path1` - --> $DIR/unsized-enum2.rs:45:8 + --> $DIR/unsized-enum2.rs:45:8: in enum E | LL | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not satisfied | ^^^^^ `PathHelper1 + 'static` does not have a constant size known at compile-time @@ -157,7 +157,7 @@ LL | VI(Path1), //~ ERROR `PathHelper1 + 'static: std::marker::Sized` is not = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `PathHelper2 + 'static: std::marker::Sized` is not satisfied in `Path2` - --> $DIR/unsized-enum2.rs:46:8 + --> $DIR/unsized-enum2.rs:46:8: in enum E | 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 @@ -167,7 +167,7 @@ LL | VJ{x: Path2}, //~ ERROR `PathHelper2 + 'static: std::marker::Sized` is = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `PathHelper3 + 'static: std::marker::Sized` is not satisfied in `Path3` - --> $DIR/unsized-enum2.rs:47:15 + --> $DIR/unsized-enum2.rs:47:15: in enum E | 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 @@ -177,7 +177,7 @@ LL | VK(isize, Path3), //~ ERROR `PathHelper3 + 'static: std::marker::Sized` = note: no field of an enum variant may have a dynamically sized type error[E0277]: the trait bound `PathHelper4 + 'static: std::marker::Sized` is not satisfied in `Path4` - --> $DIR/unsized-enum2.rs:48:18 + --> $DIR/unsized-enum2.rs:48:18: in enum E | 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 diff --git a/src/test/ui/variadic-ffi-3.stderr b/src/test/ui/variadic-ffi-3.stderr index c7355405b2acb..4092f3315d9bc 100644 --- a/src/test/ui/variadic-ffi-3.stderr +++ b/src/test/ui/variadic-ffi-3.stderr @@ -1,5 +1,5 @@ error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied - --> $DIR/variadic-ffi-3.rs:21:9 + --> $DIR/variadic-ffi-3.rs:21:9: in fn main | LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here @@ -8,7 +8,7 @@ LL | foo(); //~ ERROR: this function takes at least 2 parameters but 0 p | ^^^^^ 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 + --> $DIR/variadic-ffi-3.rs:22:9: in fn main | LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here @@ -17,7 +17,7 @@ LL | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 | ^^^^^^ expected at least 2 parameters error[E0308]: mismatched types - --> $DIR/variadic-ffi-3.rs:24:56 + --> $DIR/variadic-ffi-3.rs:24:56: in fn main | LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; | ^^^ expected non-variadic fn, found variadic function @@ -26,7 +26,7 @@ LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; found type `unsafe extern "C" fn(isize, u8, ...) {foo}` error[E0308]: mismatched types - --> $DIR/variadic-ffi-3.rs:29:54 + --> $DIR/variadic-ffi-3.rs:29:54: in fn main | LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; | ^^^ expected variadic fn, found non-variadic function @@ -35,37 +35,37 @@ LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; found type `extern "C" fn(isize, u8) {bar}` error[E0617]: can't pass `f32` to variadic function - --> $DIR/variadic-ffi-3.rs:34:19 + --> $DIR/variadic-ffi-3.rs:34:19: in fn main | 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 + --> $DIR/variadic-ffi-3.rs:35:19: in fn main | 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 + --> $DIR/variadic-ffi-3.rs:36:19: in fn main | 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 + --> $DIR/variadic-ffi-3.rs:37:19: in fn main | 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 + --> $DIR/variadic-ffi-3.rs:38:19: in fn main | 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 + --> $DIR/variadic-ffi-3.rs:39:19: in fn main | LL | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` diff --git a/src/test/ui/variance-unused-type-param.stderr b/src/test/ui/variance-unused-type-param.stderr index b3ae91a6fa580..e67b51360b2ca 100644 --- a/src/test/ui/variance-unused-type-param.stderr +++ b/src/test/ui/variance-unused-type-param.stderr @@ -1,5 +1,5 @@ error[E0392]: parameter `A` is never used - --> $DIR/variance-unused-type-param.rs:16:19 + --> $DIR/variance-unused-type-param.rs:16:19: in struct SomeStruct | LL | struct SomeStruct { x: u32 } | ^ unused type parameter @@ -7,7 +7,7 @@ LL | struct SomeStruct { x: u32 } = help: consider removing `A` or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `A` is never used - --> $DIR/variance-unused-type-param.rs:19:15 + --> $DIR/variance-unused-type-param.rs:19:15: in enum SomeEnum | LL | enum SomeEnum { Nothing } | ^ unused type parameter @@ -15,7 +15,7 @@ LL | enum SomeEnum { Nothing } = help: consider removing `A` or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `T` is never used - --> $DIR/variance-unused-type-param.rs:23:15 + --> $DIR/variance-unused-type-param.rs:23:15: in enum ListCell | LL | enum ListCell { | ^ unused type parameter diff --git a/src/test/ui/vector-no-ann.stderr b/src/test/ui/vector-no-ann.stderr index 90acc2f86d74c..2ed02714898d1 100644 --- a/src/test/ui/vector-no-ann.stderr +++ b/src/test/ui/vector-no-ann.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/vector-no-ann.rs:13:16 + --> $DIR/vector-no-ann.rs:13:16: in fn main | LL | let _foo = Vec::new(); | ---- ^^^^^^^^ cannot infer type for `T`